/* ============ base ============ */
:root {
  --brand: #0f766e;
  --brand-d: #115e59;
  --brand-l: #ccfbf1;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f3f5f7;
  --card: #ffffff;
  --green: #15803d; --green-l: #dcfce7;
  --amber: #b45309; --amber-l: #fef3c7;
  --red: #b91c1c;   --red-l: #fee2e2;
  --blue: #1d4ed8;  --blue-l: #dbeafe;
  --grey-l: #f1f5f9;
  --radius: 12px;
  --drawer-w: 264px;
  --topbar-h: 56px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Noto Sans SC", "Noto Sans TC", sans-serif;
  font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: Consolas, "Noto Sans SC", monospace; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }
.c { text-align: center; }
.r { text-align: right; }

/* ============ shell / drawers ============ */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar-h);
  display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.topbar-title { flex: 1; font-weight: 600; font-size: 17px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dev-badge { font-size: 11px; font-weight: 700; background: var(--red); color: #fff; padding: 2px 8px; border-radius: 99px; }
.app-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 16px 16px 96px; }
.bare-main { min-height: 100vh; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; color: var(--ink);
}
.icon-btn:hover { background: var(--grey-l); }
.icon-btn.danger { color: var(--red); }

.drawer {
  position: fixed; top: 0; bottom: 0; width: var(--drawer-w); z-index: 40;
  background: #0f2e2c; color: #e6f4f1; display: flex; flex-direction: column;
  transition: transform .22s ease; overflow-y: auto;
}
.drawer-left { left: 0; transform: translateX(-100%); }
.drawer-right { right: 0; transform: translateX(100%); background: #1e293b; }
.drawer.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.35); }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 30; display: none; }
body.drawer-open .drawer-backdrop { display: block; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 12px 12px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-icon { font-size: 22px; color: #5eead4; }
.brand { flex: 1; font-weight: 700; line-height: 1.2; }
.brand small { display: block; font-weight: 400; opacity: .7; font-size: 12px; }
.drawer .icon-btn { color: #e6f4f1; }
.drawer .icon-btn:hover { background: rgba(255,255,255,.08); }
.drawer-user { display: flex; gap: 10px; align-items: center; padding: 12px 16px; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.drawer-user i { font-size: 26px; opacity: .8; }
.drawer-user small { display: block; opacity: .65; }
.drawer-nav { display: flex; flex-direction: column; padding: 8px; gap: 2px; }
.drawer-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: inherit; }
.drawer-nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.drawer-nav a.active { background: var(--brand); color: #fff; }
.drawer-nav .nav-back { margin-top: 12px; opacity: .75; }

/* desktop: pin drawers */
@media (min-width: 1100px) {
  .layout-student .drawer-left, .layout-admin .drawer-left { transform: none; box-shadow: none; }
  .layout-student .app-shell, .layout-admin .app-shell { margin-left: var(--drawer-w); }
  .layout-student .topbar [data-drawer-open='left'], .layout-admin .topbar [data-drawer-open='left'], .drawer-left .drawer-x { display: none; }
}
@media (min-width: 1440px) {
  .has-right .drawer-right { transform: none; box-shadow: none; }
  .has-right .app-shell { margin-right: var(--drawer-w); }
  .has-right .topbar [data-drawer-open='right'], .drawer-right .drawer-x { display: none; }
}

/* ============ components ============ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.card-h { font-size: 16px; font-weight: 600; margin-bottom: 12px; display: flex; gap: 8px; align-items: center; }
.card-h i { color: var(--brand); }
.card-h-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.card-h-row .card-h { margin-bottom: 0; }
.page-h { font-size: 22px; margin: 4px 0 16px; display: flex; gap: 10px; align-items: center; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; }
.page-head h1 { font-size: 22px; display: flex; gap: 10px; align-items: center; }
.crumb { font-size: 13px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  font-weight: 500; cursor: pointer; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--grey-l); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-d); }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #166534; }
.btn-danger { background: #fff; border-color: #fecaca; color: var(--red); }
.btn-danger:hover { background: var(--red-l); }
.btn-warn { background: #fff; border-color: #fde68a; color: var(--amber); }
.btn-warn:hover { background: var(--amber-l); }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.busy { opacity: .6; pointer-events: none; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.action-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--grey-l); color: var(--muted); white-space: nowrap; }
.b-green, .st-paid { background: var(--green-l); color: var(--green); }
.b-amber, .st-unpaid { background: var(--amber-l); color: var(--amber); }
.b-red { background: var(--red-l); color: var(--red); }
.b-blue { background: var(--blue-l); color: var(--blue); }
.b-grey, .st-none { background: var(--grey-l); color: var(--muted); }

.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 6px 12px; margin: 0 0 12px; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; word-break: break-word; }
.kv-lg dd { font-size: 16px; font-weight: 500; }
.kv-sm { font-size: 13px; }
.kv-sm dt { font-size: 13px; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; background: var(--amber-l); color: #78350f; margin-bottom: 12px; font-size: 14px; }
.notice-ok { background: var(--green-l); color: #14532d; }
.empty-state { text-align: center; padding: 36px 16px; }
.empty-state > i { font-size: 40px; color: var(--muted); margin-bottom: 10px; }
.empty-state p { color: var(--muted); }

/* forms */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 500; }
.field input[type=text], .field input[type=password], .field input[type=number], .field input[type=date],
.field input[type=datetime-local], .field input[type=search], .field select, .field textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; min-height: 40px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand-l); border-color: var(--brand); }
.field input[type=file] { padding: 8px 0; }
.field .readonly { background: var(--grey-l); font-weight: 700; }
.field.check { flex-direction: row; align-items: center; gap: 8px; }
.field.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.field.check > span { font-size: 14px; color: var(--ink); }
.input-icon { position: relative; }
.input-icon input { padding-right: 44px !important; }
.input-icon .icon-btn { position: absolute; right: 2px; top: 1px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } .span-2 { grid-column: 1 / -1; } }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.form-msg { color: var(--red); font-size: 14px; min-height: 0; margin-bottom: 8px; }
.form-msg:empty { display: none; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; align-items: end; }
.hint { font-size: 13px; background: var(--grey-l); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; color: #374151; }
.danger-zone { border-color: #fecaca; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap.tall { max-height: 560px; overflow-y: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); background: #fafafa; position: sticky; top: 0; }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th.c, .tbl td.c { text-align: center; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl tfoot td { border-bottom: 0; background: #fafafa; }
.tbl tr.group td { background: var(--brand-l); font-weight: 700; color: var(--brand-d); }
.tbl .row-muted td { color: var(--muted); }
.tbl-click tbody tr { cursor: pointer; }
.tbl-click tbody tr:hover td { background: #f8fafc; }
.tbl .t { font-weight: 500; }
.result-summary { margin: 0 0 10px; font-size: 14px; color: var(--muted); }

/* tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: -4px 0 14px; }
.tab { border: 0; background: none; padding: 10px 14px; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; color: var(--muted); font-weight: 500; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab .count { font-size: 11px; background: var(--grey-l); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* pager */
.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.pager a, .pager span, .pager button { min-width: 38px; height: 38px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); }
.pager .cur { background: var(--brand); color: #fff; border-color: var(--brand); }

/* modal */
dialog.modal { border: 0; border-radius: 16px; padding: 20px; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.modal::backdrop { background: rgba(15,23,42,.5); }
dialog.modal h2 { font-size: 18px; margin-bottom: 14px; }

/* toast */
#toast-host { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 24px)); }
.toast { background: #111827; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 14px; animation: toast-in .2s ease; }
.toast.err { background: var(--red); }
.toast.ok { background: var(--green); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* sticky bottom action bar */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(0,0,0,.06);
}
.sticky-bar .sum { font-size: 15px; }
@media (min-width: 1100px) { .layout-student .sticky-bar, .layout-admin .sticky-bar { left: var(--drawer-w); } }
@media (min-width: 1440px) { .has-right .sticky-bar { right: var(--drawer-w); } }

/* ============ login ============ */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: linear-gradient(160deg, #0f766e 0%, #134e4a 55%, #0f172a 100%); }
.login-card { width: 100%; max-width: 400px; padding: 28px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-brand { text-align: center; margin-bottom: 20px; }
.login-brand i { font-size: 40px; color: var(--brand); }
.login-brand h1 { font-size: 20px; margin-top: 8px; }
.login-brand p { margin: 2px 0 0; color: var(--muted); }
.small-link { display: block; text-align: center; margin-top: 16px; font-size: 14px; }

/* ============ student ============ */
.campaign-cards { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 800px) { .campaign-cards { grid-template-columns: 1fr 1fr; } }
.campaign-card.is-default { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.cc-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cc-top h2 { font-size: 18px; }
.cc-total { text-align: right; font-weight: 700; font-size: 18px; color: var(--brand-d); }
.cc-total small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.campaign-head { margin-bottom: 12px; }
.campaign-head h1 { font-size: 21px; margin: 6px 0 4px; }
.back-link { font-size: 14px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 16px; }
.step { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 6px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-weight: 500; font-size: 14px; }
.step:hover { text-decoration: none; background: var(--grey-l); }
.step.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.step.locked { opacity: .55; }
.step-no { width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.08); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.step.active .step-no { background: rgba(255,255,255,.25); }
@media (max-width: 480px) { .step i { display: none; } .step { font-size: 13px; } }

.order-list { display: flex; flex-direction: column; }
.ol-subject { font-weight: 700; font-size: 13px; color: var(--brand-d); background: var(--brand-l); padding: 5px 10px; border-radius: 8px; margin: 10px 0 4px; }
.ol-row { display: grid; grid-template-columns: 28px 28px 1fr auto; grid-template-areas: "chk no main price" "chk no main qty"; gap: 2px 8px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ol-row .pick { grid-area: chk; width: 20px; height: 20px; accent-color: var(--brand); }
.ol-no { grid-area: no; color: var(--muted); font-size: 13px; text-align: center; }
.ol-main { grid-area: main; display: flex; flex-direction: column; }
.ol-title { font-weight: 500; }
.ol-pub { color: var(--muted); font-size: 13px; }
.ol-price { grid-area: price; text-align: right; font-weight: 600; white-space: nowrap; }
.ol-qty { grid-area: qty; text-align: right; }
.ol-qty .qty { width: 70px; padding: 4px 6px; border: 1px solid #d1d5db; border-radius: 8px; text-align: center; }
.qty-fixed { color: var(--muted); font-size: 13px; }
.ol-row.on { background: #f0fdfa; }
.ol-row.na { cursor: default; opacity: .6; }
@media (min-width: 700px) {
  .ol-row { grid-template-columns: 28px 36px 1fr 120px 90px; grid-template-areas: "chk no main price qty"; }
}

.pay-to .amount { font-size: 22px; font-weight: 700; color: var(--brand-d); }
.file-preview img { max-width: 100%; max-height: 260px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 12px; }
.file-preview .pdf { padding: 10px; background: var(--grey-l); border-radius: 10px; margin-bottom: 12px; }

.profile-card { max-width: 560px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--brand-l); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 32px; margin-bottom: 16px; }

.stmt-scroller { overflow-x: auto; background: #e5e7eb; border-radius: 10px; padding: 12px; }
.stmt-page { width: 210mm; min-height: 297mm; margin: 0 auto; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.12); }

.proof-view { text-align: center; }
.proof-img { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.proof-pdf { width: 100%; height: 80vh; border: 1px solid var(--line); border-radius: 10px; }

/* ============ admin ============ */
.list { display: flex; flex-direction: column; }
.list-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: inherit; }
.list-card:hover { text-decoration: none; border-color: var(--brand); }
.lc-main { flex: 1; min-width: 200px; }
.lc-title { font-weight: 600; font-size: 16px; }
.lc-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; gap: 12px; align-items: center; }
.tile > i { font-size: 22px; color: var(--brand); width: 40px; height: 40px; border-radius: 10px; background: var(--brand-l); display: flex; align-items: center; justify-content: center; }
.tile-v { font-size: 22px; font-weight: 700; }
.tile-l { font-size: 13px; color: var(--muted); }
.tile-s { font-size: 12px; color: var(--brand-d); font-weight: 600; }
.group-card .card-h { font-size: 15px; }
.pay-list { display: flex; flex-direction: column; }
.pay-card { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 900px) { .pay-card { grid-template-columns: 1.2fr 1fr auto; align-items: center; } }
.pc-amt { font-size: 18px; font-weight: 700; color: var(--brand-d); }
.pc-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.pay-card .kv { margin: 0; }

/* ============ declaration & tags ============ */
.steps-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 560px) { .steps-4 .step-text { font-size: 12px; } .steps-4 .step { flex-direction: column; gap: 2px; padding: 8px 4px; } }
.decl-line { margin-top: 6px; font-size: 14px; color: var(--brand-d); font-weight: 600; }
.declare-form .phase { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 8px; margin: 0 0 12px; }
.declare-form legend { font-weight: 700; padding: 0 6px; display: flex; align-items: center; gap: 8px; }
.phase-no { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.choice { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid #d1d5db; border-radius: 10px; cursor: pointer; background: #fff; }
.choice input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
.choice:has(input:checked) { border-color: var(--brand); background: #f0fdfa; font-weight: 600; }
.field.check.ack { align-items: flex-start; background: var(--amber-l); padding: 10px 12px; border-radius: 10px; }
.field.check.ack input { margin-top: 3px; flex: none; }
.tag-group { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; }
.tag-group legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 4px; }
.tag-group .choice { padding: 5px 10px; font-size: 14px; }
.chip { display: inline-block; font-size: 11px; font-weight: 600; background: var(--grey-l); color: #374151; border-radius: 6px; padding: 1px 6px; margin: 1px 2px 1px 0; }
.chip-all { background: var(--brand-l); color: var(--brand-d); }
dialog.modal.modal-wide { width: min(820px, calc(100vw - 24px)); }
.other-books summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.other-books[open] summary { margin-bottom: 10px; }
.other-list.locked { opacity: .45; pointer-events: none; }
.section-h { font-size: 16px; margin: 4px 0 10px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }

/* the hidden attribute must win over component display rules */
[hidden] { display: none !important; }

/* reports */
.tbl-report tr.zero td { color: var(--muted); }
.tbl-report td:nth-child(3) { min-width: 220px; }
a.tab { text-decoration: none; display: inline-block; }

/* ============ confirmation box (App.confirm) ============ */
dialog.app-confirm { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; }
dialog.app-confirm::backdrop { background: rgba(15,23,42,.5); }
.app-confirm-box { background: #fff; border-radius: 16px; padding: 22px 20px 18px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: confirm-in .15s ease; }
.app-confirm-title { font-size: 18px; margin: 0 0 8px; }
.app-confirm-msg { margin: 0 0 20px; font-size: 15px; line-height: 1.55; white-space: pre-line; word-break: break-word; }
.app-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.app-confirm-actions .btn { min-width: 96px; min-height: 44px; }
.btn-danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger-solid:hover { background: #991b1b; }
@keyframes confirm-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
/* phones: bottom sheet with large, equal-width buttons */
@media (max-width: 560px) {
  dialog.app-confirm { margin: auto 0 0; width: 100%; }
  .app-confirm-box { width: 100%; border-radius: 18px 18px 0 0; padding: 22px 18px calc(16px + env(safe-area-inset-bottom)); animation: sheet-in .2s ease; }
  .app-confirm-actions .btn { flex: 1; min-height: 48px; font-size: 16px; }
}
@keyframes sheet-in { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
