:root {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #281d39;
    background: #f6f3fb;
    color-scheme: light;
    --primary: #5934a2;
    --primary-dark: #452681;
    --muted: #685c78;
    --line: #e8dfef;
    --surface: #fff;
    --shadow: 0 8px 26px #4930660a;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100dvh; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .53; }
:focus-visible { outline: 3px solid #8761c8; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1, h2, .item-title, .name { overflow-wrap: anywhere; }
h1 { font-size: clamp(1.7rem, 5vw, 2.25rem); letter-spacing: -.042em; line-height: 1.08; }
h2 { font-size: 1.15rem; letter-spacing: -.015em; }
p { line-height: 1.45; }
a { color: var(--primary-dark); }
.shell { max-width: 650px; margin: 0 auto; padding: 18px 18px calc(28px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: center; gap: 10px; padding: 1px 0 17px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #452681; color: #f6dcaa; font-size: 22px; }
.brand { font-size: 15px; font-weight: 750; }
.brand span { color: var(--muted); font-weight: 550; }
.tabs { display: flex; gap: 4px; background: #ece5f3; border-radius: 13px; padding: 4px; margin-bottom: 17px; }
.tabs button { flex: 1; background: transparent; border: 0; min-height: 38px; border-radius: 10px; color: var(--muted); font-weight: 700; }
.tabs button[aria-current="page"] { color: var(--primary-dark); background: white; box-shadow: 0 1px 4px #391c5420; }
.stack { display: grid; gap: 14px; }
.heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 3px 0; }
.hero { position: relative; overflow: hidden; min-height: 184px; isolation: isolate; display: grid; align-content: center; padding: 24px; color: #fff9f3; border-radius: 23px; background: radial-gradient(ellipse at 86% 20%, #8a58b0, transparent 56%), linear-gradient(132deg, #322258, #613590); }
.hero-text { position: relative; z-index: 1; max-width: 65%; }
.hero h1 { font-size: clamp(1.75rem, 7vw, 2.55rem); }
.hero p { color: #f3e7fb; font-size: .92rem; margin-top: 8px; }
.hero .primary { color: #362052; background: #f6dfb4; margin-top: 17px; }
.hero .primary:hover { background: #fff0cd; }
.gift-art { position: absolute; right: 4%; top: 24%; width: clamp(78px, 24vw, 152px); aspect-ratio: 1; transform: rotate(12deg); color: #ffe2af; }
.gift-box { position: absolute; inset: 30% 11% 6%; border-radius: 7%; background: linear-gradient(90deg, #da677d 38%, #f6ce99 38% 59%, #d45778 59%); box-shadow: inset 0 -12px 0 #4624471c, 0 13px 15px #27173137; }
.gift-lid { position: absolute; inset: 19% 5% 61%; border-radius: 6px; background: linear-gradient(90deg, #f18ca1 40%, #ffe1ad 40% 58%, #e97c98 58%); box-shadow: 0 4px 8px #50204455; }
.gift-bow { position: absolute; inset: 5% 28% 80%; display: flex; }
.gift-bow::before, .gift-bow::after { content: ""; display: block; width: 50%; border: 4px solid #ffe1ad; }
.gift-bow::before { transform: rotate(25deg); border-radius: 60% 65% 15% 65%; }
.gift-bow::after { transform: rotate(-25deg); border-radius: 65% 60% 65% 15%; }
.spark { position: absolute; font-style: normal; font-size: 19px; line-height: 1; }
.spark.one { left: -7%; top: 11%; }
.spark.two { right: 0; top: -4%; font-size: 13px; }
.spark.three { right: -9%; bottom: 1%; font-size: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 17px; padding: 16px; box-shadow: var(--shadow); }
.empty { color: var(--muted); padding: 20px 16px; border: 1px dashed #d9cce6; border-radius: 15px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.primary, .secondary, .quiet { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 10px 15px; border-radius: 11px; border: 1px solid transparent; font-size: .89rem; text-decoration: none; font-weight: 730; text-align: center; }
.primary { background: var(--primary); color: white; }
.primary:hover:not(:disabled) { background: var(--primary-dark); }
.secondary { background: #f5effa; color: var(--primary-dark); border-color: #e8dcf3; }
.secondary:hover:not(:disabled) { background: #ede2f3; }
.quiet { padding-inline: 8px; background: transparent; color: var(--primary-dark); min-height: 36px; }
.danger { color: #a42b4a; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.full { width: 100%; }
.back { justify-self: start; padding-left: 0; }
.rows { display: grid; gap: 8px; }
.room-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; text-align: left; color: inherit; }
.room-row:hover { border-color: #b89ad0; }
.room-details { display: grid; gap: 4px; min-width: 0; }
.item-title { font-weight: 740; text-align: left; }
.arrow { color: #7654ab; font-size: 1.4rem; }
.status { display: inline-block; font-size: .77rem; font-weight: 720; line-height: 1.3; border-radius: 16px; padding: 5px 8px; background: #f3eaf9; color: #684291; }
.status.good { color: #225d46; background: #e4f5ea; }
.member { display: flex; align-items: center; gap: 9px; border-bottom: 1px solid #f1ebf5; padding: 10px 0; }
.member:last-child { border-bottom: 0; padding-bottom: 0; }
.member .status { flex-shrink: 0; margin-left: auto; }
.member div { min-width: 0; }
.name { font-weight: 650; }
.avatar { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-weight: 720; background: #eedff8; color: #633d89; }
form.card { display: grid; gap: 13px; }
label { display: grid; gap: 6px; font-size: .9rem; font-weight: 660; }
label small { color: var(--muted); font-weight: 500; }
input { width: 100%; min-width: 0; background: #fdfaff; color: #251b36; border: 1px solid #dcd0e6; border-radius: 10px; padding: 11px 12px; font-size: 16px; }
.item { display: grid; gap: 9px; }
.item .item-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.item .item-head .status { flex-shrink: 0; }
.item-price { font-weight: 700; color: var(--primary-dark); }
.item a { width: fit-content; }
dialog { color: inherit; border: 1px solid var(--line); border-radius: 18px; width: min(390px, calc(100vw - 32px)); padding: 20px; box-shadow: 0 12px 48px #29143b28; }
dialog::backdrop { background: #24173373; }
dialog p { color: var(--muted); margin: 10px 0 15px; }
#notice { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); margin-top: 14px; padding: 11px 14px; border-radius: 12px; color: white; background: #3a2457; box-shadow: 0 4px 20px #2c19332c; overflow-wrap: anywhere; }
#notice.error { background: #8b2947; }
@media (min-width: 600px) {
    .shell { padding-inline: 24px; }
    .hero { padding-inline: 27px; }
}
