/* ==== ClassFlow v2 — minimal, light reddish glassmorphism, Quicksand ==== */

@font-face { font-family: 'Quicksand'; src: url('fonts/quicksand-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Quicksand'; src: url('fonts/quicksand-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Quicksand'; src: url('fonts/quicksand-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Quicksand'; src: url('fonts/quicksand-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #fbf5f4;
  --ink: #35282b;
  --ink-2: #6d5b60;
  --muted: #a69599;
  --red: #e11d48;
  --red-deep: #be123c;
  --grad: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);
  --glass: rgba(255, 255, 255, .60);
  --glass-2: rgba(255, 255, 255, .74);
  --glass-line: rgba(255, 255, 255, .78);
  --hairline: rgba(190, 18, 60, .10);
  --shadow: 0 10px 30px rgba(190, 18, 60, .10);
  --shadow-sm: 0 4px 16px rgba(190, 18, 60, .08);
  --radius: 20px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(160deg, #fdf9f8 0%, #fceef0 55%, #fdf6f1 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15.5px;
  line-height: 1.5;
}

/* soft colour blobs behind the glass */
body::before, body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}
body::before { width: 62vw; height: 62vw; max-width: 430px; max-height: 430px; background: rgba(244, 63, 94, .17); top: -130px; right: -110px; }
body::after { width: 56vw; height: 56vw; max-width: 380px; max-height: 380px; background: rgba(251, 146, 60, .14); bottom: -90px; left: -120px; }

button { font: inherit; border: none; background: none; color: inherit; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; }
input, select, textarea { font: inherit; color: var(--ink); }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: calc(16px + var(--sat)) 18px calc(110px + var(--sab));
  position: relative;
}

/* ---------- splash ---------- */
#splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #fdf9f8 0%, #fceef0 55%, #fdf6f1 100%);
  transition: opacity .45s ease, transform .45s ease;
}
#splash.leaving { opacity: 0; transform: scale(1.04); pointer-events: none; }

.splash-inner { display: grid; place-items: center; animation: splashIn .7s cubic-bezier(.22, 1.2, .3, 1) both; }

#splash > div { display: grid; justify-items: center; }

@keyframes splashIn {
  from { opacity: 0; transform: translateY(14px) scale(.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.splash-logo {
  width: 84px; height: 84px;
  border-radius: 26px;
  box-shadow: 0 18px 40px rgba(190, 18, 60, .28);
  animation: logoFloat 3.2s ease-in-out .8s infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.splash-name { margin-top: 18px; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }

.splash-sub { margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: .06em; }

.splash-dots { display: flex; gap: 7px; margin-top: 22px; }
.splash-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red);
  animation: dotPulse 1.1s ease-in-out infinite;
}
.splash-dots i:nth-child(2) { animation-delay: .15s; }
.splash-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotPulse {
  0%, 100% { opacity: .25; transform: scale(.8); }
  50%      { opacity: 1; transform: scale(1.15); }
}

/* ---------- header ---------- */
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 8px 2px 16px; }

.top .overline {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 3px;
}

.top h1 { margin: 0; font-size: clamp(21px, 5.6vw, 25px); font-weight: 700; letter-spacing: -.01em; }

.top .date-line { margin: 2px 0 0; color: var(--muted); font-size: 13px; font-weight: 600; }

.bell-btn {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 15px;
  display: grid; place-items: center;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  transition: transform .18s ease, color .2s ease;
}
.bell-btn:active { transform: scale(.9); }
.bell-btn.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(225, 29, 72, .3); }

/* ---------- page transition ---------- */
.page { animation: pageIn .35s cubic-bezier(.22, .8, .3, 1) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rise { animation: rise .45s cubic-bezier(.22, .8, .3, 1) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  border-radius: 24px;
  padding: 18px 20px 16px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  top: -70px; right: -50px;
  width: 170px; height: 170px;
  border-radius: 50%;
  background: rgba(225, 29, 72, .10);
  filter: blur(30px);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: var(--red);
}
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.7); }
}

.hero-body { display: flex; align-items: center; gap: 16px; margin-top: 10px; }

