/* 舞课表 —— 视觉取自舞蹈教室地板上标站位的彩色胶带 */

@font-face {
  font-family: "Shoulders";
  src: url("fonts/big-shoulders-display-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Shoulders";
  src: url("fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --bg: #EFEEF4;          /* 练功房镜面的冷灰 */
  --surface: #FFFFFF;
  --surface-2: #E6E4ED;
  --raised: #FFFFFF;
  --ink: #211A2C;         /* 地胶的深茄色 */
  --muted: #6F6880;
  --faint: #A39DB0;
  --line: #DCD9E4;
  --hero-bg: #211A2C;
  --hero-ink: #FFFFFF;
  --hero-muted: rgba(255, 255, 255, 0.68);
  --primary: #E5336C;
  --primary-press: #C92359;
  --primary-ink: #FFFFFF;
  --danger: #D52F49;
  --focus: #E5336C;

  /* 胶带色：每家舞社自动分到一种 */
  --tape-0: #EF4677;
  --tape-1: #F3B81B;
  --tape-2: #1FA9C9;
  --tape-3: #2EAF6C;
  --tape-4: #FA7F33;
  --tape-5: #7C5CE6;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-num: "Shoulders", "DIN Condensed", "Arial Narrow", var(--font);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --gutter: 20px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16121E;
    --surface: #221C2D;
    --surface-2: #2A2337;
    --raised: #433A58;
    --ink: #F1EDF7;
    --muted: #A49CB5;
    --faint: #6F6782;
    --line: #322A40;
    --hero-bg: #2E2642;
    --hero-muted: rgba(255, 255, 255, 0.66);
    --primary: #FF4F86;
    --primary-press: #E83A72;
    --danger: #FF5A6E;
    --focus: #FF4F86;
    color-scheme: dark;
  }
}

.tc-0 { --tape: var(--tape-0); }
.tc-1 { --tape: var(--tape-1); }
.tc-2 { --tape: var(--tape-2); }
.tc-3 { --tape: var(--tape-3); }
.tc-4 { --tape: var(--tape-4); }
.tc-5 { --tape: var(--tape-5); }

/* ------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

html.locked, html.locked body { overflow: hidden; }

h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.noscript { padding: 40px var(--gutter); }

svg.i {
  width: 1em; height: 1em;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:active { background: var(--primary-press); }
.btn-quiet { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }

.link-btn {
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn.danger { color: var(--danger); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-right: -10px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 24px;
}
.icon-btn:active { background: var(--surface-2); }

/* ------------------------------------------------------------ gate (设置密码 / 登录) */

.gate {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--safe-top) + 12vh) var(--gutter) calc(var(--safe-bottom) + 32px);
}

.gate-mark {
  position: relative;
  width: 92px; height: 92px;
  margin-bottom: 28px;
}
.gate-mark .strip {
  position: absolute;
  left: -6px; top: 34px;
  width: 104px; height: 24px;
  background: var(--tape);
  clip-path: polygon(0 0, 100% 0, 96% 20%, 100% 40%, 96% 60%, 100% 80%, 96% 100%, 0 100%, 4% 80%, 0 60%, 4% 40%, 0 20%);
}
.gate-mark .strip:first-child { transform: rotate(38deg); }
.gate-mark .strip:last-child { transform: rotate(-38deg); opacity: .94; }

.gate-title {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
}
.gate-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 17px;
}
.gate-form { margin-top: 32px; display: grid; gap: 14px; }
.gate-note { color: var(--muted); font-size: 14px; }
.gate-text { margin-top: 18px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.gate-retry { margin-top: 24px; }

.field { display: grid; gap: 6px; }
.field-label { font-size: 14px; color: var(--muted); }
.field input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-size: 17px;
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus { outline: none; border-color: var(--primary); }

.form-error {
  color: var(--danger);
  font-size: 15px;
}
.form-error:empty { display: none; }

/* ------------------------------------------------------------ main shell */

.shell {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 10px) var(--gutter) calc(var(--safe-bottom) + 112px);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
}
.top-date { color: var(--muted); font-size: 15px; }

