:root {
    color-scheme: light;
    --ink: #25382e;
    --muted: #556257;
    --pine: #21533e;
    --heading: #274433;
    --focus: #1c745f;
    --page: #f4efdf;
    --page-glow: #fffcf1;
    --paper: #fffaf0;
    --paper-border: #ded8c4;
    --line: #e1ddcc;
    --row: #fffef7;
    --row-border: #e9e1cf;
    --field: #fffef8;
    --field-border: #c9cdbd;
    --control: #f9f2e5;
    --control-hover: #ece8d8;
    --tools: #f6f2e5;
    --add: #f3f4e9;
    --add-border: #cbd1bf;
    --primary: #21533e;
    --on-primary: #fffcf5;
    --selected: #e7efe2;
    --selected-border: #39735a;
    --confirm-bg: #e5f2e7;
    --confirm-ink: #205d38;
    --confirm-border: #b6d2b9;
    --cancel-bg: #fae9e3;
    --cancel-ink: #8c362e;
    --cancel-border: #e8c6bc;
    --error-bg: #faebe4;
    --error-ink: #742d27;
    --flake: #517971;
    --flake-opacity: .39;
    --scene-sky: linear-gradient(175deg, #f5f0d8, #e2ebda 62%, #f2f3e1);
    --scene-snow: #faf8ee;
    --scene-banks: 0 -1px 0 #e3e6d2, 170px -9px 0 #f3f3e7, -140px -6px 0 #fffaf0;
    --draw-red: #a83d35;
    --draw-green: #276e51;
    --draw-blue: #236d88;
    --draw-gold: #ac7528;
    --shadow: 0 16px 44px #48382113;
    --display: Georgia, "Times New Roman", serif;
    --body: system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #f0eee3;
    --muted: #bbc9c1;
    --pine: #a3ddba;
    --heading: #edf5e6;
    --focus: #a1e4c2;
    --page: #14231f;
    --page-glow: #2a4138;
    --paper: #263831;
    --paper-border: #53665b;
    --line: #576b60;
    --row: #1c2c26;
    --row-border: #496056;
    --field: #1a2a23;
    --field-border: #6a8474;
    --control: #31443b;
    --control-hover: #41584b;
    --tools: #21322b;
    --add: #30453a;
    --add-border: #718e7d;
    --primary: #a3d8b7;
    --on-primary: #183728;
    --selected: #385648;
    --selected-border: #9bd5b5;
    --confirm-bg: #304f3d;
    --confirm-ink: #bbf4c8;
    --confirm-border: #76a187;
    --cancel-bg: #55352f;
    --cancel-ink: #ffd1c9;
    --cancel-border: #b38175;
    --error-bg: #56342f;
    --error-ink: #ffe0d8;
    --flake: #d3eee9;
    --flake-opacity: .57;
    --scene-sky: linear-gradient(175deg, #182f3a, #2d4943 68%, #344d47);
    --scene-snow: #415d57;
    --scene-banks: 0 -1px 0 #6e8d82, 170px -9px 0 #46645d, -140px -6px 0 #4b6962;
    --draw-red: #ffa89e;
    --draw-green: #b5f0b3;
    --draw-blue: #a3e1ff;
    --draw-gold: #ffdb83;
    --shadow: 0 16px 44px #08130d45;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 280px;
    min-height: 100dvh;
    background: radial-gradient(ellipse at 50% 0%, var(--page-glow), transparent 60rem), var(--page);
    color: var(--ink);
    font: 1rem/1.55 var(--body);
    isolation: isolate;
}
.snowfall { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.snowfall i {
    position: absolute;
    top: -24px;
    left: var(--left);
    color: var(--flake);
    font: normal var(--size, 13px)/1 var(--body);
    opacity: var(--flake-opacity);
    animation: snow-flake var(--speed) var(--delay) linear infinite;
}
.snowfall i:nth-of-type(1) { --left: 5%; --size: 17px; --speed: 23s; --delay: -2s; }
.snowfall i:nth-of-type(2) { --left: 12%; --speed: 28s; --delay: -22s; }
.snowfall i:nth-of-type(3) { --left: 22%; --size: 9px; --speed: 22s; --delay: -10s; }
.snowfall i:nth-of-type(4) { --left: 32%; --speed: 30s; --delay: -6s; }
.snowfall i:nth-of-type(5) { --left: 42%; --size: 18px; --speed: 24s; --delay: -19s; }
.snowfall i:nth-of-type(6) { --left: 54%; --speed: 29s; --delay: -13s; }
.snowfall i:nth-of-type(7) { --left: 65%; --size: 10px; --speed: 25s; --delay: -24s; }
.snowfall i:nth-of-type(8) { --left: 76%; --speed: 32s; --delay: -9s; }
.snowfall i:nth-of-type(9) { --left: 86%; --size: 16px; --speed: 26s; --delay: -15s; }
.snowfall i:nth-of-type(10) { --left: 93%; --speed: 31s; --delay: -26s; }
.snowfall i:nth-of-type(even) { animation-name: snow-flake-left; }
@keyframes snow-flake {
    21% { transform: translate(min(9vw, 58px), 21vh) rotate(24deg); }
    47% { transform: translate(max(-9vw, -58px), 47vh) rotate(-17deg); }
    73% { transform: translate(min(8vw, 52px), 73vh) rotate(35deg); }
    to { transform: translate(-14px, calc(100vh + 27px)) rotate(65deg); }
}
@keyframes snow-flake-left {
    21% { transform: translate(max(-9vw, -58px), 21vh) rotate(-26deg); }
    47% { transform: translate(min(9vw, 58px), 47vh) rotate(19deg); }
    73% { transform: translate(max(-8vw, -52px), 73vh) rotate(-34deg); }
    to { transform: translate(14px, calc(100vh + 27px)) rotate(-70deg); }
}
.flying-hat {
    position: absolute;
    top: clamp(110px, 30vh, 300px);
    left: 0;
    width: 31px;
    height: 25px;
    transform: translateX(-55px);
}
.flying-hat::before, .flying-hat::after { content: ""; position: absolute; }
.flying-hat::before {
    inset: 0 2px 3px;
    background: #d25150;
    clip-path: polygon(3% 96%, 27% 32%, 49% 7%, 70% 1%, 93% 21%, 82% 31%, 65% 20%, 55% 40%, 79% 100%);
}
.flying-hat::after {
    left: 2px;
    bottom: 1px;
    width: 23px;
    height: 5px;
    border-radius: 12px;
    background: #fff1d2;
}
.flying-hat.in-flight { animation: hat-flight 5.5s ease-in-out; }
@keyframes hat-flight {
    from { transform: translate(-55px, 32px) rotate(-31deg); }
    38% { transform: translate(34vw, -27px) rotate(8deg); }
    68% { transform: translate(69vw, 22px) rotate(26deg); }
    to { transform: translate(calc(100vw + 55px), -11px) rotate(56deg); }
}
[data-page-hidden] .snowfall i { animation-play-state: paused; }
img { max-width: 100%; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
a { color: var(--pine); }
h1, h2, p { margin: 0; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.frame { width: min(1150px, calc(100% - 80px)); margin-inline: auto; }
.theme-toggle {
    position: absolute;
    z-index: 4;
    top: 10px;
    right: max(12px, calc((100% - 1150px) / 2));
}
.theme-toggle span { grid-area: 1 / 1; font-size: 1.5rem; }
.theme-sun, [data-theme="dark"] .theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
.masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(4px, 2vw, 24px);
    text-align: center;
    padding-block: clamp(46px, 7vw, 65px);
}
.masthead-title { display: grid; justify-items: center; gap: 4px; }
.masthead-snow { width: clamp(27px, 4vw, 42px); transform: rotate(-9deg); }
.masthead h1 {
    font: 700 clamp(2.4rem, 8vw, 6.1rem)/.99 var(--display);
    letter-spacing: -.073em;
    color: var(--heading);
}
.masthead-art {
    display: grid;
    grid-template-columns: minmax(0, 68px) minmax(0, 32px) minmax(0, 68px);
    grid-template-areas: "character gift companion" "character flake companion" ". heart .";
    align-items: center;
    justify-items: center;
    gap: 0 clamp(3px, 1vw, 10px);
}
.masthead-art-left { justify-content: end; }
.masthead-art-right { justify-content: start; }
.masthead-character { grid-area: character; width: 100%; height: auto; }
.masthead-character:nth-of-type(2) { grid-area: companion; }
.masthead-gift { grid-area: gift; font-size: clamp(.8rem, 2.4vw, 1.6rem); line-height: 1; }
.masthead-heart { grid-area: heart; width: clamp(12px, 2vw, 21px); transform: rotate(-12deg); }
.masthead-flake { grid-area: flake; color: var(--flake); font-size: clamp(.8rem, 2vw, 1.3rem); }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    gap: 8px;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--pine);
    background: transparent;
    text-decoration: none;
    font-weight: 670;
    font-size: .9rem;
    line-height: 1.3;
}
.button:hover:not(:disabled) { filter: brightness(.95); }
.button.primary { background: var(--primary); color: var(--on-primary); }
.button.primary span { color: #ffdf91; }
.button.quiet { color: var(--muted); }
.button.quiet:hover:not(:disabled) { background: var(--control-hover); color: var(--ink); }
.button.add-wish {
    width: 100%;
    justify-content: flex-start;
    border: 1px dashed var(--add-border);
    background: var(--add);
    color: var(--pine);
}
.paper {
    background: var(--paper);
    border: 1px solid var(--paper-border);
    border-radius: 15px;
    box-shadow: var(--shadow);
}
.wishlist {
    display: grid;
    grid-template-columns: 1fr 1.12fr 1fr;
    padding: 0 22px 14px;
    position: relative;
    isolation: isolate;
}
.person {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 19px clamp(23px, 2.5vw, 32px) 0;
    position: relative;
}
.person:not(:first-child)::before {
    content: "";
    z-index: -1;
    position: absolute;
    left: -29px;
    top: 11px;
    bottom: 8px;
    width: 57px;
    background: url("garland-left.webp") center / 100% 100% no-repeat;
    pointer-events: none;
}
.person:nth-child(3)::before { background-image: url("garland-right.webp"); }
.person-name {
    height: 112px;
    padding-inline: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.2vw, 15px);
}
.person-name img:first-child { width: min(60%, 176px); max-height: 100%; object-fit: contain; }
.person-jani .person-name img:first-child { width: min(56%, 148px); }
.person-name .flower {
    width: min(24%, 63px);
    max-height: 62px;
    object-fit: contain;
    transform: rotate(3deg);
    pointer-events: none;
}
.icon-button[data-share-person] { position: absolute; z-index: 1; inset-block-start: 9px; inset-inline-end: 9px; }
[data-share-person] > * { grid-area: 1 / 1; }
[data-share-person] > span { font-size: .75rem; font-weight: 650; }
[data-share-person] > svg {
    z-index: 1;
    box-sizing: content-box;
    padding: 4px;
    background: var(--control);
}
@media (forced-colors: active) {
    [data-share-person] > svg { background: ButtonFace; stroke: ButtonText; }
}
@media (min-width: 761px) {
    .icon-button[data-share-person] { inset-inline-end: 32px; width: 36px; height: 36px; }
}
.wish-space {
    flex: 1;
    min-height: 192px;
    padding: 13px 7px 10px;
    border-top: 1px dashed var(--line);
    position: relative;
    isolation: isolate;
}
.wish-list { display: grid; gap: 9px; list-style: none; margin: 0; padding: 0; }
.wish-list:not(:empty) { margin-bottom: 9px; }
.wish {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
    padding: 6px 6px 6px 10px;
    border: 1px solid var(--row-border);
    background: var(--row);
    border-radius: 9px;
    position: relative;
}
.wish.panel-open { z-index: 1; }
.wish-details { display: flex; align-items: center; min-width: 0; gap: 7px; }
.wish-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.shop-link {
    font-weight: 650;
    text-underline-offset: 3px;
}
.wish-toolbar, .wish-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.mobile-wish-icon { display: none; }
[data-mobile-controls] .wish-actions .control-icon { display: none; }
[data-mobile-controls] .wish-actions .mobile-wish-icon {
    display: block;
    font: 1.2rem/1 "Apple Color Emoji", "Samsung Color Emoji", "Noto Color Emoji", "Segoe UI Emoji", sans-serif;
}
.wish-settings { order: 1; }
.wish.settings-open { grid-template-columns: minmax(0, 1fr); row-gap: 13px; }
.wish.settings-open .wish-toolbar {
    grid-row: 1;
    justify-self: end;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: min(100%, 236px);
}
.wish.settings-open .wish-actions { grid-column: span 4; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wish.settings-open .wish-toolbar .icon-button { min-width: 0; width: 100%; }
.wish.settings-open .wish-details { grid-row: 2; }
.wish-settings .control-icon {
    grid-area: 1 / 1;
    transition: transform 230ms ease, opacity 160ms ease;
}
.wish-settings .settings-cross { opacity: 0; transform: rotate(-120deg); color: #161b18; }
[data-theme="dark"] .wish-settings .settings-cross { color: var(--ink); }
.wish-settings[aria-expanded="true"] .settings-cog { transform: rotate(120deg); opacity: 0; }
.wish-settings[aria-expanded="true"] .settings-cross { transform: rotate(0); opacity: 1; }
.wish-photo {
    display: grid;
    place-items: center;
    flex: none;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    padding: 0;
    border-radius: 6px;
    background: transparent;
}
.wish-photo img {
    display: block;
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--control);
}
.wish-composer-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 11px; }
.wish-composer-controls input { margin-top: 0; min-height: 42px; }
.wish-composer .form-error, .row-popover .form-error { margin-top: 6px; }
.row-popover {
    position: absolute;
    inset: -1px -1px auto;
    padding: 10px;
    border: 1px solid var(--field-border);
    border-radius: 9px;
    box-shadow: 0 8px 24px #48382135;
    background: var(--paper);
}
.row-popover label { margin-top: 0; }
.panel-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; }
.wish-editor .panel-actions { margin-top: 13px; }
.confirmation { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.confirmation-text { flex: 1 1 9rem; font-size: .93rem; }
.confirmation > .form-error { flex-basis: 100%; }
.icon-button.photo-source-button { background: var(--add); border-color: var(--add-border); }
.paper-hem {
    display: block;
    width: 100%;
    height: clamp(65px, 9vw, 108px);
    margin-top: 3px;
    pointer-events: none;
}

.forest { margin: 39px 0 0; padding: 25px; scroll-margin-top: 13px; }
.forest-heading { display: flex; gap: 13px; align-items: center; margin-bottom: 17px; }
.forest-heading img { width: 35px; transform: rotate(-12deg); }
.forest-heading h2, dialog h2, .login-card h2 {
    color: var(--heading);
    font: 700 clamp(1.45rem, 3vw, 2.04rem)/1.1 var(--display);
    letter-spacing: -.033em;
}
.forest-heading p { color: var(--muted); margin-top: 4px; }
.forest-layout { display: grid; gap: 21px; grid-template-columns: 216px minmax(0, 1fr); align-items: start; }
.forest-tools {
    background: var(--tools);
    border: 1px solid var(--line);
    padding: 11px;
    border-radius: 10px;
}
.tab-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.tool-tab { min-height: 39px; padding: 7px; border: 1px solid var(--line); background: var(--control); }
.tool-tab[aria-pressed="true"], .erase[aria-pressed="true"] {
    color: var(--on-primary);
    border-color: var(--primary);
    background: var(--primary);
}
.erase[aria-pressed="true"]:hover:not(:disabled) { background: var(--primary); color: var(--on-primary); }
.palette { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 10px 0 3px; }
.palette button {
    display: grid;
    place-items: center;
    height: 40px;
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: 7px;
    padding: 0;
}
.palette button:hover { background: var(--control-hover); }
.palette button[aria-pressed="true"] { border-color: var(--selected-border); box-shadow: inset 0 0 0 1px var(--selected-border); background: var(--selected); }
.forest-tools .erase { margin-top: 5px; min-height: 40px; padding-inline: 7px; }
.forest-help { color: var(--muted); font-size: .875rem; margin: 4px 3px 0; }
.forest-feedback { font-size: .875rem; color: var(--pine); margin: 4px 3px 0; }
.forest-feedback:empty { display: none; }

.scene {
    position: relative;
    width: 100%;
    aspect-ratio: 2.14;
    min-height: 0;
    border: 1px solid var(--field-border);
    border-radius: 10px;
    isolation: isolate;
    overflow: hidden;
    background: var(--scene-sky);
    container-type: inline-size;
    cursor: crosshair;
    touch-action: pan-y;
}
.scene[data-tool="draw"] { touch-action: none; }
.scene-backdrop, #drawing, #ornaments { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scene-backdrop { z-index: 0; isolation: isolate; }
#drawing { z-index: 1; }
#ornaments { z-index: 2; isolation: isolate; }
.scene-backdrop::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: auto -4% -48%;
    height: 70%;
    background: var(--scene-snow);
    border-radius: 55% 65% 0 0;
    box-shadow: var(--scene-banks);
}
.sky-flake { position: absolute; color: var(--flake); opacity: .6; font-size: clamp(.7rem, 2.5cqw, 1.3rem); }
.flake-one { left: 10%; top: 15%; }
.flake-two { left: 32%; top: 26%; }
.flake-three { left: 64%; top: 12%; }
.flake-four { right: 9%; top: 21%; }
.flake-five { left: 9%; top: 54%; }
.flake-six { right: 7%; top: 53%; }

.tree { position: absolute; display: block; pointer-events: none; }
.tree i, .tree b { display: block; position: absolute; }
.tree i {
    clip-path: polygon(50% 0, 73% 44%, 67% 45%, 87% 73%, 79% 73%, 100% 100%, 0 100%, 21% 73%, 13% 73%, 33% 45%, 27% 44%);
    border-radius: 0 0 9% 9%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}
.tree i:nth-child(1) { bottom: 11%; height: 66%; width: 100%; background: linear-gradient(110deg, #4f805e, #28523e 70%); }
.tree i:nth-child(2) { bottom: 31%; height: 59%; width: 83%; background: linear-gradient(110deg, #619069, #3f7051 70%); }
.tree i:nth-child(3) { bottom: 51%; height: 49%; width: 63%; background: linear-gradient(110deg, #729976, #578560 70%); }
.tree b { left: 44%; width: 12%; height: 23%; bottom: 0; background: #755b48; border-radius: 0 0 2px 2px; }
.scene-tree::after {
    content: "✦";
    position: absolute;
    z-index: 2;
    top: -11%;
    left: 50%;
    transform: translateX(-50%);
    color: #c19242;
    font: 700 clamp(.85rem, 4.4cqw, 2.2rem)/1 var(--display);
}
[data-theme="dark"] .scene-tree::after { color: #ffe294; }
.tree-one { width: 22%; height: 59%; left: 15%; bottom: 11%; }
.tree-two { width: 31%; height: 78%; left: 34.5%; bottom: 10%; }
.tree-three { width: 22%; height: 58%; right: 15%; bottom: 9%; }
.tree-watermark { z-index: -1; width: 105px; height: 140px; right: 9%; bottom: 3%; opacity: .13; transform: rotate(4deg); }
.person-pinja .tree-watermark { right: 19%; transform: rotate(-7deg); }
.person-mami .tree-watermark { right: 6%; transform: rotate(7deg); }
.ornament {
    position: relative;
    display: inline-block;
    width: 21px;
    height: 21px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    line-height: 1;
    text-align: center;
    font-size: 21px;
}
.ornament-gold, .ornament-red, .ornament-blue {
    width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 1px 2px #17352555;
}
.ornament-gold::before, .ornament-red::before, .ornament-blue::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 6px;
    width: 4px;
    height: 4px;
    border-radius: 1px;
    background: #a18044;
}
.ornament-gold { background: radial-gradient(circle at 35% 28%, #fff3a8, #d6a03c 55%, #9c651d); }
.ornament-red { background: radial-gradient(circle at 35% 28%, #ffb6a0, #b23630 52%, #7a2020); }
.ornament-blue { background: radial-gradient(circle at 35% 28%, #b1edf7, #2785a5 56%, #215a75); }
.ornament-heart {
    width: 24px;
    height: 24px;
    background: radial-gradient(ellipse at 30% 24%, #ffb09d, #e75755 39%, #ad292e 81%);
    clip-path: path("M12 21.5C10.8 20.7 2 15.1 2 9.1 2 5.7 4.3 3.5 7.3 3.5 9.2 3.5 11 4.6 12 6.1 13 4.6 14.8 3.5 16.7 3.5 19.7 3.5 22 5.7 22 9.1 22 15.1 13.2 20.7 12 21.5Z");
}
.ornament-snow { background-image: url("snow.webp"); }
.ornament-flower { background-image: url("flower-jani.webp"); }
.ornament-star { color: #ffd366; text-shadow: 0 1px 2px #71571d; }
.placed-ornament {
    position: absolute;
    display: grid;
    place-items: center;
    top: clamp(13px, var(--y), calc(100% - 13px));
    left: clamp(13px, var(--x), calc(100% - 13px));
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 1px #fff3d4) drop-shadow(0 1px 1px #192c24);
}
.placed-ornament.pending-ornament { z-index: 2147483647; }
.ink { width: 17px; height: 17px; border-radius: 50%; }
.ink-red { background: var(--draw-red); }
.ink-green { background: var(--draw-green); }
.ink-blue { background: var(--draw-blue); }
.ink-gold { background: var(--draw-gold); }
#keyboard-cursor {
    position: absolute;
    z-index: 3;
    top: var(--y, 50%);
    left: var(--x, 50%);
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    border: 2px solid #fffdf4;
    outline: 2px dashed #243a2d;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}
.scene:focus-visible #keyboard-cursor { opacity: 1; }
.footer { display: flex; justify-content: center; align-items: center; gap: 9px; padding: 20px 0 31px; font-size: .9rem; color: var(--muted); }
.footer img { width: 15px; height: 15px; object-fit: contain; }
.notice { margin-bottom: 12px; }

.login-layout { max-width: 465px; margin-bottom: 38px; }
.login-card { padding: 21px 20px 24px; text-align: center; }
.login-santa { display: block; width: 110px; height: auto; margin: 0 auto 9px; }
.login-card h2 { margin-bottom: 17px; }
.login-form { display: grid; justify-items: center; gap: 6px; margin-inline: auto; max-width: 280px; }
.login-form #password {
    min-height: 46px;
    padding: 9px 32px;
    font-size: 1.125rem;
    line-height: 1.35;
    direction: ltr;
    text-align: center;
    text-indent: 0;
}
.login-form .button { min-width: 105px; margin-top: 9px; }
.login-card .form-error { margin-bottom: 11px; }
.login-characters { display: flex; justify-content: center; align-items: end; gap: clamp(6px, 2vw, 17px); margin: 22px auto 0; }
.login-characters img { width: 25%; height: clamp(68px, 17vw, 105px); object-fit: contain; object-position: center bottom; }

#photo-dialog, #share-dialog {
    border: 1px solid var(--paper-border);
    width: min(720px, calc(100% - 24px));
    max-height: calc(100dvh - 32px);
    border-radius: 13px;
    padding: 12px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 20px 80px #1b2a2273;
}
#photo-dialog::backdrop, #share-dialog::backdrop { background: #192d24a6; }
#share-dialog { width: min(620px, calc(100% - 24px)); padding: clamp(12px, 3vw, 22px); }
#share-dialog[open] { display: flex; flex-direction: column; }
.share-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
#share-close { color: #161b18; }
[data-theme="dark"] #share-close { color: var(--ink); }
#share-status { margin-bottom: 10px; color: var(--muted); }
.share-previews {
    display: grid;
    gap: 10px;
    max-height: 60dvh;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border-radius: 8px;
}
.share-previews:empty { display: none; }
.share-previews img { display: block; width: 100%; height: auto; }
.share-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: 10px; }
.share-heading, #share-status, .share-footer { flex: none; }
#share-file-label { color: inherit; }
.photo-toolbar {
    position: relative;
    display: grid;
    align-items: center;
    min-height: 60px;
    margin-bottom: 8px;
}
#photo-actions { grid-area: 1 / 1; }
#photo-confirmation {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    padding: 0 5px;
    background: var(--tools);
    border-radius: 8px;
}
#photo-confirmation .confirmation { flex-wrap: nowrap; }
#photo-confirmation .confirmation-text { flex: 1; line-height: 1.25; }
#photo-confirmation .panel-actions { flex: none; flex-wrap: nowrap; }
#photo-confirmation .form-error { position: absolute; top: 100%; inset-inline: 0; z-index: 1; }
#full-photo { display: block; margin-inline: auto; max-height: calc(100dvh - 155px); object-fit: contain; border-radius: 6px; }
.icon-button {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--control);
    color: var(--ink);
    font-size: 1.17rem;
    line-height: 1;
}
.icon-button:hover:not(:disabled) { filter: brightness(.94); }
.icon-button.confirm-icon { background: var(--confirm-bg); color: var(--confirm-ink); border-color: var(--confirm-border); }
.icon-button.cancel-icon { background: var(--cancel-bg); color: var(--cancel-ink); border-color: var(--cancel-border); }
.control-icon { display: block; width: 21px; height: 21px; background: currentColor; }
.mark-cross { clip-path: polygon(22% 14%, 50% 42%, 78% 14%, 86% 22%, 58% 50%, 86% 78%, 78% 86%, 50% 58%, 22% 86%, 14% 78%, 42% 50%, 14% 22%); }
.mark-check { clip-path: polygon(18% 44%, 40% 64%, 81% 21%, 89% 29%, 40% 79%, 10% 52%); }
.mark-gear { --mark-image: url("mark-gear.png"); }
.mark-edit { --mark-image: url("mark-edit.png"); }
.mark-image { --mark-image: url("mark-image.png"); }
.mark-camera { --mark-image: url("mark-camera.png"); }
.mark-link { --mark-image: url("mark-link.png"); }
.mark-trash { --mark-image: url("mark-trash.png"); }
.control-icon:is(.mark-gear, .mark-edit, .mark-image, .mark-camera, .mark-link, .mark-trash) {
    -webkit-mask: var(--mark-image) center / contain no-repeat;
    mask: var(--mark-image) center / contain no-repeat;
}
label { display: block; font-size: .93rem; font-weight: 670; margin-top: 9px; }
label span { color: var(--muted); font-weight: 450; }
input:not([type="hidden"]), textarea {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid var(--field-border);
    border-radius: 6px;
    background: var(--field);
    color: var(--ink);
}
textarea { min-height: 66px; resize: vertical; }
input::file-selector-button {
    border: 1px solid var(--add-border);
    border-radius: 5px;
    background: var(--add);
    padding: 4px 7px;
    margin-inline-end: 8px;
    color: var(--ink);
    cursor: pointer;
}
.form-error { background: var(--error-bg); color: var(--error-ink); padding: 8px 11px; border-radius: 6px; }

@media (max-width: 950px) {
    .frame { width: calc(100% - 40px); }
    .wishlist { padding: 0 11px 12px; }
    .person { padding-inline: 18px; }
    .person:not(:first-child)::before { width: 42px; left: -21px; }
    .person-name { height: 94px; }
    .forest-layout { grid-template-columns: 185px minmax(0, 1fr); gap: 13px; }
}
@media (max-width: 760px) {
    .frame { width: calc(100% - 24px); }
    .masthead { padding-block-start: max(66px, 7vw); }
    .snowfall i:is(:nth-of-type(2), :nth-of-type(4), :nth-of-type(5), :nth-of-type(7), :nth-of-type(9)) { display: none; }
    .masthead-art {
        grid-template-columns: repeat(2, minmax(0, 44px));
        grid-template-areas: "character companion" "gift flake" "heart heart";
        gap: 2px 3px;
    }
    .masthead-gift, .masthead-flake { line-height: 1; }
    .wishlist {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 22px;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }
    .person {
        padding: 12px 16px 8px;
        background: var(--paper);
        border: 1px solid var(--paper-border);
        border-radius: 15px;
        box-shadow: var(--shadow);
    }
    .person:not(:first-child)::before { display: none; }
    .person-name { padding-inline: 26px; }
    .person-name img:first-child { width: min(60%, 151px); }
    .person-jani .person-name img:first-child { width: min(56%, 124px); }
    .wish-space { min-height: 94px; }
    .tree-watermark { width: 71px; height: 89px; bottom: 0; }
    .paper-hem { height: 80px; }
    .forest { margin-top: 23px; padding: 15px; }
    .forest-layout { grid-template-columns: 1fr; }
    .forest-tools { padding: 9px; }
    .palette { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    #ink-palette { grid-template-columns: repeat(4, minmax(0, 45px)); }
    .palette button { height: 37px; }
    .forest-heading img { width: 25px; }
    .forest-heading p { font-size: .93rem; }
    .forest-help { font-size: .9rem; }
    .icon-button { min-width: 44px; min-height: 44px; }
    .photo-toolbar { min-height: 68px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .snowfall { display: none; }
    .wish-settings .control-icon { transition: none; }
}

.person-jani .wish-space::after,
.person-mami .wish-space::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 19px;
    height: 19px;
    left: 2%;
    bottom: 14%;
    opacity: .64;
    background: url("snow-small.webp") center / contain no-repeat;
    pointer-events: none;
}
.person-mami .wish-space::after {
    left: auto;
    right: 1%;
    bottom: 52%;
    width: 25px;
    height: 25px;
    transform: rotate(23deg);
    background-image: url("snow.webp");
}