.hero-ring { position: relative; width: 92px; height: 92px; flex: 0 0 auto; }
.hero-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg, .ring-fg { fill: none; stroke-width: 7; stroke-linecap: round; }
.ring-bg { stroke: rgba(225, 29, 72, .12); }
.ring-fg { stroke: var(--red); stroke-dasharray: 326.7; transition: stroke-dashoffset .6s linear; }

.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.rc-big { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-sub { font-size: 8.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 1px; }

.hero-info { min-width: 0; flex: 1; }
.hero-course { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin: 0; line-height: 1.25; }
.hero-name { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 1px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-meta { margin: 5px 0 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.hero-when {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px; font-weight: 700;
  color: var(--red);
  background: rgba(225, 29, 72, .09);
  padding: 5px 11px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

/* ---------- section title ---------- */
.sec-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 2px 10px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted);
}
.sec-title .count {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 10.5px;
  color: var(--ink-2);
}

/* ---------- class cards ---------- */
.cls {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 13px 15px 12px 19px;
  margin-bottom: 11px;
  overflow: hidden;
  transition: transform .16s ease, box-shadow .2s ease;
  animation: rise .45s cubic-bezier(.22, .8, .3, 1) both;
  animation-delay: calc(var(--i, 0) * 50ms);
}
.cls:active { transform: scale(.975); }
.cls::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--c, var(--red));
}
.cls.now { border-color: rgba(225, 29, 72, .45); box-shadow: 0 10px 28px rgba(225, 29, 72, .16); }
.cls.past { opacity: .55; }

.cls-row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.chip { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .03em; white-space: nowrap; }
.chip.code { background: var(--tint, rgba(225,29,72,.12)); color: var(--c, var(--red)); }
.chip.type { color: var(--ink-2); }
.chip.soon { color: var(--red); background: rgba(225, 29, 72, .09); animation: pulse 1.6s ease-in-out infinite; }
.chip.done { color: var(--muted); border: 1px solid var(--hairline); }

.now-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .12em;
  color: #fff; background: var(--grad);
  border-radius: 999px; padding: 4px 10px;
}
.now-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: pulse 1.2s ease-in-out infinite; }

.cls-name { margin: 7px 0 0; font-size: 15px; font-weight: 700; letter-spacing: -.005em; }

.cls-meta { margin: 5px 0 0; font-size: 12px; color: var(--muted); font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 13px; }
.cls-meta span { display: inline-flex; align-items: center; gap: 5px; }
.cls-meta svg { flex: 0 0 auto; opacity: .75; }

