/* Interface theme and plastic color are independent of the green LCD. */
:root{--surface:#fbf9f2;--surface-hover:#edf0e1;--input-bg:#fffcf5;--track-bg:#e1e5d6;--accent-bg:#e9eedb;--primary-bg:#43583c;--primary-ink:#fff;--texture:#8b987817;--shell-light:#ffd3ac;--shell-mid:#f09a70;--shell-dark:#c87551;--shell-ink:#915f41;--shell-loop:#edb38c;--shell-frame:#b97d5366;color-scheme:light}
:root[data-theme=dark]{--ink:#e1e8d9;--muted:#a4b099;--paper:#1c241f;--line:#404c3d;--surface:#28332a;--surface-hover:#34422f;--input-bg:#263229;--track-bg:#40503b;--accent-bg:#384a32;--primary-bg:#b5c996;--primary-ink:#25331f;--texture:#b7cb9b09;color-scheme:dark}
:root[data-shell=yellow]{--shell-light:#fff0b2;--shell-mid:#ebc75c;--shell-dark:#b6953d;--shell-ink:#79612c;--shell-loop:#e5ce7d;--shell-frame:#a68d4d66}
:root[data-shell=blue]{--shell-light:#d2edfc;--shell-mid:#87b9d7;--shell-dark:#5a88a5;--shell-ink:#3e667f;--shell-loop:#9cc4df;--shell-frame:#628ea866}
:root[data-shell=green]{--shell-light:#dceccd;--shell-mid:#9ebc8c;--shell-dark:#6f9266;--shell-ink:#4a6841;--shell-loop:#b0c6a0;--shell-frame:#6c8b6266}
:root[data-shell=lavender]{--shell-light:#ead9f7;--shell-mid:#baa2cf;--shell-dark:#9076a6;--shell-ink:#6e527f;--shell-loop:#c9b2da;--shell-frame:#967da866}
body{background-image:radial-gradient(var(--texture) .7px,transparent .7px)}
.header-actions{display:flex;align-items:center;gap:9px;flex-shrink:0}.icon-button{display:grid;place-items:center;padding:8px;color:var(--ink)}.icon-button svg{width:20px;height:20px;display:block}.icon-button:hover{background:var(--surface-hover)}.icon-button[aria-pressed=true]{background:var(--surface);border-color:#8c9e77}
.settings-caption{display:inline-flex;align-items:center;gap:7px}.settings-caption svg{height:16px;width:16px}
.device-space{position:relative}.device{width:min(340px,76cqh,calc(100cqw - 62px));margin-left:32px;background:radial-gradient(ellipse at 35% 10%,#ffffff66,transparent 52%),linear-gradient(135deg,var(--shell-light),var(--shell-mid) 55%,var(--shell-dark));border-color:var(--shell-dark);box-shadow:inset 5px 8px 9px #ffffdd88,inset -7px -10px 9px #0002,0 10px 0 -6px var(--shell-dark),0 17px 25px -14px #0004}
.key-loop{border-color:var(--shell-loop)}.device-top,.device-wordmark,.device-bottom{color:var(--shell-ink);text-shadow:0 1px #ffffff44}.device-top i{background:var(--shell-ink);box-shadow:0 0 0 2px var(--shell-mid)}.screen-frame{background:var(--shell-frame);box-shadow:inset 0 3px 5px #0003,0 1px 1px #ffffff66}
.preview-device{background:radial-gradient(ellipse at 30% 10%,#ffffff88,transparent 55%),linear-gradient(130deg,var(--shell-light),var(--shell-mid) 58%,var(--shell-dark));border-color:var(--shell-dark);box-shadow:inset 5px 7px 10px #ffffff99,inset -6px -7px 7px #0002,0 15px 22px -13px #0004}.preview-device>span,.preview-mark{color:var(--shell-ink)}.preview-lcd{border-color:var(--shell-dark)}
.shell-palette{position:absolute;z-index:5;left:max(0px,calc(50% - min(170px,38cqh) - 44px));top:clamp(10px,7cqh,38px);display:flex;flex-direction:column;align-items:center;padding:7px 2px 4px;border:1px solid var(--line);border-radius:25px;background:var(--surface);box-shadow:0 4px 12px #15261b09}.palette-caption{font-size:6px;letter-spacing:.7px;color:var(--muted);font-weight:800;margin:3px 0 4px}.shell-swatch{width:40px;height:39px;padding:0;display:grid;place-items:center;border:0;background:none;border-radius:50%}.shell-swatch>span{display:block;width:21px;height:21px;border-radius:50%;border:1px solid #00000015;box-shadow:inset 1px 2px 3px #ffffff88,0 1px 3px #00000012}.shell-swatch[aria-pressed=true]>span{outline:2px solid var(--ink);outline-offset:3px}.shell-swatch:hover{background:var(--surface-hover)}
.care-actions>button,.appearance-choice,.game-picker>button{background:var(--surface);border-color:var(--line)}.care-actions>button:hover,.game-picker>button:hover{background:var(--surface-hover)}.appearance-choice[aria-pressed=true]{background:var(--accent-bg);border-color:#96a97b;box-shadow:0 0 0 2px var(--accent-bg)}
.primary-button{background:var(--primary-bg);border-color:var(--primary-bg);color:var(--primary-ink)}.primary-button:hover{filter:brightness(1.08);background:var(--primary-bg)}.secondary-button{background:var(--accent-bg);border-color:var(--line);color:var(--ink)}input{background:var(--input-bg);border-color:var(--line);color:var(--ink)}.track{background:var(--track-bg)}
:root[data-theme=dark] .eyebrow,:root[data-theme=dark] dialog p,:root[data-theme=dark] .close-button{color:var(--muted)}:root[data-theme=dark] .telegram-note{background:var(--accent-bg)}:root[data-theme=dark] .name-suggestions button[aria-pressed=true]{background:var(--accent-bg);border-color:#8c9e77}:root[data-theme=dark] .wellbeing-badge{color:#b6cb98}:root[data-theme=dark] .wellbeing-badge[data-feeling=bored]{color:#c4b792}:root[data-theme=dark] .wellbeing-badge[data-feeling=sad]{color:#d2b39d}:root[data-theme=dark] .wellbeing-badge[data-feeling=sleeping]{color:#a6b59a}
:root[data-theme=dark] dialog::backdrop{background:#080f0b99}:root[data-theme=dark] .friend-heading h1 button{color:#b0bd9d}
@media(min-width:760px) and (min-height:720px){.device{width:min(360px,78cqh,calc(100cqw - 62px))}.shell-palette{left:max(0px,calc(50% - min(180px,39cqh) - 44px))}}
@media(max-width:650px){.header-actions{gap:7px}.icon-button{padding:7px}.icon-button svg{width:18px;height:18px}.brand-caption{margin-left:5px;font-size:6px;letter-spacing:1.1px}.device{width:min(330px,77cqh,calc(100cqw - 62px))}}
@media(max-height:650px){.shell-palette{padding-top:4px;padding-bottom:3px;top:clamp(4px,5cqh,18px)}.shell-swatch{width:36px;height:32px}.shell-swatch>span{height:18px;width:18px}.palette-caption{font-size:5px;margin-bottom:3px}.icon-button{width:32px;height:32px;padding:7px}}
@media(orientation:landscape) and (max-height:500px){.shell-palette{top:12px}}

/* Friendship help stays inside the existing header; only its dialog scrolls. */
.play-screen{grid-template-columns:minmax(0,1fr)}
.friendship{width:120px}.friendship-help{position:relative;display:block;width:100%;min-height:36px;padding:0 29px 0 0;border:0;border-radius:7px;background:transparent;text-align:left;color:var(--ink)}.friendship-help>span:first-child{display:block;font-size:10px;font-weight:600;white-space:nowrap}.friendship-help .friendship-question{position:absolute;right:0;top:4px;display:grid;place-items:center;width:25px;height:25px;border:1px solid var(--line);border-radius:50%;background:var(--surface);font-size:14px;color:var(--ink)}.friendship-help .track{display:block;margin-top:5px;height:4px}.friendship-help small{display:block;margin-top:4px;font-size:8px;color:var(--muted);white-space:nowrap}.friendship-help:hover .friendship-question{background:var(--surface-hover)}.friendship-help:focus-visible{outline:2px solid var(--ink);outline-offset:4px}.friendship .wellbeing-badge{margin-top:4px}
.friendship-progress,.reward-preview{padding:15px;background:var(--surface);border:1px solid var(--line);border-radius:15px;margin-top:14px}.friendship-progress>div:first-child{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px}.friendship-progress>div>span{color:var(--muted);font-size:11px}.friendship-progress .track{margin-top:11px;height:6px}.friendship-progress .track>span{background:#cf9c77}#friendshipDialog .friendship-progress p{margin:9px 0 0;font-size:11px;color:var(--muted)}.reward-preview{background:var(--accent-bg)}.reward-preview>.eyebrow{font-size:8px;letter-spacing:1px;color:var(--muted)}.reward-preview>strong{display:block;font-size:15px;margin-top:9px}.reward-preview p{margin:7px 0 0!important;font-size:11px!important;color:var(--ink)!important}#friendshipDialog .roadmap-notice{font-size:11px;line-height:1.6;color:var(--muted);margin:14px 0}
.friendship-rewards{list-style:none;margin:0;padding:0;display:grid;gap:8px}.friendship-rewards li{display:flex;gap:12px;padding:13px;border:1px solid var(--line);border-radius:13px;background:var(--surface)}.friendship-rewards li[data-next=true]{border-color:#9eaf7f;background:var(--accent-bg)}.reward-icon{flex-shrink:0;display:grid;place-items:center;align-self:flex-start;width:31px;height:34px;font-size:25px;color:var(--ink)}.reward-level{display:block;font-size:8px;letter-spacing:1px;color:var(--muted);margin-bottom:4px}.friendship-rewards strong{font-size:13px}.friendship-rewards p{font-size:11px!important;line-height:1.5;margin:5px 0 7px;color:var(--muted)!important}.friendship-rewards small{font-size:10px;color:var(--ink)}.friendship-rules{border-top:1px solid var(--line);padding-top:14px;margin-top:16px}.friendship-rules summary{cursor:pointer;font-size:12px;font-weight:700;min-height:28px}.friendship-rules p{font-size:11px;line-height:1.6}
@media(max-width:650px){.friendship{width:110px}.friendship-help>span:first-child{font-size:9px}.friendship-help small{font-size:7px}.play-screen{grid-template-rows:54px minmax(0,1fr) 70px 122px 20px}}
@media(max-height:650px){.play-screen{grid-template-rows:50px minmax(0,1fr) 58px 108px 18px}.friendship .wellbeing-badge{margin-top:2px}}
@media(orientation:landscape) and (max-height:500px){.play-screen{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:50px 1fr 110px 18px}}
