*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --bg:         #F5F4F3;
    --bg-2:       #2F387A10;
    --bg-3:       #ede8e4;
    --bg-4:       #F5F4F390;
    --bg-sib:     #9f8ef010;
    --bg-tam:     #e6aeb310;
    --border:     rgba(0,0,0,0.08);
    --border-mid: rgba(110,9,9,0.14);
    --text:       #D09738;
    --text-muted: #A76436;
    --text-dim:   #C9A86B;
    --sib:        #262335;
    --sib-light:  #3d384f;
    --sib-dim:    #c0bdd0;
    --tam:        #B99498;
    --tam-light:  #9a6e73;
    --tam-dim:    #e8d4d6;
    --gold:       #8a6a3a;
    --gold-dim:   #d4c0a0;
    --serif:      'EB Garamond', serif;
    --sans:       'Google Sans', sans-serif;
    --jpn:        'LINE Seed JP', sans-serif;
    --display:    'Playfair Display', Georgia, serif;
    --mono:       'DM Mono', monospace;
    --vin1:       'UnifrakturMaguntia', cursive;
    --vin2:       'Pirata One', system-ui;
    color-scheme: light;
  }

  html { scroll-behavior: smooth; touch-action: pan-x pan-y; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.7;
    min-height: 100vh;
  }

  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, rgba(172,135,135,0.12) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
  }

  /* ── HEADER ── */
  .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.14s;
  }
  .back-btn:hover { color: var(--text); }

  .hero {
    position: relative;
    padding: 5rem 2rem 0;
    text-align: center;
    overflow: hidden;
  }
  .hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 60% 50% at 25% 60%, rgba(38,35,53,0.10) 0%, transparent 70%),
      radial-gradient(ellipse 60% 50% at 75% 40%, rgba(185,148,152,0.10) 0%, transparent 70%);
    pointer-events: none;
  }

  .world-tag {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
  }
  .ship-name {
    font-family: var(--vin2);
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    font-weight: 400;
    letter-spacing: 0.08em;
    line-height: 1;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-dim) 45%, var(--text-muted) 60%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
  }
  .ship-alt {
    font-family: var(--vin1);
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: 0.18em;
    margin-bottom: 1.5rem;
  }
  .ship-keys {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
  }
  .key-pill {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    padding: 4px 12px;
    border-radius: 99px;
    border: 0.5px solid;
    text-transform: uppercase;
  }
  .kp-neutral { border-color: var(--border-mid); color: var(--text-muted); }
  .kp-sib { border-color: var(--sib-dim); color: var(--sib); background: rgba(38,35,53,0.06); }
  .kp-tam { border-color: var(--tam-dim); color: var(--tam); background: rgba(185,148,152,0.06); }

  .divider-line {
    width: 120px;
    height: 0.5px;
    background: linear-gradient(to right, transparent, var(--gold-dim), transparent);
    margin: 0 auto;
  }

  /* ── LAYOUT ── */
  .container { max-width: 860px; margin: 0 auto; padding: 0 1.5rem 4rem; }
  hr.rule { border: none; border-top: 0.5px solid var(--border); margin: 2.5rem 0; }
  .sec-label {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 12px;
  }

  /* ── DUAL PANEL ── */
  .dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 0.5px solid var(--border-mid);
    border-radius: 12px;
    overflow: hidden;
    margin: 2rem 0;
  }
  .panel {
    padding: 1.75rem 1.5rem;
    position: relative;
    background-color: var(--bg-4);
    backdrop-filter: blur(10px);
  }
  .panel-sib { border-right: 0.5px solid var(--border-mid); }
  .panel-accent-sib::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, var(--sib-dim), var(--sib), transparent);
  }
  .panel-accent-tam::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, var(--tam-dim), var(--tam-light), transparent);
  }
  .char-name-big {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
  }
  .cn-sib { color: var(--sib-light); }
  .cn-tam { color: var(--tam-light); }
  .char-alias {
    font-family: var(--sans);
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.14em;
    margin-bottom: 12px;
  }
  .stat-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
  }
  .stat-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
    border-bottom: 0.5px solid var(--border);
    padding-bottom: 3px;
  }
  .stat-k { color: var(--text-dim); font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; }
  .stat-v { color: var(--text); font-size: 12px; }
  .char-desc { font-size: 13px; color: var(--text-muted); line-height: 1.75; }

  /* ── JINKI BLOCK ── */
  .jinki-block {
    background: var(--bg-2);
    border: 0.5px solid var(--border-mid);
    border-radius: 10px;
    padding: 1.25rem 1.4rem;
    margin: 1.25rem 0;
  }
  .jinki-title {
    font-family: var(--display);
    font-size: 15px;
    font-style: italic;
    font-weight: 400;
    margin-bottom: 6px;
  }
  .jt-sib { color: var(--sib-light); }
  .jt-tam { color: var(--tam-light); }
  .jinki-type {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 10px;
  }
  .jtype-sib { color: var(--sib-light); }
  .jtype-tam { color: var(--tam-light); }
  .jinki-ability {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 5px;
  }
  .jinki-ability span { color: var(--text); font-style: italic; }

  /* ── POV REPORTS ── */
  .pov-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
  }
  .pov-card-sib {
    background: var(--bg-sib);
    border: 0.5px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1.4rem;
    position: relative;
    backdrop-filter: blur(10px);
  }
  .pov-card-tam {
    background: var(--bg-tam);
    border: 0.5px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1.4rem;
    position: relative;
    backdrop-filter: blur(10px);
  }
  .pov-from {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 6px;
  }
  .pov-subject {
    font-family: var(--serif);
    font-size: 16px;
    text-transform: uppercase;
    margin-bottom: 10px;
  }
  .pov-entry {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
  }
  .pov-glyph { flex-shrink: 0; color: var(--text-dim); margin-top: 1px; }
  .pov-sib-border { border-left: 2px solid var(--sib-dim); }
  .pov-tam-border { border-left: 2px solid var(--tam-dim); }

  /* ── DYNAMIC BLOCK ── */
  .dynamic-box {
    border: 0.5px solid var(--border-mid);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    margin: 1.5rem 0;
    backdrop-filter: blur(10px);
    background-color: var(--bg-4);
  }
  .dynamic-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 50% 60% at 20% 50%, rgba(38,35,53,0.05) 0%, transparent 70%),
      radial-gradient(ellipse 50% 60% at 80% 50%, rgba(185,148,152,0.07) 0%, transparent 70%);
    pointer-events: none;
  }
  .dynamic-primary {
    font-family: var(--display);
    font-size: 13px;
    color: var(--gold);
    letter-spacing: 0.06em;
    margin-bottom: 4px;
  }
  .dynamic-title {
    font-family: var(--display);
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 8px;
  }
  .dynamic-alt {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.14em;
    margin-bottom: 1.5rem;
  }
  .dynamic-body { font-size: 14px; color: var(--text-muted); line-height: 1.85; max-width: 580px; }
  .dynamic-body p + p { margin-top: 0.9rem; }
  .dynamic-body em { color: var(--text); font-style: italic; }
  .dynamic-inner {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
  }
  .dynamic-content { flex: 1; }
  .dynamic-img {
    width: 10rem;
    height: 29rem;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-3);
    border: 0.5px solid var(--border-mid);
    position: relative;
  }
  .dynamic-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
  }
  .dynamic-img-placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-dim);
  }

  /* ── AXIS ── */
  .axis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
  }
  .axis-card {
    background: var(--bg-4);
    border: 0.5px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.2rem;
  }
  .axis-name {
    font-family: var(--display);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
  }
  .axis-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
    border-bottom: 0.5px solid var(--border);
    font-size: 12px;
  }
  .axis-row:last-child { border-bottom: none; }
  .axis-k { font-family: var(--mono); font-size: 9px; color: var(--text-dim); letter-spacing: 0.1em; }
  .axis-v { color: var(--text); font-size: 12px; }

  /* ── TAROT ROW ── */
  .tarot-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
  .tarot-pip { font-size: 11px; padding: 3px 9px; border-radius: 4px; border: 0.5px solid; }
  .tp-sib { border-color: var(--sib-dim); color: var(--sib); background: rgba(38,35,53,0.06); }
  .tp-tam { border-color: var(--tam-dim); color: var(--tam); background: rgba(185,148,152,0.07); }

  /* ── FLAG SECTION ── */
  .flag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    margin: 1.25rem 0;
  }
  .flag-item {
    background: var(--bg-2);
    border: 0.5px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
  }
  .flag-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
  }
  .flag-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  .flag-ul { padding-left: 0; list-style: none; }
  .flag-ul li {
    font-size: 11.5px;
    color: var(--text-muted);
    padding: 2px 0;
    border-bottom: 0.5px solid var(--border);
    line-height: 1.5;
  }
  .flag-ul li:last-child { border-bottom: none; }

  /* ── MEETING ── */
  .meeting-block {
    border-left: 2px solid var(--text);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--bg-2);
    backdrop-filter: blur(10px);
    border-radius: 0 10px 10px 0;
  }
  .meeting-block p { font-size: 14px; color: var(--text-muted); line-height: 1.8; }
  .meeting-block p + p { margin-top: 0.8rem; }
  .meeting-block em { color: var(--text); font-style: italic; }

  /* ── WORLD CONTEXT ── */
  .world-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin: 1.25rem 0;
  }
  .world-card {
    background: var(--bg-2);
    border: 0.5px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
  }
  .world-card-title {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 4px;
  }
  .world-card-body { font-size: 12px; color: var(--text-muted); line-height: 1.6; }

  /* ── FOOTER ── */
  .footer {
    text-align: center;
    padding: 2rem;
    border-top: 0.5px solid var(--border);
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.14em;
    background: var(--bg-2);
    backdrop-filter: blur(10px);
  }

  /* ── GALLERY ── */
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 1.25rem 0;
  }
  .gallery-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: zoom-in;
    background: var(--bg-2);
    border: 0.5px solid var(--border);
    position: relative;
  }
  .gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    transition: opacity 0.18s;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
  }
  .gallery-item:hover img { opacity: 0.85; }
  .gallery-placeholder {
    width: 100%; aspect-ratio: 1;
    background: var(--bg-2);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    border: 0.5px dashed var(--border-mid);
    cursor: default;
  }
  .ph-icon { width: 22px; height: 22px; border: 1.5px solid var(--border-mid); border-radius: 4px; position: relative; }
  .ph-icon::before { content: ''; position: absolute; bottom: 3px; left: 0; right: 0; height: 8px; border-top: 1.5px solid var(--border-mid); border-radius: 0 0 2px 2px; }
  .ph-icon::after { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--border-mid); top: 4px; left: 4px; }

  /* ── LIGHTBOX ── */
  /* ── LIGHTBOX ── */
  .lb-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    padding: 2rem;
  }
  .lb-overlay.active { display: flex; }
  .lb-inner {
    width: min(92vw, 720px);
    position: relative;
    cursor: default;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
  }
  .lb-inner img {
    width: 100%;
    height: auto;
    max-height: 78vh;
    border-radius: 6px 6px 0 0;
    display: block;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
  }
  .lb-caption {
    background: rgba(16,12,12,0.97);
    border-radius: 0 0 6px 6px;
    padding: 10px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .lb-desc {
    font-family: var(--serif);
    font-size: 13px;
    font-style: italic;
    color: rgba(232,224,220,0.85);
    line-height: 1.6;
  }
  .lb-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .lb-credit {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: rgba(185,148,152,0.8);
    text-decoration: none;
  }
  .lb-credit:hover { color: var(--tam-dim); text-decoration: underline; }
  .lb-save {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    background: rgba(255,255,255,0.06);
    border: 0.5px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.14s, color 0.14s;
    text-decoration: none;
  }
  .lb-save:hover { background: rgba(255,255,255,0.12); color: #fff; }
  .lb-close {
    position: absolute;
    top: -28px; right: 0;
    background: none; border: none;
    color: rgba(255,255,255,0.45);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    cursor: pointer;
    padding: 4px 0;
    text-transform: uppercase;
  }
  .lb-close:hover { color: #fff; }
  .lb-prev, .lb-next {
    position: absolute;
    top: 40%; transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    border: none; color: #fff;
    font-size: 18px;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.14s;
  }
  .lb-prev { left: -48px; }
  .lb-next { right: -48px; }
  .lb-prev:hover, .lb-next:hover { background: rgba(0,0,0,0.75); }
  .lb-desc:empty { display: none; }

  /* ── PLANET CARDS ── */
  .planet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 1.25rem 0; }
  .planet-card { background: var(--bg-2); border: 0.5px solid var(--border); border-radius: 10px; padding: 10px 14px; }
  .planet-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
  .planet-name { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
  .planet-val { font-size: 11.5px; color: var(--text); font-style: italic; }
  .planet-note { font-size: 12px; color: var(--text-muted); line-height: 1.65; margin-top: 5px; border-top: 0.5px solid var(--border); padding-top: 5px; }
  .planet-note em { color: var(--text); font-style: normal; font-weight: 500; }

  /* ── DEGREE ALERT ── */
  .degree-alert { background: var(--bg-2); border-left: 2px solid var(--gold); border-radius: 0 10px 10px 0; padding: 1rem 1.25rem; margin: 1rem 0; }
  .da-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 4px; }
  .da-main { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 5px; }
  .da-sub { font-size: 12.5px; color: var(--text-muted); line-height: 1.75; }
  .da-sub em { color: var(--text); font-style: italic; }

  /* ── SYNASTRY LIST ── */
  .syn-list { border: 0.5px solid var(--border); border-radius: 10px; overflow: hidden; margin: 1.25rem 0; }
  .syn-item { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 0.5px solid var(--border); }
  .syn-item:last-child { border-bottom: none; }
  .syn-glyph { color: var(--text-dim); font-size: 11px; flex-shrink: 0; width: 14px; font-family: var(--mono); }
  .syn-body { font-size: 12.5px; color: var(--text-muted); line-height: 1.75; }
  .syn-body strong { color: var(--text); font-weight: 500; }
  .syn-body em { color: var(--text); font-style: italic; }

  /* ── TAROT SOURCED ── */
  .source-char-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 1.25rem 0;
    backdrop-filter: blur(10px);
    background-color: var(--bg-4);
  }
  .source-block { border: 0.5px solid var(--border-mid); border-radius: 10px; overflow: hidden; }
  .source-block-head { padding: 10px 14px 8px; border-bottom: 0.5px solid var(--border); background: var(--bg-2); }
  .source-block-head .char-name-big { font-size: 15px; margin-bottom: 1px; }
  .source-section { padding: 10px 14px; }
  .source-section + .source-section { border-top: 0.5px solid var(--border); }
  .source-tag-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
  .source-card-item { margin-bottom: 9px; }
  .source-card-item:last-child { margin-bottom: 0; }
  .source-card-pip { font-family: var(--vin2); font-size: 16px; font-weight: 500; color: var(--text); }
  .source-card-pip em { font-style: normal; }
  .source-card-from { font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; color: var(--text-dim); margin-left: 6px; }
  .source-card-note { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.6; }

  /* ── PERSONAL TAROT LAYOUT ── */
  .tarot-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
  }
  .personal-tarot {
    width: 100px;
    flex-shrink: 0;
  }
  .personal-tarot img {
    width: 100%;
    height: auto;
    border-radius: 0.8rem;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
  }
  .tarot-text {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0;
  }

  /* ── TAROT INSIGHTS ── */
  .insight-list { border: 0.5px solid var(--border); border-radius: 10px; overflow: hidden; margin: 1.25rem 0; }
  .insight-item { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 0.5px solid var(--border); background: var(--bg); }
  .insight-item:nth-child(even) { background: var(--bg-2); }
  .insight-item:last-child { border-bottom: none; }
  .ins-glyph { color: var(--text-dim); font-size: 10px; flex-shrink: 0; width: 14px; font-family: var(--mono); margin-top: 2px; }
  .ins-body { font-size: 12.5px; color: var(--text-muted); line-height: 1.75; }
  .ins-body strong { color: var(--text); font-weight: 500; }
  .ins-body em { color: var(--text); font-style: italic; }

  /* ── DAY COUNTER ── */
  .day-count {
    font-family: var(--vin2);
    font-size: clamp(2rem, 2.5vw, 7rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-dim) 45%, var(--text-muted) 60%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.2rem;
  }
  .day-pair {
    font-family: var(--vin1);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
  }

  /* ── SEPARATOR WITH LABEL ── */
  hr.rule-label {
    border: none;
    text-align: center;
    margin: 1rem 0;
    overflow: visible;
  }
  hr.rule-label::before {
    content: attr(data-label);
    display: inline-block;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0 10px;
    background: var(--bg);
    position: relative;
  }
  hr.rule-label::after {
    content: '';
    display: block;
    border-top: 0.5px solid var(--border);
    margin-top: -12px;
    position: relative;
    z-index: -1;
  }

  hr.rule-label1 {
    border: none;
    text-align: center;
    margin: auto;
    overflow: visible;
  }
  hr.rule-label1::before {
    content: attr(data-label);
    display: inline-block;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0 10px;
    background: var(--bg);
    position: relative;
  }
  hr.rule-label1::after {
    content: '';
    display: block;
    border-top: 0.5px solid var(--border);
    margin-top: -12px;
    position: relative;
    z-index: -1;
  }

  /* ── CHAT QUOTES ── */
  .chat-log {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 1.5rem 0;
  }
  .chat-msg {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 72%;
  }
  .chat-msg.left  { align-self: flex-start; align-items: flex-start; }
  .chat-msg.right { align-self: flex-end;   align-items: flex-end; }
  .chat-header {
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .chat-msg.right .chat-header { flex-direction: row-reverse; }
  .chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-mid);
    flex-shrink: 0;
    background: var(--bg-2);
  }
  .chat-name {
    font-family: var(--sans);
    font-size: 15px;
    letter-spacing: 0.14em;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--text-dim);
  }
  .chat-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-style: italic;
    line-height: 1.75;
    backdrop-filter: blur(10px);
    cursor: pointer;
    user-select: none;
    transition: opacity 0.15s;
  }

  .chat-msg.left  .chat-bubble {
    background: var(--bg-sib);
    border: 0.5px solid var(--sib-dim);
    color: var(--sib);
    border-top-left-radius: 4px;
  }
  .chat-msg.right .chat-bubble {
    background: var(--bg-tam);
    border: 0.5px solid var(--tam-dim);
    color: var(--tam-light);
    border-top-right-radius: 4px;
  }

  /* ── LIGHTBOX ── */
  .lb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 9999; align-items: center; justify-content: center; cursor: zoom-out; }
  .lb-overlay.active { display: flex; }
  .lb-inner { max-width: min(90vw, 680px); position: relative; cursor: default; display: flex; flex-direction: column; }
  .lb-inner img { max-width: 100%; max-height: 72vh; border-radius: 6px 6px 0 0; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; object-fit: contain; }
  .lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4); border: none; color: #fff; font-size: 18px; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.14s; }
  .lb-prev { left: -48px; }
  .lb-next { right: -48px; }
  .lb-prev:hover, .lb-next:hover { background: rgba(0,0,0,0.75); }

  .lb-caption {
    background: rgba(16,12,12,0.97);
    border-radius: 0 0 6px 6px;
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 48px;
  }
  .lb-desc {
    font-family: var(--serif);
    font-size: 13px;
    font-style: italic;
    color: rgba(232,224,220,0.85);
    line-height: 1.6;
  }
  .lb-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .lb-credit {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: rgba(185,148,152,0.8);
    text-decoration: none;
  }
  .lb-credit:hover { color: var(--tam-dim); text-decoration: underline; }
  .lb-save {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    background: rgba(255,255,255,0.06);
    border: 0.5px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.14s, color 0.14s;
    text-decoration: none;
  }
  .lb-save:hover { background: rgba(255,255,255,0.12); color: #fff; }
  .lb-close { position: absolute; top: -32px; right: 0; background: none; border: none; color: rgba(255,255,255,0.45); font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; cursor: pointer; padding: 4px 0; text-transform: uppercase; }
  .lb-close:hover { color: #fff; }
  .lb-credit:empty, .lb-desc:empty { display: none; }

  /* ── ARC TIMELINE ── */
  .arc-outer {
    position: relative;
    margin: 1.5rem 0;
  }
  /* fade + scroll hint on right edge */
  .arc-outer::after {
    content: 'scroll →';
    position: absolute;
    top: 50%; right: 0;
    transform: translateY(-50%);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.16em;
    color: var(--text-dim);
    background: linear-gradient(to right, transparent 0%, var(--bg) 35%);
    padding: 4px 0 4px 32px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.7;
  }
  /* hide hint once scrolled */
  .arc-outer.scrolled::after { opacity: 0; transition: opacity 0.3s; }

  .arc-timeline {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  .arc-timeline::-webkit-scrollbar { display: none; }

  .arc-track {
    display: flex;
    position: relative;
    min-width: max-content;
    padding: 0 2rem 1rem;
    align-items: flex-start;
  }

  /* ── TIMELINE SCROLLBAR (laptop only) ── */
  @media (min-width: 601px) {
    .arc-timeline {
      scrollbar-width: thin;
      scrollbar-color: var(--text-dim) transparent;
    }
    .arc-timeline::-webkit-scrollbar {
      display: block;
      height: 3px;
    }
    .arc-timeline::-webkit-scrollbar-track {
      background: transparent;
    }
    .arc-timeline::-webkit-scrollbar-thumb {
      background: var(--text-dim);
      border-radius: 99px;
    }
    .arc-timeline::-webkit-scrollbar-thumb:hover {
      background: var(--text);
    }
  }

  /* horizontal line through the dots */
  .arc-track::before {
    content: '';
    position: absolute;
    top: 4px; /* aligns with dot center */
    left: 2rem; right: 2rem;
    height: 1px;
    background: linear-gradient(
      to right,
      transparent,
      var(--border-mid) 8%,
      var(--border-mid) 92%,
      transparent
    );
  }

  .arc-entry {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 200px;
    flex-shrink: 0;
    padding-right: 2rem;
    position: relative;
  }
  .arc-entry:last-child { padding-right: 3rem; }

  /* dot sits on the line */
  .arc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-dim);
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--text-dim);
    flex-shrink: 0;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
  }
  .arc-dot.sib { background: var(--sib-dim); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--sib-dim); }
  .arc-dot.tam { background: var(--tam-dim); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--tam-dim); }
  .arc-dot.gold { background: var(--gold-dim); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--gold-dim); }

  .arc-num {
    font-family: var(--mono);
    font-size: 8px;
    color: var(--border-mid);
    letter-spacing: 0.14em;
    margin-bottom: 5px;
  }

  .arc-tag {
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 99px;
    border: 0.5px solid var(--border-mid);
    color: var(--text-dim);
    margin-bottom: 10px;
  }
  .arc-tag.sib { border-color: var(--sib-dim); color: var(--sib-light); background: rgba(38,35,53,0.05); }
  .arc-tag.tam { border-color: var(--tam-dim); color: var(--tam-light); background: rgba(185,148,152,0.05); }
  .arc-tag.gold { border-color: var(--gold-dim); color: var(--gold); background: rgba(138,106,58,0.05); }

  .arc-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.8;
  }
  .arc-text em { color: var(--text); font-style: italic; }

  /* ── MOBILE: vertical stack ── */
  @media (max-width: 600px) {
    .arc-outer::after { display: none; }
    .arc-timeline { overflow-x: visible; }
    .arc-track {
      flex-direction: column;
      min-width: 0;
      padding: 0 0 1rem 1.5rem;
      align-items: stretch;
      gap: 0;
    }
    /* vertical line */
    .arc-track::before {
      top: 0; bottom: 0;
      left: 0; right: auto;
      width: 0.5px; height: auto;
      background: linear-gradient(
        to bottom,
        transparent,
        var(--border-mid) 8%,
        var(--border-mid) 92%,
        transparent
      );
    }
    .arc-entry {
      width: 100%;
      padding: 0 0 2rem 1.5rem;
      position: relative;
    }
    .arc-entry:last-child { padding-bottom: 0; }
    /* dot on the vertical line */
    .arc-dot {
      position: absolute;
      left: -4px;
      top: 0;
      margin-bottom: 0;
    }
    .arc-num { margin-top: 0; }
  }

  /* ── SPOILER ── */
  .spoiler {
    display: inline;
    background: var(--text);
    color: transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    user-select: none;
    padding: 0 3px;
  }
  .spoiler.sib { background: var(--sib-dim); }
  .spoiler.tam { background: var(--tam-dim); }
  .spoiler.revealed {
    background: transparent;
    color: inherit;
    cursor: text;
    user-select: text;
  }

  /* ── SHARED IMAGE CLASS ── */
  .img {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
  }

  /* ── RESPONSIVE ── */
  @media (max-width: 600px) {
    .dual, .pov-grid, .axis-grid, .world-grid,
    .planet-grid, .source-char-grid { grid-template-columns: 1fr; }
    .panel-sib { border-right: none; border-bottom: 0.5px solid var(--border-mid); }
    .ship-name { font-size: 2.6rem; }
    .flag-grid { grid-template-columns: 1fr 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .dynamic-inner { flex-direction: column; }
    .dynamic-img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  }
  /* ── LANGUAGE TOGGLE ── */

  /* default: show EN, hide TH for global content */
  .t-th { display: none; }
  body.show-th .t-en { display: none; }
  body.show-th .t-th { display: inline; }

  /* toggle button */
  .lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
    background: transparent;
    border: 0.5px solid var(--border-mid);
    border-radius: 99px;
    padding: 5px 14px;
    cursor: pointer;
    margin-top: 1.2rem;
    transition: color 0.14s, border-color 0.14s, background 0.14s;
  }
  .lang-toggle-btn em {
    font-style: normal;
    opacity: 0.55;
  }
  .lang-toggle-btn:hover {
    color: var(--text);
    border-color: var(--text-dim);
    background: var(--bg-2);
  }
  body.show-th .lang-toggle-btn {
    color: var(--text);
    border-color: var(--gold-dim);
    background: rgba(138,106,58,0.06);
  }

  /* ── MUSIC PLAYER ── */
  /*
    Grid layout (5 columns):
    [cover] [▶] [info stretch] [time] [🔊]
                [═══ bar spans cols 3–6 ══]
  */
  .music-player {
    display: grid;
    grid-template-columns: auto auto 1fr auto auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 12px;
    background: var(--bg-4);
    border: 0.5px solid var(--border-mid);
    border-radius: 10px;
    padding: 10px 14px 10px;
    margin: 1.25rem 0;
    backdrop-filter: blur(10px);
  }
  /* audio tag must not take a grid slot */
  .music-player audio { display: none; }

  /* col 1 — album art */
  .mp-cover {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    border: 0.5px solid var(--border-mid);
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    flex-shrink: 0;
  }

  /* col 2 — play button */
  .mp-play {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0.5px solid var(--border-mid);
    background: var(--bg-2);
    color: var(--text);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.14s;
    flex-shrink: 0;
  }
  .mp-play:hover { background: var(--bg-3); }

  /* col 3 — title + artist */
  .mp-info {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
  }
  .mp-title {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mp-artist {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    color: var(--text-dim);
  }

  /* col 4 — timestamp */
  .mp-right {
    grid-column: 4;
    grid-row: 1;
    display: flex;
    align-items: center;
  }
  .mp-time {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    white-space: nowrap;
  }

  /* col 5 — volume button + popup */
  .mp-vol-wrap {
    grid-column: 5;
    grid-row: 1;
    position: relative;
    display: flex;
    align-items: center;
  }
  .mp-vol-btn {
    background: none;
    border: none;
    font-size: 13px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.14s;
    padding: 4px;
    display: flex;
    align-items: center;
    line-height: 1;
  }
  .mp-vol-btn:hover { opacity: 1; }
  .mp-vol-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: var(--bg-4);
    border: 0.5px solid var(--border-mid);
    border-radius: 8px;
    padding: 10px 8px;
    backdrop-filter: blur(10px);
    z-index: 10;
  }
  .mp-vol-popup.open { display: flex; }
  .mp-vol-slider {
    -webkit-appearance: none;
    appearance: none;
    writing-mode: vertical-lr;
    direction: rtl;
    width: 2px;
    height: 60px;
    background: var(--border);
    border-radius: 99px;
    cursor: pointer;
    accent-color: var(--text);
  }

  /* row 2, cols 3–5 — progress bar */
  .mp-bar-wrap {
    grid-column: 3 / 6;
    grid-row: 2;
    height: 2px;
    background: var(--border);
    border-radius: 99px;
    margin-top: 8px;
    cursor: pointer;
    position: relative;
  }
  .mp-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--text-dim), var(--text));
    border-radius: 99px;
    pointer-events: none;
    transition: width 0.25s linear;
  }