/* Nudge: iOS-style, light and dark, scalable text */
:root { --s: 1; }
.s1 { --s: .88; } .s2 { --s: 1; } .s3 { --s: 1.15; } .s4 { --s: 1.3; }
.light { color-scheme: light; --bg:#F2F2F7; --card:#FFFFFF; --sep:#D9D9DE; --label:#000000; --label2:#5C5C61; --accent:#0A66E0; --accentT:#0958C7; --green:#1F7A3A; --greenT:#1B6E34; --red:#C4271B; --redT:#C4271B; --orangeT:#A84A00; --purpleT:#5B2DB0; --blueTint:#E3EEFD; --greenTint:#E2F4E7; --redTint:#FCE6E4; --orangeTint:#FFEBD6; --purpleTint:#EEE6FB; --fill:#E3E3E8; --seg:#FFFFFF; --bar:rgba(249,249,251,.94); --scrim:rgba(0,0,0,.4); }
.dark { color-scheme: dark; --bg:#000000; --card:#1C1C1E; --sep:#38383A; --label:#FFFFFF; --label2:#AEAEB2; --accent:#0A66E0; --accentT:#5AA2FF; --green:#1F7A3A; --greenT:#46D36B; --red:#C4271B; --redT:#FF7A70; --orangeT:#FFB04D; --purpleT:#BFA1FF; --blueTint:#0F2744; --greenTint:#12301B; --redTint:#3A1512; --orangeTint:#3A2610; --purpleTint:#2A1B4A; --fill:#2C2C2E; --seg:#58585B; --bar:rgba(22,22,24,.94); --scrim:rgba(0,0,0,.6); }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--label); }
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif; font-size: calc(17px * var(--s)); line-height: 1.3; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accentT); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.app { position: relative; display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
.app.phone { flex-direction: column; }
.app.wide { flex-direction: row; }
.col { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; position: relative; }
.wide .listcol { flex: none; width: 380px; border-right: 1px solid var(--sep); }
.scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px 32px; display: flex; flex-direction: column; gap: 16px; }
.scroll > *, .inner > *, .modal > *, .stack > *, .authcard > * { flex-shrink: 0; }
.inner { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 680px; margin: 0 auto; }
.phone .scroll > *, .phone .head, .phone .topbar { width: 100%; max-width: 680px; margin-left: auto; margin-right: auto; }
.wide .detailcol .scroll { padding: 20px 32px 32px; }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: calc(20px + env(safe-area-inset-top)) 16px 10px; flex: none; }
.wide .head { padding-top: 28px; }
.large { margin: 0; font-size: calc(34px * var(--s)); line-height: 1.1; font-weight: 700; letter-spacing: .3px; }
.wide .large { font-size: calc(30px * var(--s)); }
.circle { width: 44px; height: 44px; border-radius: 22px; border: 0; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }

.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 20px; height: 20px; }
.ic.xs { width: 14px; height: 14px; stroke-width: 2.4; }
.ic.xl { width: 40px; height: 40px; stroke-width: 1.5; }
.ic.inline { width: 1em; height: 1em; vertical-align: -.15em; margin-right: 2px; }
.ic.chev { width: 18px; height: 18px; color: var(--label2); }
.ic.open { transform: rotate(90deg); }

.seg { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--fill); width: 100%; }
.seg button { flex: 1; min-height: 44px; border: 0; border-radius: 8px; background: transparent; font-size: calc(14px * var(--s)); font-weight: 500; padding: 0 4px; }
.seg button.on { background: var(--seg); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.2); }

