:root { color-scheme: dark; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #dbe7ef; background: #000; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
[hidden] { display: none !important; }
html[data-lemy-fast-loader] .page-loader { transition: opacity .16s ease, visibility 0s linear .16s; }
button { font: inherit; touch-action: manipulation; }
button:focus-visible, #canvas:focus-visible { outline: 2px solid #ffd3e4; outline-offset: 5px; }
#main { position: relative; width: min(1200px, 100%); min-height: 100svh; margin: 0 auto; padding: 40px 32px; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr); align-items: center; gap: 24px; }
#intro, #reader { grid-column: 1; grid-row: 1; position: relative; z-index: 2; padding-left: 16px; }
#intro { color: #eac9d6; }
.intro-heart { margin: 0 0 16px; color: #ffbad3; font-size: 38px; line-height: 1; }
#intro h1 { font-size: clamp(28px, 3.1vw, 42px); line-height: 1.2; font-weight: 600; letter-spacing: -.035em; margin: 0 0 22px; }
#intro > p:last-child { font-size: 15px; line-height: 1.8; color: #bfaebc; }
#mec-tree-shell { grid-column: 2; grid-row: 1; position: relative; width: 100%; overflow: hidden; justify-self: center; }
#wrap { position: relative; width: 1100px; height: 680px; transform-origin: top left; }
#canvas { display: block; width: 1100px; height: 680px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#main:not([data-story="seed"]) #canvas { cursor: default; }
#startStory { position: absolute; z-index: 3; top: 65%; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); min-height: 46px; padding: 11px 19px; background: #341722; border: 1px solid #ad6b86; border-radius: 999px; color: #ffe5ef; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 25px #0006; }
#startStory:hover { background: #512237; }
#growthStatus { position: absolute; inset: auto 10px 7%; text-align: center; color: #dcb2c3; font-size: 13px; }
#code { color: #dbe7ef; font-size: 17px; font-weight: 550; line-height: 1.75; overflow-wrap: anywhere; }
.say { display: block; margin: 0 0 5px; white-space: pre-wrap; }
.typewriter-caret { display: inline-block; color: #f5adc8; }
#clock-box { margin-top: 30px; }
#clock-label { font-size: 14px; line-height: 1.55; color: #c2cedd; margin-bottom: 10px; overflow-wrap: anywhere; }
#clock { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; font-size: 14px; line-height: 1.6; }
.clock-unit { white-space: nowrap; }
.digit { font-size: clamp(24px, 3vw, 34px); color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.story-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.story-actions button { border: 1px solid #614451; background: #23151de6; color: #ffd2e3; border-radius: 999px; min-height: 44px; padding: 9px 16px; font-size: 13px; cursor: pointer; }
.story-actions button:hover { background: #3c2330; }
#error { position: relative; grid-column: 1 / -1; color: #f5c9d9; font-size: 14px; }
#musicStatus { position: fixed; z-index: 10; right: 12px; top: 70px; max-width: min(300px, calc(100vw - 24px)); padding: 10px 14px; border-radius: 12px; background: #251522ed; color: #f9d5e3; font-size: 12px; }
@media (max-width: 600px) {
 #main { display: flex; flex-direction: column; justify-content: flex-start; gap: 18px; padding: 64px 20px 30px; }
 #intro { order: 2; padding: 0; text-align: center; }
 .intro-heart { display: none; }
 #intro h1 { font-size: 26px; margin-bottom: 8px; }
 #intro > p:last-child { font-size: 13px; margin: 0; line-height: 1.6; }
 #mec-tree-shell { order: 1; flex: none; }
 #reader { order: 2; width: min(100%, 440px); padding: 0; }
 #code { font-size: 16px; line-height: 1.7; }
 #clock-box { margin-top: 22px; }
 #clock { gap: 4px 10px; }
 .story-actions { margin-top: 18px; }
}
@media (min-width: 601px) { #mec-tree-shell { align-self: start; } }
@media (min-width: 601px) and (max-height: 520px) {
 #main { padding: 60px 24px 24px; align-items: start; gap: 12px; }
 #intro h1 { font-size: 27px; }
 #reader { padding-top: 10px; }
 #code { font-size: 15px; }
 #clock-box { margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
