:root {
  color-scheme: light;
  --paper: #faf6ee;
  --vellum: #f5eddd;
  --surface: #fffdf7;
  --ink: #4a3b2a;
  --muted: #786856;
  --line: #e7dac0;
  --gold: #c9a24b;
  --gold-button: #e2c276;
  --red: #a83b30;
  --serif: "Songti SC", "STSong", "SimSun", serif;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: radial-gradient(ellipse at 100% 0, #f4e6c7 0, transparent 46%), var(--paper); }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
a { color: var(--ink); text-underline-offset: .25em; }
p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-family: var(--serif); font-size: clamp(1.9rem, 7.4vw, 2.8rem); line-height: 1.4; font-weight: 700; letter-spacing: .035em; }
h2 { font-size: 1.2rem; line-height: 1.5; }
h3 { font-size: 1.06rem; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.page-shell { width: min(100%, 640px); margin-inline: auto; padding: 24px 20px max(24px, env(safe-area-inset-bottom)); }
.brand-header { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; }
.brand-dragon { flex: 0 0 58px; width: 58px; height: 58px; object-fit: contain; }
.brand-name { font-size: 1rem; font-weight: 650; letter-spacing: .025em; }
.brand-caption { color: var(--muted); font-size: .875rem; margin-top: 3px; }
.eyebrow { color: #876824; font-size: .875rem; letter-spacing: .12em; margin-bottom: 12px; }
.entry-intro { padding: 0 6px; margin-bottom: 28px; }
.intro-copy { margin-top: 18px; max-width: 29em; color: var(--muted); }
.paper-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: 0 4px 22px #4a3b2a05; margin-bottom: 20px; min-width: 0; }
.paper-card h2 { margin-bottom: 18px; }
label { display: block; font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
input, textarea { width: 100%; min-width: 0; border: 1px solid #cdbf9f; border-radius: 10px; color: var(--ink); background: #fffefa; padding: 13px 14px; line-height: 1.5; min-height: 50px; }
input::placeholder { color: #8b7c63; opacity: 1; }
input[aria-invalid="true"] { border-color: var(--red); }
#redeemCode { letter-spacing: .045em; font-size: 1rem; }
.field-help { color: var(--muted); font-size: .875rem; line-height: 1.7; margin-top: 9px; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 20px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 1rem; text-align: center; line-height: 1.5; text-decoration: none; }
.primary-button { background: var(--gold-button); color: #44331d; border-color: #d3ae57; box-shadow: inset 0 1px #ffffff70, 0 3px 0 #cba34335; }
.primary-button:hover:not(:disabled) { background: #dbb864; }
.secondary-button { color: var(--ink); background: #faf6ec; border-color: #d8cbae; }
.secondary-button:hover:not(:disabled) { background: var(--vellum); }
.full-width { width: 100%; }
#redeemButton { margin-top: 22px; }
.form-status { line-height: 1.75; font-size: .9375rem; margin-top: 14px; overflow-wrap: anywhere; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--red); }
.session-note { border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; background: #f1e6ce80; padding: 16px 18px; margin-bottom: 24px; }
.session-note h2 { font-size: 1rem; margin-bottom: 6px; }
.session-note p { color: var(--muted); font-size: .9375rem; }
.returned-note { color: var(--muted); font-size: .9375rem; line-height: 1.85; }
.browser-choice { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.browser-choice > p:first-child { color: var(--muted); font-size: .9375rem; line-height: 1.8; }
.browser-choice .text-button { margin-top: 2px; }
.browser-choice .form-status { margin-top: 4px; font-size: .875rem; }
#redeemUrlFallback { margin-top: 6px; }
#redeemUrlText { font-size: .875rem; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .9375rem; font-weight: 600; margin-top: 4px; }
.usage-notes { padding: 8px 6px 0; }
.usage-notes h2 { font-family: var(--serif); font-size: 1.125rem; }
.usage-notes ul { list-style: none; margin: 18px 0 0; padding: 0; }
.usage-notes li { position: relative; color: var(--muted); padding-left: 17px; margin-bottom: 13px; font-size: .9375rem; line-height: 1.85; }
.usage-notes li::before { content: ""; position: absolute; left: 0; top: .72em; width: 5px; height: 5px; background: #b89a58; border-radius: 50%; }
.usage-notes strong, .support-note strong { color: var(--ink); font-weight: 600; }
.support-note { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; color: var(--muted); font-size: .9375rem; line-height: 1.85; }
.site-footer { margin-top: 34px; color: var(--muted); font-size: .8125rem; line-height: 1.8; text-align: center; }
.site-footer p + p { margin-top: 3px; }
.admin-shell { width: min(100%, 1000px); }
.admin-intro { max-width: 660px; margin-bottom: 28px; }
.admin-intro > p:last-child { margin-top: 14px; color: var(--muted); }
.mobile-break { display: none; }
.key-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; background: transparent; border: 0; padding: 8px 4px; color: var(--ink); font-size: .9375rem; text-decoration: underline; text-underline-offset: .25em; }
#clearAdminButton { margin-top: 6px; }
.section-copy { color: var(--muted); margin-top: -5px; margin-bottom: 18px; }
.create-row { display: flex; gap: 14px; align-items: flex-end; }
.create-row > div { flex: 0 1 210px; }
.create-row button { flex-shrink: 0; }
.new-codes-panel { margin-top: 24px; padding-top: 20px; border-top: 1px dashed #d9c8a3; }
.new-codes-panel textarea { display: block; margin-top: 12px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 1rem; white-space: pre; overflow-wrap: normal; overflow-x: auto; resize: vertical; min-height: 150px; }
.copy-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; }
.compact-button { font-size: .875rem; min-height: 46px; padding: 10px 14px; }
.codes-list { margin: 0; padding: 0; list-style: none; }
.code-record { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.code-record-copy, .code-details { min-width: 0; }
.code-hint { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 1rem; font-weight: 650; overflow-wrap: anywhere; }
.code-id { margin-top: 6px; font-size: .8125rem; color: var(--muted); overflow-wrap: anywhere; }
.status-label { display: inline-block; padding: 2px 9px; background: var(--vellum); border-radius: 5px; font-size: .875rem; }
.status-revoked { color: var(--red); background: #f6e9e4; }
.code-expiry { margin-top: 7px; font-size: .875rem; color: var(--muted); }
.record-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.danger-button { color: var(--red); }
.empty-state { color: var(--muted); padding: 22px 0 8px; }
@media (min-width: 700px) {
  .page-shell { padding-top: 36px; }
  .buyer-shell .entry-intro { padding-top: 12px; }
  .admin-shell .paper-card { padding: 28px; }
  .code-record { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; align-items: center; }
  .record-actions { grid-column: auto; justify-content: flex-end; gap: 12px; }
}
@media (max-width: 430px) {
  .page-shell { padding: 20px 16px max(24px, env(safe-area-inset-bottom)); }
  .brand-header { gap: 9px; margin-bottom: 28px; }
  .brand-dragon { width: 49px; height: 49px; flex-basis: 49px; }
  .brand-name { font-size: .9375rem; }
  .brand-caption { font-size: .8125rem; }
  .paper-card { padding: 20px 16px; border-radius: 16px; }
  .entry-intro { padding-inline: 3px; }
  #redeemCode { font-size: 1rem; padding-inline: 10px; letter-spacing: 0; }
  .key-row { grid-template-columns: minmax(0, 1fr); }
  .create-row { align-items: stretch; flex-direction: column; }
  .create-row > div { flex-basis: auto; }
  .code-record { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .record-actions { grid-column: auto; }
  .mobile-break { display: block; }
}
@media (prefers-reduced-motion: no-preference) {
  .primary-button, .secondary-button { transition: background-color .15s ease, box-shadow .15s ease; }
}

/* The buyer entrance lives on the existing warm home. Existing hero art and
   typography stay with warm.css; these rules add only its inline form and FAQ. */
html[data-warm-comparison] body.home-joined #homePage { min-width: 0; animation: none; }
html[data-warm-comparison] body.home-joined #homePage .hero-card { padding-bottom: 0; }
html[data-warm-comparison] body.home-joined .joined-redeem {
  position: relative;
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  text-align: left;
  scroll-margin-top: 20px;
}
.home-joined #redeemFormPanel, .home-joined .inline-redeem-form { min-width: 0; }
.home-joined .browser-choice { border: 0; padding-bottom: 0; margin: 16px 0 0; }
.home-joined .browser-choice > p:first-child { font-size: .875rem; }
.home-joined .inline-redeem-form > label { font-size: 1rem; margin-bottom: 9px; }
.home-joined #redeemCode { min-height: 54px; background: #fffdf7; border-color: #c9b58b; border-radius: 12px; }
.home-joined .activation-warning { margin-top: 14px; padding: 15px 16px; border: 1px solid #d9c592; border-left: 3px solid #b98c38; border-radius: 12px; background: #f5eddd; }
.home-joined .activation-warning > p { color: var(--muted); font-size: .9375rem; line-height: 1.85; }
.home-joined .activation-warning strong { font-weight: 650; color: var(--ink); }
.home-joined .activation-warning .browser-choice { margin-top: 12px; padding-top: 10px; border-top: 1px solid #e1d2b1; }
.home-joined .activation-warning .browser-choice > p:first-child { font-size: .9375rem; }
.home-joined .activation-warning .copy-inline-tail { white-space: nowrap; }
.home-joined .activation-warning #copyRedeemUrlButton {
  display: inline-block;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0 .15em;
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: baseline;
}
html[data-warm-comparison] body.home-joined #redeemButton,
html[data-warm-comparison] body.home-joined #continueAssessment {
  width: 100%;
  min-height: 56px;
  margin-top: 18px;
  padding: 15px 16px;
  border: 1px solid #b78f40;
  border-radius: 18px;
  color: var(--ink, #4a3b2a);
  background: linear-gradient(165deg, #e5d2a4, #d8bc79);
  box-shadow: 0 5px 12px #8f6a2b14, inset 0 1px 0 #fff9e78c;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .04em;
  text-decoration: none;
}
.home-joined #existingAccess { margin-bottom: 20px; }
.home-joined #existingAccess h3 { margin-bottom: 6px; font-size: 1rem; }
.home-joined #useDifferentCodeButton { display: flex; margin: 6px auto 0; }
.home-joined .home-rights {
  max-width: 390px;
  margin: 32px auto 0;
  padding: 20px 0 12px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.home-joined .home-rights h2 { color: var(--ink); font-size: .875rem; font-weight: 600; margin-bottom: 9px; }
.home-joined .home-rights p { color: var(--muted); font-size: .875rem; line-height: 1.85; }
.home-joined .home-rights p + p { margin-top: 8px; }
@media (max-width: 350px) {
  .home-joined #redeemCode { padding-inline: 10px; letter-spacing: 0; }
  .home-joined .activation-warning { padding-inline: 12px; }
  .home-joined #existingAccess { padding: 14px 12px; }
}