.tip {
  position: relative;
  margin-top: 8px;
  padding: 14px 44px 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  font-size: 15px;
  line-height: 1.6;
}
.tip strong { font-weight: 600; }
.tip .icon-btn {
  position: absolute;
  top: 4px; right: 4px;
  width: 36px; height: 36px;
  margin: 0;
  font-size: 18px;
  color: var(--muted);
}

/* ------------------------------------------------------------ hero：下一节课 */

.hero {
  position: relative;
  margin-top: 26px;
  padding: 30px 22px 22px;
  border-radius: 24px;
  background: var(--hero-bg);
  color: var(--hero-ink);
  cursor: pointer;
  transition: transform .12s;
}
.hero:active { transform: scale(.985); }

/* 贴在卡片上沿的一截胶带 */
.hero-tape, .detail-tape {
  position: absolute;
  top: -11px; left: 18px;
  width: 92px; height: 22px;
  background: var(--tape);
  transform: rotate(-4deg);
  clip-path: polygon(0 0, 100% 0, 97% 25%, 100% 50%, 97% 75%, 100% 100%, 0 100%, 3% 75%, 0 50%, 3% 25%);
}

.hero-when {
  font-size: 15px;
  color: var(--hero-muted);
}
.hero-when .live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hero-ink);
  font-weight: 600;
}
.hero-when .live::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--tape);
}

.hero-time {
  margin-top: 6px;
  font-family: var(--font-num);
  font-size: min(64px, calc((100vw - 84px) / 4.9));
  font-weight: 800;
  line-height: .95;
  white-space: nowrap;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}
.hero-time .to { color: var(--hero-muted); font-weight: 700; padding: 0 .06em; }

.hero-title {
  margin-top: 14px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}
.hero-studio {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 16px;
  color: var(--hero-ink);
}
.swatch {
  width: 10px; height: 10px;
  flex: none;
  border-radius: 3px;
  background: var(--tape);
}
.hero-meta {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: 15px;
  color: var(--hero-muted);
}
.hero-meta li { display: flex; align-items: flex-start; gap: 8px; }
.hero-meta .i { margin-top: .25em; }

/* ------------------------------------------------------------ segmented */

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 28px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-2);
}
.seg button {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}
.seg button[aria-selected="true"] {
  background: var(--raised);
  color: var(--ink);
}
.seg .count {
  margin-left: 4px;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 17px;
}

/* ------------------------------------------------------------ list */

.list { margin-top: 8px; }

.month-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 26px 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.month-head span:last-child { color: var(--muted); font-weight: 400; }

.day {
  display: grid;
  grid-template-columns: 52px 1fr;
  column-gap: 14px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--line);
}
.list > .day:first-child { border-top: 0; }
.month-head + .day { border-top: 0; }

.day-date {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 2px;
}
.day-month { font-size: 12px; color: var(--muted); line-height: 1.2; margin-bottom: 2px; }
.day-num {
  font-family: var(--font-num);
  font-size: 40px;
  font-weight: 800;
  line-height: .9;
}
.day-week { margin-top: 4px; font-size: 13px; color: var(--muted); }
.day-week.near { color: var(--primary); font-weight: 600; }

.entry {
  position: relative;
  display: block;
  margin: 0 -10px 12px -10px;
  padding: 10px 10px 10px 24px;
  border-radius: 14px;
  cursor: pointer;
}
.entry:active { background: var(--surface-2); }
.entry::before {
  content: "";
  position: absolute;
  left: 10px; top: 14px; bottom: 14px;
  width: 4px;
  border-radius: 2px;
  background: var(--tape);
}
.entry-time {
  font-family: var(--font-num);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}
.entry-title { margin-top: 4px; font-size: 17px; font-weight: 600; line-height: 1.4; }
.entry-sub { margin-top: 2px; font-size: 15px; color: var(--muted); }
.entry-sub span + span::before { content: "／"; padding: 0 4px; color: var(--faint); }
.entry-loc {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}
.entry-loc .i { margin-top: .28em; font-size: 13px; }

