:root {
    --night: #03101a;
    --night-deep: #020b12;
    --panel: #0a2235;
    --panel-soft: #0d293f;
    --ivory: #f3eddf;
    --mist: #91a1b3;
    --gold: #d6b45f;
    --gold-soft: #ecd184;
    --hairline: rgba(145, 161, 179, 0.14);
    --content: 1840px;
    --reading: 880px;
    --ink: var(--night);
    --ink-soft: var(--panel-soft);
    --panel-light: rgba(255, 255, 255, 0.055);
    --gold-bright: var(--gold-soft);
    --line: var(--hairline);
    --shadow: 0 28px 70px rgba(0, 5, 18, 0.36);
}

html {
    background: var(--night-deep);
}

body,
body.pilot-page {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--ivory);
    background:
        radial-gradient(circle at 12% 0%, rgba(29, 69, 99, 0.32), transparent 33%),
        radial-gradient(circle at 88% 6%, rgba(214, 180, 95, 0.1), transparent 24%),
        var(--night-deep);
    font-family: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.15;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.site-shell {
    width: min(var(--content), calc(100% - 80px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: center;
    min-height: 88px;
    border-bottom: 1px solid var(--hairline);
}

.site-brand,
.site-nav a {
    color: var(--ivory);
    text-decoration: none;
}

.site-brand {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    font-size: 21px;
    font-weight: 600;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    width: 38px;
    aspect-ratio: 1;
    place-items: center;
    color: var(--gold-soft);
    background: transparent;
    border: 1px solid var(--gold);
    border-radius: 0;
    font-size: 18px;
    letter-spacing: 0;
    transform: rotate(45deg);
}

.brand-mark > span {
    display: block;
    transform: rotate(-45deg);
}

.site-nav {
    display: flex;
    gap: 10px;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
}

.site-nav a,
.site-nav .language-btn {
    min-height: auto;
    padding: 9px 10px;
    color: var(--mist);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.site-nav .language-btn:hover {
    color: var(--gold-soft);
}

:focus-visible {
    outline: 2px solid var(--gold-soft);
    outline-offset: 3px;
}

.page-main {
    padding: clamp(44px, 6vw, 96px) 0;
}

.reading-page {
    width: min(var(--reading), 100%);
    box-sizing: border-box;
    margin: 0 auto;
    padding: clamp(28px, 4vw, 52px);
    color: var(--ivory);
    background: rgba(10, 34, 53, 0.72);
    border: 1px solid var(--hairline);
    border-radius: 20px;
}

.reading-page h1 {
    margin: 0 0 22px;
    color: var(--ivory);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.25;
}

.reading-page h2 {
    margin-top: 34px;
    color: var(--gold-soft);
    font-size: 21px;
}

.reading-page p,
.reading-page li {
    color: #c6d0dc;
    line-height: 1.85;
}

.reading-page a {
    color: var(--gold-soft);
    text-underline-offset: 3px;
}

.reading-page .notice {
    padding: 18px;
    background: rgba(255, 255, 255, 0.035);
    border-left: 2px solid var(--gold);
    border-radius: 0 12px 12px 0;
}

.reading-page section[lang="en"] {
    margin-top: 42px;
    padding-top: 34px;
    border-top: 1px solid var(--hairline);
}

.reading-page .links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.reading-page .link,
.reading-page .back-link {
    display: inline-block;
    padding: 9px 13px;
    color: var(--gold-soft);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--hairline);
    border-radius: 999px;
    text-decoration: none;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 28px 0 40px;
    color: var(--mist);
    border-top: 1px solid var(--hairline);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
}

.site-footer a {
    color: var(--mist);
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
    color: var(--gold-soft);
}

.language-switcher {
    display: flex;
    position: relative;
    top: auto;
    right: auto;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 62px;
}

.language-btn,
.culture-btn,
.back-link {
    flex: 0 0 auto;
    padding: 8px 12px;
    color: var(--mist);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
    letter-spacing: 0.02em;
}

.language-btn:hover,
.culture-btn:hover,
.back-link:hover {
    color: var(--gold-bright);
    background: rgba(217, 184, 108, 0.08);
    border-color: var(--line);
}

.brand-hero {
    max-width: 900px;
    margin: 0 auto 72px;
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.brand-eyebrow,
.section-kicker {
    margin-bottom: 22px;
    color: var(--gold);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

h1,
.brand-hero h1 {
    max-width: 860px;
    margin: 0 auto;
    padding: 0;
    color: var(--ivory);
    font-size: clamp(38px, 6vw, 70px);
    font-weight: 500;
    line-height: 1.16;
    letter-spacing: -0.035em;
}

h1::after,
.brand-hero h1::after {
    display: none;
}

h2,
h3,
.result-section h2,
.result-section h3 {
    color: var(--ivory);
    font-weight: 500;
}

.brand-subtitle {
    margin: 26px auto 0;
    color: var(--gold-soft);
    font-size: clamp(15px, 2vw, 19px);
    letter-spacing: 0.08em;
}

.intro-box {
    max-width: 920px;
    margin: 0 auto 48px;
    padding: 22px 24px;
    color: #bdc9d9;
    background: rgba(255, 255, 255, 0.035);
    border-left: 2px solid var(--gold);
    border-radius: 0 14px 14px 0;
    font-size: 14px;
    line-height: 1.9;
}

.input-section,
.result-section,
.history-section {
    max-width: 920px;
    margin-right: auto;
    margin-left: auto;
}

.input-section h2,
.history-section h2,
.result-section > h2 {
    margin: 0 0 20px;
    padding: 0;
    color: var(--ivory);
    font-size: clamp(24px, 3vw, 34px);
}

.sensory-inputs {
    gap: 16px;
}

.input-group label {
    color: #d9e1eb;
    font-size: 16px;
    letter-spacing: 0.04em;
}

textarea,
input {
    color: var(--ivory);
    background: rgba(2, 11, 25, 0.34);
    border: 1px solid rgba(174, 188, 208, 0.22);
    border-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

textarea {
    min-height: 164px;
    margin-bottom: 20px;
}

textarea::placeholder,
input::placeholder {
    color: #8190a6;
}

textarea:focus,
input:focus {
    background: rgba(2, 11, 25, 0.48);
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(217, 184, 108, 0.1);
}

.location-info,
.history-section,
.history-item,
.history-question,
.footer {
    color: var(--mist);
}

button,
.location-btn {
    min-height: 48px;
    color: #081528;
    background: linear-gradient(135deg, var(--gold-bright), #c49a46);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button.secondary,
.location-btn {
    color: #d8e1ee;
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.12);
}

.button-group {
    margin-top: 26px;
}

.home-main {
    padding-top: 0;
}

.home-hero {
    padding: clamp(88px, 10vw, 154px) 0 clamp(72px, 7vw, 108px);
    text-align: left;
}

.home-hero .brand-eyebrow {
    margin-bottom: 0;
}

.home-hero h1 {
    max-width: 980px;
    margin: 34px 0 0;
    text-align: left;
    font-size: clamp(56px, 5.25vw, 100px);
    font-weight: 500;
    line-height: 1.08;
}

.home-hero .brand-subtitle {
    margin: 28px 0 0;
}

.casting-card {
    position: relative;
    overflow: hidden;
    padding: 54px;
    padding-top: 48px;
    background: linear-gradient(145deg, rgba(14, 45, 64, 0.92), rgba(8, 32, 48, 0.94) 62%, rgba(7, 27, 41, 0.95));
    border: 1px solid rgba(91, 126, 145, 0.42);
    border-radius: 25px;
    box-shadow: 0 20px 58px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.035);
}

.casting-card::before {
    position: absolute;
    top: -1px;
    left: 54px;
    width: 124px;
    height: 2px;
    content: "";
    background: linear-gradient(90deg, #e4ca78, rgba(214, 182, 93, 0.08));
}

.casting-card-heading {
    margin-bottom: 29px;
}

.casting-card-heading .section-kicker {
    display: none;
}

.casting-card-heading h2 {
    margin: 0;
    padding: 0;
    color: #f2eee4;
    font-size: clamp(31px, 2.2vw, 34px);
    font-weight: 500;
    line-height: 1.3;
}

.casting-question {
    margin-bottom: 25px;
}

.casting-question textarea {
    min-height: 150px;
    margin-bottom: 0;
}

.casting-card textarea,
.casting-card input {
    color: #edf0ee;
    background: rgba(3, 21, 32, 0.66);
    border-color: rgba(64, 99, 119, 0.68);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.12);
    font-size: 17.5px;
}

.casting-card textarea {
    margin-bottom: 0;
}

.casting-card textarea::placeholder,
.casting-card input::placeholder {
    font-size: 14.5px;
    color: #91a6b2;
    line-height: 1.78;
    opacity: 1;
}

.casting-context-grid label,
.casting-meta-label {
    display: block;
    margin-bottom: 11px;
    color: #c2d0d8;
    font-size: 17px;
    font-weight: 500;
}

.field-help {
    min-height: 1.5em;
    margin: 8px 0 0;
    color: var(--gold-soft);
    font: 12px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.casting-context-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px 22px;
}

.casting-context-grid .input-group {
    min-width: 0;
    margin-bottom: 0;
}

.casting-external-response {
    grid-column: 1 / -1;
}

.casting-external-response textarea {
    min-height: 96px;
}

.casting-meta-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.casting-card .location-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
}

.casting-card .location-input input {
    min-height: 63px;
    border-radius: 12px 0 0 12px;
}

.casting-card .location-btn {
    padding: 0 21px;
    color: #ddc77d;
    background: rgba(17, 48, 65, 0.74);
    border-color: rgba(64, 99, 119, 0.68);
    border-left: 0;
    border-radius: 0 12px 12px 0;
    box-shadow: none;
    font-size: 14px;
}

.casting-time-row {
    min-width: 0;
}

.time-context {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    min-height: 63px;
    margin-top: 0;
    padding: 11px 16px;
    background: rgba(3, 21, 32, 0.66);
    border: 1px solid rgba(64, 99, 119, 0.68);
    border-radius: 14px;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.12);
}

.time-context strong {
    display: block;
    min-height: 1.4em;
    margin-top: 0;
    color: #e2e8e8;
    font-size: 14.5px;
    font-weight: 400;
}

.time-context .text-action {
    color: #e0c775;
    font-size: 14px;
}

.time-context-editor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
    margin-top: 18px;
    padding: 20px;
    background: rgba(2, 11, 25, 0.24);
    border: 1px solid var(--hairline);
    border-radius: 16px;
}

.time-context-editor[hidden] {
    display: none;
}

.time-context-editor label {
    color: #d9e1eb;
    font-size: 13px;
}

.time-context-editor .field-error {
    grid-column: 1 / -1;
    min-height: 1.3em;
    margin: 0;
    color: #f0aaa0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
}

.text-action {
    min-height: auto;
    padding: 7px 0;
    color: var(--gold-soft);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.text-action:hover,
.text-action:focus-visible {
    color: var(--ivory);
}

.casting-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
    margin-top: 0;
}

.casting-secondary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.casting-secondary-actions button {
    min-height: 52px;
}

.history-persistence-warning {
    margin: 14px 0 0;
    color: #f0c18c;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    line-height: 1.6;
}

.casting-card-closing {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.55fr);
    gap: 42px;
    align-items: end;
    margin-top: 34px;
}

.casting-culture-note {
    padding-left: 20px;
    color: #b1bec6;
    border-left: 1px solid var(--gold);
    font-size: 14.5px;
    line-height: 1.82;
}

.casting-culture-note p {
    margin: 0;
}

.casting-culture-note a {
    display: inline-block;
    margin-top: 9px;
    color: var(--gold-soft);
    text-decoration: none;
}

#startBtn {
    position: relative;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    justify-self: end;
    width: auto;
    min-width: 236px;
    min-height: 52px;
    padding: 0 22px;
    overflow: hidden;
    color: #f1d987;
    background: linear-gradient(180deg, rgba(20, 57, 78, 0.9), rgba(8, 31, 46, 0.94));
    border: 1px solid #d7ba6c;
    border-radius: 11px;
    box-shadow: 0 13px 30px rgba(0, 0, 0, 0.25), inset 0 1px rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

#startBtn::before {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    background: linear-gradient(110deg, transparent 18%, rgba(255, 255, 255, 0.24) 48%, transparent 74%);
    transform: translateX(-105%);
    transition: transform 420ms ease;
}

#startBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: saturate(1.05) brightness(1.04);
    box-shadow: 0 20px 42px rgba(0, 4, 12, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

#startBtn:hover:not(:disabled)::before {
    transform: translateX(105%);
}

#startBtn:disabled {
    cursor: wait;
    filter: saturate(0.6);
    opacity: 0.72;
}

.cast-primary-label {
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: .12em;
}

.cast-primary-divider {
    width: 1px;
    height: 15px;
    margin: 0 11px;
    background: rgba(224, 195, 105, .34);
}

.cast-primary-price {
    margin: 0;
    color: #d8c17b;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: .04em;
}

.cast-primary-price[hidden] {
    display: none;
}

.free-pilot-dialog {
    position: fixed;
    inset: 0;
    width: min(620px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    color: var(--ivory);
    background: transparent;
    border: 0;
}

.free-pilot-dialog::backdrop {
    background: rgba(0, 8, 14, 0.78);
    backdrop-filter: blur(7px);
}

.free-pilot-dialog__panel {
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: clamp(28px, 5vw, 42px);
    background:
        radial-gradient(circle at 50% 0%, rgba(217, 180, 91, 0.16), transparent 48%),
        linear-gradient(160deg, #102c40, #061520 72%);
    border: 1px solid rgba(215, 186, 108, 0.72);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.56), inset 0 1px rgba(255, 255, 255, 0.08);
}

.free-pilot-dialog__panel h2 { margin: 12px 0 16px; }
.free-pilot-dialog__panel p { color: var(--mist); line-height: 1.8; }
.free-pilot-dialog__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 26px;
}

