/* Local-only design, compatible with strict CSP. */
body:has(.app-shell){background:linear-gradient(180deg,#e8f4fd,#fff5f8);font-family:'M PLUS Rounded 1c','Hiragino Maru Gothic ProN','Hiragino Sans','Yu Gothic',system-ui,sans-serif;color:#334155;min-height:100dvh;display:flex;justify-content:center;align-items:flex-start;-webkit-tap-highlight-color:transparent}
.app-shell{width:100%;max-width:420px;min-height:100dvh;background:#fffdf8;display:flex;flex-direction:column;position:relative;font-size:14px;font-weight:600;--shadow:0 6px 20px -4px #64748b19;--border:#edf0f4;--sky:#1677b4;--rose:#b52e63;--amber:#986000}
.app-shell h1,.app-shell h2,.app-shell h3,.app-shell p{margin:0}.app-shell h1{font-size:15px;line-height:1.4;font-weight:800;overflow-wrap:anywhere}.app-shell h2{font-size:14px;font-weight:800;margin-bottom:9px}.app-shell h3{font-size:13px;font-weight:800}.app-shell small,.app-shell .small{font-size:11px;color:#64748b;font-weight:700}.app-shell .eyebrow{color:var(--sky)}.app-header{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;background:#fffdf8f5;backdrop-filter:blur(12px);padding:14px 16px 12px;border-bottom:1px solid #fce1ec;gap:8px;flex-wrap:nowrap}.identity{display:flex;align-items:center;gap:9px;min-width:0}.avatar{width:42px;height:42px;flex:none;display:grid;place-items:center;background:linear-gradient(135deg,#bae6fd,#fbcfe8);border:2px solid white;border-radius:16px;font-size:23px}.child-app .avatar{border-radius:50%}.account{display:grid;justify-items:end;min-width:70px;max-width:112px}.account .pill{max-width:100%;overflow-wrap:anywhere}.app-main{padding:16px 16px calc(96px + env(safe-area-inset-bottom));flex:1;min-width:0}.stack{display:grid;gap:18px}.stack.compact{gap:10px}.ui-card{background:#fff;border:1px solid #edf0f4;border-radius:24px;padding:16px;box-shadow:var(--shadow);min-width:0}.goal-card{background:linear-gradient(125deg,#eff9ff,white,#fff0f6);border:2px solid white}.between{display:flex;justify-content:space-between;align-items:center;gap:8px;min-width:0}.between h2{margin:0}.goal-card .between{align-items:flex-end}.points{font-size:38px;line-height:1.2;font-weight:800;color:#1682be;letter-spacing:-1px;overflow-wrap:anywhere}.points small{font-size:15px;color:#1682be;margin-left:4px}.pill{display:inline-block;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:800;line-height:1.4;text-align:center;overflow-wrap:anywhere}.blue{background:#e3f2fd;color:#12639a}.pink{background:#ffe4ec;color:#ad275c}.amber{background:#fff2cf;color:#875400}.green{background:#e0f7ec;color:#176848}.rose{color:var(--rose)}.amber-text{color:var(--amber);font-weight:800}.center{text-align:center}.goal-card progress{margin:12px 0 5px;height:15px}.app-shell progress{appearance:none;width:100%;border:0;border-radius:20px;background:#edf0f4;overflow:hidden;height:10px;display:block}.app-shell progress::-webkit-progress-bar{background:#edf0f4;border-radius:20px}.app-shell progress::-webkit-progress-value{background:linear-gradient(90deg,#53b8ee,#f49ab9,#f9c34d);border-radius:20px;transition:width .4s}.app-shell progress::-moz-progress-bar{background:linear-gradient(90deg,#53b8ee,#f49ab9,#f9c34d);border-radius:20px}.stamp-card{border:2px solid #fce1ec}.stamp-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:12px 0 16px}.stamp-cell{aspect-ratio:1;border:2px dashed #d8e1eb;border-radius:15px;background:#f8fafc;display:grid;place-items:center;position:relative;font-size:12px;color:#8292a4;min-width:0}.stamp-cell.approved{border:2px solid #f9dda0;background:linear-gradient(130deg,#fff7dd,#fff0f5);font-size:27px}.stamp-cell.pending{border-color:#f6a9c3;background:#fff0f5;font-size:24px}.stamp-cell.pending .stamp-icon{opacity:.5}.stamp-cell .stamp-label{position:absolute;bottom:-6px;background:#ad275c;color:#fff;font-size:8px;border-radius:12px;padding:2px 3px;white-space:nowrap}.stamp-cell .tick{position:absolute;right:-3px;top:-3px;border-radius:50%;background:#e5a229;color:white;font-size:10px;width:16px;height:16px;text-align:center}.chore-grid,.two-grid,.three-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.three-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.app-shell button{font-size:12px;border-radius:15px;font-weight:800;min-height:44px;padding:9px 12px;transition:transform .15s,opacity .15s;overflow-wrap:anywhere}.app-shell button:active:not(:disabled){transform:scale(.97)}.app-shell .primary{background:linear-gradient(110deg,#197db9,#b64279);color:white;border:0;box-shadow:0 3px 8px #64748b20}.app-shell .secondary{background:#eff6fd;border:1px solid #dcebf7;color:#17689e}.app-shell .quiet{color:#17689e;background:transparent;border:0;font-size:11px;padding:3px 6px;min-height:32px}.app-shell .chore{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:124px;color:#334155;border:2px solid #dcebf7;background:linear-gradient(135deg,#eff9ff,#eaf4ff);border-radius:24px;box-shadow:var(--shadow);padding:12px 6px}.app-shell .chore:nth-child(6n+2){background:linear-gradient(135deg,#ecfdf5,#e6f7f5);border-color:#d3f0df}.app-shell .chore:nth-child(6n+3){background:linear-gradient(135deg,#fff0f5,#fce6ee);border-color:#f9dbe7}.app-shell .chore:nth-child(6n+4){background:linear-gradient(135deg,#fff9e7,#fff4d5);border-color:#f7ebc5}.app-shell .chore:nth-child(6n+5){background:linear-gradient(135deg,#f5f0ff,#f9eafc);border-color:#eadff9}.app-shell .chore:nth-child(6n+6){background:linear-gradient(135deg,#f4fbe7,#e9f8ec);border-color:#e1efcc}.chore-icon{display:grid;place-items:center;background:#ffffffe0;border-radius:16px;width:48px;height:48px;font-size:30px}.chore-name{font-size:13px;line-height:1.35;overflow-wrap:anywhere;max-width:100%}.chore-meta{display:flex;gap:4px;flex-wrap:wrap;justify-content:center}.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:420px;background:#fffffff2;backdrop-filter:blur(12px);border-top:1px solid #edf0f4;box-shadow:0 -4px 16px #64748b16;display:grid;gap:4px;padding:8px 12px calc(10px + env(safe-area-inset-bottom));z-index:12}.bottom-nav.two{grid-template-columns:repeat(2,minmax(0,1fr))}.bottom-nav.four{grid-template-columns:repeat(4,minmax(0,1fr))}.bottom-nav button{position:relative;background:transparent;color:#64748b;display:grid;justify-items:center;gap:3px;padding:5px 2px;font-size:11px;min-height:50px}.bottom-nav button span{font-size:22px;line-height:1.2}.bottom-nav button[aria-pressed=true]{background:#edf7ff;color:#12639a}.nav-badge{position:absolute;top:0;right:8px;border-radius:20px;background:#b52e63;color:white;font-size:10px;padding:1px 5px}.notice{font-size:12px;color:#17689e;margin:0 0 10px!important;overflow-wrap:anywhere}.notice:empty{display:none}.pending-card{border:2px solid #f9dbe7}.line-item{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;padding:9px 0}.line-content{display:flex;gap:9px;align-items:center;min-width:0;flex:1}.line-content>div{min-width:0;overflow-wrap:anywhere}.line-icon{width:41px;height:41px;border-radius:14px;background:#edf7ff;flex:none;display:grid;place-items:center;font-size:23px}.line-icon.pending{border:1px dashed #f7a1c0;background:#fff0f5}.line-icon.exchange{background:#fff4d8}.line-title{font-size:13px;font-weight:800;overflow-wrap:anywhere}.line-meta{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-top:3px;font-size:10px;color:#64748b}.line-points{font-size:14px;color:#1677b4;font-weight:800;text-align:right;overflow-wrap:anywhere}.line-points.pending{color:#b52e63}.line-points.exchange{color:#986000}.line-points.cancelled,.line-points.rejected{color:#64748b;text-decoration:line-through}.list-card>.line-item+.line-item{border-top:1px solid #edf0f4}.list-card{padding-top:5px;padding-bottom:5px}.row-actions{display:grid;grid-template-columns:1fr 2fr;gap:8px}.summary-card{display:grid;gap:10px}.summary-card .between{align-items:center}.summary-card .between small{overflow-wrap:anywhere}.segmented{display:flex;flex-wrap:wrap;gap:5px;padding:5px;background:#eef2f6;border-radius:15px}.segmented button{flex:1 1 auto;background:transparent;color:#536579;min-height:38px;padding:6px 10px}.segmented button[aria-pressed=true]{background:white;color:#12639a;box-shadow:0 2px 6px #64748b1a}.app-shell form{margin:0;gap:10px;min-width:0}.app-shell label{font-size:12px;color:#536579;min-width:0}.app-shell input:not([type=checkbox]),.app-shell select{background:#f8fafc;border-color:#dce3eb;border-radius:13px;font-size:14px;min-width:0}.icon-field{display:grid;grid-template-columns:76px minmax(0,1fr);gap:8px}.amount-box,.invite-box,.pair-box{background:#fff6df;border:1px solid #f9e6b7;padding:12px;border-radius:16px;color:#875400}.amount-box strong{font-size:23px;overflow-wrap:anywhere}.invite-box{background:#fff0f5;border-color:#f9dbe7;color:#ad275c}.invite-box strong{display:block;overflow-wrap:anywhere;font-size:17px;letter-spacing:1px}.pair-box{background:#eff8ff;border-color:#dcebf7;text-align:center;color:#12639a}.pair-box img{display:block;margin:0 auto 10px;background:white;padding:5px;max-width:100%;height:auto}.pair-box strong{font-size:25px;letter-spacing:4px}.settings-row{background:#f8fafc;border:1px solid #edf0f4;padding:10px;border-radius:15px}.actions{align-items:center}.actions button{min-height:36px;padding:6px 9px;font-size:11px}.ui-dialog{width:calc(100% - 32px);max-width:360px;max-height:85dvh;border:4px solid #f9dbe7;border-radius:24px;padding:20px;color:#334155;background:white;box-shadow:0 12px 45px #33415530;overflow:auto}.ui-dialog[open]{animation:modal-in .2s ease-out}.ui-dialog::backdrop{background:#17233766;backdrop-filter:blur(2px)}.ui-dialog>p{margin:10px 0}.ui-dialog .wide{width:100%;margin-top:8px}.ui-dialog:has(#confirm-icon){text-align:center}.dialog-icon{width:76px;height:76px;border-radius:50%;background:#fff4d8;display:grid;place-items:center;font-size:42px;margin:0 auto 10px}.stamp-pop{animation:stamp-pop .55s cubic-bezier(.22,1,.36,1)}.celebration{position:fixed;inset:0;pointer-events:none;display:grid;place-items:center;z-index:40;font-size:64px;animation:celebrate 1s ease-out forwards}.goal-card.reached{border-color:#f9d38b}.app-shell .muted{color:#64748b;font-size:12px}.app-shell .error{color:#a51b31!important}.app-shell [hidden]{display:none!important}@keyframes stamp-pop{0%{transform:scale(2.1) rotate(-18deg);opacity:0}55%{transform:scale(.88) rotate(6deg);opacity:1}100%{transform:scale(1)}}@keyframes modal-in{from{transform:scale(.94) translateY(10px);opacity:0}to{transform:none;opacity:1}}@keyframes celebrate{0%{opacity:0;transform:scale(.3)}35%{opacity:1;transform:scale(1.2)}100%{opacity:0;transform:translateY(-100px) scale(1.5)}}@media(min-width:540px){.app-shell{margin:20px auto;min-height:calc(100dvh - 40px);border:5px solid white;border-radius:34px;box-shadow:0 20px 50px #64748b22}.app-header{top:0;border-radius:28px 28px 0 0}.bottom-nav{max-width:410px;border-radius:0 0 25px 25px}}@media(max-width:350px){.app-main{padding-left:10px;padding-right:10px}.app-header{padding-left:10px;padding-right:10px}.stamp-grid{gap:5px}.stamp-cell.approved{font-size:22px}.stamp-cell .stamp-label{font-size:7px}}@media(prefers-reduced-motion:reduce){.app-shell *,.ui-dialog,.celebration{animation:none!important;transition:none!important}}

.confetti-piece{position:fixed;top:-16px;z-index:41;width:8px;height:13px;border-radius:3px;pointer-events:none;animation:confetti-fall 2s linear forwards;background:#60a5fa}.confetti-piece:nth-of-type(5n+2){background:#f472b6}.confetti-piece:nth-of-type(5n+3){background:#fbbf24}.confetti-piece:nth-of-type(5n+4){background:#34d399}.confetti-piece:nth-of-type(5n+5){background:#a78bfa}@keyframes confetti-fall{from{transform:translateY(-10px) rotate(0);opacity:1}to{transform:translateY(105dvh) rotate(540deg);opacity:0}}
.confetti-0{left:7%;animation-duration:1.40s;animation-delay:0.00s}
.confetti-1{left:44%;animation-duration:1.55s;animation-delay:0.08s}
.confetti-2{left:81%;animation-duration:1.70s;animation-delay:0.16s}
.confetti-3{left:20%;animation-duration:1.85s;animation-delay:0.24s}
.confetti-4{left:57%;animation-duration:2.00s;animation-delay:0.00s}
.confetti-5{left:94%;animation-duration:2.15s;animation-delay:0.08s}
.confetti-6{left:33%;animation-duration:1.40s;animation-delay:0.16s}
.confetti-7{left:70%;animation-duration:1.55s;animation-delay:0.24s}
.confetti-8{left:9%;animation-duration:1.70s;animation-delay:0.00s}
.confetti-9{left:46%;animation-duration:1.85s;animation-delay:0.08s}
.confetti-10{left:83%;animation-duration:2.00s;animation-delay:0.16s}
.confetti-11{left:22%;animation-duration:2.15s;animation-delay:0.24s}
.confetti-12{left:59%;animation-duration:1.40s;animation-delay:0.00s}
.confetti-13{left:96%;animation-duration:1.55s;animation-delay:0.08s}
.confetti-14{left:35%;animation-duration:1.70s;animation-delay:0.16s}
.confetti-15{left:72%;animation-duration:1.85s;animation-delay:0.24s}
.confetti-16{left:11%;animation-duration:2.00s;animation-delay:0.00s}
.confetti-17{left:48%;animation-duration:2.15s;animation-delay:0.08s}
@media(prefers-reduced-motion:reduce){.confetti-piece{display:none}}
.app-shell .notice:not(:empty){position:sticky;top:78px;z-index:9;background:#f0f9ff;border:1px solid #dcebf7;padding:8px 12px;border-radius:13px}.app-shell .notice.error{background:#fff0f5;border-color:#f9dbe7}.app-shell .line-item.ui-card{padding:13px}.app-shell .secondary.pink{background:#fff0f5;color:#ad275c;border-color:#f9dbe7}.app-shell #settings-form .check{font-size:11px}.app-shell #pending-section h2{margin-bottom:10px}
