:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #262139; background: #f6f4fb; color-scheme: light;
  --purple: #7350cc; --muted: #7b758c; --line: #e9e4f1;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(ellipse at 85% 0%, #e9e1fb 0, transparent 40%), #f6f4fb; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; touch-action: manipulation; }
button, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #ab93e8; outline-offset: 4px; }
.app-shell { max-width: 1040px; margin: auto; padding: max(44px, env(safe-area-inset-top)) 28px calc(35px + env(safe-area-inset-bottom)); }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 0 28px; }
.brand-line { display: flex; gap: 9px; align-items: center; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; background: #e8dff9; border-radius: 10px; color: var(--purple); }
.eyebrow { margin: 0; color: var(--purple); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
h1 { font-size: clamp(30px, 4.6vw, 48px); letter-spacing: -.055em; line-height: 1.13; margin: 25px 0 13px; font-weight: 750; }
h1 em { color: var(--purple); font-style: normal; }
.subtitle { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.6; }
.round-button, .primary { background: var(--purple); color: white; border-radius: 14px; padding: 14px 19px; font-size: 13px; font-weight: 750; box-shadow: 0 6px 16px #7350cc25; }
.round-button { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.round-button > span:first-child { font-size: 22px; line-height: 1; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 10px 0 32px; }
.summary > div { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.summary > div:first-child { background: #ede7fb; border-color: #e3daf8; }
.summary > div:nth-child(2) { background: #fff5e7; border-color: #f6e9d6; }
.summary span { font-size: 9px; font-weight: 800; letter-spacing: .1em; color: var(--muted); }
.summary strong { margin: 12px 0 8px; font-size: clamp(24px, 4vw, 36px); line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.summary div:first-child strong { color: var(--purple); }
.summary div:nth-child(2) strong { color: #ab6a16; }
.summary small { font-size: 11px; color: var(--muted); }
.toolbar { display: flex; gap: 12px; margin-bottom: 30px; }
.search { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; background: white; border: 1px solid var(--line); border-radius: 13px; padding: 0 16px; color: #9b91ae; }
.search input { padding: 15px 0; min-width: 0; width: 100%; border: 0; background: transparent; color: #262139; font-size: 14px; }
input::placeholder, textarea::placeholder { color: #a59caf; }
.toolbar select { border: 1px solid var(--line); border-radius: 13px; padding: 0 15px; color: #655c77; background: white; font-size: 13px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px; }
.section-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.section-heading > span { color: var(--muted); font-size: 12px; }
.voucher-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.voucher { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 4px 20px #34204d04; }
.voucher-main { padding: 21px 21px 18px; }
.voucher-top { display: flex; align-items: center; gap: 12px; }
.merchant-icon { flex-shrink: 0; width: 43px; height: 43px; display: grid; place-items: center; border-radius: 14px; background: var(--voucher-color); color: white; font-size: 18px; font-weight: 800; }
.merchant { font-size: 15px; margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.actions { display: flex; gap: 2px; }
.actions button, .icon-button { display: grid; place-items: center; min-width: 36px; min-height: 44px; color: #958ba5; background: transparent; border-radius: 10px; }
.actions svg { width: 17px; height: 17px; }
.benefit { font-size: 32px; font-weight: 800; letter-spacing: -.055em; margin: 21px 0 5px; }
.minimum, .note { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
.note { margin-top: 8px; }
.code-line { display: flex; align-items: center; gap: 8px; margin-top: 17px; padding: 7px 7px 7px 12px; background: #f7f5fa; border-radius: 10px; border: 1px dashed #ded5eb; }
.code { flex: 1; min-width: 0; margin: 0; font: 650 13px ui-monospace, SFMono-Regular, monospace; letter-spacing: .05em; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.copy-button { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; border-radius: 7px; color: var(--purple); background: #eae2fa; padding: 8px 10px; font-size: 11px; font-weight: 750; flex-shrink: 0; }
.copy-button svg { width: 14px; height: 14px; }
.voucher-bottom { border-top: 1px dashed var(--line); padding: 13px 21px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: #fdfcfe; }
.expiry { color: var(--muted); font-size: 11px; }
.badge { border-radius: 7px; background: #e9f6f0; color: #358367; padding: 5px 8px; font-size: 10px; font-weight: 750; }
.badge.warning { color: #a96a16; background: #fff0d9; }
.badge.expired { color: #b05d67; background: #fcebed; }
.empty-state { text-align: center; padding: 54px 20px; border: 1px dashed #d9cfea; border-radius: 20px; }
.empty-state > span { display: inline-grid; place-items: center; background: #e9e0fa; color: var(--purple); width: 56px; height: 56px; border-radius: 18px; font-size: 27px; }
.empty-state h2 { font-size: 20px; margin: 18px 0 8px; letter-spacing: -.04em; }
.empty-state p { color: var(--muted); line-height: 1.6; font-size: 13px; margin-bottom: 22px; }
.app-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 35px; font-size: 11px; color: #a299b0; }
.app-footer small { font-size: inherit; }
dialog { width: min(94vw, 560px); max-height: 90dvh; border: 1px solid var(--line); border-radius: 24px; background: #fff; color: #262139; box-shadow: 0 30px 100px #26213935; padding: 25px; }
dialog::backdrop { background: #231a3966; backdrop-filter: blur(6px); }
.dialog-header { display: flex; justify-content: space-between; margin-bottom: 22px; }
.dialog-header h2, .confirm-dialog h2 { font-size: 24px; letter-spacing: -.04em; margin: 8px 0 0; }
.icon-button { font-size: 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 650; color: #655c77; min-width: 0; }
.wide { grid-column: 1 / -1; }
.form-grid input, .form-grid textarea { width: 100%; min-width: 0; background: #f8f6fb; color: #262139; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 16px; }
.form-grid input[type=color] { height: 45px; padding: 6px; }
.form-grid textarea { min-height: 75px; resize: vertical; }
.form-help, .confirm-dialog p { font-size: 12px; color: var(--muted); line-height: 1.6; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.secondary, .danger { padding: 13px 18px; border-radius: 12px; font-size: 13px; font-weight: 700; background: #f0ebf7; color: #655c77; }
.danger { color: white; background: #be5269; }
.toast { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); left: 50%; max-width: calc(100vw - 32px); border-radius: 13px; padding: 14px 20px; background: #302344; color: white; box-shadow: 0 6px 30px #30234433; font-size: 13px; opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: opacity .2s, transform .2s; z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (hover: hover) { button { transition: background .15s, transform .15s; } .primary:hover, .round-button:hover { background: #6240b8; transform: translateY(-1px); } .actions button:hover { background: #f1edf8; color: var(--purple); } }
@media (max-width: 600px) { .app-shell { padding-inline: 18px; } .hero { align-items: flex-start; gap: 10px; } h1 { font-size: 31px; } .round-button { padding: 12px; border-radius: 13px; margin-top: 4px; } .add-label { display: none; } .summary { gap: 8px; margin-bottom: 22px; } .summary > div { padding: 16px 11px; border-radius: 15px; } .summary span { font-size: 8px; letter-spacing: .04em; } .summary strong { font-size: 25px; } .summary small { font-size: 9px; line-height: 1.5; } .voucher-list { grid-template-columns: 1fr; } .toolbar { gap: 8px; margin-bottom: 24px; } .toolbar select { max-width: 115px; padding: 0 8px; } .search { padding-inline: 11px; gap: 7px; } .search input { font-size: 16px; } .app-footer { flex-direction: column; text-align: center; gap: 7px; } dialog { padding: 22px 18px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