.share-dialog {
    position: fixed;
    inset: 0;
    width: min(660px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    color: var(--ivory);
    background: transparent;
    border: 0;
}

.share-dialog::backdrop {
    background: rgba(0, 8, 14, 0.82);
    backdrop-filter: blur(7px);
}

.share-dialog__panel {
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: clamp(24px, 5vw, 40px);
    background:
        radial-gradient(circle at 50% 0%, rgba(217, 180, 91, 0.14), transparent 48%),
        linear-gradient(160deg, #102c40, #061520 72%);
    border: 1px solid rgba(215, 186, 108, 0.72);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.56), inset 0 1px rgba(255, 255, 255, 0.08);
}

.share-dialog__panel h2 {
    margin: 10px 0 12px;
    padding: 0;
    color: var(--ivory);
}

.share-dialog__panel > p:not(.brand-eyebrow) {
    color: var(--mist);
    line-height: 1.7;
}

.share-options {
    display: grid;
    gap: 10px;
    margin: 22px 0 0;
    padding: 0;
    border: 0;
}

.share-option-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px 14px;
    color: #dce4ef;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    line-height: 1.55;
}

.share-option-row input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--gold);
}

.share-option-row--fixed {
    color: var(--mist);
    cursor: default;
}

.share-dialog__actions {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 24px -4px -4px;
    padding: 14px 4px 4px;
    background: linear-gradient(180deg, transparent, #071824 28%);
}

.share-preview-dialog__panel {
    text-align: center;
}

.share-preview-dialog__image {
    display: block;
    max-width: 100%;
    max-height: calc(100dvh - 240px);
    margin: 20px auto 0;
    object-fit: contain;
    border: 1px solid rgba(215, 186, 108, 0.38);
    border-radius: 8px;
}

.result-section {
    margin-top: 70px;
}

.reading-results {
    display: none;
    width: 100%;
    margin-top: 44px;
    padding: clamp(36px, 4vw, 54px);
    color: var(--ivory);
    background: linear-gradient(145deg, rgba(14, 45, 64, 0.92), rgba(8, 32, 48, 0.94) 62%, rgba(7, 27, 41, 0.95));
    border: 1px solid rgba(91, 126, 145, 0.42);
    border-radius: 25px;
    box-shadow: 0 20px 58px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.035);
}

