/* ============================================================
   黄金时刻计算器 · 胶片暗房 / 琥珀金 + 深棕黑
   前缀 gh- · 浅色为暖米纸，深色整套覆盖（跟随导航主题切换）
   ============================================================ */
.gh-page, .gh-toast {
    --gh-bg: #f7f1e6;
    --gh-bg2: #efe5d3;
    --gh-panel: #fffaf0;
    --gh-panel2: #f8eeda;
    --gh-ink: #241d15;
    --gh-sub: #6f6251;
    --gh-line: #e4d6be;
    --gh-line2: #cdb995;
    --gh-amber: #b46a06;
    --gh-amber-deep: #8a4d00;
    --gh-amber-soft: #f8e6c4;
    --gh-teal: #275c63;
    --gh-rose: #a8492c;
    --gh-code: #f3e8d2;
    --gh-shadow: 0 16px 40px rgba(83, 63, 30, .12);
    --gh-shadow-sm: 0 3px 12px rgba(83, 63, 30, .08);
    --gh-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --gh-dark: #191410;
    --gh-dark2: #241c15;
    --gh-dark-line: #3a2d20;
    --gh-dark-ink: #f4e8d6;
    --gh-dark-sub: #b7a184;
}
:root[data-theme="dark"] .gh-page, :root[data-theme="dark"] .gh-toast {
    --gh-bg: #12100d;
    --gh-bg2: #191510;
    --gh-panel: #1c1712;
    --gh-panel2: #241d16;
    --gh-ink: #f2e7d5;
    --gh-sub: #b1a08a;
    --gh-line: #33291e;
    --gh-line2: #4a3a28;
    --gh-amber: #f0ad55;
    --gh-amber-deep: #ffc87e;
    --gh-amber-soft: #3a2a16;
    --gh-teal: #7fc4c7;
    --gh-rose: #f08d6a;
    --gh-code: #241d16;
    --gh-shadow: 0 16px 40px rgba(0, 0, 0, .5);
    --gh-shadow-sm: 0 3px 12px rgba(0, 0, 0, .34);
    --gh-dark: #0f0c09;
    --gh-dark2: #1a140f;
    --gh-dark-line: #35291d;
    --gh-dark-ink: #f6ead8;
    --gh-dark-sub: #b7a184;
}
.gh-page {
    background:
        radial-gradient(1100px 480px at 82% -8%, var(--gh-bg2), transparent 62%),
        var(--gh-bg);
    color: var(--gh-ink);
    padding: 0 0 56px;
    min-height: 60vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.75;
}
.gh-wrap { max-width: 1140px; margin: 0 auto; padding: 18px 16px 0; }
.gh-page .detail-breadcrumb { font-size: 13px; color: var(--gh-sub); margin: 10px 0 18px; }
.gh-page .detail-breadcrumb a { color: var(--gh-sub); text-decoration: none; }
.gh-page .detail-breadcrumb a:hover { color: var(--gh-amber); }
.gh-page .detail-breadcrumb .current { color: var(--gh-amber); font-weight: 700; }
.gh-page .detail-breadcrumb .sep { margin: 0 8px; opacity: .55; }

/* ---------- 首屏 ---------- */
.gh-hero { display: grid; grid-template-columns: 1.16fr .84fr; gap: 26px; align-items: stretch; margin-bottom: 22px; }
.gh-hero > * { min-width: 0; }
.gh-kicker {
    display: inline-block; font: 700 11px var(--gh-mono); letter-spacing: 1.6px;
    color: var(--gh-amber); background: var(--gh-amber-soft);
    border: 1px solid var(--gh-line2); border-radius: 3px; padding: 6px 12px; margin-bottom: 14px;
}
.gh-page h1 { font-size: 36px; line-height: 1.2; font-weight: 800; margin: 0 0 14px; letter-spacing: -.5px; }
.gh-sub { font-size: 15px; line-height: 1.95; color: var(--gh-sub); margin: 0 0 18px; max-width: 640px; }
.gh-sub b { color: var(--gh-ink); }