.is-history .day-num { color: var(--muted); }
.is-history .entry::before { opacity: .55; }

.list-end {
  padding: 18px 0 0 66px;
  color: var(--faint);
  font-size: 14px;
}

.empty {
  margin-top: 26px;
  padding: 34px 24px;
  border: 1.5px dashed var(--line);
  border-radius: 24px;
}
.empty-title { font-size: 20px; font-weight: 700; }
.empty-text { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.7; }

/* ------------------------------------------------------------ add button */

.fab-wrap {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  padding: 16px var(--gutter) calc(var(--safe-bottom) + 16px);
  background: linear-gradient(to top, var(--bg) 55%, transparent);
  pointer-events: none;
  z-index: 5;
}
.fab {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 28px;
  border: 0;
  border-radius: 27px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 17px;
  font-weight: 600;
  box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--primary) 70%, transparent);
  transition: transform .1s, background-color .15s;
}
.fab .i { font-size: 20px; stroke-width: 2.2; }
.fab:active { transform: scale(.97); background: var(--primary-press); }

/* ------------------------------------------------------------ sheets */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(16, 12, 22, .42);
  opacity: 0;
  transition: opacity .28s;
  z-index: 20;
}
.scrim.open { opacity: 1; }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  top: calc(var(--safe-top) + 12px);
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-radius: 22px 22px 0 0;
  background: var(--bg);
  transform: translateY(105%);
  transition: transform .34s cubic-bezier(.2, .8, .2, 1);
  z-index: 21;
}
.sheet.fit { top: auto; max-height: calc(100% - var(--safe-top) - 12px); }
.sheet.open { transform: translateY(0); }

.sheet-bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 58px;
  padding: 6px 8px 0;
  flex: none;
}
.sheet-bar::before {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  width: 36px; height: 5px;
  margin-left: -18px;
  border-radius: 3px;
  background: var(--line);
}
.sheet-bar h2 { font-size: 17px; font-weight: 600; text-align: center; }
.bar-btn {
  justify-self: start;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 17px;
}
.bar-btn.right { justify-self: end; }
.bar-btn.primary { color: var(--primary); font-weight: 600; }
.bar-btn[disabled] { opacity: .5; }

.sheet-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px calc(var(--safe-bottom) + 28px);
}

/* ------------------------------------------------------------ form */

.form-hint {
  margin: 4px 4px 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 12%, var(--bg));
  font-size: 15px;
}

.group {
  margin-bottom: 14px;
  border-radius: 16px;
  background: var(--surface);
}
.row {
  padding: 12px 16px 14px;
}
.row + .row { border-top: 1px solid var(--line); }
.row > label, .row > .label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--muted);
}
.row .req { color: var(--primary); margin-left: 2px; }

.row input, .row textarea, .row select {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 17px;
  -webkit-appearance: none;
  appearance: none;
}
.row input:focus, .row textarea:focus, .row select:focus { outline: none; }
.row:focus-within > label { color: var(--primary); }
.row textarea { resize: none; line-height: 1.5; min-height: 64px; }
.row input::placeholder, .row textarea::placeholder { color: var(--faint); }

/* iOS 的日期、时间输入框 */
input[type="date"], input[type="time"] {
  min-height: 40px;
  text-align: left;
}
input::-webkit-date-and-time-value { text-align: left; }
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { opacity: .45; }

