/* The sign pages: panel F's sheet, tokens and type, at full size.
   Touch targets 44 tall or more, type 17 and up. Light only. */

@font-face { font-family: "Instrument Serif"; src: url(/assets/fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/assets/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/assets/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/assets/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --ink: #15213a;
  --sub: rgba(21, 33, 58, .74);
  --hint: rgba(21, 33, 58, .66);
  --hair: rgba(21, 33, 58, .12);
  --hair-strong: rgba(21, 33, 58, .22);
  --field-edge: rgba(21, 33, 58, .53);
  --glass-solid: rgba(229, 237, 248, .97);
  --sheet: #F4F7FB;
  --amber: #E8822E;
  --amber-mark: #C4621A;
  --on-amber: #1A1208;
  --neg-ink: #A61E1E;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--sheet);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
main { min-height: 100vh; min-height: 100dvh; }
h1, p { margin: 0; }
b { font-weight: 600; }

:focus-visible { outline: 3px solid var(--amber-mark); outline-offset: 2px; }

/* ---- type ---- */
.shop { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: 44px; line-height: 1.1; overflow-wrap: anywhere; }
.shop.huge { font-size: 64px; }
.shop.mid { font-size: 36px; }
.shop.small { font-size: 32px; }
.lead { font-size: 20px; color: var(--sub); margin-top: 16px; }
.lead.strong { color: var(--ink); }
.neg { color: var(--neg-ink); font-size: 19px; margin-top: 16px; }
.notice { font-size: 20px; color: var(--ink); margin-top: 20px; }
.hint { color: var(--hint); font-size: 17px; }
.cap { font-size: 19px; color: var(--hint); margin-top: 12px; }
.foot { font-size: 17px; color: var(--hint); text-align: center; margin-top: 24px; }
.ask { font-size: 21px; margin-top: 10px; }
.done-line { font-size: 28px; margin-top: 24px; }

/* ---- screens ---- */
.screen {
  padding: max(28px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}
.screen.center {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.screen.center.narrow > * { width: 100%; max-width: 520px; }
.screen.center.narrow > .box6 { width: auto; }
.screen.center > .btn.wide { margin-top: 28px; }
.foot.pinned { position: absolute; left: 0; right: 0; bottom: max(28px, env(safe-area-inset-bottom)); margin: 0; }
.idle-body { max-width: 900px; }

.screen.form {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* ---- buttons ---- */
.btn {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  margin: 0;
  font: inherit;
  white-space: nowrap;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, .80);
  box-shadow: inset 0 0 0 1px var(--hair-strong);
  cursor: pointer;
  touch-action: manipulation;
}
.btn.big { min-height: 56px; font-size: 19px; border-radius: 12px; padding: 0 24px; }
.btn.wide { width: 100%; }
.btn.grow { flex: 1 1 auto; }
.btn.primary { background: var(--amber); color: var(--on-amber); box-shadow: none; }
.btn.ghost { background: transparent; box-shadow: none; font-weight: 500; }
.btn.danger { background: #fff; color: var(--neg-ink); box-shadow: inset 0 0 0 1.5px var(--neg-ink); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:not(:disabled):active { filter: brightness(.94); }

/* ---- the six boxes ---- */
.box6 { position: relative; display: flex; gap: 12px; justify-content: center; margin: 28px auto 0; }
.box6 .cell {
  width: 60px;
  height: 76px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--field-edge);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 34px;
  font-weight: 600;
  color: var(--ink);
}
.box6 .cell.cur { box-shadow: inset 0 0 0 2px var(--amber-mark); }
.box6:focus-within .cell.cur { box-shadow: inset 0 0 0 3px var(--amber-mark); }
.box-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0;
  border: 0;
  padding: 0;
  margin: 0;
  font-size: 16px;
  color: transparent;
  caret-color: transparent;
  background: transparent;
}
.box-input:focus-visible { outline: none; }
.box6:has(.box-input:focus-visible) { outline: 3px solid var(--amber-mark); outline-offset: 6px; border-radius: 14px; }

/* ---- the form ---- */
.terms-box { position: relative; display: flex; flex-direction: column; margin-top: 18px; }
.terms {
  background: #fff;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--field-edge);
  padding: 16px 20px;
  font-size: 19px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.more { margin-top: 6px; }

.pad {
  position: relative;
  margin-top: 16px;
  height: 180px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--field-edge);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  flex: none;
}
.pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; touch-action: none; border-radius: 12px; }
.pad .base { position: absolute; left: 24px; right: 24px; bottom: 46px; border-top: 1px solid var(--hair-strong); pointer-events: none; }
.pad .x { position: absolute; left: 26px; bottom: 52px; font-size: 26px; line-height: 1; color: var(--hint); pointer-events: none; }
.pad .ph { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 17px; color: var(--hint); pointer-events: none; }

.clear-row { display: flex; justify-content: flex-end; margin-top: 4px; }
.name-row { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.name-row .l { flex: none; font-size: 19px; color: var(--sub); }
.name-row.stacked { flex-direction: column; align-items: stretch; gap: 6px; }
.field {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  min-width: 0;
  height: 56px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--field-edge);
  padding: 0 16px;
  font: inherit;
  font-size: 20px;
  color: var(--ink);
}
.field:focus { outline: none; box-shadow: inset 0 0 0 2px var(--amber-mark); }

.actions { display: flex; gap: 12px; margin-top: 18px; }
.actions.column { flex-direction: column; gap: 6px; }
.confirm { margin-top: 18px; padding: 18px; border-radius: 14px; background: var(--glass-solid); box-shadow: inset 0 0 0 1px var(--hair-strong); }
.confirm-q { font-size: 20px; font-weight: 500; }
.confirm .actions { margin-top: 14px; }

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--ink);
  font-weight: 600;
  flex: none;
}
.mark.big { width: 72px; height: 72px; font-size: 36px; box-shadow: inset 0 0 0 3px var(--ink); }

/* ---- the counter iPad: the request fills the screen ---- */
.counter .screen.form { height: 100vh; height: 100dvh; min-height: 560px; }
.counter .screen.form .terms-box { flex: 1 1 auto; min-height: 140px; }
.counter .screen.form .terms { flex: 1 1 auto; min-height: 0; }
.counter .pad { height: clamp(190px, 28vh, 320px); }
@media (orientation: portrait) {
  .counter .pad { height: clamp(220px, 24vh, 340px); }
}

/* ---- the phone ---- */
.phone .terms { max-height: 42vh; min-height: 150px; }
.phone .screen.form { padding-top: max(22px, env(safe-area-inset-top)); }

@media (max-width: 600px) {
  body { font-size: 17px; }
  .shop { font-size: 36px; }
  .shop.mid { font-size: 30px; }
  .shop.small { font-size: 26px; }
  .shop.huge { font-size: 44px; }
  .lead { font-size: 18px; }
  .ask { font-size: 18px; }
  .neg { font-size: 17px; }
  .terms { font-size: 17px; padding: 14px 16px; }
  .box6 { gap: 8px; }
  .box6 .cell { width: 46px; height: 60px; font-size: 28px; border-radius: 10px; }
  .done-line { font-size: 24px; }
  .pad { height: 170px; }
  .name-row .l { font-size: 17px; }
  .field { font-size: 18px; height: 52px; }
  .confirm-q { font-size: 18px; }
}

/* ---- the bare index ---- */
.bare { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.bare-word { font-family: "Instrument Serif", Georgia, serif; font-size: 40px; }