.reading-results > h2 {
    margin: 0 0 30px;
    padding: 0;
    text-align: center;
    font-size: clamp(28px, 2.4vw, 36px);
}

.hexagram-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 24px);
    margin: 0;
}

.hexagram-card {
    min-width: 0;
    padding: 26px 20px 24px;
    color: var(--ivory);
    text-align: center;
    border: 1px solid rgba(217, 184, 108, 0.2);
    border-radius: 18px;
}

.hexagram-card--primary {
    border-color: rgba(217, 184, 108, 0.42);
    box-shadow: inset 0 1px 0 rgba(236, 209, 132, 0.1);
}

.gua-title,
.gua-name {
    text-align: center;
}

.gua-title {
    color: var(--gold-bright);
    font-size: 17px;
    letter-spacing: 0.14em;
}

.gua-description,
.gua-interpretation {
    color: #99a9bf;
}

.gua-image {
    min-height: 150px;
    margin: 20px 0 10px;
    color: var(--ivory);
    font-size: clamp(112px, 15vw, 176px);
    line-height: 0.9;
    transform: none;
}

.hexagram-visual {
    display: grid;
    position: relative;
    width: 100%;
    min-height: 112px;
    gap: 12px;
    margin: 28px 0 22px;
    font-size: initial;
    line-height: normal;
}

.hexagram-core {
    display: grid;
    width: 112px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    grid-template-rows: repeat(6, 7px);
    align-content: center;
    gap: 10px;
}

.hexagram-line {
    position: relative;
    width: 100%;
    height: 7px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.hexagram-line:nth-child(-n + 3) {
    transform: translateY(-3.5px);
}

.hexagram-line:nth-child(n + 4) {
    transform: translateY(3.5px);
}

.yang-segment,
.yin-segment {
    display: block;
    height: 7px;
    width: auto;
    min-width: 0;
    background: var(--ivory);
    border-radius: 1px;
}

.yang-segment {
    flex: 1 1 100%;
}

.yin-segment {
    flex: 1 1 calc(50% - 9px);
}

.hexagram-line--moving .yang-segment,
.hexagram-line--moving .yin-segment {
    background: var(--gold-soft);
    box-shadow: 0 0 14px rgba(214, 180, 95, 0.3);
}

.moving-line-callout {
    position: absolute;
    top: 50%;
    left: calc(100% + 13px);
    display: flex;
    height: auto;
    align-items: center;
    color: var(--gold-soft);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: left;
    transform: translateY(-50%);
}

.moving-line-guide {
    position: relative;
    display: block;
    flex: 0 0 24px;
    width: 24px;
    height: 1px;
    margin-right: 7px;
    background: linear-gradient(90deg, var(--gold) 0%, rgba(214, 180, 95, 0.08) 100%);
}

.moving-line-guide::before {
    position: absolute;
    top: -2px;
    left: 0;
    width: 5px;
    height: 5px;
    content: "";
    background: var(--gold-soft);
    transform: rotate(45deg);
}

.moving-line-label strong,
.moving-line-label small {
    display: block;
    white-space: nowrap;
}

.moving-line-label strong {
    color: var(--gold-soft);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.moving-line-label small {
    margin-top: 3px;
    color: var(--mist);
    font-size: 10px;
}

.gua-name {
    color: var(--ivory);
    font-size: 18px;
}

.interpretation,
.complete-reading {
    padding: 28px;
    color: #dce4ef;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 2px solid var(--gold);
    border-radius: 0 16px 16px 0;
}

.hexagram-card,
.complete-reading {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022));
}

