/* ezcover — styles (design D: soft ground · round stickers · gem blue · yellow) */
:root {
  --ground: #F6F4EE;
  --paper: #FFFFFF;
  --ink: #15224F;
  --muted: #4F566E;
  --line: #ECE8DC;
  --soft: #EFECE3;
  --dot: #E3DECB;
  --pale: #F2EEDD;
  --blue: #3E6C8E;
  --blue-soft: #E3EDF4;
  --blue-ink: #2F5A78;
  --yellow: #FFD84A;
  --yellow-soft: #FFF3C4;
  --prep-ink: #7A5600;
  --red: #F0462A;
  --red-ink: #C7321A;
  --red-soft: #FFE4DD;
  --gold: #B8860B;
  --green: #2F6B2C;
  --head: Fredoka, Nunito, system-ui, sans-serif;
  --big: Gabarito, Fredoka, Nunito, system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(21, 34, 79, 0.04), 0 10px 30px rgba(21, 34, 79, 0.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); }
html { scrollbar-gutter: stable; }
body { font-family: Nunito, system-ui, sans-serif; font-weight: 700; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue-ink); }
.hidden { display: none !important; }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.page { flex: 1; padding: max(20px, env(safe-area-inset-top)) 12px 112px; display: flex; flex-direction: column; gap: 12px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px; }
.brand { display: flex; align-items: center; gap: 7px; text-decoration: none; }
.brand b { font-family: var(--head); font-weight: 600; font-size: 24px; color: var(--gold); letter-spacing: -0.2px; }
.who { font-size: 13px; font-weight: 800; color: var(--muted); text-align: right; }
h1 { margin: 6px 8px 0; font-family: var(--big); font-weight: 700; font-size: 30px; letter-spacing: -0.5px; line-height: 1.15; }
h2 { margin: 10px 8px 0; font-size: 13px; font-weight: 800; color: var(--muted); }
.chip { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.chip.red { color: var(--red-ink); background: var(--red-soft); }
.chip.green { color: var(--green); background: #E3F0DC; }
.chip.gray { color: var(--muted); background: var(--soft); }

/* board: the one sentence at the top */
/* one rule at every width: text on the left, umbrella / ezYang in the middle of the space that is left */
.status { display: flex; align-items: center; gap: 8px; padding: 14px 8px 0; }
.status .txt { flex: 0 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.status .art { flex: 1 0 60px; display: flex; align-items: center; justify-content: center; pointer-events: none; line-height: 0; }
.perch { display: block; }
.perch.umb { transform: rotate(12deg); }
.perch.umb svg { width: 60px; height: 60px; }
.perch.yang { width: 66px; height: 66px; object-fit: contain; transform: rotate(4deg); }
.eyebrow { font-size: 13px; font-weight: 800; line-height: 18px; color: var(--muted); }
h1.big { margin: 0; font-size: 28px; line-height: 32px; letter-spacing: -0.5px; }
h1.big em { font-style: normal; color: var(--red); }
.status .sub { font-size: 15px; font-weight: 700; line-height: 22px; color: var(--muted); }

/* board: week card */
.wk { position: relative; background: var(--paper); border-radius: 28px; padding: 16px 10px 14px; box-shadow: var(--shadow); }
.wk.first { margin-top: 4px; }

.grid { display: grid; grid-template-columns: 92px repeat(5, minmax(0, 1fr)); grid-auto-rows: 48px; column-gap: 4px; row-gap: 6px; }
.grid.compact { grid-auto-rows: 46px; }
.c { display: flex; align-items: center; justify-content: center; min-width: 0; }
.c.lbl { flex-direction: column; align-items: flex-start; justify-content: center; padding-left: 8px; overflow: hidden; }
.c.lbl b { font-size: 14px; font-weight: 800; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.c.lbl i { font-style: normal; font-size: 12px; font-weight: 700; line-height: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.c.hd { flex-direction: column; border-radius: 14px; }
.c.hd span { font-size: 11px; font-weight: 800; line-height: 14px; color: var(--muted); }
.c.hd b { font-family: var(--head); font-size: 17px; font-weight: 600; line-height: 20px; }
.c.hd.today { background: var(--ink); }
.c.hd.today span { color: var(--yellow); }
.c.hd.today b { color: #fff; }
.c.lbl.oc i { color: var(--blue-ink); }
.c.oc:not(.lbl) b { width: 32px; height: 32px; border-radius: 16px; background: var(--blue-soft); color: var(--blue-ink); font-family: var(--head); font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
i.in { width: 6px; height: 6px; border-radius: 3px; background: var(--dot); }
button.c.tap { border: 0; padding: 0; background: none; border-radius: 14px; }
button.c.tap:hover, button.c.tap:focus-visible { background: var(--soft); outline: none; }
button.c.tap:hover i.in, button.c.tap:focus-visible i.in { background: var(--blue); }
/* prep rows say it in words: a teacher's dot means working, a prep's empty day means free to cover */
i.free { font-style: normal; font-size: 11px; font-weight: 800; line-height: 14px; color: #6B7187; }

/* stickers: one round mark per day off */
.st { width: 44px; height: 44px; border-radius: 22px; border: 0; padding: 0; flex-shrink: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; line-height: 12px; }
.st span, .hb span { max-width: 40px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cov.prep { background: var(--yellow); color: var(--ink); }
.cov.oc { background: var(--blue); color: #fff; }
.q { background: var(--red); color: #fff; font-family: var(--head); font-size: 24px; font-weight: 600; line-height: 1; }
.q.sent { background: var(--red-soft); color: var(--red-ink); box-shadow: inset 0 0 0 2px var(--red); font-size: 17px; }
.q small { font-family: Nunito, system-ui, sans-serif; font-size: 9px; font-weight: 800; line-height: 10px; }
.nc { background: var(--soft); color: var(--muted); font-size: 18px; }
.st.split { background: var(--pale); }
.st.split .h { flex: 1; min-height: 0; width: 100%; display: flex; }
.hb { flex: 1; border: 0; padding: 0; display: flex; justify-content: center; font-size: 10px; font-weight: 800; line-height: 11px; }
.st.split .h:first-child .hb { align-items: flex-end; padding-bottom: 3px; }
.st.split .h:last-child .hb { align-items: flex-start; padding-top: 3px; }
.hb.q { font-size: 14px; }

.band { grid-column: 1 / -1; align-self: center; height: 44px; width: 100%; border: 0; border-radius: 22px; background: var(--yellow-soft); color: var(--ink); padding: 0 14px 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 800; text-align: left; }
.band .l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.band .muted { color: var(--muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pchips { display: flex; flex-direction: column; gap: 2px; align-items: stretch; width: 100%; }
.pchip { width: 100%; border: 0; font-family: inherit; font-size: 11px; font-weight: 800; line-height: 13px; background: var(--yellow-soft); color: var(--ink); border-radius: 12px; padding: 6px 0; text-align: center; white-space: nowrap; letter-spacing: -0.2px; }
.pchip small { display: block; font-size: 10px; font-weight: 700; line-height: 11px; color: var(--muted); letter-spacing: -0.2px; }

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 8px 0; }
.legend span { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.lg { width: 12px; height: 12px; border-radius: 6px; }
.lg.red, .dots .red { background: var(--red); }
.lg.yel, .dots .yel { background: var(--yellow); }
.lg.blu, .dots .blu { background: var(--blue); }

/* coming weeks */
.weeks { display: flex; flex-direction: column; gap: 8px; }
.weekbar { height: 56px; width: 100%; border: 0; border-radius: 22px; background: var(--paper); color: var(--ink); padding: 0 14px 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; }
.weekbar .t { font-family: var(--head); font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.weekbar .t small { font-family: Nunito, system-ui, sans-serif; font-size: 13px; font-weight: 700; color: var(--muted); margin-left: 4px; }
.weekbar .r { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.weekbar .r b { font-size: 13px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.weekbar .r b.need { color: var(--red-ink); }
.dots { display: flex; gap: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 5px; background: var(--dot); }
.wk > .weekbar { height: 40px; padding: 0 6px 0 8px; margin-bottom: 6px; background: none; }

/* bottom dock */
.dock { position: fixed; left: 0; right: 0; bottom: 0; padding: 0 12px max(16px, env(safe-area-inset-bottom)); pointer-events: none; z-index: 10; }
.dock .in { pointer-events: auto; max-width: 456px; height: 64px; margin: 0 auto; background: var(--ink); border-radius: 32px; padding: 0 8px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 8px 24px rgba(21, 34, 79, 0.28); }
.tabs { display: flex; align-items: center; gap: 2px; }
.tab { width: 60px; height: 52px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: #C5CCE3; font-size: 11px; font-weight: 800; line-height: 13px; }
.tab.on { color: var(--yellow); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; border: 0; border-radius: 999px; min-height: 44px; padding: 10px 16px; font-size: 14px; font-weight: 800; background: var(--soft); color: var(--ink); white-space: nowrap; }
.btn.primary { background: var(--yellow); color: var(--ink); }
.btn.gold { background: var(--yellow-soft); color: var(--ink); }
.btn.big { min-height: 52px; padding: 14px 18px; font-family: var(--head); font-size: 17px; font-weight: 600; width: 100%; }
.btn.grow { flex: 1; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.small { min-height: 36px; padding: 7px 13px; font-size: 13px; }
.btn.mark { height: 48px; min-height: 48px; padding: 0 18px 0 14px; background: var(--yellow); color: var(--ink); font-family: var(--head); font-size: 16px; font-weight: 600; }
.textbtn { background: none; border: 0; padding: 8px; font-size: 13px; font-weight: 800; color: var(--muted); }
.textbtn.danger { color: var(--red-ink); }

/* cards & lists */
.card { background: var(--paper); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.list { background: var(--paper); border-radius: 18px; overflow: hidden; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 50px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); width: 100%; background: none; text-align: left; font-size: 15px; font-weight: 800; }
.row:last-child { border-bottom: 0; }
.row .sub { font-size: 13px; font-weight: 700; color: var(--muted); text-align: right; }
.row.dim { opacity: 0.55; }
.row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--blue); margin: 0; }
.row label, label.row { cursor: pointer; }
.lead { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lead span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rchip { font-size: 14px; font-weight: 800; background: var(--paper); border: 0; min-height: 40px; padding: 8px 14px; border-radius: 999px; }
.rchip.add { background: none; box-shadow: inset 0 0 0 1.5px #C9C3B3; color: var(--muted); }
.note { font-size: 13px; font-weight: 700; color: var(--muted); line-height: 1.45; }
p.note { margin: 0 8px; }
.empty { text-align: center; padding: 20px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty img { width: 150px; height: 150px; object-fit: contain; }
.emptyt { font-family: var(--big); font-size: 24px; font-weight: 700; letter-spacing: -0.3px; }
.steps { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.step { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; padding: 12px 16px; border-radius: 20px; background: var(--paper); color: var(--ink); width: 100%; text-align: left; text-decoration: none; font-size: 15px; font-weight: 800; }
.step.done { color: var(--muted); }
.step .n { width: 24px; height: 24px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; margin-right: 10px; }
.step.done .n { background: var(--green); }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 800; color: var(--muted); }
.field > span em { font-style: normal; font-weight: 700; }
.input, select.input { width: 100%; font-size: 16px; font-weight: 700; padding: 12px 14px; border: 1.5px solid #DDD8CA; border-radius: 14px; background: var(--paper); outline: none; }
.input:focus { border-color: var(--blue); }
.err { font-size: 13px; font-weight: 800; color: var(--red-ink); }
.consent { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: var(--soft); border-radius: 16px; font-size: 13px; font-weight: 700; line-height: 1.45; color: var(--muted); cursor: pointer; }
.consent input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--blue); }
.consent b { color: var(--ink); font-weight: 800; }
.legal { margin: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; font-weight: 800; }
.legal.left { justify-content: flex-start; padding: 0 4px; }
.legal a { color: var(--blue-ink); }
.seg { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--soft); }
.seg button { flex: 1; min-height: 40px; padding: 8px 0; font-size: 13px; font-weight: 800; background: none; border: 0; border-radius: 999px; }
.seg button.on { background: var(--ink); color: #fff; }
.days { display: flex; gap: 6px; }
.day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 0; border: 0; border-radius: 14px; background: var(--paper); position: relative; }
.day span { font-size: 11px; font-weight: 800; color: var(--muted); }
.day b { font-family: var(--head); font-size: 17px; font-weight: 600; }
.day.on { background: var(--ink); }
.day.on span { color: var(--yellow); }
.day.on b { color: #fff; }
.day.past { opacity: 0.4; }
.day .dot { position: absolute; top: 6px; right: 7px; width: 6px; height: 6px; border-radius: 3px; background: var(--red); }
.weeknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.round { width: 36px; height: 36px; border-radius: 18px; border: 0; background: var(--paper); display: inline-flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 800; }
.kv span:first-child { color: var(--muted); font-weight: 700; }
.timepair { display: flex; gap: 8px; align-items: center; }
.timepair .input { flex: 1; }

/* sheet */
#sheet { position: fixed; inset: 0; z-index: 20; display: none; }
#sheet.open { display: block; }
#sheet .shade { position: absolute; inset: 0; background: rgba(21, 34, 79, 0.45); }
#sheet .panel { position: absolute; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; max-height: 92dvh; overflow-y: auto; background: var(--ground); border-radius: 28px 28px 0 0; padding: 10px 18px max(28px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 -10px 40px rgba(21, 34, 79, 0.18); }
.grab { width: 40px; height: 4px; border-radius: 2px; background: #CFC9B8; align-self: center; flex-shrink: 0; }
.shead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.shead b { font-family: var(--big); font-weight: 700; font-size: 24px; letter-spacing: -0.4px; line-height: 1.15; display: block; }
.shead .note { margin-top: 4px; }
.sec { display: flex; flex-direction: column; gap: 6px; }
.lab { font-size: 13px; font-weight: 800; }
.lab.prep { color: var(--prep-ink); }
.lab.oc { color: var(--blue-ink); }
.lab.mut { color: var(--muted); }
.linkrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 800; }
.linkrow:last-child { border-bottom: 0; }
.linkrow .acts { display: flex; gap: 6px; }

/* toast */
#toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 14px; font-weight: 800; padding: 11px 18px; border-radius: 999px; z-index: 30; opacity: 0; pointer-events: none; transition: opacity 0.2s; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; }

/* auth */
.auth { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 32px 20px; }
.auth .hero { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.auth .hero img { width: 140px; height: 140px; object-fit: contain; }
.auth .hero b { font-family: var(--head); font-size: 36px; font-weight: 600; color: var(--gold); letter-spacing: -0.4px; }
.auth .hero p { margin: 0; font-size: 15px; color: var(--muted); }
.loading { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }

/* on a computer: same board, just roomier */
@media (min-width: 860px) {
  #app { max-width: 780px; }
  .page { padding: 32px 24px 128px; gap: 14px; }
  .status { padding-top: 22px; gap: 24px; }
  .eyebrow { font-size: 15px; line-height: 20px; }
  h1.big { font-size: 46px; line-height: 50px; letter-spacing: -1px; }
  .status .sub { font-size: 18px; line-height: 26px; }
  .wk { padding: 22px 20px 20px; border-radius: 32px; }
  .wk.first { margin-top: 10px; }
  .perch.umb svg { width: 104px; height: 104px; }
  .perch.yang { width: 116px; height: 116px; }
  .grid { grid-template-columns: 210px repeat(5, minmax(0, 1fr)); grid-auto-rows: 62px; column-gap: 8px; row-gap: 6px; }
  .grid.compact { grid-auto-rows: 58px; }
  .c.lbl { padding-left: 12px; }
  .c.lbl b { font-size: 17px; line-height: 22px; }
  .c.lbl i { font-size: 14px; line-height: 18px; }
  .c.hd span { font-size: 13px; line-height: 16px; }
  .c.hd b { font-size: 21px; line-height: 24px; }
  i.in { width: 7px; height: 7px; border-radius: 4px; }
  i.free { font-size: 14px; line-height: 18px; }
  .pchip small { font-size: 12px; line-height: 14px; letter-spacing: 0; }
  .st { width: 54px; height: 54px; border-radius: 27px; font-size: 13px; line-height: 14px; }
  .st span, .hb span { max-width: 50px; }
  .q { font-size: 28px; }
  .q.sent { font-size: 20px; }
  .q small { font-size: 10px; }
  .hb { font-size: 12px; line-height: 13px; }
  .hb.q { font-size: 16px; }
  .c.oc:not(.lbl) b { width: 38px; height: 38px; border-radius: 19px; font-size: 18px; }
  .pchip { font-size: 13px; line-height: 15px; padding: 8px 4px; }
  .band { height: 48px; border-radius: 24px; font-size: 15px; padding: 0 18px 0 14px; }
  .legend { gap: 20px; padding: 16px 12px 0; }
  .legend span { font-size: 14px; }
  .weekbar { height: 62px; padding: 0 20px 0 24px; border-radius: 24px; }
  .weekbar .t { font-size: 18px; }
  .weekbar .t small, .weekbar .r b { font-size: 15px; }
  .dock .in { max-width: 520px; }
  #sheet .panel { max-width: 560px; bottom: 24px; border-radius: 28px; padding-bottom: 28px; max-height: calc(100dvh - 48px); }
}

/* wide screens: use the room */
@media (min-width: 1200px) {
  #app { max-width: 1080px; }
  .page { padding: 36px 32px 132px; }
  h1.big { font-size: 52px; line-height: 56px; }
  .wk { padding: 26px 28px 24px; }
  .perch.umb svg { width: 120px; height: 120px; }
  .perch.yang { width: 132px; height: 132px; }
  .grid { grid-template-columns: 260px repeat(5, minmax(0, 1fr)); grid-auto-rows: 68px; column-gap: 10px; }
  .grid.compact { grid-auto-rows: 64px; }
  .c.lbl b { font-size: 19px; line-height: 24px; }
  .c.lbl i { font-size: 15px; line-height: 20px; }
  .c.hd { justify-self: center; width: 120px; }
  .c.hd span { font-size: 14px; line-height: 18px; }
  .c.hd b { font-size: 23px; line-height: 26px; }
  .st { width: 60px; height: 60px; border-radius: 30px; font-size: 14px; line-height: 16px; }
  .st span, .hb span { max-width: 56px; }
  .q { font-size: 30px; }
  .c.oc:not(.lbl) b { width: 42px; height: 42px; border-radius: 21px; font-size: 19px; }
  .pchips { width: 120px; }
  .pchip { font-size: 14px; line-height: 16px; padding: 10px 6px; }
  .band { height: 52px; border-radius: 26px; font-size: 16px; }
  .weekbar { height: 66px; }
  .weekbar .t { font-size: 19px; }
  .dock .in { max-width: 560px; }
}

/* very small phones: keep the dock inside the screen */
@media (max-width: 350px) {
  .tab { width: 50px; }
  .btn.mark { padding: 0 12px 0 10px; font-size: 15px; }
}