.gh-form {
    background: var(--gh-panel); border: 1px solid var(--gh-line2); border-radius: 14px;
    padding: 15px 16px 13px; box-shadow: var(--gh-shadow-sm);
}
.gh-form-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.gh-field { flex: 1 1 0; min-width: 132px; display: flex; flex-direction: column; gap: 5px; }
.gh-field-date { flex: 1.05 1 0; }
.gh-field-city { flex: 1.35 1 0; }
.gh-field > span { font-size: 11.5px; font-weight: 700; color: var(--gh-sub); letter-spacing: .3px; }
.gh-field > span em { font-style: normal; font-weight: 500; opacity: .75; }
.gh-field input, .gh-field select {
    width: 100%; padding: 9px 10px; border: 1px solid var(--gh-line2); border-radius: 8px;
    background: var(--gh-panel2); color: var(--gh-ink); font-size: 13.5px; font-family: inherit;
}
.gh-field input[type="number"] { font-family: var(--gh-mono); }
.gh-field input:focus, .gh-field select:focus { outline: 2px solid var(--gh-amber); outline-offset: 1px; border-color: var(--gh-amber); }
.gh-form-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.gh-btn {
    border: 1px solid var(--gh-line2); background: var(--gh-panel2); color: var(--gh-ink);
    border-radius: 8px; padding: 9px 16px; font-size: 13.5px; font-weight: 650; cursor: pointer;
    transition: transform .12s, box-shadow .12s, background .12s; font-family: inherit;
}
.gh-btn:hover { transform: translateY(-1px); box-shadow: var(--gh-shadow-sm); }
.gh-btn-main { background: var(--gh-amber); border-color: var(--gh-amber-deep); color: #2b1a05; }
.gh-btn-main:hover { background: var(--gh-amber-deep); color: #211304; }
.gh-btn-ghost { background: transparent; }
.gh-btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 7px; }
.gh-form-msg { font-size: 11.5px; color: var(--gh-sub); margin: 10px 0 0; line-height: 1.8; min-height: 20px; }
.gh-form-msg.is-err { color: var(--gh-rose); font-weight: 650; }
.gh-form-msg.is-ok { color: var(--gh-teal); }

/* ---------- 右侧暗房卡片 ---------- */
.gh-poster {
    background: linear-gradient(155deg, var(--gh-dark2), var(--gh-dark) 68%);
    border: 1px solid var(--gh-dark-line); border-radius: 14px;
    box-shadow: var(--gh-shadow); padding: 16px 18px 14px;
    color: var(--gh-dark-ink); display: flex; flex-direction: column;
    position: relative; overflow: hidden;
}
.gh-poster::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 4px),
        radial-gradient(420px 180px at 78% 0%, rgba(240, 173, 85, .18), transparent 70%);
    opacity: .9;
}
.gh-poster > * { position: relative; }
.gh-poster-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
    font: 700 10.5px var(--gh-mono); letter-spacing: 1.4px; color: var(--gh-dark-sub);
    padding-bottom: 10px; border-bottom: 1px dashed var(--gh-dark-line);
}
.gh-poster-head i { font-style: normal; color: #f0ad55; letter-spacing: .5px; }
.gh-window { padding: 11px 0 9px; border-bottom: 1px dashed var(--gh-dark-line); }
.gh-window-tag {
    display: inline-block; font: 700 10.5px var(--gh-mono); letter-spacing: 1.2px;
    color: #f0ad55; background: rgba(240, 173, 85, .13); border: 1px solid rgba(240, 173, 85, .34);
    border-radius: 3px; padding: 2px 7px; margin-bottom: 5px;
}
.gh-window b { display: block; font: 800 29px/1.15 var(--gh-mono); letter-spacing: .5px; color: #fff5e4; }
.gh-window small { display: block; margin-top: 3px; font-size: 11px; color: var(--gh-dark-sub); }
.gh-window-eve b { color: #ffd9a4; }
.gh-poster-arc { width: 100%; height: 96px; margin: 8px 0 2px; }
.gh-arc-ground { stroke: var(--gh-dark-line); stroke-width: 1.5; }
.gh-arc-line { fill: none; stroke: #f0ad55; stroke-width: 2; stroke-linejoin: round; }
.gh-arc-band { fill: rgba(240, 173, 85, .2); }
.gh-arc-dot { fill: #ffd9a4; stroke: #2b1d0d; stroke-width: 1.5; }
.gh-facts { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; }
.gh-facts li { display: flex; flex-direction: column; gap: 1px; }
.gh-facts span { font-size: 10.5px; color: var(--gh-dark-sub); letter-spacing: .4px; }
.gh-facts b { font: 700 15px var(--gh-mono); color: #fff3de; }
.gh-poster-foot { margin: 11px 0 0; font-size: 10.5px; line-height: 1.65; color: var(--gh-dark-sub); }

/* ---------- 通用卡片 ---------- */
.gh-card {
    background: var(--gh-panel); border: 1px solid var(--gh-line); border-radius: 14px;
    box-shadow: var(--gh-shadow-sm); padding: 20px; margin-bottom: 20px;
}
.gh-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.gh-card-head h2 { font-size: 19px; font-weight: 800; margin: 2px 0 3px; line-height: 1.35; }
.gh-card-head p { margin: 0; font-size: 12.5px; color: var(--gh-sub); line-height: 1.75; }
.gh-no {
    display: inline-block; font: 700 10px var(--gh-mono); letter-spacing: 1.4px; color: var(--gh-amber);
    border: 1px solid var(--gh-line2); border-radius: 3px; padding: 1px 6px; margin-bottom: 5px;
}
.gh-chip {
    font: 700 11px var(--gh-mono); letter-spacing: .6px; color: var(--gh-amber);
    background: var(--gh-amber-soft); border: 1px solid var(--gh-line2);
    border-radius: 20px; padding: 4px 12px; white-space: nowrap;
}
.gh-head-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 光位曲线 ---------- */
.gh-path-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
#ghPathSvg { width: 100%; min-width: 620px; height: auto; display: block; }
.gh-path-grid line { stroke: var(--gh-line); stroke-width: 1; stroke-dasharray: 3 5; }
.gh-axis { font: 600 10px var(--gh-mono); fill: var(--gh-sub); }
.gh-path-zero { stroke: var(--gh-line2); stroke-width: 1.4; }
.gh-path-line { fill: none; stroke: var(--gh-amber); stroke-width: 2.6; stroke-linejoin: round; }
.gh-path-now { stroke: var(--gh-teal); stroke-width: 1.6; stroke-dasharray: 4 4; }
.gh-band-gold { fill: rgba(180, 106, 6, .22); }
.gh-band-blue { fill: rgba(39, 92, 99, .22); }
:root[data-theme="dark"] .gh-band-gold { fill: rgba(240, 173, 85, .26); }
:root[data-theme="dark"] .gh-band-blue { fill: rgba(127, 196, 199, .22); }
.gh-mark circle { stroke: var(--gh-panel); stroke-width: 2; }
.gh-mark-rise circle { fill: var(--gh-rose); }
.gh-mark-noon circle { fill: var(--gh-amber); }
.gh-mark text { font: 700 9.5px var(--gh-mono); fill: var(--gh-sub); }
.gh-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 11.5px; color: var(--gh-sub); }
.gh-legend span { display: inline-flex; align-items: center; gap: 6px; }
.gh-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.gh-dot-gold { background: #c07a12; }
.gh-dot-blue { background: #2b6a71; }
.gh-dot-rise { background: var(--gh-rose); }
.gh-dot-now { background: var(--gh-teal); border-radius: 2px; }

/* ---------- 表格 ---------- */
.gh-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gh-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 620px; }
.gh-table thead th {
    text-align: left; font-size: 11.5px; font-weight: 700; color: var(--gh-sub);
    letter-spacing: .4px; padding: 8px 10px; border-bottom: 1px solid var(--gh-line2); white-space: nowrap;
}
.gh-table td { padding: 10px; border-bottom: 1px solid var(--gh-line); vertical-align: top; line-height: 1.6; }
.gh-table tbody tr:hover td { background: var(--gh-panel2); }
.gh-table td.gh-time { font: 700 13.5px var(--gh-mono); color: var(--gh-ink); white-space: nowrap; }
.gh-table td.gh-time.is-gold { color: var(--gh-amber); }
.gh-table td.gh-time.is-blue { color: var(--gh-teal); }
.gh-table td.gh-time.is-dim { color: var(--gh-sub); font-weight: 500; }
.gh-table td.gh-stage b { font-weight: 700; }
.gh-table td.gh-tip { font-size: 11.5px; color: var(--gh-sub); }
.gh-table tr.is-polar td { color: var(--gh-sub); }
.gh-week-table td:first-child { font: 700 12.5px var(--gh-mono); white-space: nowrap; }
.gh-week-note { margin: 12px 0 0; font-size: 11.5px; color: var(--gh-sub); line-height: 1.8; }
.gh-sunline { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 11.5px; color: var(--gh-sub); }
.gh-sunline b { font-family: var(--gh-mono); color: var(--gh-ink); }

/* ---------- 要点 ---------- */
.gh-note-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gh-note-grid > div { background: var(--gh-panel2); border: 1px solid var(--gh-line); border-radius: 10px; padding: 13px 15px; }
.gh-note-grid b { display: block; font-size: 13.5px; margin-bottom: 4px; color: var(--gh-amber-deep); }
.gh-note-grid p { margin: 0; font-size: 12.5px; line-height: 1.85; color: var(--gh-sub); }
.gh-note-grid p b { display: inline; font-size: inherit; color: var(--gh-ink); }

/* ---------- Toast ---------- */
.gh-toast {
    position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 24px);
    background: var(--gh-dark2); color: var(--gh-dark-ink); border: 1px solid var(--gh-dark-line);
    padding: 10px 20px; border-radius: 10px; font-size: 13px; box-shadow: 0 14px 34px rgba(0, 0, 0, .32);
    opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 90; max-width: 86vw;
}
.gh-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 940px) {
    .gh-hero { grid-template-columns: 1fr; }
    .gh-page h1 { font-size: 31px; }
}
@media (max-width: 640px) {
    .gh-wrap { padding: 12px 12px 0; }
    .gh-page h1 { font-size: 27px; }
    .gh-form-row { flex-direction: column; }
    .gh-field { min-width: 0; }
    .gh-facts { grid-template-columns: 1fr 1fr; }
    .gh-note-grid { grid-template-columns: 1fr; }
    .gh-card { padding: 15px 14px; }
    .gh-card-head h2 { font-size: 17px; }
    .gh-window b { font-size: 25px; }
    .gh-form-acts .gh-btn { flex: 1 1 44%; }
    #ghPathSvg { min-width: 560px; }
}
