:root {
  --bg: #F2F2F7;
  --bg-outer: #E5E5EA;
  --card: #ffffff;
  --accent: #5856D6;
  --accent-tint: rgba(88,86,214,.12);
  --text: #000;
  --secondary: rgba(60,60,67,.6);
  --tertiary: rgba(60,60,67,.3);
  --sep: .5px solid rgba(60,60,67,.29);
  --fill: rgba(118,118,128,.12);
  --red: #FF3B30;
  --green: #34C759;
  --accent-hover: #3634A3;
  --green-deep: #248A3D;
  --red-text: #C9291F;
  --press: #E5E5EA;
  --pill-bg: rgba(255,255,255,.8);
  --glass: rgba(255,255,255,.72);
  --glass-edge: rgba(255,255,255,.8);
  --glass-strong: rgba(255,255,255,.92);
  --modal-bg: rgba(255,255,255,.96);
  --seg-active: #ffffff;
  --tab-active: rgba(0,0,0,.06);
  --track: rgba(120,120,128,.16);
  --switch-off: rgba(120,120,128,.16);
  --shadow-sheet: 0 -4px 30px rgba(0,0,0,.12);
  --radius: 22px;
  --col: 560px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #000000;
  --bg-outer: #141416;
  --card: #1C1C1E;
  --accent: #7D7AFF;
  --accent-tint: rgba(125,122,255,.2);
  --text: #ffffff;
  --secondary: rgba(235,235,245,.6);
  --tertiary: rgba(235,235,245,.3);
  --sep: .5px solid rgba(84,84,88,.65);
  --fill: rgba(120,120,128,.24);
  --red: #FF453A;
  --green: #30D158;
  --green-deep: #32D74B;
  --red-text: #FF6961;
  --accent-hover: #A5A3FF;
  --press: #2C2C2E;
  --pill-bg: rgba(44,44,46,.85);
  --glass: rgba(44,44,46,.72);
  --glass-edge: rgba(255,255,255,.08);
  --glass-strong: rgba(44,44,46,.92);
  --modal-bg: rgba(44,44,46,.97);
  --seg-active: #636366;
  --tab-active: rgba(255,255,255,.1);
  --track: rgba(120,120,128,.32);
  --switch-off: rgba(120,120,128,.4);
  --shadow-sheet: 0 -4px 30px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg-outer);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, p { margin: 0; }

.secondary { color: var(--secondary); }
.small { font-size: 13px; line-height: 18px; }
.accent { color: var(--accent); }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }

/* ---------- App column ---------- */
.app {
  position: relative;
  max-width: var(--col);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
}
@media (min-width: 700px) {
  .app { box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 30px 80px rgba(0,0,0,.14); }
}

.view { display: none; padding: calc(env(safe-area-inset-top, 0px) + 36px) 0 128px; }
.view.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.logo { height: 52px; width: auto; display: block; mix-blend-mode: multiply; margin: -6px 0; }
:root[data-theme="dark"] .logo { filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }
.large-title { padding: 2px 16px 12px; }
.large-title.with-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.large-title h1 { font-size: 34px; font-weight: 700; letter-spacing: .3px; line-height: 41px; }
.large-title p { font-size: 15px; color: var(--secondary); margin-top: 2px; }

.pill-btn {
  border: none;
  background: var(--pill-bg);
  box-shadow: 0 1px 6px rgba(0,0,0,.08);
  height: 36px;
  padding: 0 16px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}