.date-line { display: flex; align-items: center; gap: 12px; }
.date-line input { flex: 1; min-width: 0; }
.weekday {
  flex: none;
  min-width: 52px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.weekday:empty { display: none; }

.time-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}
.time-line .to { color: var(--muted); font-size: 15px; }
.time-line input {
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  font-family: var(--font-num);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.row.has-error > label { color: var(--danger); }
.err { margin-top: 4px; color: var(--danger); font-size: 14px; }
.err:empty { display: none; }
.auto-note { margin-top: 2px; color: var(--muted); font-size: 13px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.chips:empty { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--bg);
  font-size: 15px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip:active { background: var(--surface-2); }
.chip .swatch { width: 8px; height: 8px; border-radius: 2px; }

.form-foot { margin: 2px 4px 0; color: var(--muted); font-size: 13px; }

/* ------------------------------------------------------------ detail */

.detail {
  position: relative;
  margin-top: 18px;
  padding: 28px 20px 8px;
  border-radius: 20px;
  background: var(--surface);
}
.detail-when { color: var(--muted); font-size: 15px; }
.detail-time {
  margin-top: 4px;
  font-family: var(--font-num);
  font-size: min(52px, calc((100vw - 72px) / 4.9));
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.detail-time .to { color: var(--faint); font-weight: 700; padding: 0 .06em; }
.detail-title { margin-top: 12px; font-size: 21px; font-weight: 700; line-height: 1.35; }

.detail-list { margin-top: 14px; }
.detail-list > div {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.detail-list dt { color: var(--muted); font-size: 15px; }
.detail-list dd { font-size: 16px; word-break: break-word; white-space: pre-wrap; }
.detail-list dd .studio { display: inline-flex; align-items: center; gap: 8px; }
.map-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  color: var(--primary);
  font-size: 14px;
  text-decoration: none;
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.act {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 68px;
  padding: 10px 4px;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
}
.act .i { font-size: 22px; }
.act:active { background: var(--surface-2); }
.act.danger { color: var(--danger); }

/* ------------------------------------------------------------ settings */

.set-block { padding: 18px 16px; }
.set-title { font-size: 17px; font-weight: 700; }
.set-text { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.set-block .btn { margin-top: 16px; }
.set-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
}
.set-status::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--tape-3);
}
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.set-row label { font-size: 16px; }
.set-row select {
  width: auto;
  min-height: 40px;
  padding: 0 32px 0 12px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23887f99' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}
.set-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.set-links { display: flex; gap: 20px; margin-top: 8px; }

.list-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 0;
  background: none;
  font-size: 17px;
  text-align: left;
}
.list-btn + .list-btn { border-top: 1px solid var(--line); }
.list-btn .i { color: var(--faint); font-size: 18px; }
.list-btn.danger { color: var(--danger); }
.list-btn:active { background: var(--surface-2); }
.group > .list-btn:first-child { border-radius: 16px 16px 0 0; }
.group > .list-btn:last-child { border-radius: 0 0 16px 16px; }

.foot-note { margin: 18px 4px 0; color: var(--faint); font-size: 13px; text-align: center; }

/* ------------------------------------------------------------ dialog */

.dialog-scrim {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 12, 22, .48);
  opacity: 0;
  transition: opacity .2s;
  z-index: 40;
}
.dialog-scrim.open { opacity: 1; }
.dialog {
  width: 100%;
  max-width: 340px;
  padding: 24px 20px 18px;
  border-radius: 22px;
  background: var(--surface);
  transform: scale(.94);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}
.dialog-scrim.open .dialog { transform: scale(1); }
.dialog h3 { font-size: 19px; font-weight: 700; line-height: 1.4; }
.dialog p { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.dialog-actions .btn { min-height: 48px; padding: 0 12px; font-size: 16px; }

/* ------------------------------------------------------------ toast */

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 92px);
  width: max-content;
  max-width: calc(100vw - 48px);
  padding: 12px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  z-index: 50;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast:empty { display: none; }

/* ------------------------------------------------------------ loading */

.boot {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
}
.boot span {
  width: 64px; height: 18px;
  background: var(--tape-0);
  clip-path: polygon(0 0, 100% 0, 96% 25%, 100% 50%, 96% 75%, 100% 100%, 0 100%, 4% 75%, 0 50%, 4% 25%);
  animation: pulse 1s ease-in-out infinite alternate;
}
@keyframes pulse { from { opacity: .35; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0s !important;
    animation: none !important;
  }
}

@media (min-width: 600px) {
  :root { --gutter: 28px; }
  .sheet { bottom: 24px; top: calc(var(--safe-top) + 32px); border-radius: 22px; }
  .sheet.fit { top: auto; }
}
