:root {
  --navy: #20344d;
  --gold: #c9a227;
  --cream: #faf7f2;
  --ink: #1c2733;
  --muted: #6b7684;
  --line: #e4ddd0;
  --ok-bg: #e7f6ec;
  --err-bg: #fdeaea;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
}
a { color: var(--navy); }
.wrap { max-width: 1024px; margin: 0 auto; padding: 24px 20px 56px; }
.site-header {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 24px; background: var(--navy); color: #fff; flex-wrap: wrap;
}
.site-header a { color: #fff; text-decoration: none; margin-left: 14px; }
.brand { font-size: 1.25rem; font-weight: bold; margin-left: 0 !important; display: inline-flex; align-items: center; gap: 10px; }
.brand span { color: var(--gold); }
.brand-mark { display: block; border-radius: 9px; }
.nav-user { color: #cfd8e3; font-size: .9rem; }
.inline { display: inline; }
.site-footer { border-top: 1px solid var(--line); padding: 20px 24px; text-align: center; }
.muted { color: var(--muted); }
.demo-banner {
  background: #fff3cd; border-bottom: 2px solid var(--gold); color: #664d03;
  padding: 10px 16px; text-align: center; font-weight: bold;
}
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; }
.flash-ok { background: var(--ok-bg); }
.flash-error { background: var(--err-bg); }
.hero { text-align: center; padding: 28px 0 8px; }
.hero h1 { font-size: 2.1rem; margin-bottom: 8px; }
.search { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 18px 0 8px; }
.search input, .search select { padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin: 16px 0; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.card h3 { margin: 0; }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.card-actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.chip { background: var(--navy); color: #fff; padding: 2px 10px; border-radius: 999px; font-size: .8rem; }
.price { font-weight: bold; color: var(--navy); }
.pill { padding: 2px 10px; border-radius: 999px; font-size: .8rem; background: #eee; }
.pill-paid { background: var(--ok-bg); }
.pill-requested { background: #fff3cd; }
.pill-accepted { background: #e2e8f5; }
.pill-declined, .pill-cancelled { background: var(--err-bg); }
.btn {
  display: inline-block; padding: 9px 18px; border-radius: 8px; border: 1px solid var(--navy);
  font: inherit; cursor: pointer; text-decoration: none; background: #fff; color: var(--navy);
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #2b4767; }
.btn-ghost { border-color: var(--line); background: transparent; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin: 16px 0; }
.form { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-weight: bold; }
.form input, .form textarea, .form select {
  padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-weight: normal;
}
.form.compact { max-width: none; }
.cta { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin-top: 28px; }
.empty { color: var(--muted); }
.video { position: relative; padding-top: 56.25%; margin: 12px 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px; }
table.split { border-collapse: collapse; }
table.split td { padding: 4px 12px 4px 0; }
@media (max-width: 640px) { .hero h1 { font-size: 1.6rem; } }

/* Teacher profile photos (avatars) */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  flex: none; display: inline-block; vertical-align: middle;
  background: var(--navy);
}
.avatar-lg { width: 88px; height: 88px; }
.avatar-initials {
  color: var(--gold); font-weight: bold; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.avatar-lg.avatar-initials { font-size: 1.9rem; }
.teacher-line { display: flex; align-items: center; gap: 10px; }
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.profile-head h1 { margin: 0; }
.photo-row { display: flex; align-items: center; gap: 14px; font-weight: normal; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: normal; }

/* ---------- Professional design pass (2026-11-09) ---------- */
body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; }
h1, h2, h3, .brand { font-family: 'Fraunces', Georgia, serif; letter-spacing: .01em; }
.site-header { box-shadow: 0 2px 14px rgba(16, 32, 54, .25); }
.card { transition: box-shadow .18s ease, transform .18s ease; }
.card:hover { box-shadow: 0 10px 26px rgba(32, 52, 77, .14); transform: translateY(-2px); }
.btn { transition: filter .15s ease, background .15s ease; }
.section-title { margin: 34px 0 6px; }

/* Homepage hero: text + photo side by side */
.hero2 {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 34px; align-items: center;
  padding: 34px 0 10px;
}
.hero2 h1 { font-size: 2.6rem; line-height: 1.12; margin: 0 0 14px; color: var(--navy); }
.lede { font-size: 1.13rem; color: #3d4a59; margin: 0 0 20px; max-width: 34rem; }
.hero2 .search { margin: 0; max-width: 34rem; }
.hero2-note { color: var(--muted); font-size: .92rem; margin: 14px 0 0; }
.hero2-img {
  width: 100%; height: 100%; max-height: 420px; object-fit: cover;
  border-radius: 18px; box-shadow: 0 18px 44px rgba(32, 52, 77, .28);
}

/* Instrument tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 26px 0 6px; }
.lesson-links{columns:2;column-gap:20px}
.lesson-links p{break-inside:avoid}
.tile { position: relative; display: block; border-radius: 14px; overflow: hidden; text-decoration: none; box-shadow: 0 6px 18px rgba(32, 52, 77, .16); }
.tile img { display: block; width: 100%; height: 150px; object-fit: cover; transition: transform .25s ease; }
.tile:hover img { transform: scale(1.05); }
.tile span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px;
  color: #fff; font-weight: 600; font-size: 1.02rem;
  background: linear-gradient(transparent, rgba(16, 32, 54, .82));
}

/* How it works */
.how { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin: 38px 0 6px; }
.steps { padding-left: 1.25rem; margin: 10px 0; }
.steps li { margin-bottom: 12px; }
.steps li::marker { color: var(--gold); font-weight: 700; }

/* Trust row */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 30px 0 6px; }
.trust-item {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.trust-item strong { color: var(--navy); font-size: 1.02rem; }
.trust-item span { color: var(--muted); font-size: .94rem; }

/* Admin */
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 8px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; display: flex; flex-direction: column; min-width: 118px;
}
.stat-value { font-family: 'Fraunces', Georgia, serif; font-size: 1.5rem; font-weight: 700; color: var(--navy); }
.stat-label { color: var(--muted); font-size: .85rem; }
.table-scroll { overflow-x: auto; }
.admin-table { border-collapse: collapse; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .95rem; vertical-align: middle; }
.admin-table th { background: var(--cream); color: var(--navy); }

@media (max-width: 820px) {
  .hero2 { grid-template-columns: 1fr; padding-top: 22px; }
  .hero2 h1 { font-size: 2.05rem; }
  .hero2-img { max-height: 260px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .how { grid-template-columns: 1fr; gap: 8px; }
  .trust { grid-template-columns: 1fr; }
}

/* Photo listing cards + teacher banner + designed empty states (2026-11-09) */
.card-photo{padding:0;overflow:hidden}
.card-img{width:100%;height:150px;object-fit:cover;display:block}
.card-body{padding:18px 20px 20px}
.teacher-banner{height:150px;border-radius:16px;margin-bottom:20px;background:linear-gradient(115deg,rgba(6,37,67,.78),rgba(6,37,67,.38)),url(/images/hero.jpg) center 38%/cover}
.chip-row{margin-top:8px}
.book-img{width:100%;height:150px;object-fit:cover;border-radius:12px;margin:6px 0 12px;display:block}
.empty-state{grid-column:1/-1;text-align:center;background:#fdf8ec;border:1.5px dashed #d9c48f;border-radius:16px;padding:36px 22px}
.empty-state .empty-note{font-size:2.1rem;line-height:1;color:var(--gold)}
.empty-state h3{margin:10px 0 6px}
.empty-state p{max-width:520px;margin:0 auto}
.empty-state .hero-ctas{justify-content:center;margin-top:16px}

/* SVG icon set (2026-11-09) */
.icon{width:17px;height:17px;flex:none}
.icon-sm{width:13px;height:13px;vertical-align:-2px}
.icon-lg{width:21px;height:21px}
.icon-h{width:18px;height:18px;vertical-align:-3px;color:var(--gold)}
.trust-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:#fdf3d8;color:#a97e12;margin-bottom:8px}
.steps{list-style:none;padding-left:0}
.steps li{display:flex;gap:10px;align-items:flex-start}
.steps .icon{color:var(--gold);margin-top:1px}
.btn .icon{width:15px;height:15px;vertical-align:-2px;margin-right:5px}

/* Cancellation forms on booking cards (2026-11-09) */
.cancel-form{margin-top:12px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}

/* Take-a-photo camera panel on the teacher profile (2026-11-09) */
#camera-panel{margin:4px 0 14px}
#camera-panel video{width:100%;max-width:420px;border-radius:12px;background:#0b2239;display:block;margin-bottom:10px}

/* ============ Design pass 3 — professional polish (2026-11-09) ============ */
html{scroll-behavior:smooth}
::selection{background:#f3d27a;color:#20344d}
:focus-visible{outline:2.5px solid var(--gold);outline-offset:2px;border-radius:4px}
.site-header{position:sticky;top:0;z-index:60}
.btn{border-radius:10px;padding:11px 20px;font-weight:600;letter-spacing:.01em}
.btn-primary{box-shadow:0 1px 3px rgba(6,37,67,.25)}
.btn-primary:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(6,37,67,.28)}
.btn-gold{box-shadow:0 1px 3px rgba(169,126,18,.35)}
.btn-gold:hover{transform:translateY(-1px)}
.btn-ghost:hover{border-color:var(--navy);color:var(--navy)}
.form{gap:14px}
.form label{font-weight:600;font-size:.95rem;color:#20344d}
.form input,.form textarea,.form select{padding:12px 13px;border:1.5px solid #c9d4e2;border-radius:10px;font-size:16px;background:#fff;transition:border-color .15s ease,box-shadow .15s ease}
.form input:focus,.form textarea:focus,.form select:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(201,162,39,.18);outline:none}
.panel{border-radius:16px;padding:22px;box-shadow:0 1px 4px rgba(16,32,54,.05)}
.card{box-shadow:0 1px 4px rgba(16,32,54,.05)}
/* Auth pages: centered card with the brand mark */
.auth-card{max-width:460px;margin:36px auto;background:#fff;border:1px solid var(--line);border-radius:18px;padding:30px 28px;box-shadow:0 10px 34px rgba(16,32,54,.10)}
.auth-card .auth-mark{display:block;margin:0 auto 10px;border-radius:12px}
.auth-card h1{text-align:center;font-size:1.55rem;margin-bottom:16px}
.auth-card .form{max-width:none}
.auth-card p.muted{text-align:center}
/* Legal/content pages: readable measure */
.prose{max-width:760px;line-height:1.68}
.prose h2{margin-top:30px}
.prose p{margin:10px 0}
/* Dashboard welcome head */
.dash-head{display:flex;gap:16px;align-items:center;background:linear-gradient(115deg,#fdf8ec,#fdf3d8);border:1px solid #eadfae;border-radius:16px;padding:18px 20px;margin-bottom:20px}
.dash-head h1{margin:0;font-size:1.5rem}
.dash-head p{margin:3px 0 0}
.dash-head .avatar-lg{width:58px;height:58px;font-size:1.25rem}
/* FAQ accordions (native details/summary — no JS) */
.faq{margin-top:34px}
.faq details{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 18px;margin:10px 0}
.faq summary{font-weight:600;cursor:pointer;color:var(--navy)}
.faq details p{margin:10px 0 4px;color:#43536b}
/* Structured footer */
.site-footer{text-align:left;background:#f7fafc;padding:34px 24px 28px;margin-top:44px}
.footer-grid{max-width:1060px;margin:0 auto;display:grid;grid-template-columns:2fr 1fr 1fr 1.3fr;gap:26px}
.footer-grid h4{margin:2px 0 10px;font-size:.82rem;letter-spacing:.09em;text-transform:uppercase;color:var(--navy)}
.footer-grid p{margin:6px 0}
.footer-logo{display:flex;align-items:center;gap:9px;font-family:Fraunces,serif;font-weight:700;font-size:1.12rem;color:var(--navy)}
.footer-logo span{color:#a97e12}
.tbl tbody tr:nth-child(even){background:#f7fafc}
@media (max-width:820px){.footer-grid{grid-template-columns:1fr 1fr}}
@media (max-width:520px){.footer-grid{grid-template-columns:1fr}.auth-card{margin:18px auto;padding:24px 18px}.dash-head{padding:14px 16px}}

/* Header nav icons — deliberately small (15px), one line style (2026-11-09) */
.icon-nav{width:15px;height:15px;vertical-align:-2.5px;margin-right:5px}
.site-header nav a,.site-header .nav-user{display:inline-flex;align-items:center}
.site-header .nav-user{color:#dbe5f0;margin-left:14px}

/* Teacher profile: price line + lesson conditions (2026-11-09) */
.profile-price{font-weight:700;color:#8a6d1f;font-size:16.5px;margin-top:2px}
.cond-panel{margin:6px 0 20px}
.cond-list{list-style:none;margin:6px 0 2px;padding:0;display:grid;gap:10px}
.cond-list li{display:flex;gap:10px;align-items:flex-start;font-size:14.5px;line-height:1.5}
.cond-list .icon{flex:0 0 auto;margin-top:1px;color:#8a6d1f}

/* Mobile header: one single row for visitors, so Log in / Sign up are always
   visible top-right; the logged-in header (with the user name) may wrap. */
@media (max-width: 640px){
  .site-header{flex-wrap:nowrap;padding:10px 12px;gap:8px}
  .site-header:has(.nav-user){flex-wrap:wrap}
  .brand{font-size:1rem;gap:7px;white-space:nowrap}
  .brand-mark{width:28px;height:28px}
  .site-header nav{display:flex;align-items:center;gap:10px;white-space:nowrap}
  .site-header nav a{margin-left:0}
  .site-header .btn{padding:8px 12px;font-size:.92rem}
}

/* Header Log out button: white on navy so it is actually visible, and the
   logged-in phone nav wraps so the button stays on screen (2026-11-10) */
.site-header .btn-ghost{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.45);color:#fff}
.site-header .btn-ghost:hover{border-color:#fff;color:#fff;background:rgba(255,255,255,.16)}
@media (max-width: 640px){
  .site-header:has(.nav-user) nav{flex-wrap:wrap;white-space:normal;row-gap:4px}
}

/* Branded error pages (404/500) + full-width form submits where it reads
   as one clear action (2026-11-10) */
.error-page{text-align:center;padding:54px 0 42px}
.error-code{font-family:'Fraunces',Georgia,serif;font-size:64px;font-weight:700;color:var(--gold);line-height:1;margin:0 0 6px}
.error-page h1{margin-top:0}
.auth-card .form .btn{width:100%}
@media (max-width: 640px){
  .form button[type="submit"]{width:100%}
  .error-code{font-size:48px}
}

/* Log out: its own solid white button at the header's right edge — on phones
   it stays on the brand row while the nav links take the row below. */
.logout-form{margin:0}
.logout-btn{background:#fff;border:1.5px solid #fff;color:var(--navy);font-weight:700}
.logout-btn:hover{background:var(--gold);border-color:var(--gold);color:var(--navy)}
@media (max-width: 640px){
  .site-header:has(.logout-form){flex-wrap:wrap}
  .site-header:has(.logout-form) nav{order:3;flex-basis:100%}
  .logout-form{margin-left:auto}
  .logout-btn{padding:8px 12px;font-size:.92rem}
}

/* Reviews + in-app messages (2026-11-10) */
.stars{letter-spacing:2px;font-size:1.02rem;line-height:1}
.star-on{color:var(--gold)}
.star-off{color:var(--line)}
.rating-line{display:flex;align-items:center;gap:7px;margin:4px 0 8px}
.badge{display:inline-block;background:var(--gold);color:var(--navy);border-radius:999px;padding:1px 9px;font-weight:700;font-size:.78rem;margin-left:6px;vertical-align:2px}
.review{border-top:1px solid var(--line);padding:12px 0}
.review:first-of-type{border-top:none}
.review-text{white-space:pre-wrap;margin:4px 0 0}
.msg-thread{margin:16px 0}
.msg{max-width:80%;padding:10px 14px;border-radius:14px;margin:8px 0;background:#fff;border:1.5px solid var(--line)}
.msg-mine{margin-left:auto;background:var(--navy);border-color:var(--navy);color:#fff}
.msg-meta{font-size:.76rem;opacity:.72;margin-bottom:3px}
.msg-body{white-space:pre-wrap}

/* Design polish 2026-11-10 (items #1/#3/#4): brand lockup, hero trust icons, rich homepage empty state */
.brand{gap:12px}
.brand-words{display:inline-flex;flex-direction:column;line-height:1.04;text-align:left}
.brand .brand-top{font-family:'Inter',system-ui,sans-serif;font-size:.6rem;font-weight:700;letter-spacing:.26em;text-transform:uppercase;color:var(--gold)}
.brand .brand-main{font-family:'Fraunces',Georgia,serif;font-size:1.32rem;font-weight:600;color:#fff}
.footer-logo{display:flex;align-items:center;gap:10px}
.footer-brand .brand-main{color:var(--navy)}
.footer-brand .brand-top{color:#a97e12}
.hero2-note{display:flex;flex-wrap:wrap;gap:8px 22px;align-items:center}
.hero2-note span{display:inline-flex;align-items:center;gap:7px}
.hero2-note .icon{color:var(--gold)}
.empty-photos{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:18px}
.empty-photos img{width:100%;height:112px;object-fit:cover;border-radius:12px;display:block}
.empty-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:18px}
.empty-chip{display:inline-flex;align-items:center;gap:7px;background:#fff;border:1px solid var(--line);border-radius:999px;padding:7px 13px;font-size:.85rem;color:#3d4a59}
.empty-chip .icon{color:var(--gold)}
@media (max-width:640px){.empty-photos img{height:82px}.brand .brand-main{font-size:1.18rem}}

/* Accessibility utility (2026-11-10): visually hidden labels for screen readers */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