.complete-reading {
    margin-top: 28px;
    padding: clamp(28px, 4vw, 48px);
}

.complete-reading h3 {
    margin-top: 0;
}

#interpretationContent {
    max-width: 840px;
    margin: 0 auto;
    overflow-wrap: anywhere;
}

#interpretationContent p {
    font-size: clamp(17px, 1.25vw, 18px);
    line-height: 2.05;
    margin: 0 0 1.15em;
}

#interpretationContent p:last-child {
    margin-bottom: 0;
}

.reading-feedback {
    max-width: 840px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(210, 225, 232, 0.16);
}

.reading-feedback-prompt {
    margin: 0 0 15px;
    color: #d6e0e4;
    font: 500 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.reading-feedback-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.reading-feedback-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    color: #dbe5e9;
    background: rgba(10, 37, 52, 0.72);
    border: 1px solid rgba(194, 213, 222, 0.32);
    border-radius: 999px;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
}

.reading-feedback-button[aria-pressed="true"] {
    color: var(--ivory);
    border-color: rgba(222, 207, 157, 0.52);
    background: rgba(18, 49, 64, 0.9);
}

.reading-feedback-button:focus-visible {
    outline: 2px solid var(--ivory);
    outline-offset: 3px;
}

.reading-feedback-status {
    margin: 13px 0 0;
    color: var(--mist);
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .reading-feedback-button { flex: 1 1 130px; }
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 24px;
}

.save-share-image-btn {
    min-width: 190px;
    color: #07131d;
    background: linear-gradient(135deg, var(--gold-soft), var(--gold));
    border: 1px solid rgba(255, 244, 207, 0.42);
    font-weight: 650;
    letter-spacing: 0.05em;
}

.save-share-image-btn:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.save-share-image-btn:focus-visible {
    outline: 2px solid var(--ivory);
    outline-offset: 3px;
}

.save-share-image-btn:disabled {
    cursor: default;
    opacity: 0.58;
}

.share-image-status {
    flex: 1 0 100%;
    margin: 0;
    color: #f0c49a;
    font-size: 14px;
    text-align: right;
}

.share-image-capture {
    position: fixed;
    top: 0;
    left: -10000px;
    width: 800px;
    pointer-events: none;
}

