:root {
    color-scheme: dark;
    --wish-accent: #0a84ff;
    --blue: var(--wish-accent);
    --page-bg: #000;
    --header-bg: #000;
    --header-border: color-mix(in srgb, var(--wish-accent) 22%, transparent);
    --border: color-mix(in srgb, var(--wish-accent) 28%, #38383a);
    --surface: color-mix(in srgb, var(--wish-accent) 14%, #161416);
    --text: #f5f5f7;
    --muted: #aea7a3;
}

* { box-sizing: border-box; }

html.wish-html,
body.wish-body {
    min-height: 100%;
    margin: 0;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
    overflow-x: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

html.wish-html {
    background-color: var(--page-bg, #000);
}

body.wish-body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    background-color: var(--page-bg, #000);
}

.wish-main {
    position: relative;
    flex: 1 1 auto;
    min-height: auto;
    display: flex;
    flex-direction: column;
}

.wish-toolbar {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px max(16px, env(safe-area-inset-right)) 4px max(16px, env(safe-area-inset-left));
    pointer-events: none;
}

.wish-identity,
.wish-tools {
    pointer-events: auto;
}

.wish-identity {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.wish-kicker {
    color: color-mix(in srgb, var(--wish-accent) 80%, #fff);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.wish-identity strong {
    overflow: hidden;
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wish-tools {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.wish-chip,
.wish-icon-btn,
.wish-cta,
.wish-close {
    border: 1px solid color-mix(in srgb, var(--wish-accent) 28%, #38383a);
    background: color-mix(in srgb, var(--wish-accent) 12%, #1c1c1e);
    color: var(--text);
    cursor: pointer;
}

.wish-chip {
    height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.wish-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wish-icon-btn svg { width: 18px; height: 18px; }
.wish-icon-btn.is-on,
.wish-icon-btn--accent {
    background: var(--wish-accent);
    border-color: var(--wish-accent);
    color: #fff;
}

.wish-board {
    position: relative;
    flex: 1 1 auto;
    min-height: calc(100dvh - 140px);
    padding: 12px max(16px, env(safe-area-inset-right)) calc(72px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    overflow: visible;
}

.wish-cards {
    position: relative;
    width: 100%;
    min-height: inherit;
}

.wish-card {
    position: absolute;
    width: var(--size, 210px);
    transform: rotate(var(--rot, 0deg)) scale(var(--scale, 1));
    transform-origin: center center;
    cursor: pointer;
    transition: transform .22s ease, filter .22s ease;
}

.wish-card-sway {
    transform-origin: 50% 80%;
}

.wish-card.is-picked {
    pointer-events: none;
    z-index: 49 !important;
}

.wish-card.is-picked .wish-card-sway {
    animation: wish-pick .45s cubic-bezier(.22, .8, .2, 1) forwards;
}

.wish-card.is-returning {
    z-index: 40 !important;
}

.wish-card.is-returning .wish-card-sway {
    animation: wish-return .4s ease forwards;
}

.wish-card.is-lifted,
.wish-card.is-hover,
.wish-card.is-front {
    z-index: 49;
    transform: translateY(-12px) rotate(var(--rot, 0deg)) scale(calc(var(--scale, 1) * 1.07));
    filter: drop-shadow(0 22px 18px rgba(0, 0, 0, .38));
}

.wish-card.is-front {
    z-index: 49 !important;
}

.wish-sheet--center {
    align-items: center;
}

@media (hover: hover) and (pointer: fine) {
    .wish-card:hover:not(.is-tossed):not(.is-picked):not(.is-landing) {
        z-index: 28;
        transform: translateY(-14px) rotate(var(--rot, 0deg)) scale(calc(var(--scale, 1) * 1.05));
        filter: drop-shadow(0 22px 18px rgba(0, 0, 0, .38));
    }
    .wish-card:hover:not(.is-tossed):not(.is-picked) .wish-card-face {
        box-shadow:
            0 26px 44px rgba(0, 0, 0, .38),
            0 1px 0 rgba(255, 255, 255, .45) inset;
    }
}

.wish-card.is-lifted .wish-card-face,
.wish-card.is-hover .wish-card-face {
    box-shadow:
        0 26px 44px rgba(0, 0, 0, .38),
        0 1px 0 rgba(255, 255, 255, .45) inset;
}

.wish-card.is-tossed {
    z-index: 22;
    pointer-events: none;
    transition: transform .7s cubic-bezier(.18, .82, .32, 1.12), filter .5s ease;
    transform: translate3d(var(--fly-x, 0), var(--fly-y, 0), 0)
        rotate(var(--fly-rot, var(--rot)))
        scale(1.08);
    filter: drop-shadow(0 34px 24px rgba(0, 0, 0, .42));
}

.wish-card.is-landing {
    z-index: 18;
    transition:
        left .95s cubic-bezier(.2, .85, .2, 1),
        top .95s cubic-bezier(.2, .85, .2, 1),
        transform .95s cubic-bezier(.2, .85, .2, 1),
        filter .7s ease;
}

body.is-shuffling .wish-card {
    pointer-events: none;
}

@keyframes wish-sway {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    35% { transform: translate3d(2px, -9px, 0) rotate(1.8deg); }
    70% { transform: translate3d(-3px, -4px, 0) rotate(-1.2deg); }
}

@keyframes wish-pick {
    0% { opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
    42% { opacity: 1; transform: translate3d(0, -34px, 0) scale(1.1) rotate(-3deg); }
    100% { opacity: 0; transform: translate3d(10px, -88px, 0) scale(1.18) rotate(-8deg); }
}

@keyframes wish-return {
    0% { opacity: 0; transform: translate3d(0, -42px, 0) scale(1.08) rotate(-4deg); }
    100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
}

.wish-card-face {
    display: block;
    width: 100%;
    margin: 0;
    padding: 8px 8px 10px;
    border: 0;
    border-radius: 4px 4px 8px 8px;
    background: var(--wish-paper, #f6efe6);
    box-shadow:
        0 7px 16px rgba(0, 0, 0, .3),
        0 1px 0 rgba(255, 255, 255, .4) inset;
    color: #2b211c;
    font: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
    transition: box-shadow .22s ease;
}

.wish-card[data-desire="1"] { --wish-paper: #c9d4e3; }
.wish-card[data-desire="2"] { --wish-paper: #cde8d4; }
.wish-card[data-desire="3"] { --wish-paper: #f6efe6; }
.wish-card[data-desire="4"] { --wish-paper: #f4c9a0; }
.wish-card[data-desire="5"] { --wish-paper: #ee9b8a; }

.wish-card[data-desire="4"] .wish-card-face,
.wish-card[data-desire="5"] .wish-card-face {
    padding: 10px 10px 14px;
}

.wish-card[data-desire="4"] .wish-card-cap { font-size: 13px; }
.wish-card[data-desire="5"] .wish-card-cap { font-size: 15px; font-weight: 700; }

.wish-card-photo,
.wish-card-blank {
    display: block;
    width: 100%;
    aspect-ratio: .86;
    object-fit: cover;
    border-radius: 2px;
    background:
        linear-gradient(160deg, color-mix(in srgb, var(--wish-accent) 55%, #3a2018), #1a1210);
}

.wish-card-blank {
    display: flex;
    align-items: flex-end;
    padding: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.25;
}

.wish-card-cap {
    display: -webkit-box;
    margin-top: 8px;
    overflow: hidden;
    color: #3a2d27;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wish-x {
    position: absolute;
    top: -8px;
    right: -8px;
    z-index: 2;
    width: 26px;
    height: 26px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #ff453a;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(255, 69, 58, .4);
}

body.is-editing .wish-x { display: flex; }
body.is-editing .wish-card-face {
    box-shadow:
        0 7px 16px rgba(0, 0, 0, .3),
        0 1px 0 rgba(255, 255, 255, .4) inset,
        0 0 0 2px var(--wish-accent);
}

.wish-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 24px;
    color: var(--muted);
    text-align: center;
    pointer-events: none;
}

.wish-archive-hint {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
}

#archive-empty {
    position: static;
    inset: auto;
    display: block;
    padding: 24px 0;
}

.wish-landing {
    max-width: 520px;
    margin: 12vh auto 0;
    padding: 0 24px;
    text-align: center;
}

.wish-landing h1 {
    margin: 8px 0 10px;
    font-size: clamp(42px, 8vw, 72px);
    letter-spacing: -.07em;
}

.wish-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    background: var(--wish-accent);
    border-color: var(--wish-accent);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.wish-cta--full { width: 100%; margin-top: 8px; }

.wish-sheet {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(10px);
    overscroll-behavior: contain;
}

.wish-sheet[hidden],
.wish-empty[hidden],
#archive-empty[hidden],
[hidden] {
    display: none !important;
}

.wish-sheet-card {
    width: min(100%, 420px);
    max-height: min(88dvh, var(--vvh, 88dvh));
    overflow: auto;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--wish-accent) 24%, #38383a);
    border-radius: 22px 22px 18px 18px;
    background: color-mix(in srgb, var(--wish-accent) 8%, #141210);
    -webkit-overflow-scrolling: touch;
}

.wish-sheet-card--wide { width: min(100%, 720px); }
.wish-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.wish-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
}

.wish-close--over {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.wish-sheet label,
.wish-sheet-label {
    display: block;
    margin: 10px 0 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.wish-sheet input[type="url"],
.wish-sheet input[type="text"],
.wish-sheet textarea {
    width: 100%;
    margin-top: 6px;
    padding: 11px 12px;
    border: 1px solid #38383a;
    border-radius: 12px;
    background: #1c1c1e;
    color: var(--text);
    font: inherit;
    font-size: 16px;
}

.wish-photo-pick { cursor: pointer; }
.wish-photo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    overflow: hidden;
    border-radius: 16px;
    background: #1c1c1e;
    color: var(--muted);
    background-size: cover;
    background-position: center;
}

.wish-desire-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}
.wish-desire-opt {
    position: relative;
    flex: 0 0 auto;
}
.wish-desire-opt input { position: absolute; opacity: 0; }
.wish-desire-opt span {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(43, 33, 28, .18);
    color: #2b211c;
    font-weight: 800;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset;
    transition: transform .16s ease, box-shadow .16s ease;
}
.wish-desire-opt[data-desire="1"] span {
    width: 36px;
    height: 36px;
    background: #c9d4e3;
    font-size: 13px;
}
.wish-desire-opt[data-desire="2"] span {
    width: 42px;
    height: 42px;
    background: #cde8d4;
    font-size: 14px;
}
.wish-desire-opt[data-desire="3"] span {
    width: 50px;
    height: 50px;
    background: #f6efe6;
    font-size: 16px;
}
.wish-desire-opt[data-desire="4"] span {
    width: 60px;
    height: 60px;
    background: #f4c9a0;
    font-size: 18px;
}
.wish-desire-opt[data-desire="5"] span {
    width: 72px;
    height: 72px;
    background: #ee9b8a;
    font-size: 22px;
}
.wish-desire-opt input:checked + span {
    transform: scale(1.08);
    box-shadow:
        0 0 0 3px var(--wish-accent),
        0 1px 0 rgba(255, 255, 255, .45) inset;
}

.wish-patterns {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.wish-pattern {
    height: 52px;
    overflow: hidden;
    padding: 0;
    border-radius: 12px;
    border: 2px solid transparent;
}
.wish-pattern span { display: block; width: 100%; height: 100%; }
.wish-pattern.is-on { border-color: var(--wish-accent); }

.wish-accents { display: flex; flex-wrap: wrap; gap: 8px; }
.wish-accent {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--swatch);
    padding: 0;
}
.wish-accent.is-on { border-color: #fff; }
.wish-accent--custom {
    overflow: hidden;
    background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
}
.wish-accent--custom input { opacity: 0; width: 32px; height: 32px; cursor: pointer; }

.wish-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.wish-arch-card {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #1c1c1e;
}

.wish-arch-card img,
.wish-arch-card .wish-arch-blank {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.wish-arch-blank {
    display: flex;
    align-items: flex-end;
    padding: 10px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--wish-accent) 50%, #333), #111);
}

.wish-arch-card p {
    margin: 0;
    padding: 8px 10px 10px;
    font-size: 12px;
}

.wish-arch-actions {
    display: flex;
    gap: 6px;
    padding: 0 8px 10px;
}

.wish-arch-actions button {
    flex: 1;
    height: 32px;
    border-radius: 10px;
    border: 0;
    cursor: pointer;
    font-weight: 650;
}

.wish-restore { background: var(--wish-accent); color: #fff; }
.wish-delete { background: rgba(255, 69, 58, .18); color: #ff6961; }

.wish-view-card { position: relative; padding: 0; overflow: hidden; }
.wish-view-photo {
    min-height: 180px;
    max-height: 52dvh;
    background: #111;
}
.wish-view-photo img {
    display: block;
    width: 100%;
    max-height: 52dvh;
    object-fit: contain;
    background: #0a0a0a;
}
.wish-view-copy { padding: 16px; }
.wish-view-copy p { margin: 0 0 12px; font-size: 16px; line-height: 1.4; }

.wish-paper-0, html.wish-paper-0, html.wish-paper-0 body.wish-body { background: #000; }
.wish-paper-1, html.wish-paper-1, html.wish-paper-1 body.wish-body {
    --page-bg: #0b1524;
    --header-bg: #07101c;
    background-color: #0b1524;
    background-image:
        radial-gradient(circle at 18% 22%, rgba(10, 132, 255, .18), transparent 28%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><g fill='none' stroke='%2377b6ff' stroke-width='1.1' opacity='.22'><circle cx='22' cy='28' r='7'/><path d='M60 18c8 4 9 14 2 20'/><path d='M102 34l8 8-8 8'/><circle cx='40' cy='90' r='3'/><path d='M80 78h18'/><path d='M18 110c10-8 24-6 30 6'/></g></svg>");
}
.wish-paper-2, html.wish-paper-2, html.wish-paper-2 body.wish-body {
    --page-bg: #1a1028;
    --header-bg: #120a1c;
    background-color: #1a1028;
    background-image:
        radial-gradient(circle at 80% 10%, rgba(191, 90, 242, .2), transparent 30%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='130' height='130'><g fill='none' stroke='%23d6a6ff' stroke-width='1.1' opacity='.24'><path d='M20 20h16v16H20z'/><path d='M70 24l10 18H60z'/><circle cx='108' cy='40' r='6'/><path d='M30 88c12 0 12 16 0 16s-12-16 0-16z'/><path d='M86 92h22'/></g></svg>");
}
.wish-paper-3, html.wish-paper-3, html.wish-paper-3 body.wish-body {
    --page-bg: #06241f;
    --header-bg: #041a16;
    background-color: #06241f;
    background-image:
        radial-gradient(circle at 10% 80%, rgba(48, 209, 88, .16), transparent 32%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='150'><g fill='none' stroke='%237dffb0' stroke-width='1.15' opacity='.22'><path d='M18 40c10-18 28-8 24 8'/><path d='M78 22c6 10 18 12 26 4'/><circle cx='50' cy='96' r='8'/><path d='M110 88c-8 14-24 12-28-2'/></g></svg>");
}
.wish-paper-4, html.wish-paper-4, html.wish-paper-4 body.wish-body {
    --page-bg: #2a1018;
    --header-bg: #1c0a10;
    background-color: #2a1018;
    background-image:
        radial-gradient(circle at 70% 30%, rgba(255, 55, 95, .2), transparent 28%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='136' height='136'><g fill='none' stroke='%23ff8da1' stroke-width='1.1' opacity='.26'><path d='M24 28c8-10 22-8 24 4-8 2-16 8-24 18'/><circle cx='92' cy='36' r='5'/><path d='M40 90c10 4 18-4 14-14'/><path d='M100 96l12-8 4 14z'/></g></svg>");
}
.wish-paper-5, html.wish-paper-5, html.wish-paper-5 body.wish-body {
    --page-bg: #102418;
    --header-bg: #0a1810;
    background-color: #102418;
    background-image:
        radial-gradient(circle at 30% 20%, rgba(48, 209, 88, .14), transparent 26%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='144' height='144'><g fill='none' stroke='%2396e6b0' stroke-width='1.1' opacity='.23'><path d='M20 30c6 10 0 18-8 22 14 2 26-8 30-20'/><path d='M84 24l8 20-18 4z'/><circle cx='50' cy='100' r='6'/><path d='M108 88c8 10 0 22-12 18'/></g></svg>");
}
.wish-paper-6, html.wish-paper-6, html.wish-paper-6 body.wish-body {
    --page-bg: #241a08;
    --header-bg: #181208;
    background-color: #241a08;
    background-image:
        radial-gradient(circle at 90% 80%, rgba(255, 159, 10, .16), transparent 30%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><g fill='none' stroke='%23ffd28a' stroke-width='1.15' opacity='.24'><circle cx='28' cy='28' r='8'/><path d='M70 18h24l-8 16H78z'/><path d='M24 92c16-4 22 14 8 22'/><path d='M100 80c0 14 16 16 22 6'/></g></svg>");
}
.wish-paper-7, html.wish-paper-7, html.wish-paper-7 body.wish-body {
    --page-bg: #16181c;
    --header-bg: #101214;
    background-color: #16181c;
    background-image:
        repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 2px, transparent 2px 18px),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><g fill='%23ffffff' opacity='.12'><circle cx='16' cy='20' r='2'/><circle cx='60' cy='48' r='2'/><circle cx='100' cy='22' r='2'/><circle cx='36' cy='90' r='2'/></g></svg>");
}
.wish-paper-8, html.wish-paper-8, html.wish-paper-8 body.wish-body {
    --page-bg: #28080c;
    --header-bg: #1a0508;
    background-color: #28080c;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 69, 58, .2), transparent 28%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='148' height='148'><g fill='none' stroke='%23ff8b80' stroke-width='1.1' opacity='.24'><path d='M18 36c20-16 36 6 18 22'/><path d='M86 20l14 10-14 10z'/><circle cx='48' cy='104' r='7'/><path d='M112 96c12 0 16 16 4 22'/></g></svg>");
}
.wish-paper-9, html.wish-paper-9, html.wish-paper-9 body.wish-body {
    --page-bg: #121028;
    --header-bg: #0c0a1c;
    background-color: #121028;
    background-image:
        radial-gradient(circle at 78% 18%, rgba(10, 132, 255, .18), transparent 26%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='132' height='132'><g fill='none' stroke='%239ab4ff' stroke-width='1.1' opacity='.24'><path d='M22 22l18 6-6 18-18-6z'/><circle cx='92' cy='32' r='7'/><path d='M34 92h26'/><path d='M88 86c10 8 8 22-4 24'/></g></svg>");
}
.wish-paper-10, html.wish-paper-10, html.wish-paper-10 body.wish-body {
    --page-bg: #062028;
    --header-bg: #04161c;
    background-color: #062028;
    background-image:
        radial-gradient(circle at 12% 12%, rgba(100, 210, 255, .18), transparent 28%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='142' height='142'><g fill='none' stroke='%2380e7ff' stroke-width='1.1' opacity='.23'><circle cx='26' cy='26' r='6'/><path d='M70 18c12 6 14 20 4 28'/><path d='M108 40l12 12'/><path d='M32 100c16-10 28 6 14 18'/><circle cx='96' cy='104' r='5'/></g></svg>");
}

html.wish-paper-1, html.wish-paper-2, html.wish-paper-3, html.wish-paper-4,
html.wish-paper-5, html.wish-paper-6, html.wish-paper-7, html.wish-paper-8,
html.wish-paper-9, html.wish-paper-10,
body.wish-body {
    background-attachment: fixed;
}

body.wish-sheet-open {
    overflow: hidden;
}

body.wish-sheet-open .wish-board,
body.wish-sheet-open .wish-card {
    z-index: 0 !important;
}

@media (max-width: 700px) {
    .wish-toolbar {
        padding: 10px max(12px, env(safe-area-inset-right)) 2px max(12px, env(safe-area-inset-left));
        flex-wrap: nowrap;
        gap: 8px;
    }
    .wish-identity strong { font-size: 17px; }
    .wish-tools { gap: 6px; }
    .wish-icon-btn {
        width: 40px;
        height: 40px;
    }
    .wish-chip {
        height: 40px;
        padding: 0 10px;
        font-size: 12px;
    }
    .wish-board {
        min-height: calc(100dvh - 118px);
        padding: 8px max(12px, env(safe-area-inset-right)) calc(56px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    }
    .wish-x {
        top: -6px;
        right: -6px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    .wish-landing {
        margin-top: 8vh;
        padding: 0 max(20px, env(safe-area-inset-left)) calc(24px + env(safe-area-inset-bottom));
    }
    .wish-landing h1 { font-size: clamp(36px, 12vw, 64px); }
    .wish-sheet {
        padding: 0;
        padding-top: env(safe-area-inset-top);
    }
    .wish-sheet-card,
    .wish-sheet-card--wide {
        width: 100%;
        max-width: none;
        max-height: min(92dvh, var(--vvh, 92dvh), calc(100dvh - env(safe-area-inset-top)));
        margin-top: auto;
        border-radius: 20px 20px 0 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    }
    .wish-view-card { padding: 0; }
    .wish-view-copy { padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); }
    .wish-view-photo,
    .wish-view-photo img { max-height: 42dvh; }
    .wish-photo-preview { height: 132px; }
    .wish-patterns { grid-template-columns: repeat(4, 1fr); }
    .wish-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wish-desire-opt[data-desire="1"] span { width: 34px; height: 34px; }
    .wish-desire-opt[data-desire="5"] span { width: 64px; height: 64px; }
    .wish-close {
        width: 36px;
        height: 36px;
    }
    .wish-close--over {
        top: 10px;
        right: 10px;
    }
    .wish-sheet--center {
        align-items: center;
        justify-content: center;
        padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    }
    .wish-sheet--center .wish-sheet-card {
        width: min(100%, 400px);
        max-width: 400px;
        max-height: min(80dvh, var(--vvh, 80dvh));
        margin: 0;
        border-radius: 22px;
        border: 1px solid color-mix(in srgb, var(--wish-accent) 24%, #38383a);
        padding: 0;
    }
    .wish-sheet--center .wish-view-copy {
        padding: 14px 16px 16px;
    }
    .wish-sheet--center .wish-view-photo,
    .wish-sheet--center .wish-view-photo img {
        max-height: 48dvh;
    }
    .wish-card-cap { font-size: 11px; }
}

@media (max-width: 380px) {
    .wish-icon-btn {
        width: 36px;
        height: 36px;
    }
    .wish-tools { gap: 5px; }
    .wish-identity strong { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .wish-card-sway { animation: none; }
    .wish-card.is-picked { opacity: 0; }
    .wish-card.is-picked .wish-card-sway,
    .wish-card.is-returning .wish-card-sway { animation: none; }
    .wish-card,
    .wish-card.is-tossed,
    .wish-card.is-landing,
    .wish-card.is-lifted { transition: none; }
}