.card { background: var(--card); border-radius: 12px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--sep); background: transparent; text-align: left; }
.row.last { border-bottom: 0; }
.row.picked { background: var(--blueTint); }
.row.split { padding: 0 12px 0 0; }
.rowmain { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 0 10px 16px; border: 0; background: transparent; text-align: left; min-height: 64px; }
button.row:active, .rowmain:active { background: var(--fill); }
.lead { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.lead.big { width: 56px; height: 56px; }
.lead.todo { background: var(--blueTint); color: var(--accentT); }
.lead.ask { background: var(--purpleTint); color: var(--purpleT); }
.lead.ok { background: var(--greenTint); color: var(--greenT); }
.lead.no { background: var(--redTint); color: var(--redT); }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.title { font-size: calc(17px * var(--s)); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { font-size: calc(14px * var(--s)); color: var(--label2); overflow-wrap: anywhere; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.lead-tags { margin: 0 0 10px; }
.pill { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 11px; font-size: calc(12px * var(--s)); font-weight: 600; white-space: nowrap; }
.pill.urgent, .pill.overdue { background: var(--redTint); color: var(--redT); }
.pill.important { background: var(--orangeTint); color: var(--orangeT); }
.pill.ask { background: var(--purpleTint); color: var(--purpleT); }
.pill.todo, .pill.wait { background: var(--blueTint); color: var(--accentT); }
.pill.money { background: var(--fill); color: var(--label); }
.pill.done { background: var(--greenTint); color: var(--greenT); }
.rowend { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.small { font-size: calc(12px * var(--s)); color: var(--label2); font-weight: 500; }
.emptybox { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 48px 24px; color: var(--label2); }
.emptybox .title { color: var(--label); white-space: normal; }
.warn-text { color: var(--redT); }
.ok-text { color: var(--greenT); }

.tabbar { display: flex; padding: 6px 8px max(8px, env(safe-area-inset-bottom)); background: var(--bar); border-top: 1px solid var(--sep); flex: none; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.tab { flex: 1; position: relative; min-height: 49px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: transparent; color: var(--label2); font-size: 11px; font-weight: 500; }
.tab.on { color: var(--accentT); }
.bdg { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.side { width: 240px; flex: none; background: var(--card); border-right: 1px solid var(--sep); padding: 24px 12px 16px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 12px 14px; font-size: calc(22px * var(--s)); font-weight: 700; }
.logo { width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.logo .ic { stroke-width: 2.6; }
.logo.lg { width: 56px; height: 56px; border-radius: 14px; }
.logo.lg .ic { width: 32px; height: 32px; }
.logo.xl { width: 84px; height: 84px; border-radius: 20px; }
.logo.xl .ic { width: 48px; height: 48px; }
.newbtn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; margin: 0 4px 10px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 600; font-size: calc(16px * var(--s)); }
.navi { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; text-align: left; font-size: calc(16px * var(--s)); }
.navi.on { background: var(--blueTint); color: var(--accentT); font-weight: 600; }
.cnt { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.spacer { flex: 1; }
.me { display: flex; align-items: center; gap: 12px; padding: 12px; border-top: 1px solid var(--sep); }
@media (max-width: 1099px) {
  .wide .side { width: 76px; padding: 20px 10px 12px; align-items: center; }
  .wide .navtxt { display: none; }
  .wide .brand { padding: 0 0 14px; }
  .wide .newbtn { width: 48px; margin: 0 0 10px; padding: 0; }
  .wide .navi { width: 52px; justify-content: center; padding: 0; }
  .wide .navi .cnt { position: absolute; top: 2px; right: 0; margin: 0; }
  .wide .me { padding: 12px 0; }
  .wide .listcol { width: 340px; }
}

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 8px 4px; min-height: 56px; flex: none; }
.wide .topbar { padding: 14px 20px 4px; }
.navbtn { display: flex; align-items: center; gap: 2px; min-height: 44px; min-width: 76px; padding: 0 8px; border: 0; background: transparent; color: var(--accentT); font-size: calc(17px * var(--s)); }
.navbtn.bold { font-weight: 600; justify-content: flex-end; }
.navbtn:disabled { opacity: .4; cursor: not-allowed; }
.navtitle { font-size: calc(17px * var(--s)); font-weight: 600; text-align: center; }
.navspace { min-width: 76px; }

.cap { font-size: calc(13px * var(--s)); text-transform: uppercase; letter-spacing: .2px; color: var(--label2); padding: 0 16px 6px; }
.foot { font-size: calc(13px * var(--s)); color: var(--label2); padding: 8px 16px 0; margin: 0; line-height: 1.4; }
.foot.warn { color: var(--redT); font-weight: 600; }
.center-text { text-align: center; }
.input { display: block; width: 100%; min-height: 48px; padding: 12px 16px; border: 0; background: transparent; outline: none; font-size: calc(17px * var(--s)); color: var(--label); }
.input.right { text-align: right; padding-right: 0; }
.input::placeholder, .num::placeholder, .reason::placeholder { color: var(--label2); opacity: 1; }
textarea.input { min-height: 104px; resize: none; line-height: 1.4; }
.frow .input { padding-left: 0; }
.codein { text-align: center; font-size: calc(26px * var(--s)); letter-spacing: 4px; font-weight: 700; text-transform: uppercase; min-height: 64px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 22px; border: 1.5px solid var(--sep); background: transparent; font-weight: 500; font-size: calc(16px * var(--s)); }
.chip.sm { padding: 0 12px; min-width: 52px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.frow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; min-height: 50px; border: 0; border-top: 1px solid var(--sep); width: 100%; background: transparent; text-align: left; }
.frow.first { border-top: 0; }
.frow > label, .frow > span:first-child { flex: none; }
.lbl { display: flex; align-items: center; gap: 10px; flex: 1 !important; min-width: 0; }
.pad-row { padding: 4px 16px 12px; }
.row2 { display: flex; gap: 10px; flex-wrap: wrap; }
.row2 > * { flex: 1; }
.sel { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--accentT); font-size: calc(17px * var(--s)); text-align: right; text-align-last: right; max-width: 60%; padding: 12px 0; outline: none; min-height: 44px; }
input[type="date"].sel { min-width: 140px; }
.num { width: 110px; text-align: right; border: 0; background: transparent; outline: none; font-size: calc(17px * var(--s)); padding: 12px 0; color: var(--label); }
.sw { position: relative; width: 51px; height: 31px; border-radius: 16px; border: 0; background: #8E8E93; flex: none; padding: 0; }
.sw.on { background: var(--green); }
.knob { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25); transition: left .18s; }
.sw.on .knob { left: 22px; }
.photos { display: flex; gap: 10px; padding: 12px 16px; flex-wrap: wrap; }
.photos.nopad { padding: 0; }
.tile { width: 76px; height: 76px; border-radius: 12px; background: var(--fill); display: flex; align-items: center; justify-content: center; color: var(--label2); border: 0; }
.tile.add { border: 1.5px dashed var(--label2); background: transparent; color: var(--accentT); }
.thumb { width: 96px; height: 96px; border-radius: 12px; overflow: hidden; border: 0; padding: 0; background: var(--fill); }
.thumb.sm { width: 44px; height: 44px; border-radius: 8px; flex: none; }
.thumb img, .thumbimg { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbwrap { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; }
.rmphoto { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; }
.rmphoto::after { content: ""; position: absolute; inset: -8px; }
.photoview { max-height: 70vh; overflow: auto; border-radius: 12px; background: #000; display: flex; justify-content: center; }
.photoview img { max-height: 70vh; object-fit: contain; }

.kv { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; min-height: 50px; border-top: 1px solid var(--sep); }
.kv.first { border-top: 0; }
.k { color: var(--label2); flex: none; }
.v { text-align: right; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.v.code { font-size: calc(20px * var(--s)); letter-spacing: 2px; font-weight: 700; }
.dtitle { margin: 0; font-size: calc(28px * var(--s)); line-height: 1.15; font-weight: 700; overflow-wrap: anywhere; }
.dfrom { margin: 4px 0 0; color: var(--label2); }
.note { padding: 14px 16px; line-height: 1.45; overflow-wrap: anywhere; }
.actions { display: flex; gap: 12px; padding: 12px 16px max(14px, env(safe-area-inset-bottom)); background: var(--bar); border-top: 1px solid var(--sep); flex: none; }
.actions.wrap { flex-wrap: wrap; }
.actions.wrap .btn { flex: 1 1 140px; }
.wide .actions { padding: 14px 32px 20px; }
.btn { flex: 1; min-height: 50px; border: 0; border-radius: 14px; color: #fff; font-weight: 600; font-size: calc(17px * var(--s)); padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.green { background: var(--green); }
.btn.red { background: var(--red); }
.btn.blue { background: var(--accent); }
.btn.gray { background: var(--fill); color: var(--accentT); }
.btn.danger-text { color: var(--redT); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.textbtn { display: block; width: 100%; min-height: 48px; border: 0; border-top: 1px solid var(--sep); background: transparent; font-size: calc(17px * var(--s)); padding: 0 16px; text-align: left; color: var(--accentT); }
.textbtn.danger { color: var(--redT); }
form .textbtn, .modal .textbtn { border-top: 0; }
.minibtn { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 0; font-weight: 600; font-size: calc(15px * var(--s)); flex: none; }
.minibtn.ok { background: var(--green); color: #fff; }
.minibtn.no { background: var(--fill); color: var(--redT); }
.minibtn.gray { background: var(--fill); color: var(--accentT); }
.nudge { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 0; background: var(--blueTint); color: var(--accentT); font-weight: 600; font-size: calc(14px * var(--s)); display: flex; align-items: center; gap: 4px; flex: none; }
.nudge:disabled { opacity: .55; cursor: default; }

.scrim { position: fixed; inset: 0; border: 0; background: var(--scrim); padding: 0; z-index: 40; animation: fade .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--card); border-radius: 20px 20px 0 0; padding: 12px 16px max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; max-height: 92vh; overflow-y: auto; animation: up .24s ease-out; }
.sheet .btn { flex: none; }
.wide .sheet, .widelayout .sheet { left: 50%; right: auto; top: 50%; bottom: auto; width: 480px; transform: translate(-50%, -50%); border-radius: 20px; padding: 22px; animation-name: fade; }
.grab { width: 36px; height: 5px; border-radius: 3px; background: var(--sep); align-self: center; }
.sheet h2 { margin: 4px 0 0; font-size: calc(22px * var(--s)); font-weight: 700; }
.sheet p { margin: 0; color: var(--label2); }
.reason { width: 100%; min-height: 100px; border-radius: 12px; border: 1.5px solid var(--sep); background: var(--bg); padding: 12px; font-size: calc(17px * var(--s)); resize: none; outline: none; color: var(--label); }
.reason:focus { border-color: var(--accent); }
.req { font-size: calc(13px * var(--s)); color: var(--label2); }
.req.warn { color: var(--redT); font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.toast { position: fixed; z-index: 60; left: 16px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; background: #2C2C2E; color: #fff; border-radius: 14px; padding: 6px 8px 6px 16px; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.35); font-size: calc(15px * var(--s)); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: none; pointer-events: auto; }
html:not(.hastabbar):not(.widelayout) .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
html.notabbar-actions .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
.widelayout .toast { left: auto; right: 24px; bottom: 24px; width: 440px; }
.undo { min-height: 44px; padding: 0 14px; border: 0; background: transparent; color: #7DB7FF; font-weight: 700; font-size: calc(16px * var(--s)); flex: none; }

.paper { background: var(--card); border-radius: 16px; padding: 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.rno { font-size: calc(13px * var(--s)); letter-spacing: .6px; color: var(--label2); font-weight: 600; }
.rtitle { font-size: calc(22px * var(--s)); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.stamp { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 15px; font-weight: 700; font-size: calc(14px * var(--s)); }
.stamp.approved { background: var(--greenTint); color: var(--greenT); }
.stamp.declined { background: var(--redTint); color: var(--redT); }
.stamp.mixed { background: var(--orangeTint); color: var(--orangeT); }
.tear { height: 0; border-top: 2px dashed var(--sep); }
.rkv { display: flex; justify-content: space-between; gap: 16px; }
.lockline { display: flex; gap: 8px; align-items: flex-start; font-size: calc(13px * var(--s)); color: var(--label2); }

.av { width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 700; font-size: calc(16px * var(--s)); display: flex; align-items: center; justify-content: center; flex: none; }
.av.mini { width: 36px; height: 36px; font-size: 15px; }
.av.big { width: 56px; height: 56px; font-size: calc(22px * var(--s)); }
.c-blue { background: #0A66E0; } .c-green { background: #1F7A3A; } .c-purple { background: #6B3FC4; } .c-orange { background: #B54D00; } .c-pink { background: #C2185B; } .c-teal { background: #00707A; }
.swatches { display: flex; gap: 10px; padding: 8px 16px 14px; flex-wrap: wrap; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 0; color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; }
.swatch.on { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--label); }
.tip { display: flex; gap: 12px; padding: 14px 16px; align-items: flex-start; color: var(--accentT); }
.tip p { margin: 0; font-size: calc(15px * var(--s)); line-height: 1.4; color: var(--label); }
.sample { margin: 0; padding: 0 16px 14px; color: var(--label2); }
.joinrow { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--sep); flex-wrap: wrap; }
.joinrow.first { border-top: 0; }
.joinrow .grow { min-width: 120px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--blueTint); color: var(--accentT); }
.banner .title { color: var(--label); white-space: normal; }
.banner .meta { color: var(--label); }
.banner.warnb { background: var(--redTint); color: var(--redT); }

.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; min-height: 100%; }
.center.muted { color: var(--label2); }
.center.pad { max-width: 520px; margin: 0 auto; }

/* sign in */
.authwrap { flex: 1; overflow-y: auto; display: flex; align-items: flex-start; justify-content: center; padding: calc(40px + env(safe-area-inset-top)) 16px 32px; }
.authcard { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; margin: auto 0; }
.brandmark { display: flex; align-items: center; gap: 14px; font-size: calc(34px * var(--s)); font-weight: 800; letter-spacing: .2px; }
.lede { margin: 0; color: var(--label2); font-size: calc(17px * var(--s)); line-height: 1.4; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--label2); font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--sep); }

/* welcome popup */
.backdrop { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 30%, var(--blueTint), var(--bg) 70%); }
.modalwrap { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); background: var(--scrim); animation: fade .25s; }
.modal { width: 100%; max-width: 460px; max-height: 100%; overflow-y: auto; background: var(--bg); border-radius: 22px; padding: 22px 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.35); animation: up .3s ease-out; }
.modal .card { background: var(--card); }
.modal-head { display: flex; justify-content: center; }
.mtitle { margin: 0; text-align: center; font-size: calc(26px * var(--s)); font-weight: 800; line-height: 1.15; }
.mtext { margin: 0; text-align: center; color: var(--label2); line-height: 1.45; }
.choices { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.choice { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; min-height: 84px; border: 1.5px solid var(--sep); border-radius: 16px; background: var(--card); text-align: left; }
.choice:active { border-color: var(--accent); }
.choice .title { white-space: normal; }
.mbar { display: flex; align-items: center; justify-content: space-between; margin: -8px -8px 0; }
.bigcode { text-align: center; font-size: calc(40px * var(--s)); font-weight: 800; letter-spacing: 6px; padding: 18px; border-radius: 16px; background: var(--card); font-variant-numeric: tabular-nums; }
.spin-slow .ic { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* bold text + reduce motion */
.boldtext .meta, .boldtext .foot, .boldtext .k, .boldtext .cap, .boldtext .input, .boldtext .note, .boldtext .small, .boldtext .lbl, .boldtext p, .boldtext .seg button, .boldtext .chip, .boldtext .tab, .boldtext .navi, .boldtext .reason, .boldtext .dfrom, .boldtext .req, .boldtext .frow { font-weight: 600; }
.boldtext .title, .boldtext .navtitle, .boldtext .v, .boldtext .seg button.on { font-weight: 700; }
.rm *, .rm *::before, .rm *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* print a receipt as PDF */
@media print {
  html.printing body * { visibility: hidden !important; }
  html.printing #receipt-paper, html.printing #receipt-paper * { visibility: visible !important; color: #000 !important; }
  html.printing #receipt-paper { position: fixed; left: 0; top: 0; width: 100%; background: #fff !important; border: 1px solid #999; }
  .noprint { display: none !important; }
}
