:root {
  color-scheme: light;
  --ink: #13261f;
  --muted: #68766f;
  --forest: #173e31;
  --forest-2: #235c49;
  --mint: #cfe9d9;
  --lime: #d9f25f;
  --cream: #f4f1e8;
  --paper: #fffdf8;
  --line: #d9ddd4;
  --red: #b64233;
  --shadow: 0 24px 70px rgba(24, 55, 44, 0.11);
  --font-thai: "Leelawadee UI", "Thonburi", "Noto Sans Thai", Tahoma, system-ui, sans-serif;
  --font-numeric: "Aptos Display", "Segoe UI", var(--font-thai);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% 5%, rgba(217, 242, 95, .28), transparent 25rem),
    linear-gradient(180deg, #f7f4ec 0%, var(--cream) 100%);
  color: var(--ink);
  font-family: var(--font-thai);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .018; z-index: 20; background: repeating-linear-gradient(115deg, transparent 0 7px, #173e31 8px, transparent 9px 15px); }

.topbar {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 900; font-size: 1.25rem; line-height: 1; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: .58rem; letter-spacing: .17em; }
.brand-mark { width: 46px; height: 46px; border-radius: 14px 14px 14px 5px; display: grid; place-items: center; color: var(--forest); background: var(--lime); font-size: .9rem; transform: rotate(-4deg); box-shadow: 0 8px 22px rgba(85, 107, 19, .16); }
.pos-ready { display: inline-flex; gap: 9px; align-items: center; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.55); color: var(--forest); font-size: .78rem; font-weight: 700; }
.pos-ready span { width: 8px; height: 8px; border-radius: 50%; background: #42a36f; box-shadow: 0 0 0 4px rgba(66,163,111,.13); }

main { max-width: 1320px; margin: 0 auto; padding: 24px 32px 64px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: end; margin: 35px 0 38px; }
.eyebrow { margin: 0 0 14px; color: var(--forest-2); font-size: .75rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.hero h1 { margin: 0; max-width: 850px; font-size: clamp(3.25rem, 6.6vw, 6.6rem); line-height: .98; letter-spacing: -.065em; font-weight: 900; }
.hero h1 span { color: var(--forest-2); font-weight: 500; }
.hero-note { max-width: 720px; margin: 23px 0 0; color: var(--muted); font-size: .96rem; line-height: 1.7; }
.summary-strip { min-width: 310px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--line); box-shadow: 0 15px 50px rgba(27,53,44,.07); }
.summary-strip > div { min-height: 94px; padding: 19px 22px; display: flex; flex-direction: column; justify-content: center; background: rgba(255,253,248,.95); }
.summary-strip strong { font-size: 1.8rem; letter-spacing: -.04em; }
.summary-strip span { color: var(--muted); font-size: .72rem; }
.summary-strip .summary-status { grid-column: 1/-1; min-height: 52px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; }
.summary-status i { width: 7px; height: 7px; border-radius: 50%; background: #42a36f; }

.workspace { display: grid; grid-template-columns: minmax(360px, .82fr) minmax(540px, 1.18fr); gap: 18px; align-items: start; }
.panel { background: rgba(255,253,248,.92); border: 1px solid rgba(208,214,204,.85); border-radius: 28px; box-shadow: var(--shadow); }
.count-panel { padding: 30px; }
.records-panel { padding: 30px 30px 24px; min-height: 654px; }
.panel-heading { display: flex; gap: 14px; align-items: center; margin-bottom: 25px; }
.panel-heading.compact { margin: 0; }
.step { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: var(--forest); color: var(--lime); font-size: .72rem; font-weight: 900; letter-spacing: .07em; }
.panel-heading p { margin: 0 0 2px; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.panel-heading h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.025em; }

.scan-button { width: 100%; min-height: 92px; padding: 16px 18px; display: grid; grid-template-columns: auto 1fr auto; gap: 15px; align-items: center; text-align: left; border: 0; border-radius: 21px; background: var(--forest); color: white; box-shadow: 0 16px 35px rgba(23,62,49,.2); transition: transform .2s ease, background .2s ease; }
.scan-button:hover { transform: translateY(-2px); background: #1d4c3c; }
.scan-button:active { transform: translateY(0); }
.scan-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: var(--lime); color: var(--forest); font-size: 2rem; font-weight: 400; }
.scan-button strong, .scan-button small { display: block; }
.scan-button strong { font-size: 1.02rem; }
.scan-button small { margin-top: 4px; color: #bfd0c9; font-size: .72rem; font-weight: 400; }
.scan-button b { color: var(--lime); font-size: 1.7rem; font-weight: 400; }
.camera-box { position: relative; aspect-ratio: 4/3; overflow: hidden; margin-bottom: 16px; border-radius: 22px; background: #09140f; }
.camera-box video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 23%; }
.scan-frame span { position: absolute; width: 38px; height: 38px; border-color: var(--lime); border-style: solid; }
.scan-frame span:nth-child(1) { top: 0; left: 0; border-width: 4px 0 0 4px; border-radius: 9px 0 0 0; }
.scan-frame span:nth-child(2) { top: 0; right: 0; border-width: 4px 4px 0 0; border-radius: 0 9px 0 0; }
.scan-frame span:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 4px 4px; border-radius: 0 0 0 9px; }
.scan-frame span:nth-child(4) { bottom: 0; right: 0; border-width: 0 4px 4px 0; border-radius: 0 0 9px 0; }
.camera-box p { position: absolute; left: 50%; bottom: 13px; transform: translateX(-50%); margin: 0; padding: 7px 11px; border-radius: 999px; background: rgba(5,15,11,.72); color: white; font-size: .7rem; white-space: nowrap; }
.camera-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(5,15,11,.72); color: white; font-size: 1.4rem; }
.or { display: flex; align-items: center; gap: 10px; margin: 20px 0; color: #89938e; font-size: .69rem; }
.or::before,.or::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.field { display: block; margin-bottom: 17px; }
.field > span { display: flex; justify-content: space-between; margin-bottom: 8px; color: #33483f; font-size: .76rem; font-weight: 800; }
.field b { color: var(--red); }
.field em { color: #9aa39e; font-size: .66rem; font-style: normal; font-weight: 500; }
.field input, .search-box input { width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: white; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.field > input { padding: 0 15px; }
.field input:focus, .search-box input:focus { border-color: #4b8b72; box-shadow: 0 0 0 4px rgba(75,139,114,.12); }
.field input::placeholder, .search-box input::placeholder { color: #a9b0ac; }
.quantity-control { display: grid; grid-template-columns: 50px 1fr 50px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: white; }
.quantity-control input { min-width: 0; border: 0; border-radius: 0; text-align: center; font-size: 1.15rem; font-weight: 800; }
.quantity-control input:focus { box-shadow: none; }
.quantity-control button { border: 0; background: #f1f3ee; color: var(--forest); font-size: 1.25rem; }
.quantity-control button:hover { background: var(--mint); }
.duplicate-options { margin: -4px 0 17px; padding: 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 1px solid #f0ca75; border-radius: 14px; background: #fff9e8; }
.duplicate-options[hidden] { display: none; }
.duplicate-options legend { padding: 0 5px; color: #816117; font-size: .7rem; font-weight: 800; }
.duplicate-options label { position: relative; }
.duplicate-options input { position: absolute; opacity: 0; }
.duplicate-options span { display: grid; min-height: 40px; place-items: center; padding: 4px; border: 1px solid #ebddb8; border-radius: 10px; background: white; color: #715a22; font-size: .7rem; font-weight: 700; }
.duplicate-options input:checked + span { border-color: var(--forest); background: var(--forest); color: white; }
.save-button { width: 100%; min-height: 53px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 14px; background: var(--lime); color: var(--forest); font-weight: 900; box-shadow: 0 10px 26px rgba(109,130,25,.16); }
.save-button:hover { filter: brightness(.96); }
.save-button kbd { padding: 3px 6px; border: 1px solid rgba(23,62,49,.25); border-radius: 5px; font: 500 .61rem/1 Tahoma,sans-serif; }
.form-message { min-height: 17px; margin: 9px 0 -9px; color: var(--red); text-align: center; font-size: .68rem; }

.records-top { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.text-button { padding: 5px 0; border: 0; border-bottom: 1px solid currentColor; background: none; color: var(--forest-2); font-size: .72rem; font-weight: 800; }
.text-button.danger { color: var(--red); }
.text-button:disabled { opacity: .35; }
.search-box { position: relative; display: block; margin: 24px 0 16px; }
.search-box > span[aria-hidden] { position: absolute; z-index: 1; top: 50%; left: 15px; transform: translateY(-50%); color: #7d8983; font-size: 1.25rem; }
.search-box input { padding: 0 16px 0 44px; }
.empty-state { min-height: 303px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; border: 1px dashed #cbd2c9; border-radius: 18px; background: rgba(245,246,241,.55); }
.empty-state h3 { margin: 18px 0 4px; font-size: 1rem; }
.empty-state p { margin: 0 0 13px; color: var(--muted); font-size: .75rem; }
.empty-code { position: relative; width: 72px; height: 72px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 15px; border-radius: 21px; background: var(--mint); transform: rotate(3deg); }
.empty-code i { background: var(--forest); }
.empty-code i:nth-child(2),.empty-code i:nth-child(3) { border-radius: 50%; }
.empty-code b { position: absolute; width: 12px; height: 12px; right: 13px; bottom: 13px; background: var(--lime); border: 3px solid var(--forest); }
.records-wrap { min-height: 303px; }
.table-head,.record-row { display: grid; grid-template-columns: minmax(160px,1.5fr) minmax(85px,.65fr) minmax(100px,.75fr) 72px; gap: 12px; align-items: center; }
.table-head { padding: 0 13px 9px; border-bottom: 1px solid var(--line); color: #8d9792; font-size: .63rem; font-weight: 700; }
.record-row { min-height: 62px; padding: 10px 13px; border-bottom: 1px solid #e9ebe6; }
.record-row:last-child { border-bottom: 0; }
.record-code { min-width: 0; }
.record-code strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .83rem; letter-spacing: .025em; }
.record-code small { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .64rem; }
.record-qty { color: var(--forest); font-size: 1rem; font-weight: 900; }
.record-time { color: var(--muted); font-size: .66rem; }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.row-actions button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--forest); font-size: .78rem; }
.row-actions button:hover { border-color: #8bab9e; background: #eef5f1; }
.row-actions .delete-row:hover { border-color: #d6a59f; background: #fff1ef; color: var(--red); }
.no-results { padding: 35px; color: var(--muted); text-align: center; font-size: .75rem; }
.export-card { margin-top: 18px; padding: 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; border-radius: 18px; background: var(--forest); color: white; }
.excel-badge { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: #2f815f; color: white; font-weight: 900; }
.export-copy strong,.export-copy span { display: block; }
.export-copy strong { font-size: .78rem; }
.export-copy span { margin-top: 3px; color: #bcd0c8; font-size: .61rem; }
.export-button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 11px; background: var(--lime); color: var(--forest); font-size: .7rem; font-weight: 900; }
.export-button:disabled { opacity: .38; }
.export-button span { margin-left: 4px; font-size: 1rem; }
.format-details { margin: 12px 4px 0; color: var(--muted); font-size: .66rem; }
.format-details summary { cursor: pointer; text-align: right; }
.format-details div { margin-top: 8px; padding: 10px; border-radius: 10px; background: #f3f4ef; line-height: 1.9; }
.format-details div span { display: inline-grid; width: 21px; height: 21px; place-items: center; margin: 0 5px 0 8px; border-radius: 5px; background: var(--mint); color: var(--forest); font-weight: 900; }

dialog { width: min(420px, calc(100% - 34px)); padding: 0; border: 0; border-radius: 24px; box-shadow: 0 30px 100px rgba(9,24,18,.28); }
dialog::backdrop { background: rgba(7,22,16,.48); backdrop-filter: blur(3px); }
dialog form { padding: 30px; text-align: center; }
.dialog-mark { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 50%; background: #fbe3df; color: var(--red); font-size: 1.25rem; font-weight: 900; }
dialog h2 { margin: 0; font-size: 1.3rem; }
dialog p { margin: 8px 0 23px; color: var(--muted); font-size: .78rem; line-height: 1.6; }
dialog form > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
dialog button { min-height: 46px; border-radius: 12px; font-weight: 800; }
.dialog-cancel { border: 1px solid var(--line); background: white; color: var(--ink); }
.dialog-confirm { border: 0; background: var(--red); color: white; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 24px; max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 999px; background: #102d23; color: white; font-size: .75rem; box-shadow: 0 12px 30px rgba(8,28,20,.25); transform: translate(-50%, 25px); opacity: 0; pointer-events: none; transition: .25s ease; }
.toast.show { transform: translate(-50%,0); opacity: 1; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 26px; }
  .summary-strip { width: min(100%, 440px); }
  .workspace { grid-template-columns: 1fr; }
  .records-panel { min-height: 0; }
}

@media (max-width: 620px) {
  .topbar { padding: 16px 18px; }
  .pos-ready { padding: 8px 10px; font-size: .66rem; }
  .brand { font-size: 1rem; }
  .brand-mark { width: 39px; height: 39px; border-radius: 12px 12px 12px 4px; }
  main { padding: 16px 14px 38px; }
  .hero { margin: 20px 4px 25px; }
  .eyebrow { font-size: .65rem; }
  .hero h1 { font-size: clamp(2.75rem, 14vw, 4.5rem); line-height: 1.02; }
  .hero-note { font-size: .78rem; line-height: 1.55; }
  .summary-strip { min-width: 0; border-radius: 16px; }
  .summary-strip > div { min-height: 75px; padding: 14px 17px; }
  .summary-strip strong { font-size: 1.45rem; }
  .panel { border-radius: 23px; }
  .count-panel,.records-panel { padding: 21px 17px; }
  .records-panel { padding-bottom: 18px; }
  .panel-heading { margin-bottom: 20px; }
  .step { width: 38px; height: 38px; }
  .scan-button { min-height: 82px; padding: 13px; border-radius: 18px; }
  .scan-icon { width: 48px; height: 48px; }
  .scan-button strong { font-size: .9rem; }
  .scan-button small { font-size: .65rem; }
  .table-head { display: none; }
  .records-wrap { min-height: 220px; }
  .record-row { grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 8px; padding: 13px; border: 1px solid #e1e5de; border-radius: 14px; background: white; }
  .record-qty { grid-column: 2; grid-row: 1; font-size: 1.1rem; }
  .record-time { grid-column: 1; grid-row: 2; }
  .row-actions { grid-column: 2; grid-row: 2; }
  .empty-state { min-height: 240px; padding: 25px 16px; }
  .export-card { grid-template-columns: auto 1fr; }
  .export-button { grid-column: 1/-1; min-height: 46px; }
  .export-copy span { font-size: .58rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Shared multi-device workflow */
[hidden] { display: none !important; }
.brand { border: 0; background: transparent; padding: 0; }
.sync-ready { display: inline-flex; gap: 9px; align-items: center; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.62); color: var(--forest); font-size: .76rem; font-weight: 800; }
.sync-ready i { width: 8px; height: 8px; border-radius: 50%; background: #42a36f; box-shadow: 0 0 0 4px rgba(66,163,111,.13); }
.boot-view { min-height: 65vh; display: grid; place-content: center; justify-items: center; color: var(--muted); font-size: .8rem; }
.loader { width: 44px; height: 44px; border: 4px solid #dce3db; border-top-color: var(--forest-2); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.shared-hero { align-items: center; }
.shared-hero h1 { font-size: clamp(3.2rem, 7.2vw, 7rem); }
.collab-card { position: relative; width: 315px; min-height: 250px; padding: 28px; overflow: hidden; border-radius: 34px; background: var(--forest); color: white; box-shadow: 0 28px 80px rgba(23,62,49,.23); transform: rotate(2deg); }
.collab-card::before { content: ""; position: absolute; width: 190px; height: 190px; right: -65px; top: -55px; border-radius: 50%; background: var(--lime); opacity: .94; }
.folder-shape { position: relative; width: 155px; height: 112px; margin: 26px 0 22px; display: grid; place-content: center; border-radius: 8px 22px 22px 22px; background: var(--mint); color: var(--forest); box-shadow: 0 14px 28px rgba(0,0,0,.14); }
.folder-shape::before { content: ""; position: absolute; left: 0; top: -18px; width: 73px; height: 27px; border-radius: 10px 12px 0 0; background: var(--mint); }
.folder-shape b { font-size: 2.4rem; line-height: 1; }
.folder-shape span { font-size: .72rem; font-weight: 800; }
.device-stack { position: absolute; right: 26px; bottom: 47px; display: flex; align-items: center; }
.device-stack i,.device-stack strong { width: 42px; height: 64px; display: grid; place-items: center; margin-left: -13px; border: 3px solid var(--forest); border-radius: 11px; background: white; color: var(--forest); font-size: .73rem; font-style: normal; box-shadow: 0 7px 18px rgba(0,0,0,.16); }
.device-stack i:nth-child(2) { background: var(--lime); transform: translateY(-8px); }
.device-stack i:nth-child(3) { background: var(--mint); }
.device-stack strong { width: 34px; height: 34px; border-radius: 50%; background: var(--forest-2); color: var(--lime); z-index: 3; }
.collab-card > p { position: absolute; left: 28px; bottom: 19px; margin: 0; color: #c7d8d1; font-size: .72rem; font-weight: 800; }
.access-card { width: min(100%, 620px); margin: 28px auto 70px; padding: 32px; }
.card-note { margin: -8px 0 24px 56px; color: var(--muted); font-size: .76rem; line-height: 1.65; }
.compact-form { max-width: 450px; margin: 0 auto; }
.inline-access-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.inline-access-form .field { margin: 0; }
.primary-button { min-height: 51px; padding: 0 22px; border: 0; border-radius: 14px; background: var(--lime); color: var(--forest); font-weight: 900; box-shadow: 0 10px 26px rgba(109,130,25,.16); }
.primary-button:hover { filter: brightness(.96); }
.staff-hint { margin-top: 24px; padding: 14px 16px; display: grid; gap: 3px; border-radius: 14px; background: #eef4ef; }
.staff-hint b { font-size: .74rem; }
.staff-hint span { color: var(--muted); font-size: .68rem; line-height: 1.5; }
.field select { width: 100%; min-height: 50px; padding: 0 15px; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: white; color: var(--ink); }
.field select:focus { border-color: #4b8b72; box-shadow: 0 0 0 4px rgba(75,139,114,.12); }
.dashboard-head { margin: 30px 0 20px; display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.dashboard-head h2 { margin: 0; font-size: clamp(1.8rem,4vw,3rem); letter-spacing: -.04em; }
.dashboard-grid { display: grid; grid-template-columns: minmax(330px,.72fr) minmax(480px,1.28fr); gap: 18px; align-items: start; padding-bottom: 70px; }
.create-card,.rounds-card { padding: 28px; }
.field-grid { display: grid; grid-template-columns: .6fr 1.4fr; gap: 10px; }
.pin-control { display: grid; grid-template-columns: 1fr auto; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: white; }
.pin-control input { border: 0; border-radius: 0; font-weight: 900; letter-spacing: .16em; }
.pin-control button { border: 0; border-left: 1px solid var(--line); background: #eff3ed; color: var(--forest); padding: 0 13px; font-size: .68rem; font-weight: 800; }
.create-card .primary-button { width: 100%; }
.rounds-toolbar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.rounds-toolbar p { margin: 0 0 2px; color: var(--muted); font-size: .67rem; }
.rounds-toolbar strong { font-size: 1rem; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--forest); font-size: 1.2rem; }
.rounds-list { display: grid; gap: 10px; margin-top: 15px; }
.round-card { padding: 16px; display: grid; grid-template-columns: 1fr auto; gap: 13px; border: 1px solid #e0e5dd; border-radius: 17px; background: white; }
.round-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.round-card h3 { margin: 0; font-size: .9rem; }
.round-card p { margin: 0; color: var(--muted); font-size: .67rem; }
.status-badge { padding: 4px 8px; border-radius: 999px; background: #dff3e5; color: #23734c; font-size: .58rem; font-weight: 900; }
.status-badge.closed { background: #eceeea; color: #778079; }
.round-metrics { display: flex; gap: 14px; margin-top: 11px; }
.round-metrics span { color: var(--muted); font-size: .62rem; }
.round-metrics b { color: var(--ink); }
.round-actions { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.round-actions button { min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--forest); font-size: .62rem; font-weight: 800; }
.round-actions .share-round { background: var(--forest); color: white; border-color: var(--forest); }
.row-actions .edit-row { width: auto; padding: 0 8px; white-space: nowrap; }
.rounds-empty { min-height: 280px; display: grid; place-content: center; justify-items: center; color: var(--muted); text-align: center; }
.rounds-empty b { color: var(--ink); font-size: .85rem; }
.rounds-empty span { margin-top: 4px; font-size: .68rem; }
.join-view { min-height: 75vh; display: grid; place-content: center; padding: 25px 0 60px; }
.join-card { width: min(540px,calc(100vw - 28px)); padding: 30px; }
.back-button { padding: 0; border: 0; background: none; color: var(--forest-2); font-size: .7rem; font-weight: 800; }
.folder-hero { position: relative; margin: 22px 0 24px; padding: 26px; overflow: hidden; border-radius: 23px; background: var(--forest); color: white; }
.folder-hero::after { content: ""; position: absolute; width: 130px; height: 130px; right: -46px; top: -44px; border-radius: 50%; background: var(--lime); }
.folder-hero span { color: #b8cec5; font-size: .66rem; font-weight: 800; }
.folder-hero h1 { position: relative; z-index: 1; margin: 8px 0 5px; max-width: 85%; font-size: 1.45rem; letter-spacing: -.03em; }
.folder-hero p { margin: 0; color: #c6d7d0; font-size: .72rem; }
.folder-hero i { display: inline-block; margin-top: 14px; padding: 5px 8px; border-radius: 999px; background: rgba(217,242,95,.16); color: var(--lime); font-size: .62rem; font-style: normal; font-weight: 900; }
.join-card .primary-button { width: 100%; }
.round-bar { padding: 18px 22px; display: grid; grid-template-columns: minmax(240px,1fr) auto auto auto; gap: 24px; align-items: center; }
.round-bar p { margin: 0 0 3px; color: var(--forest-2); font-size: .64rem; font-weight: 900; }
.round-bar h1 { margin: 0; font-size: 1.08rem; }
.round-user { display: grid; }
.round-user span { font-size: .72rem; font-weight: 800; }
.round-user b { color: var(--muted); font-size: .62rem; }
.live-state { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .62rem; }
.live-state i { width: 7px; height: 7px; border-radius: 50%; background: #45a871; box-shadow: 0 0 0 4px rgba(69,168,113,.13); }
.shared-summary { width: 100%; grid-template-columns: repeat(3,1fr); margin: 16px 0; }
.shared-summary .summary-status { grid-column: 1/-1; }
.closed-notice { margin: 0 0 16px; padding: 13px 17px; display: flex; gap: 10px; align-items: center; border-radius: 13px; background: #fff4d6; color: #785b16; font-size: .7rem; }
.closed-notice span { color: #8b7848; }
.participant-chips { display: flex; gap: 6px; overflow-x: auto; padding: 20px 0 0; scrollbar-width: thin; }
.participant-chip { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: #edf3ed; color: var(--forest); font-size: .62rem; }
.participant-chip b { margin-right: 4px; }
.record-code small.contributions { white-space: normal; line-height: 1.5; }
.my-contribution { color: var(--forest-2); font-weight: 800; }

@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .round-bar { grid-template-columns: 1fr auto; }
  .live-state { grid-column: 1; }
  .round-user { grid-column: 2; grid-row: 1; text-align: right; }
  .round-bar > .text-button { grid-column: 2; grid-row: 2; }
}

@media (max-width: 620px) {
  .sync-ready span { display: none; }
  .sync-ready { width: 39px; height: 39px; justify-content: center; padding: 0; }
  .shared-hero { gap: 20px; }
  .collab-card { width: 100%; min-height: 200px; }
  .access-card { padding: 22px 18px; }
  .card-note { margin-left: 0; }
  .inline-access-form { grid-template-columns: 1fr; }
  .dashboard-head { align-items: center; }
  .dashboard-head h2 { font-size: 1.65rem; }
  .create-card,.rounds-card { padding: 20px 16px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .round-card { grid-template-columns: 1fr; }
  .round-actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; }
  .round-bar { padding: 15px; gap: 10px; }
  .round-bar h1 { font-size: .88rem; }
  .round-user span { font-size: .66rem; }
  .shared-summary { grid-template-columns: repeat(3,1fr); }
  .shared-summary > div { min-height: 68px; padding: 12px; }
  .shared-summary strong { font-size: 1.25rem; }
  .closed-notice { align-items: flex-start; flex-direction: column; }
}

/* Thai typography refinement */
.brand {
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
}
.brand small { line-height: 1.3; }
.eyebrow {
  font-size: .8rem;
  line-height: 1.5;
  letter-spacing: .055em;
}
.hero h1 {
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.hero h1 span { font-weight: 700; }
.hero-note {
  font-size: 1rem;
  line-height: 1.8;
}
.panel-heading h2,
.dashboard-head h2,
.folder-hero h1,
.round-bar h1,
.round-card h3 {
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.panel-heading h2 { font-size: 1.32rem; }
.panel-heading p {
  font-size: .76rem;
  line-height: 1.45;
  letter-spacing: .045em;
}
.field > span {
  font-size: .82rem;
  line-height: 1.45;
}
.field input,
.field select,
.search-box input {
  font-size: .95rem;
  line-height: 1.5;
}
.primary-button,
.save-button,
.scan-button strong,
.export-button,
.text-button,
.round-actions button {
  font-weight: 800;
}
.summary-strip strong,
.record-qty,
.quantity-control input,
.round-metrics b {
  font-family: var(--font-numeric);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.record-code strong {
  font-size: .9rem;
  letter-spacing: .015em;
}
.record-code small,
.record-time,
.live-state,
.round-user b {
  line-height: 1.5;
}
.card-note,
.staff-hint,
.closed-notice,
.empty-state p {
  line-height: 1.7;
}

@media (max-width: 620px) {
  .brand { font-size: 1.04rem; }
  .brand small { font-size: .6rem; }
  .eyebrow { font-size: .7rem; }
  .hero h1 {
    font-size: clamp(2.5rem, 12vw, 4rem);
    line-height: 1.12;
    letter-spacing: -.015em;
  }
  .hero-note {
    font-size: .9rem;
    line-height: 1.7;
  }
  .panel-heading h2 { font-size: 1.2rem; }
  .field > span { font-size: .8rem; }
  .primary-button,
  .save-button,
  .export-button { font-size: .86rem; }
  .record-code strong { font-size: .92rem; }
  .dashboard-head h2 { font-size: 1.7rem; }
  .round-bar h1 { font-size: .95rem; }
}
