/* Famimulor — Parent Classroom
   Soft, warm, trustworthy pastel identity: blush pink · mint · sky blue · deep navy.
   Note: original semantic var names are kept (JS/HTML reference them); only the
   palette values are re-tuned to the Famimulor brand. */
:root {
  --navy: #14568a;
  --blue: #2f83c0;
  --blue-deep: #14568a;
  --sky: #dcecf8;
  --sky-strong: #9cc9e8;
  --blush: #e79ba6;
  --blush-soft: #f6d3d8;
  --mint: #8fceb0;
  --mint-soft: #d3ecdf;
  /* remapped legacy names */
  --yellow: #f4d2d7;   /* soft blush highlight (step.active, btn-yellow) */
  --orange: #7fb6dd;   /* soft sky (primary gradient start, accents) */
  --terra: #14568a;    /* navy (primary gradient end, price, totals) */
  --brown: #14568a;    /* headings -> navy */
  --brown-soft: #6d8ca2;
  --green: #5aa17d;
  --cream: #f2f8fb;    /* page background: pale blue-white */
  --paper: #ffffff;
  --ink: #2b3a48;
  --ink-soft: #5d6f80;
  --line: #e2edf3;
  --ok: #3e9a6d;
  --warn: #cf8a2e;
  --danger: #c1512f;
  --radius: 18px;
  --shadow: 0 10px 26px rgba(20, 86, 138, 0.10);
  --font: 'Poppins', 'Noto Sans Thai', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-script: 'Parisienne', cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- floating brand bubbles (soft background motif) ---------- */
.bubbles { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bubbles span { position: absolute; border-radius: 50%; filter: blur(3px); opacity: .55; }
.bubbles .bb1 { width: 300px; height: 300px; left: -70px; top: -50px; background: radial-gradient(circle at 30% 30%, var(--mint-soft), transparent 70%); }
.bubbles .bb2 { width: 240px; height: 240px; right: -60px; top: 90px; background: radial-gradient(circle at 30% 30%, var(--blush-soft), transparent 70%); }
.bubbles .bb3 { width: 220px; height: 220px; left: -60px; bottom: 180px; background: radial-gradient(circle at 30% 30%, var(--sky), transparent 70%); }
.bubbles .bb4 { width: 280px; height: 280px; right: -80px; bottom: -60px; background: radial-gradient(circle at 30% 30%, var(--mint-soft), transparent 70%); }
@media (max-width: 640px){ .bubbles span { opacity: .4; } }

/* keep content above the bubbles */
.nav, .hero, .wrap, .footer, .line-fab { position: relative; z-index: 1; }

/* ---------- top bar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 20px; color: var(--navy); }
.brand .logo {
  width: 34px; height: 34px; border-radius: 50%;
  background: conic-gradient(from 200deg, var(--blush), var(--sky-strong), var(--mint), var(--blush));
  display: grid; place-items: center; box-shadow: var(--shadow); flex: none;
}
.brand .wordmark {
  font-family: var(--font-script); font-size: 30px; font-weight: 400; line-height: 1;
  background: linear-gradient(95deg, var(--blush), var(--sky-strong) 55%, var(--mint));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  padding-right: 4px;
}
.nav a.plain { color: var(--ink-soft); font-weight: 600; font-size: 15px; }
.nav a.plain:hover { color: var(--navy); }

/* ---------- hero ---------- */
.hero {
  padding: 60px 22px 44px;
  text-align: center;
  background:
    radial-gradient(1200px 320px at 50% -90px, var(--sky), transparent),
    linear-gradient(180deg, #f7fbfe, var(--cream));
  overflow: hidden;
}
.hero .script {
  font-family: var(--font-script); font-size: clamp(46px, 10vw, 82px); line-height: .95; margin: 0 0 4px;
  background: linear-gradient(95deg, var(--blush), var(--sky-strong) 50%, var(--mint));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero h1 { font-size: clamp(26px, 5vw, 42px); margin: 8px 0 10px; color: var(--navy); font-weight: 800; text-wrap: balance; }
.hero p { color: var(--ink-soft); max-width: 620px; margin: 0 auto; font-size: 17px; }
.hero .tagline { font-style: italic; color: var(--navy); font-weight: 500; margin: 2px 0 14px; font-size: clamp(14px, 2.4vw, 18px); }
.badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.badge {
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 15px; font-size: 14px; color: var(--navy); box-shadow: var(--shadow); font-weight: 600;
}
.leaf { position: absolute; opacity: .5; font-size: 30px; }

/* ---------- layout ---------- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 28px 22px 80px; }
.section-title { font-size: 25px; color: var(--navy); margin: 8px 0 20px; font-weight: 700; }

/* ---------- workshop cards ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
#list { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px){ #list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px){ #list { grid-template-columns: 1fr; } }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(20, 86, 138, .16); }
.card .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--sky-strong), var(--blush-soft));
  display: grid; place-items: center; font-size: 54px; overflow: hidden;
}
.card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tag {
  align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--blue-deep);
  background: var(--sky); padding: 3px 10px; border-radius: 999px;
}
.card h3 { margin: 2px 0; font-size: 19px; color: var(--navy); }
.card .muted { color: var(--ink-soft); font-size: 14px; }
.card .rounds { font-size: 14px; color: var(--ink-soft); }
.card .price { font-weight: 800; color: var(--blush); font-size: 18px; margin-top: 4px; }
.card .foot { margin-top: auto; padding-top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-family: var(--font); font-weight: 700; font-size: 16px;
  padding: 12px 20px; border-radius: 12px; transition: filter .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--sky-strong); outline-offset: 2px; }
.btn-primary { background: linear-gradient(135deg, var(--sky-strong), var(--navy)); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--brown-soft); }
.btn-yellow { background: var(--blush); color: #fff; }
.btn-yellow:hover { filter: brightness(1.04); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { filter: brightness(1.06); }
.btn-sm { padding: 7px 12px; font-size: 14px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.block { width: 100%; }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--navy); font-size: 15px; }
.field .req { color: var(--danger); }
input, select, textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 11px;
  font-family: var(--font); font-size: 15px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky-strong); box-shadow: 0 0 0 3px var(--sky); }
textarea { min-height: 80px; resize: vertical; }
.hint { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- panel / box ---------- */
.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 780px){ .two-col { grid-template-columns: 1fr; } }

/* ---------- steps ---------- */
.steps { display: flex; gap: 8px; margin-bottom: 20px; }
.step {
  flex: 1; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink-soft);
  padding: 8px; border-radius: 10px; background: #fff; border: 1px solid var(--line);
}
.step.active { background: var(--blush-soft); color: var(--navy); border-color: var(--blush); }
.step.done { background: var(--green); color: #fff; border-color: var(--green); }

/* ---------- summary rows ---------- */
.rowline { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.rowline:last-child { border-bottom: none; }
.rowline .k { color: var(--ink-soft); }
.rowline .v { font-weight: 700; color: var(--navy); text-align: right; }
.total { font-size: 20px; color: var(--blush); }

/* ---------- badges / status ---------- */
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.pill.pending { background: #fdeccb; color: var(--warn); }
.pill.paid { background: var(--mint-soft); color: var(--ok); }
.pill.confirmed { background: var(--navy); color: #fff; }
.pill.cancelled { background: #f2d5cc; color: var(--danger); }

/* ---------- QR box ---------- */
.qrbox { text-align: center; padding: 18px; background: #fff; border: 2px dashed var(--sky-strong); border-radius: 14px; }
.qrbox img { margin: 0 auto; width: 220px; height: 220px; }

/* ---------- toast / alert ---------- */
.alert { padding: 12px 15px; border-radius: 11px; font-size: 14px; margin-bottom: 14px; }
.alert.info { background: var(--sky); color: var(--blue-deep); }
.alert.warn { background: #fdeccb; color: var(--warn); }
.alert.ok { background: var(--mint-soft); color: var(--ok); }
.alert.err { background: #f6d9cf; color: var(--danger); }

/* ---------- admin table ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--ink-soft); font-size: 13px; text-transform: uppercase; letter-spacing: .3px; }
tr:hover td { background: #f6fbfe; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.stat .n { font-size: 28px; font-weight: 800; color: var(--navy); }
.stat .l { font-size: 13px; color: var(--ink-soft); }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(20,44,68,.5); display: none; place-items: center; z-index: 100; padding: 18px; }
.modal-bg.open { display: grid; }
.modal { background: var(--paper); border-radius: var(--radius); padding: 24px; max-width: 640px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: var(--shadow); }
.modal h3 { margin-top: 0; color: var(--navy); }
.round-row { display: grid; grid-template-columns: 1.2fr 1fr .7fr .8fr auto; gap: 8px; margin-bottom: 8px; align-items: center; }
@media (max-width: 620px){ .round-row { grid-template-columns: 1fr 1fr; } }

.footer { text-align: center; padding: 36px 24px; color: var(--ink-soft); font-size: 14px; border-top: 1px solid var(--line); }
.footer .fline { margin-bottom: 14px; }

/* LINE Official add-friend button */
.line-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: #06C755; color: #fff !important; font-weight: 800; font-size: 15px;
  padding: 11px 20px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 6px 16px rgba(6, 199, 85, 0.35);
  transition: filter .15s ease, transform .05s ease;
}
.line-btn:hover { filter: brightness(1.05); }
.line-btn:active { transform: translateY(1px); }
.line-btn svg { width: 22px; height: 22px; flex: none; }

/* floating LINE button (bottom-right, all pages) */
.line-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  background: #06C755; color: #fff !important; font-weight: 800; font-size: 14px;
  padding: 12px 16px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 8px 20px rgba(6, 199, 85, 0.4);
}
.line-fab svg { width: 22px; height: 22px; flex: none; }
.line-fab .lbl { white-space: nowrap; }
@media (max-width: 520px){ .line-fab .lbl { display: none; } .line-fab { padding: 13px; } }
.center { text-align: center; }
.mt { margin-top: 16px; }
.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce){ * { scroll-behavior: auto; transition: none !important; } }
