@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400..900&family=Noto+Serif+JP:wght@400..900&display=swap");

:root {
  color-scheme: dark;
  --bg: #070815;
  --panel: rgba(20, 24, 47, 0.82);
  --panel-solid: #14182f;
  --line: rgba(190, 199, 255, 0.17);
  --text: #eef0ff;
  --muted: #a7abc4;
  --accent: #aebcff;
  --accent-strong: #8398ff;
  --danger: #ff8d9b;
  --success: #8ee0bd;
  --warning: #f1ca81;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 18px;
  --font-serif: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --font-sans: "Noto Sans JP", system-ui, sans-serif;
  --weight-normal: 580;
  --weight-bold: 850;
  --reading-font-size: calc(1rem + 1px);
  font-family: var(--font-serif);
  font-weight: var(--weight-normal);
}

* { box-sizing: border-box; }
strong, b { font-weight: var(--weight-bold); }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--bg); }

/* PCではブラウザ100%のまま、参考画像に近い情報量で表示します。 */
@media (min-width: 900px) {
  html { font-size: 87.5%; }
}
/* スマホの会話・台本本文は、情報量を保てる共通サイズにします。 */
@media (max-width: 640px) {
  :root { --reading-font-size: 11.5px; }
}
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, rgba(113, 128, 219, 0.14), transparent 28rem),
    radial-gradient(circle at 85% 8%, rgba(116, 69, 178, 0.12), transparent 26rem),
    var(--bg);
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.46;
  background-image:
    radial-gradient(circle, #fff 0 1px, transparent 1.3px),
    radial-gradient(circle, #cad0ff 0 1px, transparent 1.2px);
  background-position: 0 0, 47px 73px;
  background-size: 137px 137px, 211px 211px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}
a { color: var(--accent); text-underline-offset: 0.2em; }
button, input, textarea, select { font: inherit; }
select {
  color-scheme: dark;
  color: var(--text);
  background-color: #090b1b;
}
select option,
select optgroup {
  color: #f4f5ff;
  background-color: #11152b;
}
select option:disabled { color: #969bb2; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(174, 188, 255, 0.55);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
  padding: 12px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 21, 0.78);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; text-decoration: none; }
.brand-mark { color: var(--accent); font-size: 1.35rem; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.user-name { max-width: 18ch; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: linear-gradient(135deg, #7288ee, #8d70d2); box-shadow: 0 10px 30px rgba(110, 125, 220, 0.24); }
.button-secondary { border-color: var(--line); background: var(--panel-solid); }
.button-ghost { border-color: var(--line); background: rgba(255, 255, 255, 0.04); }
.button-wide { width: 100%; border-radius: 12px; }
.button:disabled { cursor: not-allowed; filter: grayscale(0.7); opacity: 0.55; transform: none; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font: 700 0.72rem/1.2 var(--font-sans); letter-spacing: 0.18em; }
.notice { margin: 18px 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(131, 152, 255, 0.1); line-height: 1.65; }
.notice-warning { color: #ffe6b7; background: rgba(192, 133, 40, 0.12); border-color: rgba(241, 202, 129, 0.28); }
.notice-error { color: #ffd4d9; background: rgba(202, 66, 88, 0.12); border-color: rgba(255, 141, 155, 0.3); }
.status-chip { margin: 0; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font: 0.78rem/1.2 var(--font-sans); }
.empty-state { padding: 50px 20px; color: var(--muted); text-align: center; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; max-width: 960px; margin: 0 auto; padding: 30px 24px 50px; color: var(--muted); font-size: 0.85rem; }

@media (max-width: 640px) {
  .site-header { padding-inline: 16px; }
  .brand span:last-child { display: none; }
  .user-name { display: none; }
  .site-footer { flex-direction: column; }
  /* スマホのフルページ撮影で、背景の丸い光がページの高さに引き伸ばされて巨大な丸に見えるため、スマホでは使わない */
  body { background: var(--bg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
