:root {
    color-scheme: dark;
    --night: #10091a;
    --ground: #211232;
    --ink: #fff7ef;
    --muted: #e3d2e9;
    --gold: #f3ca8a;
    --gold-dim: #c6945e;
    --content-width: 1180px;
    --font: "Noto Sans Thai", "Leelawadee UI", "Th Sarabun New", "Tahoma", sans-serif;
}

* { box-sizing: border-box; }

body {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-width: 280px;
    min-block-size: 100vh;
    min-block-size: 100svh;
    margin: 0;
    isolation: isolate;
    background: var(--night);
    color: var(--ink);
    font: 400 1rem/1.6 var(--font);
}

h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }

button, input, textarea { font: inherit; }
button { color: inherit; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }

:focus-visible {
    outline: 2px solid #ffdb9b;
    outline-offset: 4px;
}

main:focus { outline: none; }

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    z-index: 3;
    top: .65rem;
    left: .75rem;
    padding: .55rem .9rem;
    border-radius: .5rem;
    background: var(--gold);
    color: #261222;
    transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
    position: relative;
    z-index: 1;
    border-bottom: 1px solid #c18e6433;
    background: #130b1d;
}

.site-header-inner {
    display: grid;
    grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
    align-items: center;
    width: min(100% - 3rem, var(--content-width));
    min-height: 78px;
    margin-inline: auto;
}

.brand {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: .7rem;
    color: var(--ink);
    font-size: 1.26rem;
    font-weight: 750;
}

.brand-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid #dcae76b3;
    border-radius: 50%;
    color: var(--gold);
    font-family: Georgia, serif;
    font-size: 1.42rem;
    line-height: 1;
}

.site-nav {
    display: flex;
    align-self: center;
    align-items: stretch;
    gap: clamp(.3rem, 1vw, .85rem);
}

.site-nav a {
    position: relative;
    display: grid;
    min-height: 41px;
    align-items: center;
    justify-content: center;
    padding-block: .14rem .42rem;
    padding-inline: clamp(.65rem, 2vw, 1.2rem);
    border-radius: .45rem;
    color: var(--muted);
    font-size: .96rem;
    font-weight: 650;
    line-height: 1.25;
    text-align: center;
}

.site-nav a::before, .site-nav a::after {
    position: absolute;
    inset-inline: 0;
    margin-inline: auto;
    opacity: 0;
    content: "";
    pointer-events: none;
}

.site-nav a::before {
    z-index: 1;
    inset-block-end: calc(.24rem - 1px);
    width: 4px;
    height: 4px;
    background: #ffd99f;
    box-shadow: 0 0 7px #f3b86ab3;
    rotate: 45deg;
}

.site-nav a::after {
    inset-block-end: .24rem;
    width: min(66%, 3.15rem);
    height: 1px;
    background: linear-gradient(90deg, transparent, #efc389, transparent);
    scale: .38 1;
}

.site-nav a:is(:hover, :focus-visible, [aria-current="page"]) { color: var(--gold); }
.site-nav a:is(:hover, :focus-visible)::after { opacity: .64; scale: 1 1; }
.site-nav a[aria-current="page"]::after { opacity: 1; scale: 1 1; }
.site-nav a[aria-current="page"]::before { opacity: 1; }

.line-contact {
    display: grid;
    justify-self: end;
    width: 44px;
    height: 44px;
    place-items: center;
}

.line-contact img { display: block; }

body > main {
    display: flex;
    min-inline-size: 0;
    flex-direction: column;
}

.stage {
    position: relative;
    flex: 1 0 auto;
    isolation: isolate;
    padding: 2rem max(1rem, min(3vw, 3rem)) 1.2rem;
    padding-block: clamp(1.2rem, 5svh, 4.1rem) clamp(.7rem, 2.1svh, 1.75rem);
    padding-inline: max(1rem, min(3vw, 3rem), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    text-align: center;
}

:is(.dream-stage, .ritual-stage, .scratch-stage) {
    display: grid;
    align-items: center;
}

.stage-shell {
    width: min(100%, var(--content-width));
    margin-inline: auto;
}

.stage-inner { min-width: 0; }
.hero-heading { margin-bottom: clamp(.95rem, 2.6svh, 1.9rem); }

.hero-heading > p {
    max-width: 43rem;
    margin: .65rem auto 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.36vw, 1.35rem);
    text-wrap: pretty;
}

.celestial-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    margin-bottom: .7rem;
    color: var(--gold);
    font: 400 clamp(1.6rem, 4vw, 2.15rem)/1 Georgia, serif;
}

