/* Application chrome: restrained typography and surfaces; depth stays on tiles. */
:root {
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: var(--sans);
  --cream: #f5f5f2;
  --paper: #ffffff;
  --ink: #26332d;
  --muted: #59675f;
  --line: #d9ded9;
}
.topbar { height: 64px; background: #fff; color: var(--ink); padding: 0 24px; border-bottom: 1px solid var(--line); }
.topbar .quiet { color: var(--ink); font-size: 13px; }
.brand { font-size: 20px; letter-spacing: -.4px; gap: 10px; }
.brand-light { font: inherit; font-weight: 400; }
.brand-mark { font-size: 22px; border-radius: 3px; box-shadow: 0 2px 0 #c5c7b9; }
.edition { color: var(--muted); letter-spacing: 1px; }
.app-shell { min-height: calc(100vh - 64px); grid-template-columns: 190px minmax(0,1fr); }
main { padding: 28px 32px; max-width: 1500px; }
aside { background: #f0f2ee; padding: 24px 12px; }
.eyebrow { font-size: 11px; letter-spacing: .7px; margin-bottom: 12px; }
.nav { font-size: 14px; padding: 12px; border-radius: 4px; }
.nav span { display: none; }
.nav.active { background: #dfe8df; box-shadow: inset 3px 0 #285749; }
h1, .table-page-head h1 { font: 600 28px/1.2 var(--sans); letter-spacing: -.5px; margin: 0 0 8px; }
h2, .potential-heading h2 { font: 600 19px/1.3 var(--sans); }
.card h3 { font: 600 18px/1.3 var(--sans); }
.page-head .eyebrow, .table-page-head .eyebrow { display: none; }
.page-head p, .table-page-head p { font-size: 14px; color: var(--muted); }
.table-page-head { margin-bottom: 20px; }
.panel, .card { border-radius: 6px; box-shadow: none; }
.card-art, .card:nth-child(n) .card-art { background: #eef1ea; }
.card p { font-size: 13px; }
.tag { letter-spacing: .4px; color: #53644f; font-size: 11px; }
.chip { border-radius: 4px; font-size: 13px; }
.mahjong-table { background: #315f48; border: 3px solid #284a39; border-radius: 10px; box-shadow: inset 0 1px 8px #16332355; padding: 20px 24px; min-height: 0; }
.table-inscription { letter-spacing: .3px; font-size: 12px; color: #dbe7db; }
.table-help { font-size: 12px; min-height: 40px; border-color: #9ab8a177; border-radius: 4px; }
.gold-button { background: #f0dfad; border: 1px solid #d3bf8a; border-radius: 4px; box-shadow: none; font-size: 13px; min-height: 44px; }
.gold-button:hover { background: #f6e9c6; }
.opponent { border-radius: 5px; background: transparent; }
.current-seat { background: #244c38; border-color: #d4c99e; box-shadow: none; }
.center-dragon { font-size: 44px; }
.table-status { font-size: 13px; color: #f0f3e9; }
.table-rack-label { font-size: 11px; letter-spacing: .5px; color: #e0e8d8; }
.table-rack button.tile:not(:disabled):hover { transform: translateY(-6px); }
.table-rack button.tile:disabled:hover { transform: perspective(650px) rotateX(5deg); }
.potential-panel { background: #244c39; border-color: #71917a; border-radius: 5px; box-shadow: none; }
.potential-heading .table-section-label { display: none; }
.potential-title h3 { font-size: 14px; }
.potential-intro, .potential-hand>p, .potential-summary { font-size: 12px; }
.potential-caveat, .potential-legend { font-size: 11px; }
.potential-title>span { font-size: 12px; }
.potential-scroll { max-height: 260px; }
.below-table { font-size: 12px; }
.footnote { font-size: 12px; }
@media (max-width: 720px) {
  .topbar { padding: 0 16px; gap: 12px; }
  .brand { font-size: 18px; }
  .topbar .quiet { font-size: 12px; }
  .app-shell { display: block; }
  aside { padding: 0 8px; }
  nav { gap: 0; }
  .nav { padding: 14px 4px; font-size: 11px; min-height: 48px; border-radius: 0; }
  .nav.active { box-shadow: inset 0 -3px #285749; background: transparent; }
  main { padding: 20px 12px; }
  h1, .table-page-head h1 { font-size: 25px; }
  .table-page-head p { font-size: 13px; }
  .mahjong-table { padding: 14px 10px; border-width: 2px; border-radius: 7px; box-shadow: none; }
  .table-inscription { font-size: 10px; }
  .table-help, .table-bottom .table-help { font-size: 11px; min-height: 44px; padding: 8px; }
  .table-status { font-size: 13px; text-align: left; }
  .table-bottom .actions { gap: 7px; }
  .potential-heading h2 { font-size: 18px; }
  .potential-title h3 { font-size: 13px; }
  .potential-hand>p, .potential-intro { font-size: 12px; }
  .table-rack-label { font-size: 10px; }
  .below-table { font-size: 12px; }
}
/* Hand examples belong to the page flow, rather than a nested scroll box. */
.potential-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
  overflow: visible;
}
.potential-list .potential-hand { padding: 16px 0; min-width: 0; }
.potential-list .potential-pattern {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 3px;
  max-width: 490px;
}
.potential-list .potential-tile .tile.small {
  width: 100%;
  height: auto;
  aspect-ratio: .7;
  min-width: 0;
}
@media (max-width: 1000px) {
  .potential-list { grid-template-columns: minmax(0, 1fr); }
}
.capture-settings{display:flex;flex-wrap:wrap;gap:12px;align-items:end}.capture-settings label{flex:1;min-width:160px}.capture-settings input,.capture-settings select,#training-tile{display:block;width:100%;padding:12px;border:1px solid var(--line);border-radius:4px;margin:6px 0 12px;background:white;color:var(--ink)}.capture-file{position:relative;overflow:hidden;cursor:pointer}.capture-file input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}.capture-file:has(input:disabled){opacity:.4;pointer-events:none}.annotation-stage{position:relative;width:100%;max-width:1000px;margin:16px auto;background:#eee}.annotation-stage img{width:100%;display:block}.annotation-stage svg{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair}.annotation-stage rect{fill:#33bb8833;stroke:#e5b623;stroke-width:3;vector-effect:non-scaling-stroke}.annotation-stage text{fill:#151c16;stroke:#fff;stroke-width:1;font:24px sans-serif;paint-order:stroke;pointer-events:none}.annotation-labels{display:flex;flex-wrap:wrap;gap:8px 28px;padding-left:24px}.annotation-labels li{padding:4px}.review-check{display:block;margin:20px 0}.review-check input{width:20px;height:20px;vertical-align:middle}.capture-list>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:14px 0;border-top:1px solid var(--line)}.capture-list span{flex:1;min-width:160px}