.pill-btn.solid { background: var(--accent); color: #fff; box-shadow: none; font-weight: 600; height: 34px; }
.sheet-bar .pill-btn { background: var(--fill); box-shadow: none; color: var(--text); height: 34px; }
.sheet-bar .pill-btn.solid { background: var(--accent); color: #fff; }
.round-btn {
  border: none;
  background: var(--accent);
  width: 36px; height: 36px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(88,86,214,.35);
}
.text-btn { border: none; background: none; color: var(--accent); font-size: 15px; padding: 0; }

.btn-accent {
  width: 100%;
  border: none;
  background: var(--accent);
  color: #fff;
  height: 48px;
  border-radius: 24px;
  font-size: 17px;
  font-weight: 600;
  transition: filter .15s, transform .1s;
}
.btn-accent:active { transform: scale(.98); }
.btn-accent:hover { filter: brightness(1.06); }
.btn-plain { width: 100%; border: none; background: var(--fill); height: 44px; border-radius: 22px; font-size: 16px; }
.btn-danger { flex: 1; border: none; background: var(--red); color: #fff; height: 44px; border-radius: 22px; font-size: 16px; font-weight: 600; }

/* ---------- Cards & rows ---------- */
.inset-card { margin: 0 16px; background: var(--card); border-radius: var(--radius); }
.list-card { overflow: hidden; }
.pad-card { padding: 22px 20px; }
.group-label {
  font-size: 13px;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: .2px;
  padding: 22px 32px 7px;
}
.footnote { font-size: 13px; line-height: 18px; color: var(--secondary); padding: 7px 32px 0; }

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  font-size: 17px;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
}
.row + .row, .row + form.row { border-top: var(--sep); margin-left: 16px; padding-left: 0; width: calc(100% - 16px); }
.link-row { color: var(--accent); }
.empty-card { padding: 28px 20px; text-align: center; }
.empty-title { font-size: 17px; font-weight: 600; }
.error-text { color: var(--red); font-size: 14px; margin-top: 12px; }

.danger-row {
  display: flex; align-items: center; justify-content: center;
  width: calc(100% - 32px);
  min-height: 48px;
  border: none;
  margin: 24px 16px 0;
  font-size: 17px;
  color: var(--red);
}

/* ---------- Calendar ---------- */
.cal-card { padding: 14px 8px 10px; }
.cal-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 10px 10px; }
.cal-month { font-size: 17px; font-weight: 600; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 6px; }
.cal-day { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 2px 0; cursor: pointer; background: none; border: none; }
.cal-dow { font-size: 11px; font-weight: 500; color: var(--secondary); text-transform: uppercase; }
.cal-num {
  width: 36px; height: 36px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 400;
  transition: background .2s;
}
.cal-day.today .cal-num { color: var(--red); font-weight: 600; }
.cal-day.selected .cal-num { background: var(--text); color: var(--bg); font-weight: 600; }
.cal-day.today.selected .cal-num { background: var(--red); color: #fff; }
.cal-dots { display: flex; gap: 3px; height: 5px; }
.cal-dots i { width: 5px; height: 5px; border-radius: 3px; display: block; }

/* ---------- Lists ---------- */
.list-head { display: flex; justify-content: space-between; align-items: center; padding: 24px 20px 4px; }
.list-head h2 { font-size: 22px; font-weight: 700; }

.show-row, .my-row {
  display: flex; align-items: center; gap: 12px;
  padding: 0 0 0 14px;
  width: 100%;
  background: none; border: none; text-align: left;
  transition: background .15s;
}
.show-row:active, .my-row:active, .admin-row:active { background: var(--press); }
.show-thumb {
  width: 46px; height: 46px; border-radius: 12px;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: 'New York', 'Iowan Old Style', Georgia, serif;
  font-size: 22px; font-weight: 600; flex: none;
  background-size: cover; background-position: center;
}
.show-main {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px 12px 0;
}
.show-row + .show-row .show-main, .my-row + .my-row .my-main { border-top: var(--sep); }
.show-text { flex: 1; min-width: 0; }
.show-title { font-size: 17px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.show-sub { font-size: 14px; color: var(--secondary); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: 13px; font-weight: 600; padding: 4px 9px; border-radius: 12px; white-space: nowrap; }
.badge.open { background: rgba(52,199,89,.15); color: var(--green-deep); }
.badge.full { background: var(--fill); color: var(--secondary); }
.badge.mine { background: var(--accent-tint); color: var(--accent); }
.badge.need { background: rgba(255,59,48,.12); color: #C9291F; }
.chev { flex: none; }

.group-label.day { padding-top: 14px; }

/* ---------- Profile ---------- */
.user-card { padding: 16px; display: flex; align-items: center; gap: 14px; }
.avatar-lg {
  width: 64px; height: 64px; border-radius: 32px;
  background: linear-gradient(180deg, #A5A3F0, var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 600; flex: none;
}
.user-meta { min-width: 0; flex: 1; }
.user-name { font-size: 20px; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 16px 0; }
.stat-card { background: var(--card); border-radius: 18px; padding: 12px 14px; }
.stat-num { font-size: 28px; font-weight: 700; }

.my-row { padding-left: 16px; gap: 14px; }
.my-date { width: 44px; text-align: center; flex: none; }
.my-date .dow { font-size: 12px; font-weight: 600; color: var(--red); text-transform: uppercase; }
.my-date .num { font-size: 22px; font-weight: 600; line-height: 26px; }
.my-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 11px 14px 11px 0; }
.my-row.past { opacity: .6; }

/* ---------- Admin ---------- */
.segmented { margin: 0 16px; background: var(--fill); border-radius: 9px; padding: 2px; display: flex; }
.segmented .seg {
  flex: 1; text-align: center; height: 28px; line-height: 28px;
  font-size: 13px; font-weight: 500; border: none; background: none;
  border-radius: 7px; transition: background .2s; cursor: pointer; position: relative;
}
.segmented .seg.active { background: var(--seg-active); font-weight: 600; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
.segmented label.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented label.seg:has(input:checked) { background: var(--seg-active); font-weight: 600; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
.venue-seg { margin: 0; width: 270px; max-width: 100%; }
.venue-seg .seg { font-size: 12.5px; }

.admin-pane { padding-bottom: 8px; }
.admin-row { display: block; width: 100%; text-align: left; background: none; border: none; padding: 0 0 0 16px; }
.admin-row-inner { padding: 11px 16px 11px 0; display: flex; align-items: center; gap: 12px; }
.admin-row + .admin-row .admin-row-inner { border-top: var(--sep); }
.admin-bar { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }
.admin-text { flex: 1; min-width: 0; }
.admin-line { display: flex; justify-content: space-between; gap: 8px; }
.admin-title { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-fill { font-size: 15px; font-weight: 600; white-space: nowrap; }
.admin-when { font-size: 13px; color: var(--secondary); margin: 2px 0 7px; }
.progress { height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; }
.progress > div { height: 100%; border-radius: 2px; }

.pending-row { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.pending-row + .pending-row { border-top: var(--sep); }
.pending-top { display: flex; gap: 12px; align-items: center; }
.pending-actions { display: flex; gap: 8px; }
.pending-actions button {
  flex: 1; height: 34px; border-radius: 17px; border: none;
  font-size: 15px; font-weight: 600; background: var(--fill); color: var(--text);
}
.pending-actions .approve { background: var(--accent); color: #fff; }
.pending-actions .reject { background: rgba(255,59,48,.12); color: var(--red); }
.import-note { font-size: 13px; color: var(--red-text); margin-top: 2px; }

.search {
  margin: 16px 16px 0; height: 36px; border-radius: 10px; background: var(--fill);
  display: flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--secondary);
}
.search input { border: none; background: none; outline: none; flex: 1; font-size: 17px; color: var(--text); min-width: 0; }

.staff-row { display: flex; align-items: center; gap: 12px; padding-left: 16px; }
.avatar-sm {
  width: 38px; height: 38px; border-radius: 19px; color: #fff; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600;
}
.staff-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 10px 16px 10px 0; }
.staff-row + .staff-row .staff-main { border-top: var(--sep); }
.staff-name { font-size: 17px; }
.staff-pos { font-size: 13px; color: var(--secondary); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-select {
  border: none; background: var(--fill); border-radius: 8px;
  height: 30px; padding: 0 8px; font-size: 13px; font-weight: 600; color: var(--accent);
}
.shift-count { font-size: 15px; color: var(--secondary); white-space: nowrap; }

.inline-form { gap: 10px; }
.inline-form input {
  flex: 1; min-width: 0; border: none; background: var(--fill); border-radius: 8px;
  height: 34px; padding: 0 10px; font-size: 16px; outline: none;
}
.pin-input {
  text-align: center; font-size: 22px; letter-spacing: 8px; font-weight: 700;
  width: 100%; height: 50px; border: none; background: var(--fill); border-radius: 12px;
  margin-bottom: 12px; outline: none;
}

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(calc(100% - 40px), 500px);
  height: 64px;
  border-radius: 32px;
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 8px 30px rgba(0,0,0,.12), inset 0 0 0 .5px var(--glass-edge);
  display: flex;
  padding: 4px;
  z-index: 20;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: none; border-radius: 28px; background: transparent; color: var(--text);
  transition: background .2s, color .2s;
}
.tab span { font-size: 10px; font-weight: 600; }
.tab.active { background: var(--tab-active); color: var(--accent); }

/* ---------- Sheets ---------- */
.dim {
  position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 40;
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.dim.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  top: 40px;
  width: min(100%, var(--col));
  transform: translate(-50%, 105%);
  z-index: 50;
  background: var(--bg);
  border-radius: 38px 38px 0 0;
  box-shadow: var(--shadow-sheet);
  transition: transform .42s cubic-bezier(.32,.72,0,1);
  display: flex; flex-direction: column;
}
.sheet:not(.on) { pointer-events: none; }
.sheet.on { transform: translate(-50%, 0); }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--tertiary); margin: 6px auto 0; flex: none; }
.sheet-top { display: flex; justify-content: flex-end; padding: 6px 16px 0; flex: none; }
.close-btn { width: 32px; height: 32px; border-radius: 16px; border: none; background: var(--fill); color: var(--secondary); display: flex; align-items: center; justify-content: center; }
.sheet-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 4px; flex: none; }
.sheet-title { font-size: 17px; font-weight: 600; }
.sheet-body { flex: 1; overflow-y: auto; padding: 0 0 40px; -webkit-overflow-scrolling: touch; }

.detail-head { display: flex; gap: 16px; align-items: center; padding: 0 20px 18px; }
.detail-thumb { width: 72px; height: 72px; border-radius: 18px; font-size: 34px; }
.detail-title { font-size: 24px; font-weight: 700; line-height: 28px; text-wrap: pretty; }
.detail-sub { font-size: 15px; color: var(--secondary); margin-top: 3px; }
.kv { display: flex; align-items: center; min-height: 46px; padding: 0 16px; gap: 12px; }
.kv + .kv { border-top: var(--sep); margin-left: 16px; padding-left: 0; }
.kv .k { flex: 1; font-size: 16px; color: var(--secondary); }
.kv .v { font-size: 16px; font-weight: 500; text-align: right; }
.about { padding: 14px 16px; font-size: 15px; line-height: 21px; }
.slot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.slot + .slot { border-top: var(--sep); margin-left: 16px; padding-left: 0; }
.slot-label { font-size: 17px; font-weight: 500; }
.slot-name { font-size: 13px; color: var(--secondary); margin-top: 2px; }
.slot-tag { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 12px; }
.slot-tag.open { background: rgba(52,199,89,.15); color: var(--green-deep); }
.slot-tag.filled { background: var(--fill); color: var(--secondary); }
.slot-tag.me { background: var(--accent-tint); color: var(--accent); }
.slot-bars { display: flex; gap: 3px; margin-top: 8px; }
.slot-bars i { flex: 1; max-width: 28px; height: 4px; border-radius: 2px; display: block; }
.cta-wrap { padding: 20px 16px 0; display: flex; flex-direction: column; gap: 10px; }
.cta { width: 100%; height: 50px; border: none; border-radius: 25px; font-size: 17px; font-weight: 600; transition: filter .15s, transform .1s; }
.cta:active { transform: scale(.98); }
.cta.primary { background: var(--accent); color: #fff; }
.cta.danger { background: rgba(255,59,48,.12); color: var(--red); }
.cta.full { background: var(--fill); color: var(--tertiary); cursor: default; }
.cta-note { text-align: center; font-size: 13px; color: var(--secondary); }
.manage-row { display: flex; align-items: center; min-height: 48px; padding: 0 16px; font-size: 17px; width: 100%; background: none; border: none; text-align: left; color: var(--accent); }
.manage-row + .manage-row { border-top: var(--sep); margin-left: 16px; padding-left: 0; width: calc(100% - 16px); }
.manage-row.danger { color: var(--red); }

/* form rows */
.row.field { cursor: text; }
.row.field > span { width: 96px; flex: none; font-size: 17px; }
.row.field input {
  flex: 1; min-width: 0; border: none; background: none; outline: none;
  font-size: 17px; text-align: right; color: var(--text); height: 46px;
}
.row.field input::placeholder { color: var(--tertiary); }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 16px; background: var(--switch-off); transition: background .25s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15); transition: transform .25s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(20px); }
label.row { cursor: pointer; }

/* ---------- Modals ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 70;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.bottom { align-items: flex-end; padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
.modal {
  background: var(--modal-bg); border-radius: 26px; padding: 24px 20px 20px;
  width: 100%; max-width: 340px; box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.modal h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; text-align: center; }
.modal p { text-align: center; }
.modal form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.modal input {
  border: none; background: var(--fill); border-radius: 12px; height: 46px; padding: 0 14px;
  font-size: 17px; outline: none;
}
.modal input:focus { box-shadow: 0 0 0 2px var(--accent); }
.confirm-actions { display: flex; gap: 10px; margin-top: 18px; }
.confirm-actions .btn-plain { flex: 1; }
.action-sheet { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 8px; }
.action-title, .action-options { background: var(--modal-bg); border-radius: 22px; overflow: hidden; }
.action-title { padding: 14px 16px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.action-options button {
  display: block; width: 100%; height: 54px; border: none; background: none;
  font-size: 18px; color: var(--accent);
}
.action-options button + button { border-top: var(--sep); }
.action-options button.skip { color: var(--secondary); font-weight: 600; }
.action-options button:active { background: var(--press); }

.reminder-banner {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  background: var(--glass-strong); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 6px 24px rgba(0,0,0,.14); border-radius: 22px;
  padding: 12px 16px 12px 18px; z-index: 90; display: flex; align-items: center; gap: 12px;
  max-width: min(92vw, 440px); font-size: 14px;
}
.reminder-banner .rb-close { background: none; border: none; font-size: 20px; color: var(--secondary); padding: 0; }

.toast {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  background: var(--glass-strong); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 6px 24px rgba(0,0,0,.14); border-radius: 22px;
  padding: 11px 18px; display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500; z-index: 100; max-width: 92vw; animation: toastIn .3s cubic-bezier(.32,.72,0,1);
}
.toast::before { content: ""; width: 18px; height: 18px; border-radius: 9px; flex: none; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.2l2.7 2.6L13 6.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
.toast.error::before { background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M6 6l6 6M12 6l-6 6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -16px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 380px) {
  .row.field > span { width: 80px; }
  .venue-seg { width: 220px; }
}

.theme-seg { margin: 0; width: 170px; }

/* ---------- Welcome / login ---------- */
.locked .view, .locked .tabbar { display: none !important; }
.welcome {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: flex; justify-content: center; overflow-y: auto;
  transition: opacity .45s ease;
}
.welcome.leaving { opacity: 0; pointer-events: none; }
.welcome-inner {
  width: min(100%, var(--col)); min-height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 24px;
}
.welcome-brand { display: flex; flex-direction: column; align-items: center; gap: 4px; animation: welcomeIn .7s cubic-bezier(.32,.72,0,1) backwards; }
@keyframes welcomeIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.welcome-logo { height: auto; width: min(72vw, 300px); margin: 0; }
.welcome-tag { font-size: 20px; font-weight: 600; letter-spacing: .5px; color: var(--secondary); }
.welcome-form {
  width: 100%; max-width: 340px; max-height: 0; overflow: hidden;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: max-height .6s cubic-bezier(.32,.72,0,1), opacity .5s ease .1s, transform .6s cubic-bezier(.32,.72,0,1), margin-top .6s cubic-bezier(.32,.72,0,1);
}
.welcome.ready .welcome-form { max-height: 460px; opacity: 1; transform: none; pointer-events: auto; margin-top: 28px; }
.welcome-form form { display: flex; flex-direction: column; gap: 10px; }
.welcome-form input {
  border: none; background: var(--card); border-radius: 14px; height: 50px; padding: 0 16px;
  font-size: 17px; outline: none; width: 100%;
}
.welcome-form input:focus { box-shadow: 0 0 0 2px var(--accent); }
.welcome-form .error-text { text-align: center; }
.welcome-hint { text-align: center; margin-top: 14px; }
