:root {
  --bg: #fffafb;
  --surface: #ffffff;
  --surface-soft: #fff5f8;
  --ink: #35252d;
  --muted: #806d76;
  --line: #f3dde5;
  --primary: #d45d8b;
  --primary-deep: #9f3d65;
  --primary-bright: #ed8fb3;
  --primary-soft: #ffe9f1;
  --positive: #b44872;
  --negative: #a35468;
  --danger-soft: #fff5f7;
  --shadow: 0 12px 32px rgba(190, 98, 134, 0.09);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 13px;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-width: 320px;
  background: linear-gradient(180deg, #fff6fa 0, var(--bg) 380px);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  transition: background-color .2s ease, color .2s ease;
}

body.deduct-active {
  background: linear-gradient(180deg, #eee8f7 0, #f8f5fc 440px, #f3eef8 100%);
  color: #352d3b;
}

body.redeem-active {
  background:
    radial-gradient(circle at 88% 6%, rgba(244, 211, 79, .28), transparent 25%),
    linear-gradient(180deg, #fff5c9 0, #fff8ee 360px, #fcebf3 100%);
  color: #482d3c;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.app-shell { min-height: 100dvh; }
main { width: min(100%, 760px); margin: 0 auto; padding: 14px 14px calc(30px + env(safe-area-inset-bottom)); }
.view { display: none; }
.view.active { display: block; }

.theme-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 5px;
  border: 1px solid #f0d5df;
  border-radius: 16px;
  background: rgba(255,255,255,.8);
  box-shadow: 0 7px 22px rgba(190, 98, 134, .08);
}
.theme-tab { min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: #8c7480; padding: 6px; font-weight: 760; cursor: pointer; }
.theme-tab.active { background: #f8d6e3; color: #91345b; box-shadow: 0 3px 10px rgba(171, 73, 112, .12); }
.theme-swipe-hint { margin: 7px 0 10px; color: #9a7b88; text-align: center; font-size: 12px; font-weight: 650; }
.theme-stage { touch-action: pan-y; }
.theme-page { width: 100%; }
.theme-page.active { display: block; }
.theme-page.slide-from-right { animation: theme-from-right .2s ease-out; }
.theme-page.slide-from-left { animation: theme-from-left .2s ease-out; }

.deduct-active .theme-tabs { border-color: #d8cce5; background: rgba(255,255,255,.86); box-shadow: 0 9px 26px rgba(73,48,95,.12); }
.deduct-active .theme-tab { color: #786a81; }
.deduct-active .theme-tab.active { background: linear-gradient(135deg, #72548f, #59416f); color: #fff; box-shadow: inset 0 0 0 1px rgba(232,196,118,.62), 0 4px 12px rgba(75,49,95,.22); }
.deduct-active .theme-swipe-hint { color: #766a7d; }

.redeem-active .theme-tabs { border-color: #ecd997; background: rgba(255,255,248,.9); box-shadow: 0 9px 24px rgba(132,67,91,.1); }
.redeem-active .theme-tab { color: #8a6473; }
.redeem-active .theme-tab.active { background: linear-gradient(135deg, #f5db67, #f3b6ce); color: #752c50; box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 4px 12px rgba(148,64,94,.13); }
.redeem-active .theme-swipe-hint { color: #8a6672; }

.network-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  background: #872643;
  color: white;
  text-align: center;
  font-size: 14px;
}

.score-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid #f2cedd;
  background: #fff0f5;
  color: var(--ink);
  box-shadow: 0 16px 38px rgba(194, 103, 139, 0.14);
}

.pokemon-card-art { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.score-card-head, .section-heading, .dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.score-card-head, .score-main, .score-helper { position: relative; z-index: 1; }
.score-card-head > div { max-width: 64%; }
.score-label { margin: 0 0 3px; color: var(--primary-deep); font-size: 13px; font-weight: 700; }
.score-card h1 { margin: 0; font-size: 21px; letter-spacing: .01em; text-shadow: 0 1px 0 rgba(255,255,255,.9); }
.score-settings-button { flex: 0 0 auto; min-height: 44px; padding: 8px 13px; border: 1px solid rgba(197, 105, 140, .3); border-radius: 999px; background: rgba(255,255,255,.78); color: var(--primary-deep); font-weight: 700; cursor: pointer; backdrop-filter: blur(5px); }
.score-main { display: flex; max-width: 52%; align-items: baseline; gap: 7px; padding: 22px 0 15px; }
.score-number { color: #8f3159; font-size: clamp(66px, 21vw, 94px); font-weight: 780; letter-spacing: -.055em; line-height: .88; font-variant-numeric: tabular-nums; text-shadow: 0 2px 0 rgba(255,255,255,.9); }
.score-unit { font-size: 19px; color: var(--primary-deep); }
.score-helper { width: max-content; max-width: 52%; margin: 0; padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.72); color: var(--primary-deep); font-size: 12px; font-weight: 650; backdrop-filter: blur(4px); }

.deduct-score-card { isolation: isolate; border-color: #8873a5; background: linear-gradient(135deg, #51426f 0%, #684b80 52%, #3e345f 100%); box-shadow: 0 17px 40px rgba(75,52,98,.24); }
.deduct-score-card::after { position: absolute; z-index: 0; inset: 0; background: linear-gradient(90deg, rgba(49,38,72,.95) 0%, rgba(57,41,77,.83) 45%, rgba(72,45,85,.24) 72%, rgba(102,67,112,.05) 100%), radial-gradient(circle at 86% 28%, rgba(232,189,102,.25), transparent 34%); content: ""; }
.deduct-score-card .pokemon-card-art { top: 8px; right: 1px; bottom: auto; left: auto; width: 49%; height: calc(100% - 16px); object-fit: contain; object-position: right center; filter: drop-shadow(0 9px 10px rgba(25,15,36,.34)); }
.deduct-score-card .score-label { color: #e7b4c3; }
.deduct-score-card h1 { color: #fff4f6; text-shadow: 0 2px 12px rgba(0,0,0,.85); }
.deduct-score-card .score-number { color: #fff1f5; text-shadow: 0 3px 16px rgba(34,19,45,.62); }
.deduct-score-card .score-unit { color: #eadce8; }
.deduct-score-card .score-helper { max-width: 62%; background: rgba(126,45,67,.78); color: #fff3f5; box-shadow: inset 0 0 0 1px rgba(235,172,184,.3); }
.deduct-score-card .score-settings-button { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.15); color: #fff; box-shadow: 0 5px 16px rgba(39,23,52,.22); }

.redeem-score-card { isolation: isolate; border-color: #e6c35a; background: linear-gradient(135deg, #fff4b8 0%, #f9d7a8 48%, #e795b8 100%); box-shadow: 0 17px 40px rgba(137,64,91,.17); }
.redeem-score-card::before { position: absolute; z-index: 0; inset: 0; background: radial-gradient(circle at 82% 20%, rgba(255,255,255,.82) 0 6px, transparent 7px), radial-gradient(circle at 73% 70%, rgba(255,243,158,.74) 0 9px, transparent 10px), radial-gradient(circle at 93% 60%, rgba(255,255,255,.66) 0 4px, transparent 5px); content: ""; }
.redeem-score-card::after { position: absolute; z-index: 0; inset: 0; background: linear-gradient(90deg, rgba(255,248,211,.96) 0%, rgba(255,244,205,.89) 49%, rgba(249,195,215,.2) 70%, transparent 100%); content: ""; }
.redeem-score-card .pokemon-card-art { z-index: 1; top: 7px; right: 8px; bottom: auto; left: auto; width: 43%; height: calc(100% - 14px); object-fit: contain; object-position: right center; filter: drop-shadow(0 9px 9px rgba(103,45,70,.2)); }
.redeem-score-card .score-card-head, .redeem-score-card .score-main, .redeem-score-card .score-helper { z-index: 2; }
.redeem-score-card .score-label { color: #9e4269; }
.redeem-score-card h1 { color: #4c3040; text-shadow: 0 1px 0 rgba(255,255,255,.8); }
.redeem-score-card .score-number { color: #9b3d68; text-shadow: 0 2px 0 rgba(255,255,255,.78); }
.redeem-score-card .score-unit { color: #7f3658; }
.redeem-score-card .score-helper { max-width: 58%; background: rgba(255,255,243,.75); color: #81385b; box-shadow: inset 0 0 0 1px rgba(216,170,74,.22); }
.redeem-score-card .score-settings-button { border-color: rgba(145,67,95,.2); background: rgba(255,255,244,.78); color: #803458; }

.quick-adjust-card, .content-section, .settings-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(240, 217, 226, .95);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
}

.quick-adjust-card { border-color: #f5d9e4; }
.section-heading { margin-bottom: 15px; }
.section-kicker { margin: 0 0 2px; color: var(--primary); font-size: 12px; font-weight: 750; letter-spacing: .08em; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.section-heading h2, .settings-card h2, .dialog-header h2 { margin: 0; font-size: 20px; }

.quick-points-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.quick-points-input {
  width: 100%;
  min-height: 68px;
  border: 2px solid #f0cedb;
  border-radius: 17px;
  background: #fffbfd;
  color: var(--ink);
  padding: 8px 16px;
  text-align: center;
  font-size: 30px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.quick-points-input:focus { border-color: var(--primary-bright); box-shadow: 0 0 0 4px rgba(231, 98, 151, .14); }
.quick-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 11px; }
.quick-button { min-height: 58px; border-radius: 16px; padding: 12px; font-size: 18px; font-weight: 800; cursor: pointer; }
.quick-button span { font-size: 22px; vertical-align: -1px; }
.quick-add { border: 0; background: var(--primary); color: white; box-shadow: 0 8px 20px rgba(189, 53, 109, .18); }
.quick-deduct { border: 2px solid #edc9d6; background: var(--danger-soft); color: var(--primary-deep); }
.quick-help { margin: 10px 1px 0; color: var(--muted); font-size: 12px; text-align: center; }

.deduct-theme .content-section { border-color: #d9cde4; background: rgba(255,255,255,.94); box-shadow: 0 14px 34px rgba(81,57,101,.12); }
.deduct-theme .section-kicker { color: #94557f; }
.deduct-theme .section-heading h2, .deduct-theme .quick-points-label { color: #392f3f; }
.deduct-theme .quick-points-input { border-color: #cbbbd8; background: #fcfaff; color: #352d3b; }
.deduct-theme .quick-points-input:focus { border-color: #8868a2; box-shadow: 0 0 0 4px rgba(121,87,149,.15); }
.deduct-theme .quick-add { border: 1px solid #cfc2d8; background: #eee8f3; color: #5d4d67; box-shadow: none; }
.deduct-theme .quick-deduct { border: 0; background: #aa4b5d; color: #fff; box-shadow: 0 8px 22px rgba(137,53,72,.24); }
.deduct-theme .quick-help { color: #786d7b; }

.redeem-theme .content-section { border-color: #eedca3; background: rgba(255,254,248,.96); box-shadow: 0 14px 34px rgba(136,67,94,.1); }
.redeem-theme .section-kicker { color: #b34c77; }
.redeem-theme .section-heading h2 { color: #4b303e; }
.redeem-form { display: grid; gap: 11px; }
.redeem-form label { color: #846873; }
.redeem-points-input { min-height: 72px; border: 2px solid #ecd679; border-radius: 18px; background: #fffdf2; color: #783353; text-align: center; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.redeem-points-input::placeholder { color: #b9a9a2; font-size: 17px; font-weight: 650; }
.redeem-points-input:focus { border-color: #d16891; box-shadow: 0 0 0 4px rgba(209,104,145,.14); }
.redeem-submit-button { min-height: 58px; border: 0; border-radius: 17px; background: linear-gradient(135deg, #b84b78, #94365f); color: #fffdf3; font-size: 19px; font-weight: 820; box-shadow: 0 8px 0 #f0d66e, 0 14px 24px rgba(144,51,91,.16); cursor: pointer; }
.redeem-submit-button:active { transform: translateY(2px); box-shadow: 0 6px 0 #e8ca58, 0 10px 18px rgba(144,51,91,.14); }
.redeem-records-heading { margin-bottom: 11px; }
.redeem-records-header, .redeem-record { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.redeem-records-header { padding: 0 11px 7px; color: #9a7c84; font-size: 12px; font-weight: 720; }
.redeem-records { display: grid; gap: 8px; }
.redeem-record { min-height: 58px; padding: 11px 13px; border: 1px solid #f0dca6; border-radius: 16px; background: linear-gradient(135deg, #fffdf1, #fff5f8); }
.redeem-record time { color: #69515d; font-size: 14px; font-variant-numeric: tabular-nums; }
.redeem-record-points { min-width: 74px; padding: 6px 10px; border-radius: 999px; background: #f7d4e1; color: #963c64; text-align: center; font-size: 16px; font-weight: 820; font-variant-numeric: tabular-nums; }
.redeem-records-empty { padding: 24px 14px; border: 1px dashed #e7cf83; border-radius: 16px; background: #fffdf5; color: #987b85; text-align: center; font-size: 14px; }

.deduction-intro { margin: -5px 0 14px; color: #756979; font-size: 13px; }
.deduction-items { display: grid; gap: 10px; }
.deduction-item { display: grid; gap: 14px; padding: 16px; border: 1.5px solid #dacfe3; border-radius: 20px; background: #fdfbfe; }
.deduction-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.deduction-title-row h3 { margin: 0; color: #392f3e; font-size: 17px; line-height: 1.35; }
.deduction-points { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: #f7e3e8; color: #a63e52; font-size: 14px; font-weight: 800; }
.deduction-copy p { margin: 6px 0 0; color: #756a78; font-size: 13px; }
.deduction-copy .deduction-count { color: #76528c; font-weight: 800; }
.deduction-actions { display: grid; grid-template-columns: minmax(0, 2fr) minmax(88px, 1fr); gap: 9px; }
.deduction-apply-button, .deduction-cancel-button { min-height: 52px; border-radius: 14px; padding: 10px 12px; font-size: 16px; font-weight: 800; cursor: pointer; }
.deduction-apply-button { border: 1px solid #b95d6e; background: #a84c5f; color: #fff; box-shadow: 0 7px 18px rgba(134,48,66,.18); }
.deduction-cancel-button { border: 1.5px solid #cfa7b4; background: #fff; color: #9d4055; }
.deduction-cancel-button:disabled { border-color: #ddd4dc; background: #f5f2f6; color: #aaa0aa; opacity: 1; cursor: not-allowed; }
.deduction-empty { padding: 18px; border: 1px dashed #cbbfd3; border-radius: 14px; color: #796e7d; text-align: center; }

.task-groups { display: grid; gap: 20px; }
.task-group { display: grid; gap: 9px; }
.task-group-title { margin: 0; border-left: 4px solid var(--primary-bright); padding-left: 8px; color: var(--primary-deep); font-size: 14px; }
.task-card { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.task-card.completed { border-color: #f0cad8; background: #fff8fa; }
.task-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.task-title-row h4 { margin: 0; font-size: 17px; line-height: 1.35; }
.points-badge { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--positive); font-weight: 780; font-size: 14px; white-space: nowrap; }
.task-description { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.task-status { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.task-status strong { color: var(--ink); }
.task-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.task-controls.single { grid-template-columns: 1fr; }
.score-select { min-height: 48px; width: 100%; border: 1px solid #e8cbd6; border-radius: 13px; background: #fff; padding: 0 11px; font-size: 16px; }
.complete-button, .cancel-button { min-height: 48px; border-radius: 13px; padding: 10px 14px; font-weight: 760; cursor: pointer; }
.complete-button { border: 0; background: var(--primary); color: white; }
.complete-button.done { background: var(--primary-soft); color: var(--primary-deep); }
.cancel-button { border: 1px solid #e3b7c6; background: #fff; color: var(--primary-deep); }
.complete-button:disabled, .cancel-button:disabled { opacity: .55; cursor: not-allowed; }

.page-header { padding: 8px 4px 2px; }
.page-header h1 { margin: 2px 0 0; font-size: 30px; }
.back-button { min-height: 44px; margin-bottom: 18px; padding: 8px 13px; border: 1px solid #e8c4d2; border-radius: 999px; background: #fff; color: var(--primary-deep); font-weight: 720; cursor: pointer; }

label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 650; }
input, select, textarea { width: 100%; min-height: 48px; border: 1px solid #dfc7d0; border-radius: 13px; background: #fff; color: var(--ink); padding: 10px 12px; font-size: 16px; outline: none; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary-bright); box-shadow: 0 0 0 3px rgba(231, 98, 151, .13); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.primary-button, .secondary-button, .danger-outline-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; border-radius: 13px; padding: 10px 15px; font-weight: 760; text-decoration: none; cursor: pointer; }
.primary-button { border: 0; background: var(--primary); color: #fff; }
.secondary-button { border: 1px solid #e5becd; background: #fff; color: var(--primary-deep); }
.danger-outline-button { border: 1px solid #dda9b8; background: var(--danger-soft); color: #8f304e; }
.full-button { width: 100%; }
button:disabled { opacity: .58; cursor: wait; }

.settings-task-list { display: grid; gap: 8px; }
.settings-task { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.settings-task.disabled { opacity: .58; }
.settings-task strong, .settings-task small { display: block; }
.settings-task small { margin-top: 3px; color: var(--muted); }
.edit-task-button { min-width: 58px; min-height: 44px; border: 1px solid #e6becd; border-radius: 11px; background: #fff; color: var(--primary-deep); font-weight: 720; cursor: pointer; }
.category-divider { margin: 11px 2px 2px; color: var(--primary); font-size: 13px; font-weight: 780; }
.data-details summary { min-height: 48px; display: flex; align-items: center; color: var(--primary-deep); font-size: 17px; font-weight: 780; cursor: pointer; }
.muted-copy, .safety-note { color: var(--muted); font-size: 13px; }
.data-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
.safety-note { margin-bottom: 0; }
.settings-quick-adjust { border-color: #f0d5df; }

dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(64, 34, 48, .44); backdrop-filter: blur(3px); }
.bottom-dialog { width: min(100% - 16px, 620px); max-height: calc(100dvh - 16px - env(safe-area-inset-top)); margin: auto auto 8px; border-radius: 26px 26px 18px 18px; background: var(--surface); box-shadow: 0 24px 70px rgba(101, 35, 62, .25); }
.dialog-form { display: flex; max-height: calc(100dvh - 16px - env(safe-area-inset-top)); flex-direction: column; }
.dialog-header { flex: 0 0 auto; padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.dialog-body { display: grid; gap: 14px; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px 22px; }
.dialog-footer { position: sticky; bottom: 0; z-index: 2; flex: 0 0 auto; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.icon-button { width: 44px; height: 44px; border: 0; border-radius: 13px; background: var(--surface-soft); color: var(--primary-deep); font-size: 26px; line-height: 1; cursor: pointer; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); }
.toggle-row small { display: block; margin-top: 2px; color: var(--muted); font-weight: 400; }
.toggle-row input { width: 24px; min-height: 24px; flex: 0 0 auto; accent-color: var(--primary); }
.source-rule { padding: 12px; border-radius: 13px; background: var(--surface-soft); }
.source-rule span { color: var(--primary); font-size: 12px; font-weight: 760; }
.source-rule p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.redeem-confirm-dialog { width: min(calc(100% - 28px), 430px); margin: auto; border-radius: 30px; background: transparent; box-shadow: 0 28px 80px rgba(104,40,68,.3); overflow: visible; }
.redeem-confirm-dialog::backdrop { background: rgba(85,45,63,.46); backdrop-filter: blur(5px); }
.redeem-dialog-card { position: relative; overflow: hidden; padding: 26px 22px 22px; border: 2px solid #f0d66e; border-radius: 30px; background: linear-gradient(180deg, #fff9cf 0%, #fffdf5 45%, #fde6ef 100%); text-align: center; }
.redeem-dialog-card::before, .redeem-dialog-card::after { position: absolute; width: 110px; height: 110px; border-radius: 50%; content: ""; pointer-events: none; }
.redeem-dialog-card::before { top: -58px; left: -48px; background: rgba(238,204,81,.32); }
.redeem-dialog-card::after { right: -52px; bottom: -58px; background: rgba(218,112,153,.2); }
.redeem-dialog-close { position: absolute; z-index: 3; top: 12px; right: 12px; width: 42px; height: 42px; border: 1px solid rgba(152,67,100,.13); border-radius: 50%; background: rgba(255,255,247,.78); color: #913b61; font-size: 25px; line-height: 1; cursor: pointer; }
.redeem-dialog-art { position: relative; z-index: 1; width: 126px; height: 126px; margin: 0 auto 10px; border: 2px solid rgba(240,214,110,.7); border-radius: 50%; background: radial-gradient(circle at 44% 34%, #fffef0 0 22%, #f9e891 60%, #f3bfd3 100%); box-shadow: 0 12px 28px rgba(148,63,94,.15); }
.redeem-dialog-art img { width: 100%; height: 100%; object-fit: contain; padding: 8px; filter: drop-shadow(0 6px 6px rgba(110,49,74,.16)); }
.redeem-star { position: absolute; z-index: 2; color: #b44975; font-size: 25px; text-shadow: 0 2px 0 #fff; }
.star-one { top: 4px; left: -9px; }
.star-two { right: -12px; bottom: 12px; color: #d2a91d; font-size: 31px; }
.redeem-dialog-kicker { position: relative; z-index: 1; margin: 0 0 4px; color: #b14a74; font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.redeem-dialog-card h2 { position: relative; z-index: 1; margin: 0; color: #492f3c; font-size: 23px; }
.redeem-dialog-card h2 strong { color: #a83f6b; font-size: 30px; font-variant-numeric: tabular-nums; }
.redeem-balance-preview { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 17px 0 10px; padding: 12px 10px; border: 1px solid #eedb94; border-radius: 17px; background: rgba(255,255,251,.78); color: #7c616b; font-size: 13px; }
.redeem-balance-preview span:not(.redeem-preview-arrow) { display: grid; gap: 2px; }
.redeem-balance-preview strong { color: #7f3457; font-size: 19px; font-variant-numeric: tabular-nums; }
.redeem-preview-arrow { color: #c69222; font-size: 20px; font-weight: 800; }
.redeem-dialog-note { position: relative; z-index: 1; margin: 0 0 16px; color: #8d727c; font-size: 13px; }
.redeem-dialog-actions { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.25fr; gap: 9px; }
.redeem-cancel-button, .redeem-confirm-button { min-height: 52px; border-radius: 15px; padding: 10px; font-size: 16px; font-weight: 800; cursor: pointer; }
.redeem-cancel-button { border: 1px solid #e2bdca; background: #fff; color: #92506b; }
.redeem-confirm-button { border: 0; background: linear-gradient(135deg, #bd527e, #96375f); color: #fffdf4; box-shadow: 0 6px 0 #efd46b, 0 10px 20px rgba(141,51,87,.15); }

.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 13px; background: rgba(76, 36, 54, .95); color: white; text-align: center; box-shadow: 0 10px 28px rgba(74, 27, 48, .2); font-size: 14px; }

@media (min-width: 620px) {
  main { padding-top: 24px; }
  .score-card { padding: 28px; }
  .task-card { grid-template-columns: minmax(0, 1fr) minmax(190px, auto); align-items: center; }
  .task-controls { min-width: 210px; }
  .deduction-item { grid-template-columns: minmax(0, 1fr) 310px; align-items: center; padding: 18px 20px; }
  .data-actions { grid-template-columns: 1fr 1fr; }
  .bottom-dialog { margin: auto; border-radius: 26px; }
}

@media (max-width: 370px) {
  main { padding-left: 10px; padding-right: 10px; }
  .quick-adjust-card, .content-section, .settings-card { padding-left: 14px; padding-right: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .score-card { padding: 19px; }
  .score-card h1 { font-size: 18px; }
  .quick-buttons { gap: 8px; }
  .theme-tab { font-size: 14px; }
  .redeem-dialog-card { padding-right: 16px; padding-left: 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  .view.active { animation: fade-in .16s ease-out; }
  @keyframes fade-in { from { opacity: .45; transform: translateY(3px); } }
  @keyframes theme-from-right { from { opacity: .45; transform: translateX(18px); } }
  @keyframes theme-from-left { from { opacity: .45; transform: translateX(-18px); } }
}
