:root {
  color-scheme: light;
  --milk: #f1ede6;
  --milk-2: #fbf9f5;
  --graphite: #292a2d;
  --graphite-2: #424348;
  --muted: #89847e;
  --line: rgba(42, 40, 37, 0.11);
  --accent: #a98562;
  --accent-soft: #e6d8c7;
  --shadow: 0 18px 50px rgba(38, 33, 28, 0.08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--milk); color: var(--graphite); }
body { padding: max(18px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); }
button, select { font: inherit; }
button { border: 0; cursor: pointer; }
.shell { width: min(100%, 560px); margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 8px 2px 22px; }
.brand-mark { display: grid; place-items: center; width: 58px; height: 58px; padding: 2px; border-radius: 16px; background: var(--milk-2); box-shadow: 4px 5px 0 var(--accent-soft); overflow: hidden; }
.brand-logo { display: block; width: 100%; height: 100%; border-radius: 13px; object-fit: cover; mix-blend-mode: multiply; }
.eyebrow, .kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: 10px; font-weight: 800; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 18px; line-height: 1.15; letter-spacing: -.02em; }
h2 { margin-top: 8px; font-size: 28px; letter-spacing: -.05em; line-height: 1.05; }
h3 { font-size: 18px; }
.icon-button { margin-left: auto; width: 38px; height: 38px; border-radius: 12px; background: transparent; color: var(--muted); font-size: 20px; transform: rotate(90deg); }
.icon-button:hover { background: var(--milk-2); color: var(--graphite); }
.panel { background: var(--milk-2); border: 1px solid rgba(42, 40, 37, .07); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); }
.setup-panel p { margin-top: 10px; line-height: 1.45; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { margin-top: 12px; font-size: 11px; min-height: 14px; }
label { display: block; margin-top: 18px; color: var(--muted); font-size: 12px; font-weight: 700; }
select { display: block; width: 100%; margin-top: 7px; padding: 14px 38px 14px 14px; color: var(--graphite); background: var(--milk); border: 1px solid var(--line); border-radius: 14px; outline: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
select:focus { border-color: var(--accent); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.primary-button { width: 100%; margin-top: 22px; padding: 15px 16px; border-radius: 15px; background: var(--graphite); color: var(--milk); font-weight: 800; display: flex; align-items: center; justify-content: space-between; }
.primary-button span { color: var(--accent-soft); font-size: 22px; line-height: 12px; }
.hidden { display: none !important; }
.profile-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 2px 2px 17px; }
.group-label { font-size: 22px; font-weight: 800; letter-spacing: -.04em; }
.week-badge { border-radius: 999px; padding: 7px 10px; background: var(--accent-soft); color: #72563e; font-size: 11px; font-weight: 800; white-space: nowrap; }
.date-nav { display: grid; grid-template-columns: 34px 1fr 1fr 1fr 34px; gap: 5px; align-items: center; margin-bottom: 18px; }
.date-arrow, .date-chip { height: 38px; border-radius: 12px; color: var(--muted); background: transparent; font-size: 13px; }
.date-arrow { font-size: 28px; line-height: 1; }
.date-chip { font-size: 11px; font-weight: 800; }
.date-chip.active { color: var(--graphite); background: var(--milk-2); box-shadow: 0 5px 18px rgba(38, 33, 28, .07); }
.date-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.date-title { font-size: 25px; font-weight: 800; letter-spacing: -.05em; }
.segmented { display: flex; padding: 3px; border-radius: 11px; background: var(--milk-2); box-shadow: 0 5px 18px rgba(38, 33, 28, .06); }
.subgroup-button { padding: 7px 8px; border-radius: 8px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 800; }
.subgroup-button.active { color: var(--graphite); background: var(--accent-soft); }
.lessons { display: grid; gap: 10px; }
.lesson { position: relative; display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--milk-2); box-shadow: 0 8px 25px rgba(38, 33, 28, .045); overflow: hidden; }
.lesson::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.lesson-time { padding-top: 2px; font-size: 12px; font-weight: 800; color: var(--accent); line-height: 1.35; }
.lesson-subject { font-size: 16px; line-height: 1.18; font-weight: 800; letter-spacing: -.02em; }
.lesson-kind { margin-top: 5px; color: var(--accent); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.lesson-meta span { display: inline-flex; align-items: center; gap: 4px; }
.room-address { color: var(--graphite-2); font-size: 10px; }
.empty-state { padding: 44px 20px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); font-size: 28px; }
.empty-state p { margin-top: 6px; line-height: 1.4; }
.loading { display: flex; gap: 6px; justify-content: center; padding: 42px 0; }
.loading span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1s infinite ease-in-out; }
.loading span:nth-child(2) { animation-delay: .14s; }.loading span:nth-child(3) { animation-delay: .28s; }
@keyframes pulse { 0%, 80%, 100% { opacity: .25; transform: scale(.75); } 40% { opacity: 1; transform: scale(1); } }
.footer { display: flex; justify-content: space-between; gap: 12px; padding: 19px 3px 0; color: var(--muted); font-size: 10px; }
@media (max-width: 420px) { body { padding-left: 12px; padding-right: 12px; } .panel { padding: 18px; } .date-heading { align-items: flex-start; flex-direction: column; } .segmented { align-self: stretch; } .subgroup-button { flex: 1; } .lesson { grid-template-columns: 64px 1fr; gap: 8px; } }