.share-card {
    width: 800px;
    padding: 52px;
    color: var(--ivory);
    background:
        radial-gradient(circle at 50% 0%, rgba(214, 180, 95, 0.14), transparent 34%),
        linear-gradient(150deg, #102c40, #061520 76%);
    font-family: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
}

.share-brand h1 {
    margin: 0 0 40px;
    color: var(--gold-soft);
    font-size: 34px;
    text-align: center;
}

.share-hexagram-triptych {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.share-hexagram {
    padding: 20px 10px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.share-hexagram h2,
.share-section h2 {
    margin: 0 0 16px;
    padding: 0;
    color: var(--gold-soft);
    font-size: 18px;
}

.share-hexagram-visual {
    margin: 20px 0;
}

.share-hexagram .moving-line-guide {
    flex-basis: 6px;
    width: 6px;
    margin-right: 3px;
}

.share-hexagram .moving-line-label {
    max-width: 22px;
    overflow-wrap: anywhere;
}

.share-hexagram .moving-line-label strong,
.share-hexagram .moving-line-label small {
    line-height: 1.15;
    white-space: normal;
}

.share-hexagram-name {
    margin: 0;
    color: var(--ivory);
    font-size: 17px;
}

.share-section {
    margin-top: 24px;
    padding: 22px;
    color: #dce4ef;
    background: rgba(255, 255, 255, 0.04);
    border-left: 2px solid var(--gold);
}

.share-section p {
    margin: 0.85em 0 0;
    color: #dce4ef;
    line-height: 1.8;
}

.share-context-row {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 16px;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.share-context-row span {
    overflow-wrap: anywhere;
}

.share-footer {
    margin-top: 34px;
    padding-top: 22px;
    color: var(--mist);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

.share-website {
    color: var(--gold-soft);
    letter-spacing: 0.08em;
}

.interpretation-section,
.loading,
.error {
    color: #dce4ef;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 20px;
}

.footer-links a,
.pilot-page a {
    color: var(--gold-bright);
    text-decoration-color: rgba(240, 212, 141, 0.42);
    text-underline-offset: 4px;
}

.footer {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pilot-page h1 {
    font-size: clamp(36px, 6vw, 58px);
}

.culture-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, var(--reading));
    justify-content: center;
    gap: clamp(36px, 5vw, 76px);
    align-items: start;
}

.culture-toc {
    position: sticky;
    top: 28px;
    display: grid;
    border-right: 1px solid var(--hairline);
}

.culture-toc a {
    padding: 9px 18px 9px 0;
    color: var(--mist);
    text-decoration: none;
}

.culture-toc a:hover,
.culture-toc a:focus-visible {
    color: var(--gold-soft);
}

.culture-chapter {
    scroll-margin-top: 28px;
    padding-bottom: 42px;
}

.culture-chapter + .culture-chapter {
    padding-top: 42px;
    border-top: 1px solid var(--hairline);
}

.culture-example {
    margin: 18px 0;
    padding: 16px 18px;
    color: #b7c4cf;
    background: rgba(3, 16, 26, 0.34);
    border-left: 2px solid rgba(214, 180, 95, 0.62);
}

@media (max-width: 1180px) {
    .hexagram-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 930px) {
    .casting-meta-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .free-pilot-dialog__actions { grid-template-columns: 1fr; }

    .share-dialog {
        width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px);
    }

    .share-dialog__panel {
        max-height: calc(100dvh - 24px);
        padding: 22px 18px;
    }

    .share-dialog__actions {
        grid-template-columns: 1fr;
    }

    .save-share-image-btn {
        width: 100%;
    }

    .share-image-status {
        text-align: left;
    }

    body,
    body.pilot-page {
        padding: 0;
    }

    .site-shell {
        width: min(100% - 32px, var(--content));
    }

    .site-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .site-header {
        min-height: auto;
        padding: 20px 0;
    }

    .site-brand {
        white-space: normal;
    }

    .site-nav {
        flex-wrap: wrap;
        margin: 0 -10px;
    }

    .page-main {
        padding: 32px 0 48px;
    }

    .reading-page {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .culture-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .culture-toc {
        position: static;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        border-right: 0;
        scrollbar-width: thin;
    }

    .culture-toc a {
        flex: 0 0 auto;
        padding: 8px 11px;
        border: 1px solid var(--hairline);
        border-radius: 999px;
    }

    .language-switcher {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 42px;
        gap: 4px;
        justify-content: flex-start;
        overflow-x: visible;
        flex-wrap: wrap;
    }

    .language-switcher > * {
        flex: 0 0 auto;
    }

    .brand-hero {
        margin-bottom: 46px;
        text-align: left;
    }

    .brand-hero h1 {
        font-size: clamp(36px, 12vw, 50px);
    }

    .brand-subtitle {
        letter-spacing: 0.04em;
    }

    .intro-box {
        padding: 18px;
    }

    .sensory-inputs {
        grid-template-columns: 1fr;
    }

    .reading-results {
        padding: 30px 18px 34px;
        border-radius: 22px;
    }

    .hexagram-grid {
        grid-template-columns: 1fr;
    }

    .hexagram-card {
        padding-inline: 10px;
    }

    .hexagram-visual {
        width: 100%;
    }

    .moving-line-guide {
        flex-basis: 8px;
        width: 8px;
        margin-right: 4px;
    }

    .moving-line-label {
        max-width: 37px;
        overflow-wrap: anywhere;
    }

    .moving-line-label strong,
    .moving-line-label small {
        white-space: normal;
    }

    .moving-line-label strong {
        font-size: 9px;
    }

    .moving-line-label small {
        font-size: 9px;
    }

    .result-actions {
        flex-direction: column;
    }

    .button-group {
        flex-direction: column;
    }

    .site-shell {
        width: min(100% - 24px, var(--content));
    }

    .home-hero {
        padding: 64px 0 48px;
    }

    .home-hero h1 {
        font-size: clamp(44px, 14vw, 62px);
    }

    .casting-card {
        padding: 38px 23px 42px;
        border-radius: 22px;
    }

    .casting-card-heading h2 {
        font-size: 31px;
    }

    .casting-context-grid {
        grid-template-columns: 1fr;
    }

    .casting-context-grid label {
        font-size: 16px;
    }

    .casting-question textarea {
        min-height: 178px;
    }

    .casting-card textarea::placeholder,
    .casting-card input::placeholder {
        font-size: 14px;
    }

    .time-context-editor {
        grid-template-columns: 1fr;
    }

    .time-context {
        align-items: flex-start;
        margin-top: 0;
        padding: 16px;
    }

    .casting-actions {
        display: grid;
        grid-template-columns: 1fr;
        margin-top: 32px;
    }

    .casting-secondary-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .casting-card-closing {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .casting-culture-note {
        padding-left: 16px;
        font-size: 14px;
    }

    #startBtn {
        justify-self: stretch;
        width: 100%;
    }
}

/* Private analytics dashboard */
#adminApp {
    width: min(1480px, calc(100% - 64px));
    max-width: 100%;
    min-height: 100vh;
    box-sizing: border-box;
    margin: 0 auto;
    padding: clamp(32px, 5vw, 72px) 0;
    overflow-x: clip;
}

.admin-language {
    display: block;
    min-width: 44px;
    min-height: 44px;
    margin: 0 0 24px auto;
    color: var(--gold-soft);
    background: transparent;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    cursor: pointer;
}

.admin-login {
    width: min(520px, 100%);
    box-sizing: border-box;
    margin: clamp(36px, 8vh, 96px) auto 0;
    padding: clamp(28px, 5vw, 52px);
    background: linear-gradient(145deg, rgba(13, 41, 63, 0.94), rgba(6, 25, 39, 0.94));
    border: 1px solid rgba(214, 180, 95, 0.28);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.admin-eyebrow {
    margin: 0 0 16px;
    color: var(--gold);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.admin-login h1,
.admin-dashboard h1 {
    margin: 0;
    color: var(--ivory);
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.2;
}

.admin-login__intro {
    margin: 18px 0 28px;
    color: var(--mist);
    line-height: 1.75;
}

.admin-login__form {
    display: grid;
    gap: 12px;
}

.admin-login__form label,
.admin-custom-range label {
    color: #bdc9d5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}

.admin-login__form input,
.admin-custom-range input {
    min-width: 0;
    min-height: 48px;
    box-sizing: border-box;
    padding: 10px 14px;
    color: var(--ivory);
    background: rgba(2, 11, 18, 0.7);
    border: 1px solid rgba(145, 161, 179, 0.28);
    border-radius: 10px;
    color-scheme: dark;
}

.admin-button {
    min-height: 44px;
    padding: 10px 18px;
    color: var(--ivory);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 650;
    border-radius: 10px;
    cursor: pointer;
}

.admin-button--primary {
    color: var(--night);
    background: linear-gradient(135deg, var(--gold-soft), var(--gold));
    border: 1px solid rgba(236, 209, 132, 0.82);
}

.admin-button--quiet {
    background: transparent;
    border: 1px solid rgba(145, 161, 179, 0.3);
}

.admin-button:disabled,
.admin-ranges button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.admin-alert,
.admin-status {
    min-height: 1.6em;
    margin: 18px 0 0;
    color: #dfaaa4;
    line-height: 1.6;
}

.admin-dashboard {
    width: 100%;
}

.admin-dashboard__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--hairline);
}

.admin-dashboard__heading {
    min-width: 0;
}

.admin-session-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 30px;
    margin: 20px 0 30px;
    color: var(--mist);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}

.admin-session-meta p {
    margin: 0;
}

.admin-ranges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.admin-ranges button {
    min-height: 44px;
    padding: 9px 16px;
    color: var(--mist);
    background: rgba(10, 34, 53, 0.66);
    border: 1px solid var(--hairline);
    border-radius: 999px;
    cursor: pointer;
}

.admin-ranges button[aria-pressed="true"] {
    color: var(--night);
    background: var(--gold-soft);
    border-color: var(--gold-soft);
}

.admin-custom-range {
    display: grid;
    grid-template-columns: auto minmax(150px, 1fr) auto minmax(150px, 1fr) auto;
    gap: 10px 12px;
    align-items: center;
    margin: 0 0 24px;
    padding: 18px;
    background: rgba(10, 34, 53, 0.56);
    border: 1px solid var(--hairline);
    border-radius: 14px;
}

.admin-metric-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin: 28px 0;
}

.admin-metric-card {
    min-width: 0;
    min-height: 112px;
    box-sizing: border-box;
    padding: 22px 18px;
    color: var(--ivory);
    background: linear-gradient(160deg, rgba(13, 41, 63, 0.92), rgba(7, 26, 40, 0.92));
    border: 1px solid var(--hairline);
    border-top-color: rgba(214, 180, 95, 0.44);
    border-radius: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(16px, 1.7vw, 22px);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.admin-trend {
    padding: clamp(20px, 3vw, 30px);
    background: rgba(10, 34, 53, 0.6);
    border: 1px solid var(--hairline);
    border-radius: 20px;
}

.admin-trend__heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.admin-trend__heading h2 {
    margin: 0;
    color: var(--ivory);
    font-size: 24px;
}

.admin-trend__heading span {
    color: var(--mist);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
}

.admin-trend__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 0 0 18px;
    padding: 0;
    color: #bdc9d5;
    border: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
}

.admin-trend__filters legend {
    width: 100%;
    margin-bottom: 4px;
    color: var(--mist);
}

.admin-trend__filters label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    cursor: pointer;
}

.admin-trend__filters input {
    width: 16px;
    height: 16px;
    accent-color: var(--gold);
}

.admin-trend__viewport {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.admin-trend__svg {
    display: block;
    max-height: 310px;
    color: var(--mist);
}

.admin-trend__axis {
    stroke: rgba(145, 161, 179, 0.28);
    stroke-width: 1;
}

.admin-trend__legend,
.admin-trend__day {
    fill: #aebbc8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 11px;
}

.admin-disclosure {
    margin: 22px 0 0;
    color: var(--mist);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    line-height: 1.8;
}

@media (max-width: 900px) {
    .admin-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-custom-range {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .admin-custom-range .admin-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    #adminApp {
        width: min(100% - 28px, 1480px);
        padding-top: 20px;
    }

    .admin-dashboard__header {
        align-items: stretch;
        flex-direction: column;
        gap: 20px;
    }

    .admin-dashboard__header .admin-button {
        align-self: flex-start;
    }

    .admin-metric-grid {
        grid-template-columns: 1fr;
    }

    .admin-custom-range {
        grid-template-columns: 1fr;
    }

    .admin-custom-range .admin-button {
        grid-column: auto;
    }

    .admin-trend {
        padding: 18px 14px;
    }

    .admin-trend__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}

@media (max-width: 390px) {
    #adminApp {
        width: calc(100% - 24px);
    }

    .admin-login {
        padding: 24px 18px;
    }

    .admin-ranges button {
        flex: 1 1 calc(50% - 10px);
    }
}

/* End private analytics dashboard */

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

/* Shared long-form content pages */
.page-main {
    padding: clamp(72px, 8vw, 128px) 0 96px;
}

/* The landing page deliberately reaches the casting card sooner than long-form pages. */
.page-main.home-main {
    padding: 0 0 96px;
}

.home-hero {
    padding: clamp(76px, 5.4vw, 96px) 0 clamp(72px, 7vw, 108px);
}

.page-hero,
.reading-page {
    width: min(100%, var(--reading));
    margin-inline: auto;
}

.page-hero {
    margin-bottom: 48px;
}

.page-hero h1 {
    margin: 16px 0;
    font-size: clamp(46px, 6vw, 76px);
}

.page-lede {
    color: var(--mist);
    line-height: 1.8;
}

.reading-page {
    padding: clamp(28px, 5vw, 58px);
    background: rgba(10, 34, 53, 0.72);
    border: 1px solid var(--hairline);
    border-radius: 24px;
}

.reading-page h2 {
    margin-top: 2.4em;
    color: var(--gold-soft);
}

.reading-page p,
.reading-page li {
    color: #b6c1cc;
    line-height: 1.95;
}

[hidden] {
    display: none !important;
}

/* Cultural guide editorial details */
.culture-reading {
    position: relative;
}

.culture-toc a + a {
    border-top: 1px solid var(--hairline);
}

.culture-chapter h2 {
    margin: 0 0 20px;
    font-size: clamp(27px, 3vw, 34px);
    line-height: 1.35;
}

.culture-chapter h3 {
    margin: 0 0 10px;
    color: var(--gold-soft);
    font-size: 18px;
    line-height: 1.45;
}

.culture-chapter p {
    margin: 0 0 1.2em;
}

.culture-chapter .chapter-number {
    margin-bottom: 12px;
    color: var(--gold);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.2em;
}

.culture-quote {
    margin: 22px 0 24px;
    padding: 18px 20px;
    background: rgba(214, 180, 95, 0.045);
    border-top: 1px solid var(--hairline);
    border-right: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    border-left: 2px solid rgba(214, 180, 95, 0.72);
}

.culture-quote p {
    margin: 0;
    color: #ddd5c2;
    font-size: 17px;
    line-height: 1.9;
}

.culture-concept-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 24px 0 26px;
}

