/* ============================================================================
   style.css  — 100周年特設ページ 共通スタイル
   元 Streamlit アプリの配色・カード・ナビの意匠を静的サイト向けに移植。
   ============================================================================ */

:root {
  --bg-1: #edf3ff;
  --bg-2: #f7f0e4;
  --ink: #2f2945;
  --muted: #655d79;
  --line: rgba(110, 95, 170, 0.18);
  --card: rgba(255, 255, 255, 0.78);
  --accent: #7a67c7;
  --accent-2: #597bca;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  background:
    radial-gradient(circle at 8% 12%, rgba(122, 103, 199, 0.18), transparent 24%),
    radial-gradient(circle at 88% 10%, rgba(78, 123, 201, 0.18), transparent 26%),
    radial-gradient(circle at 50% 120%, rgba(207, 171, 98, 0.16), transparent 28%),
    linear-gradient(155deg, var(--bg-1), #e6def7 48%, var(--bg-2));
  background-attachment: fixed;
}

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1rem 1.1rem 6rem;
}

a {
  color: inherit;
}

/* --- 上部ナビ --- */
.top-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.2rem;
}
.top-nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(116, 101, 176, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: #403469;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(83, 70, 143, 0.08);
}
.top-nav-button.is-active {
  background: linear-gradient(145deg, rgba(122, 103, 199, 0.96), rgba(89, 123, 202, 0.95));
  color: #fff;
}

/* --- 見出し --- */
.section-title {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "MS PMincho", serif;
  font-size: 1.55rem;
  color: #3d3368;
  margin: 0.2rem 0 0.6rem;
}
.section-copy {
  color: var(--muted);
  margin-bottom: 1.2rem;
  line-height: 1.7;
}

/* --- カード --- */
.soft-card,
.entry-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(248, 246, 255, 0.74));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 12px 30px rgba(87, 74, 143, 0.08);
}
.entry-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.entry-title {
  font-weight: 700;
  color: #403469;
}
.entry-meta {
  font-size: 0.85rem;
  color: var(--muted);
}
.entry-body {
  white-space: pre-wrap;
  line-height: 1.8;
  color: #322a4c;
}
.reply {
  margin-left: 1.1rem;
  padding-left: 0.95rem;
  border-left: 3px solid rgba(122, 103, 199, 0.22);
}

.empty-note {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed rgba(122, 103, 199, 0.28);
  color: var(--muted);
}

/* --- フォーム --- */
label.field {
  display: block;
  margin-bottom: 1rem;
}
label.field > span {
  display: block;
  font-weight: 600;
  color: #47397d;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}
input[type="text"],
input[type="password"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(116, 101, 176, 0.28);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 0.95rem;
  font-family: inherit;
}
textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(122, 103, 199, 0.35);
  border-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(116, 101, 176, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: #403469;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: linear-gradient(145deg, rgba(122, 103, 199, 0.96), rgba(89, 123, 202, 0.95));
  color: #fff;
  border-color: transparent;
}
.btn-danger {
  color: #a33;
  border-color: rgba(200, 80, 80, 0.4);
}
.btn-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.4rem 0 0.2rem;
}

/* --- メトリクス --- */
.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 1rem 0 1.4rem;
}
.metric {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  padding: 0.9rem 1rem;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(87, 74, 143, 0.08);
}
.metric .metric-label {
  font-size: 0.8rem;
  color: var(--muted);
}
.metric .metric-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: #3f3468;
}

/* --- 添付 --- */
.attachment {
  margin: 0.4rem 0 0.2rem;
}
.attachment summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.9rem;
}
.attachment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.attachment-summary .attachment-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-fullscreen-btn {
  flex: none;
  border: 1px solid rgba(116, 101, 176, 0.3);
  border-radius: 10px;
  padding: 0.3rem 0.75rem;
  background: rgba(255, 255, 255, 0.85);
  color: #47397d;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.attachment-fullscreen-btn:hover {
  background: #fff;
}

/* --- 全画面ビューア --- */
.fs-lock {
  overflow: hidden;
}
.fs-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  background: rgba(20, 17, 38, 0.96);
}
.fs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}
.fs-title {
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fs-close {
  flex: none;
  border: 0;
  border-radius: 10px;
  padding: 0.5rem 0.95rem;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
.fs-close:hover {
  background: rgba(255, 255, 255, 0.3);
}
.fs-stage {
  flex: 1;
  min-height: 0;
}
.fs-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.fs-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.attachment-body {
  margin-top: 0.6rem;
}
.attachment-body img {
  max-width: 100%;
  border-radius: 14px;
}
.attachment-body iframe {
  width: 100%;
  height: 640px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}
.attachment-links {
  margin-top: 0.5rem;
  font-size: 0.88rem;
}
.attachment-links a {
  color: var(--accent);
}

/* --- フローティング --- */
.floating-shortcut {
  position: fixed;
  bottom: 18px;
  z-index: 900;
}
.floating-shortcut.right {
  right: 18px;
}
.floating-shortcut a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(116, 101, 176, 0.22);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(241, 237, 252, 0.76));
  color: #403469;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(83, 70, 143, 0.14);
  backdrop-filter: blur(10px);
}

.logo-unlock-shell {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 900;
  width: clamp(54px, 7vw, 72px);
  height: clamp(54px, 7vw, 72px);
}
.logo-unlock-button {
  width: 100%;
  height: 100%;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.logo-unlock-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  opacity: 0.96;
  filter: drop-shadow(0 10px 18px rgba(83, 70, 143, 0.08));
}

/* --- トースト --- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  padding: 0.75rem 1.2rem;
  border-radius: 14px;
  background: rgba(36, 31, 58, 0.94);
  color: #fff;
  font-size: 0.9rem;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 16px 34px rgba(24, 22, 40, 0.3);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-error {
  background: rgba(150, 40, 40, 0.95);
}
.toast-success {
  background: rgba(46, 110, 80, 0.95);
}

/* --- タブ / セクション切替 --- */
.tab-row,
.section-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.tab-row .btn.is-active,
.section-switch .btn.is-active {
  background: linear-gradient(145deg, rgba(122, 103, 199, 0.96), rgba(89, 123, 202, 0.95));
  color: #fff;
  border-color: transparent;
}

.workspace-note {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(122, 103, 199, 0.28);
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.info-banner {
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: rgba(122, 103, 199, 0.1);
  border: 1px solid rgba(122, 103, 199, 0.25);
  color: #47397d;
  margin-bottom: 1rem;
}

.page-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* --- レスポンシブ --- */
@media (max-width: 820px) {
  .top-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-row {
    grid-template-columns: 1fr;
  }
  .section-title {
    font-size: 1.25rem;
  }
  .floating-shortcut.right {
    right: 12px;
    left: 12px;
  }
  .floating-shortcut a {
    width: 100%;
    min-width: 0;
  }
}
