/* Visual reference: the "Modernus" skin of demos/booking — same tokens, surfaces and type. */

:root {
  --bg: #f4f5f9; --surface: #ffffff; --ink: #14161f; --ink-2: #5d6275; --line: #e6e8ef;
  --brand: #2f8f7a; --brand-2: #1f6f5e; --brand-soft: #e3f3ef;
  --danger: #d1453b; --danger-soft: #fde9e7; --warn: #b7790b; --warn-soft: #fdf3df; --info: #4a63e0; --info-soft: #e8ecfd;
  --radius: 14px; --shadow: 0 1px 2px rgba(20, 22, 31, .05), 0 4px 16px rgba(20, 22, 31, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; min-height: 100vh;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; }
small { font-size: 12px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; }
.hide { display: none !important; }

/* ---------- demo chrome & modes ---------- */
.demo-bar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 16px; font: 13px/1.3 system-ui, sans-serif; background: #1d1d1f; color: #e8e8ea;
}
.mode-switch { display: inline-flex; background: #3a3a3d; border-radius: 999px; padding: 3px; overflow-x: auto; max-width: 100%; }
.mode-switch button { border: 0; background: transparent; color: #cfcfd3; padding: 5px 14px; border-radius: 999px; font-size: 13px; white-space: nowrap; }
.mode-switch button.active { background: #fff; color: #111; font-weight: 600; }
.mode-switch .short { display: none; }

.showcase-only { display: none !important; }
body[data-mode="showcase"] .showcase-only { display: revert !important; }
body[data-mode="admin"] .device:not([data-role="admin"]),
body[data-mode="instructor"] .device:not([data-role="instructor"]),
body[data-mode="student"] .device:not([data-role="student"]) { display: none; }

.sc-head { max-width: 1100px; margin: 0 auto; padding: 28px 24px 8px; text-align: center; }
.sc-head h1 { font-size: 28px; letter-spacing: -.02em; }
.sc-head p { color: var(--ink-2); margin: 8px auto 0; max-width: 760px; }

.stage { display: flex; justify-content: center; align-items: flex-start; gap: 28px; padding: 24px; flex-wrap: wrap; }
.device { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.device figcaption { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.screen { position: relative; overflow: hidden; background: var(--bg); }
#admin-root { container-type: inline-size; } /* the admin adapts to its frame, not the window */

/* Phone frame */
.phone .screen {
  width: 380px; height: 780px; border-radius: 46px; border: 11px solid #15161a;
  box-shadow: 0 0 0 2px #3a3b40, 0 30px 60px rgba(20, 22, 31, .25);
}
.phone .screen::before {
  content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 30;
  width: 96px; height: 26px; border-radius: 20px; background: #15161a;
}
/* Laptop frame (showcase) */
.laptop { flex: 1 1 720px; max-width: 1180px; }
.laptop-bar {
  width: 100%; display: flex; align-items: center; gap: 6px; padding: 9px 14px; background: #e4e6ec;
  border-radius: 14px 14px 0 0; border: 1px solid #d5d8e0; border-bottom: 0; font-size: 12px; color: var(--ink-2);
}
.laptop-bar i { width: 11px; height: 11px; border-radius: 50%; background: #c9ccd4; }
.laptop-bar span { margin-left: 10px; }
body[data-mode="showcase"] .laptop .screen {
  width: 100%; height: 780px; border: 1px solid #d5d8e0; border-radius: 0 0 14px 14px; box-shadow: 0 30px 60px rgba(20, 22, 31, .18);
}
/* Admin alone: the whole page, no frame */
body[data-mode="admin"] .stage { padding: 0; display: block; }
body[data-mode="admin"] .laptop { max-width: none; display: block; }
body[data-mode="admin"] .laptop .screen { width: 100%; min-height: calc(100vh - 38px); height: auto; overflow: visible; }
body[data-mode="admin"] .adm { min-height: calc(100vh - 38px); }

/* ---------- admin ---------- */
.adm { display: grid; grid-template-columns: 220px 1fr; height: 100%; position: relative; }
.adm-nav { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--brand), #4fb39c); flex: none; }
.brand-text { font-weight: 700; font-size: 16px; line-height: 1.2; }
.brand-text small { display: block; font-weight: 400; color: var(--ink-2); }
.nav-item { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; }
.nav-item:hover { background: var(--bg); color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-2); font-weight: 600; }
.nav-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 6px 0; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.nav-user small { display: block; font-weight: 400; color: var(--ink-2); }
.adm-main { padding: 24px 28px 40px; display: flex; flex-direction: column; gap: 16px; min-width: 0; overflow: auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; letter-spacing: -.01em; }
.page-head h1::first-letter { text-transform: uppercase; }
.sub { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.btn-group { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.date-nav { display: flex; align-items: center; gap: 6px; }
.date-label { width: 190px; display: flex; flex-direction: column; align-items: center; line-height: 1.25; } /* fixed width: arrows never move */
.date-label small { color: var(--ink-2); }
.invisible { visibility: hidden; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 10px; font-weight: 500; font-size: 14px; text-decoration: none; color: var(--ink); transition: background .15s, transform .1s; }
.btn:hover { background: var(--bg); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(47, 143, 122, .28); }
.btn-primary:hover { background: var(--brand-2); }
.btn-danger { color: var(--danger); }
.btn.wide { width: 100%; padding: 13px; font-size: 15px; border-radius: 12px; }
.seg { display: inline-flex; background: #e9ebf2; padding: 3px; border-radius: 11px; }
.seg .btn { border: 0; background: transparent; padding: 6px 12px; }
.seg .btn.active { background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 16px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.stat span { color: var(--ink-2); font-size: 13px; }
.stat strong { font-size: 24px; font-weight: 700; }
.stat em { font-style: normal; color: var(--ink-2); font-size: 12px; }
.stat.warn { box-shadow: inset 0 0 0 2px var(--warn-soft), var(--shadow); }
.stat.warn strong { color: var(--warn); }

.grid-and-feed { display: grid; grid-template-columns: 1fr 280px; gap: 14px; align-items: start; }
.grid-wrap { overflow: auto; max-height: 560px; }
.tgrid { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(150px, 1fr)); position: relative; }
.tg-corner, .tg-head { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); height: 44px; }
.tg-head { display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 13px; line-height: 1.2; }
.tg-head small { display: block; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.tg-times { position: relative; grid-row: 2; }
.tg-times span { position: absolute; right: 8px; font-size: 12px; color: var(--ink-2); transform: translateY(-50%); }
.tg-times span:first-child { transform: none; }
.tg-col { position: relative; grid-row: 2; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 52px); }
.blk {
  position: absolute; left: 4px; right: 4px; height: 48px; margin-top: 2px; border: 0; border-left: 4px solid var(--c); border-radius: 9px;
  background: color-mix(in srgb, var(--c) 13%, white); text-align: left; padding: 4px 8px; display: flex; flex-direction: column;
  font-size: 13px; line-height: 1.25; overflow: hidden; transition: transform .12s, box-shadow .12s;
}
.blk:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20, 22, 31, .12); z-index: 2; }
.blk span { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk.s-done { opacity: .6; }
.blk.s-pending { background: repeating-linear-gradient(45deg, var(--warn-soft) 0 6px, #fff 6px 12px); border-left-color: var(--warn); }
.blk.s-noshow { opacity: .55; background: repeating-linear-gradient(45deg, var(--danger-soft) 0 6px, #fff 6px 12px); border-left-color: var(--danger); }
.now-line { position: absolute; left: 56px; right: 0; height: 2px; background: var(--danger); z-index: 2; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

.feed { padding: 14px 16px; }
.feed h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); margin-bottom: 8px; }
.feed ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feed li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed li:last-child { border-bottom: 0; }
.feed time { color: var(--ink-2); font-size: 12px; }
.feed li:first-child { animation: flash 1.2s ease; }
@keyframes flash { from { background: var(--brand-soft); } to { background: transparent; } }

.search { padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); outline: none; max-width: 420px; }
.search:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.table { display: flex; flex-direction: column; overflow: hidden; }
.tr { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr .9fr 1fr; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tr:last-child { border-bottom: 0; }
.tr small { display: block; color: var(--ink-2); }
.tr.th { color: var(--ink-2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.sms-table .tr { grid-template-columns: 120px 170px 120px 1fr; }
.sms-text { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; color: var(--ink-2); }

.meter { display: block; height: 6px; border-radius: 3px; background: var(--brand-soft); overflow: hidden; margin-top: 4px; max-width: 160px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #4fb39c); }
.badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; display: inline-block; }
.b-planned { background: var(--info-soft); color: var(--info); }
.b-done { background: var(--brand-soft); color: var(--brand-2); }
.b-pending { background: var(--warn-soft); color: var(--warn); }
.b-noshow, .b-cancelled { background: var(--danger-soft); color: var(--danger); }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--bg); color: var(--ink-2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: linear-gradient(135deg, #5b5fc7, #8b8fe6); color: #fff; font-size: 13px; font-weight: 600; }

/* Panels and sheets render inside their own screen */
.overlay { position: absolute; inset: 0; background: rgba(20, 22, 31, .35); z-index: 20; animation: fadein .15s; }
@keyframes fadein { from { opacity: 0; } }
.panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 21; background: var(--surface);
  padding: 22px; overflow: auto; box-shadow: -20px 0 50px rgba(20, 22, 31, .2); animation: slidein .2s ease;
}
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.panel-head > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.panel-head h2 { font-size: 19px; }
.icon-btn { border: 0; background: transparent; font-size: 18px; padding: 4px 8px; border-radius: 8px; color: var(--ink-2); }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; background: var(--bg); border-radius: 12px; padding: 14px 16px; font-size: 14px; }
.details dt { color: var(--ink-2); }
.details dd { margin: 0; }
.details.compact { font-size: 13px; padding: 12px; }
.panel-actions { margin-top: 16px; display: flex; gap: 10px; }

.toast {
  position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 40; width: max-content; max-width: calc(100% - 32px);
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 14px; box-shadow: 0 16px 40px rgba(20, 22, 31, .3);
  animation: up .25s ease;
}
.adm .toast { bottom: 24px; }
@keyframes up { from { opacity: 0; transform: translate(-50%, 10px); } }

@container (max-width: 760px) {
  .adm { grid-template-columns: 1fr; }
  .adm-nav { flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; overflow-x: auto; }
  .brand { padding: 0 6px 0 0; }
  .brand-text, .nav-user { display: none; }
  .adm-main { padding: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-and-feed { grid-template-columns: 1fr; }
  .page-head .seg { order: 2; width: 100%; overflow-x: auto; }
  .panel { width: 100%; }
  .tr { grid-template-columns: 1fr 1fr; }
  .tr > :nth-child(2), .tr > :nth-child(4) { display: none; }
  .sms-table .tr { grid-template-columns: 1fr; gap: 2px; }
  .sms-table .tr.th { display: none; }
}

/* ---------- phone apps ---------- */
.ph { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.ph-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 44px 18px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ph-head small { color: var(--ink-2); }
.ph-head h2 { font-size: 21px; letter-spacing: -.01em; }
.car-pill { font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-2); text-align: center; }
.ph-body { flex: 1; overflow: auto; padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
.ph-tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px 18px; }
.ph-tabs button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 11px; color: var(--ink-2); padding: 6px 0; border-radius: 10px; }
.ph-tabs button span { font-size: 19px; }
.ph-tabs button.active { color: var(--brand-2); font-weight: 600; background: var(--brand-soft); }
.ph-alert { background: var(--warn-soft); color: #7a5208; padding: 10px 12px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.ph-list { display: flex; flex-direction: column; gap: 10px; }

.lcard { display: flex; gap: 12px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; border-left: 4px solid var(--info); }
.lcard.s-pending { border-left-color: var(--warn); }
.lcard.s-done { border-left-color: var(--brand); opacity: .78; }
.lcard.s-noshow { border-left-color: var(--danger); opacity: .7; }
.lc-time { display: flex; flex-direction: column; min-width: 46px; font-variant-numeric: tabular-nums; }
.lc-time b { font-size: 16px; }
.lc-time small { color: var(--ink-2); }
.lc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lc-main small { color: var(--ink-2); }
.lc-actions { display: flex; gap: 6px; margin-top: 8px; }
.lc-actions .btn { padding: 9px 10px; font-size: 13px; }
.lc-actions .btn-primary { flex: 1; }
.lc-actions .icon { padding: 9px 11px; }
.lc-status { margin-top: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 10px 18px 26px; max-height: 88%; overflow: auto; display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 -20px 50px rgba(20, 22, 31, .2); animation: sheetup .22s ease;
}
@keyframes sheetup { from { transform: translateY(40px); opacity: 0; } }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 6px; }
.sheet h3 { font-size: 18px; }
.lbl { font-size: 12px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px; font-size: 13px; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; resize: none; outline: none; font-size: 14px; }
textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.sig-wrap { position: relative; border: 2px dashed var(--line); border-radius: 12px; background: #fbfbfd; }
.sig-wrap canvas { display: block; width: 100%; height: 110px; touch-action: none; cursor: crosshair; }
.sig-hint { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-2); font-size: 14px; pointer-events: none; }
.sig-clear { position: absolute; right: 6px; top: 6px; border: 0; background: transparent; font-size: 12px; color: var(--ink-2); }

.ph-day { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.ph-day h4 { font-size: 14px; margin-bottom: 6px; display: flex; justify-content: space-between; }
.ph-day h4 small { color: var(--ink-2); font-weight: 500; }
.mini { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.mini b { font-variant-numeric: tabular-nums; min-width: 44px; }
.mini span { flex: 1; }
.mini .badge { font-size: 11px; padding: 2px 8px; }
.scard { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.scard > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.scard small { color: var(--ink-2); }

.progress-card { display: flex; align-items: center; gap: 16px; }
.ring { width: 96px; height: 96px; flex: none; }
.ring circle { fill: none; stroke-width: 9; }
.ring-bg { stroke: var(--brand-soft); }
.ring-fg { stroke: var(--brand); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dasharray .5s ease; }
.ring-n { font-size: 26px; font-weight: 700; fill: var(--ink); }
.ring-t { font-size: 10px; fill: var(--ink-2); }
.next { display: flex; flex-direction: column; gap: 3px; }
.next small { color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.next .big { font-size: 18px; }
.next span { color: var(--ink-2); font-size: 14px; }
.next .btn { margin-top: 8px; align-self: flex-start; }
.sms-bubble { align-self: flex-start; max-width: 90%; background: #e9e9eb; border-radius: 18px 18px 18px 4px; padding: 10px 14px; font-size: 13px; line-height: 1.4; }
.sms-bubble small { display: block; color: var(--ink-2); font-size: 11px; margin-bottom: 2px; }

.day-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.dchip { flex: none; width: 62px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; }
.dchip b { font-size: 18px; }
.dchip small { font-size: 10.5px; color: var(--ink-2); }
.dchip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.dchip.on small { color: #e3f3ef; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.slot.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-2); }
.hcard { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.hc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.note { margin: 8px 0 0; font-size: 14px; }
.note small { color: var(--ink-2); }

/* ---------- paper vs phone ---------- */
.paper-vs { max-width: 1000px; margin: 8px auto 48px; padding: 0 24px; }
.paper-vs h2 { text-align: center; font-size: 22px; margin-bottom: 16px; }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vs-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.vs-card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); margin-bottom: 10px; }
.vs-card.good { box-shadow: inset 0 0 0 2px var(--brand-soft), var(--shadow); }
.vs-card.good h3 { color: var(--brand-2); }
.vs-card ul { margin: 10px 0 0; padding-left: 18px; }
.vs-card li { margin: 4px 0; }
.paper-sheet { background: #fffdf5; border: 1px solid #e8e1c8; border-radius: 6px; padding: 8px 10px; transform: rotate(-1deg); font-family: "Segoe Print", "Comic Sans MS", cursive; font-size: 13px; color: #31437a; }
.ps-row { display: grid; grid-template-columns: 1fr 1fr .5fr 1fr; border-bottom: 1px solid #c9d3ea; padding: 4px 0; min-height: 26px; }
.ps-head { font-family: Inter, system-ui, sans-serif; font-size: 11px; color: #777; font-weight: 600; }
.ps-row.smudge span { filter: blur(.6px); }
.sig { font-style: italic; }

/* ---------- small screens: phone views go full-screen, frames drop ---------- */
@media (max-width: 1240px) { .laptop { flex-basis: 100%; } }
@media (max-width: 640px) {
  .demo-note { display: none; }
  .demo-bar { justify-content: center; }
  .mode-switch .long { display: none; }
  .mode-switch .short { display: inline; }
  .mode-switch button { padding: 5px 11px; }
  .stage { padding: 12px; gap: 20px; }
  .phone .screen { width: calc(100vw - 24px); height: 720px; border-width: 6px; border-radius: 30px; }
  .phone .screen::before { display: none; }
  .ph-head { padding-top: 16px; }
  body[data-mode="instructor"] .stage, body[data-mode="student"] .stage { padding: 0; }
  body[data-mode="instructor"] .phone .screen, body[data-mode="student"] .phone .screen {
    width: 100vw; height: calc(100dvh - 38px); border: 0; border-radius: 0; box-shadow: none;
  }
  body[data-mode="instructor"] figcaption, body[data-mode="student"] figcaption { display: none; }
  body[data-mode="showcase"] .laptop .screen { height: 640px; }
  .vs { grid-template-columns: 1fr; }
  .sc-head h1 { font-size: 22px; }
}

/* ---------- mobile admin agenda (shown by the container query above) ---------- */
.agenda-m { display: none; flex-direction: column; gap: 10px; }
.am-ins { padding: 12px 14px; }
.am-ins h4 { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.am-ins h4 small { color: var(--ink-2); font-weight: 400; width: 100%; padding-left: 18px; }
.am-row { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; padding: 9px 0; text-align: left; font-size: 14px; }
.am-row b { font-variant-numeric: tabular-nums; min-width: 44px; }
.am-row span:not(.badge) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-row .badge { font-size: 11px; padding: 2px 8px; }
@container (max-width: 600px) {
  .grid-wrap { display: none; } /* time grid → agenda list on narrow screens */
  .agenda-m { display: flex; }
  .tip-agenda { display: inline-block; }
  .toolbar .seg { width: 100%; overflow-x: auto; }
  .date-nav { width: 100%; justify-content: space-between; }
  .date-label { flex: 1; width: auto; }
}

/* ---------- "tap here" tips ---------- */
.tip {
  display: inline-block; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 10px;
  border-radius: 999px; box-shadow: 0 6px 16px rgba(20, 22, 31, .25); white-space: nowrap; pointer-events: none;
  animation: bob 1.4s ease-in-out infinite;
}
.tip-inline { align-self: flex-start; }
.tip-agenda { display: none; } /* only above the phone agenda; the grid has its own tip on a lesson */
.tip-left { position: absolute; left: calc(100% - 14px); z-index: 6; }
.tip-left::after { content: ""; position: absolute; right: 100%; top: 50%; transform: translateY(-50%); border: 6px solid transparent; border-right-color: var(--ink); }
.blk.pulse { z-index: 2; }
.tg-col { overflow: visible; }
.lc-actions { position: relative; }
.tip-anchor { position: relative; }
.tip-anchor.has-tip { margin-top: 30px; }
.lc-actions.has-tip { margin-top: 36px; }
.tip-up { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 5; }
.tip-up::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--ink); }
.lc-actions .tip-up { left: 30%; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
.pulse { animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 143, 122, .55); } 100% { box-shadow: 0 0 0 14px rgba(47, 143, 122, 0); } }

/* ---------- phone: "Visi kartu" becomes a picker (no phones inside a phone) ---------- */
.mobile-pick, .phone-only { display: none; }
@media (max-width: 640px) {
  body[data-mode="showcase"] .stage, .desktop-only { display: none; }
  .phone-only { display: block; }
  body[data-mode="showcase"] .mobile-pick { display: flex; flex-direction: column; gap: 10px; padding: 4px 16px 20px; }
  .mobile-pick button {
    display: flex; align-items: center; gap: 14px; text-align: left; border: 0; background: var(--surface);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px;
  }
  .mobile-pick button > span:first-child { font-size: 28px; }
  .mobile-pick b { display: block; font-size: 16px; }
  .mobile-pick small { color: var(--ink-2); font-size: 13px; }
  .mobile-pick button:first-of-type { animation: pulse 1.6s ease-out infinite; }
  .mobile-pick .note { margin: 4px 2px 0; font-size: 13px; color: var(--ink-2); }
}