.culture-concept-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.culture-concept-card {
    padding: 20px;
    background: rgba(3, 16, 26, 0.28);
    border: 1px solid var(--hairline);
    border-top-color: rgba(214, 180, 95, 0.38);
}

.culture-concept-card p {
    margin: 0;
    color: #aebbc8;
    font-size: 14px;
    line-height: 1.85;
}

.culture-historical-note {
    margin: 22px 0 0;
    padding: 17px 19px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--hairline);
    border-left: 2px solid rgba(214, 180, 95, 0.56);
}

.culture-historical-note p {
    margin: 0;
    color: #aebbc8;
    font-size: 14px;
    line-height: 1.85;
}

.culture-historical-note--boundary {
    background: rgba(214, 180, 95, 0.035);
}

.culture-source-list {
    display: grid;
    gap: 12px;
    margin: 24px 0;
    padding: 0;
    list-style: none;
}

.culture-source-list li {
    padding: 16px 18px;
    background: rgba(3, 16, 26, 0.25);
    border: 1px solid var(--hairline);
    border-left: 2px solid rgba(214, 180, 95, 0.48);
}

.culture-return {
    display: inline-flex;
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--hairline);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-decoration: none;
}

@media (max-width: 760px) {
    .culture-concept-grid,
    .culture-concept-grid--three {
        grid-template-columns: 1fr;
    }

    .culture-chapter {
        padding-bottom: 34px;
    }

    .culture-chapter + .culture-chapter {
        padding-top: 34px;
    }

    .culture-quote {
        padding: 16px;
    }
}
