:root {
  --font: 'Noto Sans Thai', 'DM Sans', sans-serif;
  --mono: 'IBM Plex Mono', 'Noto Sans Thai', monospace;
}

body { isolation: isolate; min-height: 100svh; text-align: center; line-height: 1.7; }
.workspace { position: relative; padding-top: 37px; }
.brand-row { flex-direction: column; justify-content: center; gap: 12px; }
.wordmark { font-family: 'DM Sans', sans-serif; font-size: 34px; gap: 8px; }
.site-title { font-size: inherit; line-height: 1; margin: 0; }
.brand-caption { color: #bcc0c8; font-size: 16px; font-weight: 400; line-height: 1.8; margin: 12px 0 0; }
.eyebrow { font-family: var(--font); letter-spacing: .04em; font-size: 13px; line-height: 1.8; margin-bottom: 8px; }
.masthead { margin-bottom: 36px; }

.section-heading {
  display: flex; justify-content: flex-start; text-align: left;
  align-items: center; gap: 10px; margin-bottom: 15px;
}
.section-heading h2 { font-size: 18px; line-height: 1.7; letter-spacing: 0; text-align: left; }
.step { justify-self: center; }
.help-button { margin: 0 0 0 auto; flex-shrink: 0; }
.section-meta { margin-left: auto; font-family: var(--font); letter-spacing: 0; font-size: 12px; }
.player-panel { padding: 19px 20px 17px; background: #15181cf5; text-align: left; }
.player-panel label { flex-direction: row; justify-content: space-between; gap: 8px; margin-bottom: 13px; font-size: 14px; }
.player-panel label span { font-family: var(--font); font-size: 12px; color: #949ca6; letter-spacing: 0; }
.input-shell { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 0; padding: 0 7px; }
.uid-icon { justify-self: center; }
.input-shell input { text-align: left; padding: 0 3px; letter-spacing: .03em; }
.input-shell button { justify-content: center; min-height: 38px; padding: 5px 4px; font-size: 12px; }
.input-shell button svg { display: none; }
.field-note { justify-content: flex-start; font-size: 13px; line-height: 1.8; gap: 6px; }
.uid-feedback, .selection-feedback { text-align: left; font-size: 14px; line-height: 1.8; text-wrap: pretty; }
.player-result { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 0; margin: 0; border: 0; }
.player-avatar { width: 48px; height: 54px; border-radius: 10px; font: 700 23px 'DM Sans', sans-serif; background: linear-gradient(140deg, #60492555, #292b2d); border-color: #746042; color: var(--accent-light); }
.player-identity { text-align: left; gap: 2px; }
.player-identity strong { font-size: 16px; }
.player-identity span { font-family: var(--font); font-size: 12px; line-height: 1.8; }
.player-identity .player-status { color: var(--green); }
.edit-player { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 44px; padding: 7px 11px; border-radius: 7px; border: 1px solid #40464e; background: #22272d; color: #d9dee5; font-size: 13px; white-space: nowrap; }
.edit-player svg { width: 15px; height: 15px; }
.edit-player:hover { border-color: #a47a3f; color: var(--accent-light); background: #312a20; }
.demo-hint { justify-content: flex-start; flex-wrap: wrap; column-gap: 8px; row-gap: 0; }
.demo-hint, .demo-hint button { font-size: 12px; line-height: 1.8; }
.help-panel { text-align: left; font-size: 14px; line-height: 1.9; }

.diamonds-section { margin-top: 26px; }
.diamond-card { min-height: 190px; background: #15181cfa; }
.pack-index { position: static; align-self: center; font-family: var(--font); letter-spacing: 0; line-height: 1.7; font-size: 12px; margin-top: 9px; }
.diamond-art { margin-top: 0; height: 70px; }
.diamond-art img { height: 72px; width: 100px; }
.pack-value { font-family: 'DM Sans', sans-serif; font-size: 25px; line-height: 1.3; }
.pack-unit { font-size: 14px; line-height: 1.6; margin-top: 0; }
.pack-price { font-size: 14px; line-height: 1.5; margin-top: 9px; padding: 8px 0 9px; }
.pricing-note { font-size: 12px; line-height: 1.9; text-wrap: balance; }
.page-footer { flex-direction: column; justify-content: center; gap: 6px; line-height: 1.8; }
.page-footer > span:last-child { text-align: center; }
.footer-logo { font-family: 'DM Sans', sans-serif; }
.continue-button { font-size: 17px; font-weight: 700; }

dialog { text-align: center; line-height: 1.8; }
.dialog-topline { position: relative; justify-content: center; padding: 3px 30px; min-height: 38px; }
.dialog-topline .eyebrow { font-size: 12px; }
.close-button { position: absolute; right: -8px; top: 0; }
.review-symbol { margin: 20px auto 0; }
dialog h2 { font-size: 25px; letter-spacing: 0; line-height: 1.6; }
.review-caption { font-size: 14px; line-height: 1.8; }
.review-details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
.review-details > div { flex-direction: column; justify-content: center; align-items: center; gap: 2px; min-width: 0; }
.review-details dd { text-align: center; max-width: 100%; }
.review-total { grid-column: 1 / -1; }
.review-total dd { font-size: 20px; }
.review-demo { border: 1px solid #6d532f80; border-radius: 8px; font-size: 13px; line-height: 1.9; }

/* Soft gradients respond to pointer/touch input and scrolling; no idle animation. */
.gradient-background { --gx: 0px; --gy: 0px; position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #0c0d0f; }
.gradient-background > div { position: absolute; inset: -100px; transition: transform .8s cubic-bezier(.2,.7,.3,1); }
.gradient-warm { background: radial-gradient(ellipse 45% 52% at 10% 4%, #ffad3212, transparent 85%); transform: translate3d(var(--gx), var(--gy), 0); }
.gradient-cool { background: radial-gradient(ellipse 42% 48% at 95% 83%, #f58a240c, transparent 85%); transform: translate3d(calc(var(--gx) * -.7), calc(var(--gy) * -.6), 0); }
.gradient-light { background: radial-gradient(ellipse 45% 35% at 55% -8%, #ffc3670a, transparent 85%); transform: translate3d(calc(var(--gx) * .4), calc(var(--gy) * .4), 0); }

@media (max-width: 600px) {
  .workspace { padding-top: 29px; }
  .wordmark { font-size: 31px; }
  .brand-caption { font-size: 14px; margin-top: 10px; }
  .masthead { margin-bottom: 29px; }
  .section-heading { gap: 4px 8px; }
  .section-heading h2 { font-size: 17px; }
  .player-panel { padding: 16px 14px; }
  .field-note { font-size: 12px; }
  .diamond-card { min-height: 185px; }
  .pack-index { margin-top: 8px; }
  .pack-price { font-size: 13px; }
  .section-meta { font-size: 12px; }
  .player-result { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; }
  .player-avatar { width: 42px; height: 49px; }
  .edit-player { padding: 7px 9px; }
  .review-details { font-size: 13px; }
}
@media (max-width: 359px) {
  .section-heading h2 { font-size: 16px; }
  .section-meta { display: none; }
  .player-panel label { flex-wrap: wrap; gap: 2px 8px; }
  .player-result { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 8px; }
  .player-avatar { width: 36px; height: 44px; font-size: 20px; }
  .edit-player { gap: 4px; padding: 6px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .gradient-background > div { transform: none; transition: none; }
}
