:root {
  color-scheme: light;
  --ink: #183129;
  --muted: #53655c;
  --forest: #184936;
  --forest-dark: #0b3225;
  --paper: #fcfaf4;
  --line: #e0dfd3;
  --white: #fffefa;
  --gold: #eaca85;
  --red: #992f39;
  --radius: 22px;
  font: 500 16px/1.55 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
h1, h2, p, ul { margin: 0; }
h1, h2 { line-height: 1.12; }
h1 { font: 400 clamp(2.75rem, 8vw, 4.55rem)/.99 'Instrument Serif', Georgia, serif; overflow-wrap: anywhere; }
h2 { font-size: 1.18rem; font-weight: 800; letter-spacing: -.03em; }
p { color: var(--muted); }
a { color: var(--forest); }
button, input, select { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #327d66;
  outline-offset: 3px;
}
.topbar { border-bottom: 1px solid var(--line); background: var(--white); }
.topbar-inner {
  max-width: 1080px;
  padding: 8px 16px;
  margin: auto;
  min-height: 65px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; text-decoration: none; letter-spacing: -.04em; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; color: #ffe0a2; background: var(--forest); border-radius: 50%; }
.account-nav { display: flex; gap: 2px 16px; }
.workspace { max-width: 1080px; margin: auto; padding: 18px 14px 30px; }
.loading { padding: 28px 4px; }
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 180px;
  padding: 25px 20px;
  display: flex;
  align-items: center;
  border-radius: var(--radius);
  color: #fffdf4;
  background: linear-gradient(115deg, #0d3629 45%, #265744 100%);
}
.hero-text { position: relative; z-index: 1; max-width: 76%; }
.hero-label { color: var(--gold); text-transform: uppercase; letter-spacing: .11em; font-size: .68rem; font-weight: 800; margin-bottom: 8px; }
.hero p:last-child { color: #e4efe4; margin-top: 10px; max-width: 33ch; font-size: .9rem; }
.hero-photo {
  position: absolute; inset: 0 0 0 59%; z-index: -1;
  background: linear-gradient(90deg, #154132 1%, transparent 68%), url('/images/tt/santa-on-phone.jpg') 62% 40% / cover;
  opacity: .59;
}
.hero-sparkle { position: absolute; right: 14px; top: 7px; color: #ffe2a4; font-size: 2rem; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--white); }
.panel p { margin-top: 8px; }
.share { margin: 12px 0; }
.section-heading { margin-bottom: 14px; }
.dashboard-grid { display: grid; gap: 12px; }
.button-row, .copy-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.copy-row { flex-wrap: nowrap; }
.copy-row input { min-width: 0; flex: 1; }
.button, .text-button { cursor: pointer; border: 0; border-radius: 11px; line-height: 1.3; font-weight: 800; font-size: .85rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 15px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.primary { background: var(--forest); color: white; }
.primary:hover { background: var(--forest-dark); }
.secondary { color: var(--forest); border: 1px solid #ccd8cc; background: #f4f7f0; }
.secondary:hover { background: #e8f0e6; }
.full { width: 100%; }
.text-button { min-height: 44px; background: transparent; color: var(--forest); padding: 5px 0; }
.text-button:hover { text-decoration: underline; }
button:disabled { opacity: .62; cursor: wait; }
input:not([type='checkbox']), select {
  width: 100%;
  min-height: 47px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  border: 1px solid #cbd4cc;
  border-radius: 11px;
  font-size: 16px;
}
input[readonly] { background: #f6f6ed; }
#share-link, #gift-code { font-size: .86rem; }
.earnings { background: #f0f5ec; border-color: #d9e4d7; }
.earnings-value { display: flex; align-items: baseline; gap: 2px 12px; flex-wrap: wrap; margin-top: 3px; }
.earnings-value span { font: 400 2.65rem/1.15 'Instrument Serif', Georgia, serif; white-space: nowrap; }
.earnings-value small { font-size: .68rem; font-weight: 800; color: var(--muted); margin-left: 4px; }
.fine { font-size: .79rem; }
.earnings-details { color: var(--muted); font-size: .8rem; margin-top: 8px; }
.earnings-details summary { padding: 5px 0; cursor: pointer; color: var(--forest); font-weight: 700; }
.bank-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pill { border-radius: 20px; padding: 4px 9px; font-size: .73rem; font-weight: 800; background: #f6ecda; color: #784317; }
.pill.ready { background: #e0efe2; color: #164b35; }
.bank .button-row, .gift .button-row { margin-top: 13px; }
.gift { background: #fff8ea; border-color: #efdfbf; }
#gift-code { margin-top: 13px; background: #fffefa; font: .75rem ui-monospace, monospace; }
.purchase-list { list-style: none; padding: 0; margin-top: 8px; }
.purchase-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.purchase-list li:last-child { border: 0; }
.purchase-list p { margin: 0; font-size: .79rem; }
.purchase-list time { font-size: .84rem; text-align: right; color: var(--muted); }
.portal-footer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 13px; margin-top: 20px; text-align: center; color: var(--muted); font-size: .82rem; }
.auth-card { width: min(100%, 480px); margin: 12px auto 0; padding: 0; overflow: hidden; }
.auth-image {
  height: 104px;
  background: linear-gradient(110deg, #0d3629 0%, #15433399 41%, #15433322), url('/images/tt/santa-on-phone.jpg') center 35% / cover;
}
.auth-content { padding: 20px; }
.auth-content h1 { font-size: clamp(2.4rem, 10vw, 3.4rem); }
.auth-content form { margin-top: 18px; }
.auth-content form > label, #password-block > label:not(.check) { display: block; font-size: .84rem; font-weight: 800; margin-bottom: 4px; }
#password-block { margin-top: 12px; }
.password-field { position: relative; }
.password-field input { padding-right: 63px; }
.password-field button { position: absolute; inset: 1px 11px 1px auto; }
.check { display: flex; align-items: center; gap: 9px; padding-block: 9px 6px; min-height: 44px; font-size: .87rem; }
.check input { accent-color: var(--forest); width: 19px; height: 19px; margin: 0; }
.auth-content form .button { margin-top: 12px; }
.auth-back { display: block; margin: 4px auto 0; }
.feedback { font-size: .88rem; font-weight: 700; color: var(--red); }
#auth-status { color: var(--forest); }
.toast {
  position: fixed; z-index: 5; bottom: 16px; left: 50%; transform: translateX(-50%);
  max-width: calc(100% - 24px); min-width: 170px;
  padding: 10px 14px; border-radius: 13px; text-align: center;
  background: var(--forest-dark); color: white; font-size: .84rem;
}
body.guide-open { overflow: hidden; }
.terms-link { display: inline-flex; align-items: center; }
.guide {
  --guide-cream: #fff4dc;
  --guide-dim: #eedfc7;
  --guide-gold: #f0cf8f;
  --guide-base: #0d2c22;
  --guide-light: #235140;
  border: 0;
  color: var(--guide-cream);
  padding: 0;
  background: radial-gradient(ellipse at 12% 100%, var(--guide-light), transparent 64%), var(--guide-base);
  box-shadow: 0 25px 100px #061b16a8;
}
.guide[data-step='1'] { --guide-base: #30191d; --guide-light: #78343a; }
.guide[data-step='2'] { --guide-base: #4c101d; --guide-light: #a02234; }
.gift-guide[data-step='1'] { --guide-base: #4c101d; --guide-light: #a02234; }
.guide::backdrop { background: #071a14bf; }
.guide-story {
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  touch-action: pan-y;
}
.guide-compact {
  width: min(590px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  border: 1px solid #ead6a54d;
  border-radius: 24px;
}
.guide-frame {
  width: min(100%, 1260px);
  min-height: 100%;
  margin: auto;
  padding: max(16px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(18px, 3.2vh, 34px);
}
.guide-top { display: flex; align-items: flex-start; gap: 18px; justify-content: space-between; }
#guide-progress { flex: 1; min-width: 0; }
.guide-bars { height: 4px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 9px; }
.gift-guide .guide-bars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.guide-bars span { background: #fff2cf30; border-radius: 6px; }
.guide-bars .filled { background: var(--guide-gold); }
.guide-count { font-size: .76rem; font-weight: 700; color: var(--guide-dim); margin-top: 8px; }
.guide-top .text-button { color: var(--guide-dim); min-height: 36px; white-space: nowrap; }
.guide-scene { display: grid; gap: 20px; align-content: center; min-width: 0; }
.guide-art {
  min-height: clamp(140px, 29vh, 360px);
  position: relative;
  border: 1px solid #f3d39957;
  border-radius: 18px;
  overflow: clip;
  background: linear-gradient(120deg, #0b1d2573, #12271e05 55%, #12271e49), url('/images/tt/santa-on-phone.jpg') 50% 33% / cover;
}
.guide-art span {
  position: absolute;
  right: 15px;
  top: 10px;
  color: #f6d899;
  font-size: clamp(1.6rem, 4vw, 3rem);
  filter: drop-shadow(0 2px 12px #10140e);
}
.guide-story .guide-art { cursor: pointer; }
.guide-slide { min-width: 0; }
.guide h2 { font: 400 clamp(2.6rem, 9.5vw, 5.4rem)/.97 'Instrument Serif', Georgia, serif; text-wrap: balance; }
.guide h2:focus { outline: 0; }
.guide-slide > p, #bank-country-picker { margin-top: 14px; }
#guide-copy { color: var(--guide-cream); font-size: clamp(1rem, 2.8vw, 1.27rem); max-width: 39ch; }
.guide-note { color: var(--guide-dim); font-size: .91rem; max-width: 46ch; }
.guide .feedback { color: #ffe0a5; }
#bank-country-picker { width: min(100%, 365px); }
#bank-country-picker label { display: block; color: var(--guide-cream); font-weight: 700; font-size: .86rem; margin-bottom: 5px; }
#bank-country { background: #fff4dc; }
.guide-stripe { margin-top: 17px; background: var(--guide-gold); color: #301d17; }
.guide-stripe:hover { background: #ffe4ac; }
.guide-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.guide-back, .guide-forward { min-height: 48px; }
.guide-back { background: #fff4dc12; border: 1px solid #fff4dc4a; color: var(--guide-cream); gap: 7px; }
.guide-forward { margin-left: auto; background: var(--guide-cream); color: #24352b; }
.guide-forward:hover, .guide-back:hover { filter: brightness(1.10); }
.guide-compact .guide-frame { padding: 18px 23px 21px; gap: 12px; }
.guide-compact .guide-top { justify-content: flex-end; }
.guide-compact .guide-top .text-button { min-height: 32px; }
.guide-compact .guide-art { min-height: 114px; background-position: 50% 30%; }
.guide-compact h2 { font-size: clamp(2.4rem, 9vw, 3.45rem); }
.guide-compact #guide-copy { font-size: 1rem; }
.guide-compact .guide-forward { border: 1px solid #fff4dc55; background: transparent; color: var(--guide-cream); }
.guide :is(button, select):focus-visible { outline-color: var(--guide-gold); }
@media (max-width: 579px) and (max-height: 660px) {
  .guide-story:is([data-step='2'], .gift-guide) .guide-frame,
  .guide-story:is([data-step='2'], .gift-guide) .guide-scene { gap: 12px; }
  .guide-story:is([data-step='2'], .gift-guide) .guide-art { min-height: 88px; }
  .guide-story:is([data-step='2'], .gift-guide) h2 { font-size: 2rem; }
  .guide-story:is([data-step='2'], .gift-guide) .guide-slide > p { margin-top: 10px; }
}
@media (min-width: 740px) {
  .guide-story .guide-frame { padding-inline: clamp(34px, 5vw, 72px); }
  .guide-story .guide-scene { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: clamp(28px, 5vw, 88px); }
  .guide-story .guide-art { grid-column: 2; grid-row: 1; min-height: clamp(220px, 60vh, 590px); }
  .guide-story .guide-slide { grid-column: 1; grid-row: 1; }
}
@media (min-width: 580px) and (max-height: 540px) {
  .guide-story .guide-frame { gap: 12px; }
  .guide-story .guide-scene { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); align-items: center; }
  .guide-story h2 { font-size: clamp(2rem, 7vh, 3.2rem); }
  .guide-story #guide-copy { font-size: .95rem; }
  .guide-story .guide-art { min-height: 145px; }
}
.gift-redeem label:not(:first-child) { margin-top: 12px; }
@media (min-width: 640px) {
  .topbar-inner { padding-inline: 24px; }
  .workspace { padding: 28px 24px 40px; }
  .hero { min-height: 230px; padding: 36px 36px; }
  .hero-photo { inset-inline-start: 55%; opacity: .85; }
  .hero-sparkle { right: 24px; top: 12px; font-size: 3rem; }
  .panel { padding: 24px; }
  .auth-card { padding: 0; }
  .auth-content { padding: 25px 30px; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .share { margin: 16px 0; }
}
