/* Decorative artwork motion and interaction effects; gated by visibility and reduced motion. */
/* V24: a quiet horizon, a fitted game board and shared locale controls. */
body{isolation:isolate}
.header-controls{display:flex;align-items:center;gap:15px}.header .nav{margin-left:auto;margin-right:26px}
.language-switch{display:flex;gap:2px;padding:2px;border:1px solid #b191d42b;border-radius:999px}.language-switch button{border:0;border-radius:999px;background:none;color:#8d819d;font-size:9px;padding:4px 6px;line-height:1}.language-switch [aria-pressed="true"]{background:#b191d41c;color:#d2bedf}
.sound-toggle,.icon-button{display:inline-grid;place-items:center;flex:none;width:32px;height:32px;padding:6px;border:1px solid #b191d42b;border-radius:50%;background:#100d1680;color:#afa0c2;line-height:0}
.sound-toggle:hover,.icon-button:hover{color:#d4c1ed;border-color:#b191d469}.sound-toggle svg,.icon-button svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round}
.sound-muted{display:none}.sound-toggle[aria-pressed="false"] .sound-waves{display:none}.sound-toggle[aria-pressed="false"] .sound-muted{display:block}
html.dialog-open{overflow:hidden;scrollbar-gutter:auto}
html.dialog-open main .art-motion,html.dialog-open main .art-stage>*,html.dialog-open main .card-face::after,html.dialog-open main .hero-portrait::before,html.dialog-open .brand-logo,html.dialog-open .brand-sheen,html.dialog-open .section-divider>i,html.dialog-open .back-trace{animation-play-state:paused!important}
dialog{color:var(--ink);border:1px solid #9e7cbe44;background:#0d0b12;border-radius:22px;padding:24px;box-shadow:0 24px 100px #0009}
dialog::backdrop{background:#050407ed}
.memory-dialog{width:min(1480px,calc(100% - 32px));height:min(980px,calc(100dvh - 32px));max-width:none;max-height:none;overflow:hidden;padding:22px 26px}
.memory-dialog[open]{display:flex;flex-direction:column;gap:13px}
.memory-top{display:flex;justify-content:space-between;gap:12px;align-items:center;flex:none}.memory-top h2,.secret-dialog h2{font-size:27px;letter-spacing:-.035em;margin:0;color:#e8ddf3}
.eyebrow{font-size:10px;letter-spacing:.07em;color:#8f7c9e;margin:0 0 7px}
.dialog-tools{display:flex;align-items:center;gap:9px}.dialog-close{width:28px;height:32px;flex:none;background:none;border:0;color:#a393b2;font-size:25px;line-height:1;padding:0}
.results-toggle{background:none;border:0;color:#9e8eae;font-size:11px;padding:6px 4px;margin-right:8px}.results-toggle[aria-pressed="true"]{color:#ddc8ef}
.memory-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none}.memory-levels{display:flex;gap:6px}
.memory-levels button,.memory-cover button,.result-tabs button,.secret-return{font-size:11px;color:#a99ab9;border:1px solid #a789c22c;background:#17111e;border-radius:999px;padding:4px 10px;line-height:1.4}
.memory-levels [aria-pressed="true"],.result-tabs [aria-pressed="true"]{color:#ddc7ee;border-color:#a789c278;background:#30203e}.memory-levels button:hover,.memory-cover button:hover,.secret-return:hover{border-color:#b191d480}
.memory-metrics{display:flex;gap:20px;align-items:center;color:#8c7f98;font-size:9px}.memory-metrics>span{display:flex;align-items:baseline;gap:6px}.memory-metrics strong{color:#d7c3e9;font-size:14px;font-variant-numeric:tabular-nums;font-weight:500}.memory-metrics .is-low{color:#d9a3b4}
#memory-status{min-height:18px;margin:0;color:#bfa7d4;font-size:11px;line-height:1.6;flex:none}
.memory-stage{position:relative;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;isolation:isolate}
.memory-board{display:flex;flex-wrap:wrap;align-content:center;justify-content:center;gap:var(--tile-gap,8px);max-width:100%}
.memory-tile{--edge:#9fbcdf;position:relative;display:block;flex:none;min-width:0;padding:0;border:0;background:transparent;border-radius:12px;width:var(--tile-w,90px);height:var(--tile-h,84px);perspective:700px;color:var(--edge);touch-action:manipulation}
.memory-tile[data-rarity="epic"]{--edge:#bd9ae5}.memory-tile[data-rarity="special"]{--edge:#a1c9bc}.memory-tile[data-rarity="legendary"]{--edge:#d3b58b}
.memory-rotor{position:absolute;inset:0;border-radius:inherit;transform-style:preserve-3d;transition:transform .26s ease;pointer-events:none}.memory-tile.is-open .memory-rotor{transform:rotateY(180deg)}
.memory-front,.memory-back{position:absolute;inset:0;overflow:hidden;border-radius:inherit;backface-visibility:hidden;-webkit-backface-visibility:hidden;border:1px solid color-mix(in srgb,var(--edge) 42%,transparent)}
.memory-back{background:#070609}.memory-back img{width:100%;height:100%;object-fit:contain;opacity:.78;display:block}
.memory-back::after{content:"";position:absolute;inset:0;background:linear-gradient(120deg,transparent 35%,#d4b4f31a 49%,transparent 64%);opacity:0;transform:translateX(-110%)}
.memory-dialog[open]:not(.is-paused):not(.is-results) .memory-tile:not(.is-open) .memory-back::after{animation:memory-back-light 9s ease-in-out var(--tile-phase) infinite}
.memory-front{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:clamp(4px,calc(var(--tile-w)*.05),9px);gap:3px;transform:rotateY(180deg);background:radial-gradient(ellipse at 50% 20%,color-mix(in srgb,var(--edge) 10%,transparent),transparent 75%),#101016}
.memory-art{display:grid;place-items:center;min-height:0;width:100%;flex:1}.memory-art>svg,.memory-art>img{display:block;max-width:100%;width:100%;height:100%;min-height:0;object-fit:contain;fill:none;stroke:var(--edge);stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round;opacity:.88;color:var(--edge)}
.memory-name{font-size:clamp(8px,calc(var(--tile-w)*.077),12px);line-height:1.12;font-weight:500;color:#d7ccdf;text-align:center;flex:none;overflow-wrap:anywhere}
.memory-tile.is-matched .memory-front{border-color:color-mix(in srgb,var(--edge) 68%,transparent)}.memory-tile[aria-disabled="true"]{cursor:default}
.memory-dialog[open]:not(.is-paused):not(.is-results) .is-matched .memory-art{animation:memory-pair-float 6s ease-in-out var(--tile-phase) infinite}
@keyframes memory-back-light{0%,68%,100%{opacity:0;transform:translateX(-110%)}72%{opacity:1}92%{opacity:1;transform:translateX(110%)}96%{opacity:0;transform:translateX(110%)}}
@keyframes memory-pair-float{50%{transform:translateY(-2px);opacity:.8}}
#memory-effects{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none}
.memory-board.is-paused{visibility:hidden}.memory-cover{position:absolute;inset:0;display:grid;place-items:center;background:#0d0b12}.memory-cover button{padding:8px 18px;font-size:13px}
.memory-results{flex:1;min-height:0;display:flex;flex-direction:column;color:#ad9bbc;font-size:11px}.result-tabs{display:flex;gap:8px;margin:3px 0 16px}#memory-storage-note{font-size:10px;color:#9b8da8;line-height:1.6}
.results-scroll{overflow:auto;min-height:0}.memory-results table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}.memory-results caption{text-align:left;font-size:12px;margin:8px 0 12px;color:#c2afcf}.memory-results th,.memory-results td{padding:11px 8px;text-align:left;border-bottom:1px solid #a789c214;font-size:11px;white-space:nowrap}.memory-results th{font-weight:400;color:#8f7e9d}.memory-results td{color:#baa9c8}
.word-secret{border:0;background:none;padding:0;color:inherit;font:inherit}.word-secret:hover,.word-secret:focus-visible{color:#d2b2f0}
.secret-target{position:absolute;display:block;z-index:5;background:transparent;border:0;padding:0;color:inherit;pointer-events:auto;touch-action:manipulation;-webkit-user-select:none;user-select:none}
.gem-target{left:16%;right:16%;top:8%;bottom:7%;border-radius:35%}.archive-target{width:138px;height:138px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:50%;-webkit-touch-callout:none}
.back-runes{position:absolute;inset:0;z-index:5;pointer-events:none}.rune{position:absolute;min-width:28px;min-height:28px;width:12%;height:8%;padding:0;border:0;background:transparent;transform:translate(-50%,-50%);pointer-events:auto;touch-action:manipulation;border-radius:50%}
.rune-top{left:50%;top:23.25%}.rune-right{left:91.7%;top:50%}.rune-bottom{left:50%;top:77.35%}.rune-left{left:8.2%;top:50%}.rune-fm{left:50%;top:49%;width:27%;height:13%;border-radius:8px}
.discovery-progress{display:flex;align-items:center;gap:13px;color:#82758e;font-size:9px;margin:-4px 0 22px}.discovery-progress>span{letter-spacing:.02em}#discovery-stars{display:flex;gap:13px}.discovery-star{font-size:12px;color:#56455f}.discovery-star.is-collected{color:#c4a8dc}
.secret-notice{position:fixed;bottom:24px;left:24px;width:min(330px,calc(100% - 48px));padding:22px 34px 20px 22px;background:#181120f5;border:1px solid #b293d35c;border-radius:17px;box-shadow:0 12px 40px #0006;z-index:55;animation:discovery-in .3s ease-out}
.secret-notice strong{font-size:16px;font-weight:500;color:#ceb4e6}.secret-notice p{font-size:12px;line-height:1.7;margin:8px 0 0;color:#ac9aba}.secret-notice button{position:absolute;right:10px;top:8px;border:0;background:none;color:#9886a6;font-size:20px}
.secret-dialog{width:min(430px,calc(100% - 40px));max-height:calc(100dvh - 40px);padding:32px;text-align:center}.secret-dialog>.dialog-close{position:absolute;right:12px;top:10px}.discovery-emblem{font:40px/1.4 monospace;color:#cbb2e4;margin-bottom:16px}.secret-dialog[data-discovery="archivist"] .discovery-emblem{color:#dfc28b}.secret-dialog>p:not(.eyebrow){font-size:13px;line-height:1.8;color:#a99ab7}.secret-dialog pre{text-align:left;white-space:pre-wrap;border:1px solid #a789c233;background:#08070c;padding:16px;border-radius:10px;font:11px/1.8 monospace;color:#a7c9bc}.secret-return{margin-top:16px;padding:7px 12px}
.art-stage.discovered>svg{animation:gem-discovered .8s ease-out!important}
@keyframes discovery-in{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@keyframes gem-discovered{50%{opacity:1;filter:drop-shadow(0 0 5px #b2e8d466)}}
html.page-hidden .memory-back::after,html.page-hidden .memory-art{animation-play-state:paused!important}
html[lang="en"] .hero-wordmark .brand-lettering{display:flex;gap:.22em;font-size:clamp(54px,6vw,100px);line-height:1;color:#efebf5}html[lang="en"] .hero-wordmark .brand-word:last-child{color:#b48bdd}html[lang="en"] .hero-footnote{letter-spacing:-.025em}html[lang="en"] [data-id="support-lines"] .card-body h3{white-space:normal}
@media(max-width:900px){.header .nav{gap:19px;margin-right:18px}.header-controls{gap:9px}.memory-dialog{padding:18px}.memory-metrics{gap:14px}.memory-metrics>span{display:grid;gap:1px;text-align:right}}
@media(max-height:480px){.memory-dialog{padding:9px 15px}.memory-dialog[open]{gap:5px}.memory-top h2{font-size:20px}#memory-status{min-height:13px;font-size:9px}.memory-toolbar{min-height:24px}}