.now-line { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.now-bar { flex: 1; height: 5px; border-radius: 999px; background: rgba(225, 29, 72, .10); overflow: hidden; }
.now-bar i { display: block; height: 100%; border-radius: 999px; background: var(--grad); transition: width .8s linear; }
.now-label { font-size: 11px; font-weight: 700; color: var(--red); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- study / all-day row ---------- */
.study {
  display: flex; align-items: center; gap: 12px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 13px 16px;
  margin-bottom: 11px;
}
.study svg { color: var(--red); flex: 0 0 auto; }
.study b { font-size: 14px; font-weight: 700; display: block; }
.study span { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ---------- empty ---------- */
.empty { text-align: center; padding: 40px 20px; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--glass-line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.empty svg { color: var(--red); opacity: .8; }
.empty h3 { margin: 10px 0 3px; font-size: 16px; font-weight: 700; }
.empty p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; }

/* ---------- week strip ---------- */
.day-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }

.day-pill {
  flex: 0 0 auto;
  width: 54px;
  padding: 9px 0 8px;
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform .18s ease, background .2s ease, color .2s ease;
}
.day-pill:active { transform: scale(.93); }
.day-pill .dl { font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.day-pill .dn { font-size: 17px; font-weight: 700; margin-top: 1px; font-variant-numeric: tabular-nums; }
.day-pill .ddot { width: 4px; height: 4px; border-radius: 50%; background: var(--red); margin: 5px auto 0; opacity: 0; transform: scale(0); transition: all .25s ease; }
.day-pill.has .ddot { opacity: 1; transform: scale(1); }
.day-pill.sel { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(225, 29, 72, .3); }
.day-pill.sel .dl { color: rgba(255, 255, 255, .85); }
.day-pill.sel .ddot { background: #fff; }

.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.legend .lg {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 600; color: var(--ink-2);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  padding: 6px 11px; border-radius: 999px;
}
.legend .lg i { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- calendar ---------- */
.cal { background: var(--glass); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border: 1px solid var(--glass-line); border-radius: 24px; box-shadow: var(--shadow); padding: 16px 14px 12px; margin-bottom: 16px; }

.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; }
.cal-head .cal-title { font-size: 15.5px; font-weight: 700; }
.cal-nav { display: flex; gap: 8px; }
.cal-nav button {
  width: 32px; height: 32px; border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(225, 29, 72, .08);
  color: var(--red);
  transition: transform .16s ease;
}
.cal-nav button:active { transform: scale(.88); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow { text-align: center; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 0 6px; letter-spacing: .05em; }

.cal-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 600;
  color: var(--ink-2);
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.cal-cell:active { transform: scale(.9); }
.cal-cell.blank { pointer-events: none; }
.cal-cell.today { color: var(--red); font-weight: 700; box-shadow: inset 0 0 0 1.5px rgba(225, 29, 72, .55); }
.cal-cell.sel { background: var(--grad); color: #fff; font-weight: 700; box-shadow: 0 5px 12px rgba(225, 29, 72, .3); }

.cal-dots { position: absolute; bottom: 4px; left: 0; right: 0; display: flex; justify-content: center; gap: 3px; }
.cal-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--red); opacity: .85; }
.cal-cell.sel .cal-dots i { background: #fff; }

/* ---------- settings ---------- */
.card {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--glass-line);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  padding: 17px;
  margin-bottom: 15px;
}
.card h2 { margin: 0 0 3px; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.card .hint { margin: 0 0 13px; font-size: 12px; color: var(--muted); line-height: 1.55; font-weight: 500; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--hairline); }
.row:first-of-type { border-top: none; }
.row .lab { font-size: 14px; font-weight: 700; }
.row .sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; font-weight: 600; }

.switch { position: relative; width: 50px; height: 29px; border-radius: 999px; background: #e8d9db; transition: background .25s ease; flex: 0 0 auto; }
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 23px; height: 23px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
  transition: transform .25s cubic-bezier(.34, 1.4, .44, 1);
}
.switch.on { background: var(--grad); }
.switch.on::after { transform: translateX(21px); }

.status-chip { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.status-chip.ok { color: #15803d; background: rgba(21, 128, 61, .1); }
.status-chip.warn { color: #b45309; background: rgba(180, 83, 9, .1); }
.status-chip.err { color: #b91c1c; background: rgba(185, 28, 28, .1); }

.lead-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 3px 0 12px; }
.lchip {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 700;
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--hairline);
  color: var(--ink-2);
  transition: all .2s ease;
}
.lchip:active { transform: scale(.92); }
.lchip.sel { background: rgba(225, 29, 72, .1); color: var(--red); border-color: rgba(225, 29, 72, .5); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13.5px; font-weight: 700;
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--glass-line);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, opacity .2s ease;
}
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(225, 29, 72, .28); }
.btn.danger { color: #b91c1c; background: rgba(185, 28, 28, .08); border-color: rgba(185, 28, 28, .18); }
.btn.ghost { background: transparent; border: 1.5px dashed rgba(190, 18, 60, .3); color: var(--muted); width: 100%; box-shadow: none; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }

.manage-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 11px 0;
  border-top: 1px solid var(--hairline);
  transition: opacity .2s ease;
}
.manage-item:first-of-type { border-top: none; }
.manage-item:active { opacity: .6; }
.manage-item .cdot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.manage-item .mi-main { flex: 1; min-width: 0; }
.manage-item .mi-t { display: block; font-size: 13.5px; font-weight: 700; }
.manage-item .mi-s { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.manage-item .chev { color: var(--muted); flex: 0 0 auto; }

.about-note { font-size: 12px; color: var(--muted); line-height: 1.65; margin: 0; font-weight: 500; }

/* ---------- tab bar ---------- */
.tabbar-wrap {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center;
  padding: 0 12px calc(9px + var(--sab));
  pointer-events: none;
  z-index: 40;
}
.tabbar {
  pointer-events: auto;
  position: relative;
  display: flex;
  width: 100%; max-width: 430px;
  background: rgba(255, 255, 255, .68);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(190, 18, 60, .18);
  padding: 7px;
}
.tab-ind {
  position: absolute;
  top: 7px; bottom: 7px;
  /* sit exactly under a flex tab: padding box minus 2×7px padding, /4 tabs */
  width: calc((100% - 14px) / 4);
  left: 7px;
  border-radius: 18px;
  background: var(--grad);
  box-shadow: 0 6px 14px rgba(225, 29, 72, .32);
  transition: transform .3s cubic-bezier(.34, 1.3, .44, 1);
}
.tab {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 7px 0 5px;
  color: var(--muted);
  font-size: 10px; font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  transition: color .25s ease;
  z-index: 1;
}
.tab.on { color: #fff; }
.tab svg { display: block; transition: transform .3s cubic-bezier(.34, 1.6, .44, 1); }
.tab.on svg { transform: translateY(-1px) scale(1.06); }

/* ---------- sheet ---------- */
.backdrop {
  position: fixed; inset: 0;
  background: rgba(70, 35, 45, .35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 50;
  animation: fadeIn .25s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 51;
  margin: 0 auto;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  background: rgba(253, 247, 246, .92);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -12px 40px rgba(190, 18, 60, .18);
  padding: 10px 20px calc(22px + var(--sab));
  animation: sheetUp .34s cubic-bezier(.32, .72, .24, 1) both;
}
.sheet.closing { animation: sheetDown .26s ease both; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes sheetDown { from { transform: translateY(0); } to { transform: translateY(100%); } }

.sheet-grab { width: 42px; height: 4px; border-radius: 999px; background: #e3ccd0; margin: 6px auto 14px; }
.sheet h2 { margin: 0 0 14px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }

.field { margin-bottom: 13px; }
.field label { display: block; font-size: 10.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; letter-spacing: .08em; text-transform: uppercase; }
.field .fhint { font-size: 10.5px; color: var(--muted); font-weight: 600; margin: -4px 0 8px; }

.field input[type="text"], .field input[type="time"], .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 13px;
  border: 1.5px solid rgba(190, 18, 60, .12);
  background: rgba(255, 255, 255, .72);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { min-height: 120px; font-size: 12px; font-family: ui-monospace, monospace; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, .12);
}

.time-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.seg { display: flex; background: rgba(255, 255, 255, .6); border: 1px solid var(--hairline); border-radius: 13px; padding: 4px; gap: 4px; }
.seg button { flex: 1; padding: 8px 4px; border-radius: 10px; font-size: 12.5px; font-weight: 700; color: var(--muted); transition: all .22s ease; }
.seg button.sel { background: #fff; color: var(--red); box-shadow: 0 2px 8px rgba(190, 18, 60, .12); }

.day-chips { display: flex; gap: 6px; }
.dchip { flex: 1; padding: 9px 0; border-radius: 12px; font-size: 11.5px; font-weight: 700; background: rgba(255, 255, 255, .6); border: 1px solid var(--hairline); color: var(--ink-2); transition: all .2s ease; }
.dchip.sel { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 10px rgba(225, 29, 72, .28); }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 32px; height: 32px; border-radius: 11px; transition: transform .18s ease, box-shadow .2s ease; }
.swatch:active { transform: scale(.85); }
.swatch.sel { box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px currentColor; transform: scale(1.05); }

.inline-check { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 13px; }
.inline-check .lab { font-size: 13.5px; font-weight: 700; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  top: calc(14px + var(--sat));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: rgba(53, 40, 43, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 17px;
  border-radius: 15px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
  animation: toastIn .3s cubic-bezier(.34, 1.3, .44, 1) both;
  max-width: min(88vw, 400px);
  text-align: center;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -16px) scale(.92); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* ---------- desktop ---------- */
@media (min-width: 720px) {
  body { padding-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