.celestial-mark span {
    display: block;
    width: clamp(1.8rem, 5vw, 3.5rem);
    height: 1px;
    background: linear-gradient(90deg, transparent, #ebbe7ea3);
}

.celestial-mark > span:last-child { transform: rotate(180deg); }
.celestial-mark .moon-mark { font-style: normal; }

h1 {
    color: var(--ink);
    font-size: clamp(2.12rem, calc(1.55rem + 2.7vw), 4.8rem);
    font-weight: 750;
    line-height: 1.19;
    letter-spacing: -.017em;
    text-wrap: balance;
}

.dream-workspace, .ritual-workspace { margin-inline: auto; }
.dream-workspace { width: min(100%, clamp(39rem, 53vw, 56rem)); }
.ritual-workspace { width: min(100%, 40rem); }

.dream-form {
    width: 100%;
    text-align: left;
}

.dream-form > label {
    display: block;
    margin-bottom: .45rem;
    color: var(--ink);
    font-size: clamp(1rem, 1.17vw, 1.18rem);
    font-weight: 670;
}

.dream-field { position: relative; }

.dream-field textarea {
    display: block;
    width: 100%;
    block-size: 7.25rem;
    block-size: clamp(6.2rem, 15svh, 11.5rem);
    padding: .75rem clamp(.9rem, 1.55vw, 1.25rem) 2rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    resize: none;
    border: 1px solid #f3dfff70;
    border-radius: .9rem;
    background: #392450e8;
    box-shadow: 0 13px 30px #170a2760;
    color: var(--ink);
    font-size: clamp(1rem, 1.1vw, 1.23rem);
    line-height: 1.55;
}

.dream-field textarea::placeholder { color: #ead8edb8; }
.dream-field textarea:focus-visible { border-color: #f5ce91; outline-offset: 2px; }

.char-count {
    position: absolute;
    right: 1.15rem;
    bottom: .37rem;
    color: #ccb7d0;
    font-size: .8rem;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.dream-examples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .35rem clamp(.42rem, .95vw, .72rem);
    margin: .65rem .3rem 0;
    color: var(--muted);
    font-size: .87rem;
}

.example-button {
    min-height: 36px;
    padding: .3rem clamp(.65rem, 1vw, .98rem);
    border: 1px solid #eed5e941;
    border-radius: 99px;
    background: #2d1944;
    color: #f3def4;
    cursor: pointer;
}

.example-button:hover { border-color: #dba66ea6; background: #37243a; }

.field-note {
    margin: .6rem 0 1rem;
    color: var(--muted);
    font-size: .91rem;
    text-align: center;
}

.gold-button, .outline-button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .68rem 1.3rem;
    border: 1px solid #fff1e0;
    border-radius: 99px;
    background: linear-gradient(160deg, #fffaf2, #eadaef);
    color: #371432;
    font-weight: 750;
    line-height: 1.3;
    cursor: pointer;
}

.gold-button:hover { background: #fff1e4; }
.gold-button:disabled { opacity: .7; }
.gold-button span { font: 700 1.17rem/1 Georgia, serif; }
.dream-form > .gold-button {
    display: flex;
    width: min(calc(100% - 1.5rem), clamp(16rem, 26vw, 22rem));
    min-height: clamp(3rem, 5.3svh, 3.65rem);
    padding-inline: clamp(1.15rem, 2.6vw, 2rem);
    margin-inline: auto;
    font-size: clamp(1rem, 1.16vw, 1.2rem);
}
.dream-examples + .gold-button { margin-block-start: clamp(.7rem, 2svh, 1.1rem); }
.dream-form .status { text-align: center; }

.outline-button {
    border-color: var(--gold-dim);
    background: #24172eeb;
    color: var(--ink);
}

.outline-button:hover { background: #452949; }

.status {
    margin-top: .7rem;
    color: #f6dda9;
    font-size: .94rem;
}

.status:empty { margin: 0; }
.status.is-error, .char-count.is-error { color: #ffd0cf; }

.interaction-status.status {
    block-size: 2.85rem;
    block-size: clamp(1.8rem, 3.7svh, 2.85rem);
    margin: .43rem 0 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    line-height: 1.5;
}

.reading-actions {
    display: grid;
    min-block-size: 44px;
    align-content: start;
    justify-items: center;
}

.reading-actions .outline-button {
    min-height: 44px;
    max-width: calc(100% - 1rem);
    padding-block: .46rem;
    font-size: .94rem;
}

html:has(.reading-dialog[open]) { overflow: hidden; }

.reading-dialog {
    --reading-glow: #32234c;
    --reading-inset: clamp(.5rem, 3vw, 2rem);

    position: fixed;
    inset: 0;
    inline-size: min(calc(100% - 2 * var(--reading-inset)), 70rem);
    max-inline-size: none;
    min-block-size: min(42vh, 26rem);
    max-block-size: calc(100vh - 2 * var(--reading-inset));
    max-block-size: min(calc(100dvh - 2 * var(--reading-inset)), 60rem);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid #f3ca8a50;
    border-radius: clamp(.85rem, 2.4vw, 1.5rem);
    background: radial-gradient(ellipse at 48% 18%, var(--reading-glow), transparent 78%), #1a1224;
    box-shadow: 0 24px 90px #0b0616ab;
    color: var(--ink);
}

.page-siamsi .reading-dialog { --reading-glow: #44232b; }
.reading-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.reading-dialog::backdrop {
    background: #10091a9c;
    backdrop-filter: blur(10px);
}

.reading-toolbar {
    display: flex;
    justify-content: flex-end;
    padding: clamp(.65rem, 2vw, 1.45rem) clamp(.7rem, 2.5vw, 1.7rem) .1rem;
}

.reading-close {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: .4rem;
    padding-inline: .85rem;
    border: 1px solid #f3ca8a67;
    border-radius: 99px;
    background: #2e203a;
    cursor: pointer;
}

.reading-close:hover { background: #443151; }
.reading-close span { color: var(--gold); font: 1.38rem/1 Georgia, serif; }

.reading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-block: clamp(.8rem, 2.1vh, 1.4rem) clamp(1.45rem, 5vh, 3.35rem);
    padding-inline: clamp(1rem, 5vw, 4rem);
}

.reading-content:focus-visible { outline-offset: -4px; }

.reading-copy {
    flex: none;
    width: min(100%, 43rem);
    margin-block: auto;
    text-align: start;
}

.reading-copy h2 {
    margin-block-end: clamp(.7rem, 2.1vh, 1.3rem);
    color: var(--gold);
    font-size: clamp(1.72rem, 4vw, 3rem);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.reading-copy h2:focus { outline: none; }

.reading-text {
    font-size: clamp(1.05rem, 1.35vw, 1.25rem);
    line-height: 1.85;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

#dream-result {
    --reading-glow: #382b50;
    inline-size: min(calc(100% - 2 * var(--reading-inset)), 47rem);
    min-block-size: 0;
}

#dream-result .reading-content {
    padding: .6rem clamp(1rem, 4.5vw, 2.4rem) clamp(1.25rem, 4vh, 2.35rem);
}

#dream-result .reading-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    inline-size: 100%;
    align-items: start;
    gap: clamp(1.2rem, 4vw, 2.3rem);
}

.dream-interpretation {
    min-inline-size: 0;
    padding-block: .15rem;
}

.dream-interpretation h2 {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-block-end: clamp(.75rem, 2vw, 1.18rem);
    color: #fff2dc;
    font-size: clamp(1.45rem, 3.6vw, 2.55rem);
}

.dream-interpretation h2 > span {
    color: var(--gold);
    font: .86em/1 Georgia, serif;
}

.dream-interpretation .reading-text {
    color: #f2e8f4;
    font-size: clamp(1rem, 1.35vw, 1.12rem);
    line-height: 1.78;
}

.dream-number-panel {
    min-inline-size: 0;
    padding: clamp(.85rem, 2.5vw, 1.25rem);
    border: 1px solid #dcae7670;
    border-radius: .92rem;
    background: radial-gradient(ellipse at 50% 0%, #49354e, transparent 82%), #21182e;
}

.dream-number-panel h3 {
    margin: 0;
    color: var(--gold);
    font-size: clamp(1.05rem, 2vw, 1.27rem);
    text-align: center;
}

.dream-number-featured {
    display: grid;
    gap: .16rem;
    padding-block: .62rem .8rem;
    border-block-end: 1px solid #dcae7655;
    color: #e5d5e8;
    text-align: center;
    font-size: .86rem;
}

.dream-number-featured strong {
    color: #ffe1a5;
    font-size: clamp(1.95rem, 5vw, 2.9rem);
    line-height: 1.17;
    font-variant-numeric: tabular-nums;
}

.dream-number-row {
    display: grid;
    grid-template-columns: minmax(4.1rem, .38fr) minmax(0, 1fr);
    align-items: center;
    gap: .4rem;
    min-block-size: 3rem;
    padding-block: .26rem;
}

.dream-number-row:not(:last-child) { border-block-end: 1px solid #dcae7627; }

.dream-number-row h4 {
    margin: 0;
    color: #e5d5e8;
    font-size: .9rem;
    font-weight: 650;
}

.dream-number-row ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-items: center;
    gap: .18rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dream-number-row li {
    color: #fff0ce;
    font-size: clamp(1.18rem, 2.15vw, 1.52rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.dream-number-row [data-dream-number-group="digits"] li {
    display: grid;
    inline-size: clamp(2.05rem, 4vw, 2.4rem);
    block-size: clamp(2.05rem, 4vw, 2.4rem);
    place-items: center;
    border-radius: 50%;
    background: #f0d3a5;
    color: #2b1b27;
}

.site-footer {
    padding: .14rem 1rem clamp(.35rem, 1.15svh, .85rem);
    padding-block-end: max(clamp(.35rem, 1.15svh, .85rem), env(safe-area-inset-bottom, 0px));
    color: #ebd7e8;
    text-align: center;
    text-shadow: 0 1px 4px #130a19;
}

.site-footer-inner {
    display: flex;
    max-width: 41rem;
    align-items: center;
    justify-content: center;
    gap: clamp(.25rem, 1.5vw, .9rem);
    margin-inline: auto;
    font-size: clamp(.74rem, 1.08vw, .87rem);
    line-height: 1.35;
}

.site-footer-inner p { text-wrap: balance; }

.footer-brand {
    display: inline-flex;
    min-height: 27px;
    flex: none;
    align-items: center;
    gap: .35rem;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 700;
}

.footer-brand:hover { color: var(--gold); }

.footer-moon {
    display: grid;
    width: 1.15rem;
    height: 1.2rem;
    place-items: center;
    color: var(--gold);
    font: 1.12rem/1 Georgia, serif;
}

@media (max-width: 430px) {
    .footer-brand { min-width: 24px; justify-content: center; }
    .footer-brand > span:last-child { display: none; }
}

.ritual-intro { margin-bottom: clamp(.35rem, 1.35svh, .75rem); }

.ritual-shell .siamsi-button {
    width: min(calc(100% - 1.5rem), 15rem);
    min-width: 0;
    touch-action: none;
    user-select: none;
}

.siamsi-button {
    position: relative;
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: .53rem;
    padding: .52rem .78rem;
    border: 1px solid #ffe7bb;
    border-radius: 99px;
    background: linear-gradient(174deg, #ffebc5, #e2ad72);
    box-shadow: inset 0 1px #fff2cb, 0 6px 24px #b46d3b54;
    color: #361b20;
    font-weight: 750;
    line-height: 1.25;
    cursor: pointer;
}

.siamsi-button:not(:disabled):hover { background: linear-gradient(174deg, #fff0ce, #edba7d); }
.siamsi-button[data-phase], .siamsi-button[data-phase]:hover { background: linear-gradient(174deg, #f8d9a8, #dfaa6f); }
.siamsi-button:disabled { cursor: wait; }

.siamsi-button-mark {
    display: grid;
    width: 1.55rem;
    height: 1.55rem;
    flex: none;
    place-items: center;
    border: 1px solid #8c543c60;
    border-radius: 50%;
    background: #fce0a9;
    color: #6f362d;
    font: 700 1.1rem/1 Georgia, serif;
}

.siamsi-progress {
    position: absolute;
    inset-inline: 15%;
    inset-block-end: .34rem;
    height: 3px;
    visibility: hidden;
    overflow: hidden;
    border-radius: 99px;
    background: #77453342;
    pointer-events: none;
}

.siamsi-button[data-phase] .siamsi-progress { visibility: visible; }

.siamsi-progress::before {
    display: block;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(112deg, #784531 0 5px, #a66840 5px 10px);
    content: "";
}

.ritual-display {
    --siamsi-scale: 1.08;

    position: relative;
    display: grid;
    width: min(100%, calc(244px * var(--siamsi-scale)));
    block-size: calc(225px * var(--siamsi-scale));
    place-items: start center;
    margin: 0 auto clamp(.95rem, 2.05svh, 1.6rem);
    padding-block-start: calc(24px * var(--siamsi-scale));
    overflow: clip;
    overflow-clip-margin: .6rem;
    isolation: isolate;
}

@media (min-width: 360px) {
    .ritual-display { --siamsi-scale: 1.26; }
}

@media (min-width: 621px) {
    .ritual-display { --siamsi-scale: 1.4; }
}

@media (min-width: 900px) {
    .ritual-display { --siamsi-scale: 1.6; }
}

@media (min-width: 1200px) {
    .ritual-display { --siamsi-scale: 1.76; }
}

@media (min-width: 1800px) {
    .ritual-display { --siamsi-scale: 2.18; }
}

@media (min-width: 621px) and (min-height: 861px) and (max-height: 1050px) {
    .ritual-stage { padding-block-start: clamp(1.2rem, 2.8svh, 1.7rem); }
}

@media (min-width: 900px) and (min-height: 861px) and (max-height: 1050px) {
    .ritual-display { --siamsi-scale: 1.62; }
}

@media (min-width: 1800px) and (min-height: 981px) and (max-height: 1050px) {
    .ritual-display { --siamsi-scale: 1.88; }
}

@media (min-width: 621px) and (max-height: 860px) {
    .ritual-display { --siamsi-scale: 1.38; }
}

@media (max-height: 700px) {
    .ritual-display { --siamsi-scale: 1.06; }
    .ritual-shell .siamsi-button { min-height: 44px; }
}

@media (max-height: 620px) {
    .ritual-display { --siamsi-scale: .86; }
}

@media (max-height: 500px) {
    .ritual-display {
        --siamsi-scale: .68;
        margin-block-end: .64rem;
    }
}

@media (max-width: 370px) {
    .siamsi-button-mark { display: none; }
}

.ritual-display::before {
    position: absolute;
    z-index: -1;
    inset: -1.5rem 0;
    background: radial-gradient(ellipse, #ca76544a 0%, #943a5e2f 37%, transparent 70%);
    content: "";
}

.siamsi-figure {
    position: relative;
    display: grid;
    width: min(100%, 244px);
    height: 193px;
    align-items: end;
    justify-items: center;
    margin: 0 auto;
    scale: var(--siamsi-scale);
    transform-origin: center top;
}

.figure-halo {
    position: absolute;
    top: 0;
    left: 50%;
    width: 190px;
    height: auto;
    aspect-ratio: 1;
    border: 1px solid #d6a87650;
    border-radius: 50%;
    background: radial-gradient(circle, #b6645f40, transparent 72%);
    box-shadow: 0 0 0 11px #d6a87613, 0 0 0 12px #d6a87626;
    transform: translateX(-50%);
}

.siamsi-vessel {
    position: relative;
    display: grid;
    width: 130px;
    height: 180px;
    align-content: end;
    transform-origin: center 80%;
}

.siamsi-vessel b {
    position: relative;
    display: grid;
    width: 108px;
    height: 100px;
    place-items: center;
    margin: 0 auto 6px;
    border: 3px solid #bc7c4f;
    border-bottom-width: 6px;
    border-radius: 16% 16% 31% 31% / 12% 12% 26% 26%;
    background: linear-gradient(90deg, #4e161c, #aa4939 45%, #6d222a 71%, #370e1b);
    box-shadow: inset 0 0 0 2px #421722, 0 12px 18px #0a03129c;
}

.siamsi-vessel b::before {
    position: absolute;
    top: -6px;
    inset-inline: -7px;
    height: 11px;
    border: 1px solid #ffd9a5;
    border-radius: 11rem;
    background: linear-gradient(#edc58d, #b87a4e 70%, #71315a);
    content: "";
}

.siamsi-vessel b span {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid #e8b8798a;
    border-radius: 50%;
    color: #ffd68f;
    font: 400 1.45rem/1 Georgia, serif;
}

.siamsi-vessel i {
    position: absolute;
    bottom: 58px;
    left: calc(50% - 4px);
    width: 8px;
    height: 102px;
    border: 1px solid #ffe0ae8f;
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(90deg, #a86141, #f0c08e);
    transform: rotate(-22deg) translateX(-20px);
    transform-origin: center 85%;
}

.siamsi-vessel i:nth-child(2) { height: 111px; transform: rotate(-12deg) translateX(-10px); }
.siamsi-vessel i:nth-child(3) { height: 97px; transform: rotate(1deg); }
.siamsi-vessel i:nth-child(4) { height: 114px; transform: rotate(13deg) translateX(13px); }
.siamsi-vessel i:nth-child(5) { height: 92px; transform: rotate(22deg) translateX(19px); }
.siamsi-drawn-stick { pointer-events: none; }
.fortune-number {
    display: inline-block;
    margin-bottom: .35rem;
    color: var(--muted);
    font-size: .92rem;
}

@media (max-width: 620px) {
    .site-header-inner {
        grid-template-columns: 1fr auto;
        grid-template-areas: "brand line" "nav nav";
        width: min(100% - 2rem, 440px);
        row-gap: .32rem;
        padding-block: .35rem .45rem;
    }

    .brand { grid-area: brand; font-size: 1.12rem; }
    .brand-icon { width: 29px; height: 29px; font-size: 1.23rem; }
    .line-contact { grid-area: line; }
    .site-nav { grid-area: nav; justify-content: center; gap: .24rem; }
    .site-nav a { flex: 1; min-width: 0; min-height: 41px; padding-inline: .35rem; font-size: clamp(.8rem, 3.5vw, .96rem); }

    .stage { padding-block-start: clamp(1rem, 3svh, 2rem); }

    .hero-heading { margin-bottom: 1.2rem; }
    .ritual-intro { margin-bottom: .65rem; }
    .hero-heading > p { max-width: 27rem; }
}

@media (max-height: 680px) {
    .stage { padding-block: clamp(.7rem, 2.5svh, 1.35rem) .75rem; }
    .hero-heading { margin-bottom: .75rem; }
    .hero-heading > p { margin-top: .35rem; font-size: clamp(.94rem, 1.35vw, 1.1rem); }
    .celestial-mark { margin-bottom: .4rem; font-size: 1.42rem; }
    h1 { font-size: clamp(1.8rem, min(5.55vw, 6.4svh), 3.25rem); }
    .dream-form > label { margin-bottom: .32rem; }
    .dream-field textarea { block-size: clamp(4.25rem, 12.7svh, 6.5rem); padding-block: .52rem 1.3rem; }
    .char-count { bottom: .19rem; }
    .dream-examples { gap: .25rem .4rem; margin-top: .36rem; }
    .dream-form .field-note { margin: .4rem 0 .55rem; font-size: .84rem; }
    .dream-form > .gold-button { min-height: 44px; padding-block: .45rem; }
    .interaction-status.status { margin-block-start: .3rem; }
}

@media (max-width: 620px) and (max-height: 680px) {
    .site-header-inner { row-gap: .2rem; padding-block: .2rem .35rem; }
    .site-nav a { min-height: 38px; }
}

@media (max-width: 350px) and (max-height: 680px) {
    .dream-examples > span { display: none; }
    .example-button { padding-inline: .6rem; }
}

@media (max-width: 620px) and (max-height: 825px) {
    .stage { padding-block: .5rem .4rem; }
    .stage .celestial-mark { display: none; }
    .stage .hero-heading { margin-bottom: .5rem; }
    .stage .hero-heading > p { font-size: .9rem; line-height: 1.4; }
    .dream-examples > span { display: none; }
    .dream-stage .dream-form .field-note { margin-block: .3rem .4rem; line-height: 1.4; }
    .dream-stage .interaction-status { block-size: 1.55rem; }
}

@media (max-width: 350px) and (max-height: 600px) {
    .dream-stage .dream-field textarea { block-size: 4.1rem; }
    .dream-stage .field-note { text-wrap: pretty; }
    .dream-stage .dream-examples { margin-inline: 0; }
    .dream-stage .interaction-status.status { block-size: 1.45rem; margin-block-start: .18rem; }
}

@media (min-width: 621px) and (max-height: 840px) {
    .dream-stage { padding-block: clamp(.55rem, 1.55svh, 1.3rem) .45rem; }
    .dream-stage .hero-heading { margin-block-end: .7rem; }
    .dream-stage .dream-field textarea { block-size: clamp(4.35rem, 12.7svh, 6.6rem); }
}

@media (min-width: 621px) and (max-height: 565px), (621px <= width <= 880px) and (max-height: 645px) {
    .site-header-inner { min-height: 57px; }
    .site-nav a { min-height: 36px; }
    .stage .celestial-mark { display: none; }
    .stage { padding-block: .42rem; }
    .stage .hero-heading { margin-bottom: .5rem; }
    .stage .hero-heading > p { margin-top: .26rem; line-height: 1.3; }
    .dream-workspace {
        display: grid;
        width: min(100%, 61rem);
        grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
        align-items: start;
        gap: clamp(.85rem, 2.5vw, 2.1rem);
    }

    .dream-workspace > noscript { grid-column: 1 / -1; }
    .dream-workspace .reading-actions { align-self: center; }
    .dream-stage .hero-heading { margin-block-end: .32rem; }
    .dream-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); column-gap: .5rem; align-items: center; }
    .dream-form > :is(label, .dream-field, .dream-examples, .field-note) { grid-column: 1 / -1; }
    .dream-stage .dream-field textarea { block-size: clamp(4rem, 12.7svh, 6.5rem); }
    .dream-examples > span { display: none; }
    .dream-form .field-note { margin-block: .24rem .35rem; font-size: .8rem; line-height: 1.4; }
    .dream-form > .gold-button { width: min(100%, 17.5rem); min-height: 42px; padding-inline: .6rem; }
    .dream-examples + .gold-button { margin-block-start: .55rem; }
    .dream-form .interaction-status.status { block-size: 2.6rem; margin: 0; font-size: .83rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::after, *::before { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
