/* Beginning Learning — site styles */
:root {
  /* Brand colors taken from the Beginning Learning logo */
  --blue: #0b63ce;
  --blue-dark: #084ea6;
  --red: #e8262b;
  --orange: #f7931e;
  --yellow: #fbc02d;
  --green: #3db34a;
  --sky: #1e9be9;
  --purple: #7b3fd1;
  --pink: #ef6a9b;
  --ink: #1b2330;
  --ink-soft: #4e5868;
  --paper: #fffdf9;
  --card: #ffffff;
  --sage: #eaf3fd;       /* light tint used for chips, badges, hovers */
  --sage-deep: #e1edfb;  /* hero, footer, feature panels */
  --leaf: var(--green);
  --leaf-dark: var(--blue-dark);
  --apple: var(--red);
  --apple-dark: #c41d22;
  --sun: var(--yellow);
  --line: #e3e7ee;
  --amazon: #ffb347;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 35, 48, .06), 0 6px 20px rgba(27, 35, 48, .07);
  --rainbow: linear-gradient(90deg, var(--red) 0 14%, var(--orange) 14% 28%, var(--yellow) 28% 42%, var(--green) 42% 57%, var(--sky) 57% 71%, var(--purple) 71% 85%, var(--pink) 85% 100%);
  --head: 'Fredoka', system-ui, sans-serif;
  --body: 'Andika', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); text-underline-offset: 3px; }
a:hover { color: var(--apple); }
h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-soft); }
.small { font-size: .88rem; }
.eyebrow { font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--apple); margin-bottom: .4em; font-weight: 600; }
.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 62ch; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* Buttons */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: .4em; background: var(--blue); color: #fff; border: 0; border-radius: 999px; padding: .7em 1.35em; font: 600 1rem var(--head); text-decoration: none; cursor: pointer; transition: background .15s, transform .15s; }
.btn:hover { background: var(--blue-dark); color: #fff; transform: translateY(-1px); }
.btn-small { padding: .45em 1em; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { background: var(--sage); color: var(--ink); }
.btn-amazon { background: var(--amazon); color: #1a1a1a; }
.btn-amazon:hover { background: #f5a031; color: #1a1a1a; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink-soft); font: inherit; font-size: .85rem; cursor: pointer; text-decoration: underline; }
.link-btn.danger { color: var(--apple); margin-top: 1em; }

/* Header */
.site-header { background: #fff; border-bottom: 0; box-shadow: 0 1px 0 var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand img { height: 54px; width: auto; }
.site-header::after { content: ""; display: block; height: 4px; background: var(--rainbow); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-text, .footer-brand { font: 700 1.45rem var(--head); letter-spacing: -.02em; }
.brand-text span, .footer-brand span { color: var(--apple); }
.footer-brand img { width: 230px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.site-nav > a { white-space: nowrap; text-decoration: none; color: var(--ink); font: 500 1rem var(--head); padding: 6px 2px; border-bottom: 3px solid transparent; }
.site-nav > a.is-active, .site-nav > a:hover { border-color: var(--apple); color: var(--ink); }
.site-nav .btn { color: #fff; border: 0; }
.nav-search input { width: 140px; padding: .45em .9em; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: .9rem; }
.nav-user { font-weight: 600; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 2px solid var(--line); border-radius: 999px; padding: .35em 1em; font: 600 .95rem var(--head); }
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); flex-direction: column; align-items: stretch; padding: 12px 16px 20px; border-bottom: 1px solid var(--line); gap: 6px; }
  .site-nav.is-open { display: flex; }
  .nav-search input { width: 100%; }
}

/* Flash */
.flash { padding: .8em 1.1em; border-radius: 10px; margin: 16px 0; background: var(--sage); }
.flash ul { margin: 0; padding-left: 1.2em; }
.flash-error { background: #fde4e1; color: #7a1b14; }
.flash-info { background: #fff4d1; }

/* Hero */
.hero { background: var(--sage-deep); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; padding: 56px 0; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.hero h1 em { font-style: normal; color: var(--apple); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
.hero .btn-ghost { box-shadow: inset 0 0 0 2px var(--ink); }
.hero-audience { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; color: var(--ink-soft); }
.hero-audience li::before { content: "●"; color: var(--leaf); margin-right: 8px; font-size: .7em; vertical-align: middle; }
.hero-room { position: relative; display: block; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 50px rgba(31, 42, 29, .25); transform: rotate(1.5deg); max-width: 380px; justify-self: center; }
.hero-room img { width: 100%; }
.hero-room-tag { position: absolute; left: 12px; right: 12px; bottom: 12px; background: rgba(255, 255, 255, .95); color: var(--ink); padding: 10px 14px; border-radius: 12px; font: 600 .95rem var(--head); display: flex; align-items: center; gap: 10px; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--apple); box-shadow: 0 0 0 0 rgba(217, 52, 43, .6); animation: pulse 1.8s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(217, 52, 43, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 52, 43, 0); } }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; padding: 36px 0; } .hero-room { max-width: 320px; } }

/* Sections */
.section { padding: 48px 0 8px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 40px 0 16px; flex-wrap: wrap; }
.cat-head { display: block; border-left: 8px solid var(--cat); padding-left: 20px; margin-top: 32px; }

/* Topic tiles */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cat-tile { background: var(--card); border-radius: var(--radius); padding: 18px 18px 16px; text-decoration: none; color: var(--ink); border-top: 6px solid var(--cat); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; transition: transform .15s; }
.cat-tile:hover { transform: translateY(-3px); color: var(--ink); }
.cat-name { font: 600 1.15rem var(--head); }
.cat-desc { color: var(--ink-soft); font-size: .92rem; flex: 1; }
.cat-count { font-size: .82rem; color: var(--cat); font-weight: 700; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; padding-bottom: 32px; }
.card { background: var(--card); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); display: flex; flex-direction: column; border-left: 6px solid var(--cat, var(--leaf)); transition: transform .15s; }
.card:hover { transform: translateY(-3px); color: var(--ink); }
.card h2, .card h3 { font-size: 1.22rem; margin: .3em 0 .45em; }
.card p { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.card-cat { font: 600 .78rem var(--head); text-transform: uppercase; letter-spacing: .06em; color: var(--cat, var(--leaf)); }
.card-meta { font-size: .82rem; color: var(--ink-soft); }
.feature-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; }
.card-feature { background: color-mix(in srgb, var(--cat) 12%, white); border-left: 0; border-top: 8px solid var(--cat); padding: 32px; }
.card-feature h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
.card-list { display: grid; gap: 12px; }
.card-mini { padding: 14px 18px; }
.card-mini h3 { font-size: 1.05rem; margin: .2em 0; }
@media (max-width: 820px) { .feature-row { grid-template-columns: 1fr; } }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 20px; }
.chip { text-decoration: none; background: #fff; color: var(--ink); border: 1px solid var(--line); border-left: 5px solid var(--cat, var(--line)); border-radius: 999px; padding: .35em .95em; font: 500 .9rem var(--head); }
.chip:hover, .chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-sep { flex-basis: 12px; }
.filters { display: flex; gap: 8px; align-items: center; }
.filters select { padding: .4em .8em; border-radius: 999px; border: 1px solid var(--line); font: inherit; }
.pager { display: flex; gap: 6px; padding-bottom: 32px; }
.pager a { padding: .3em .8em; border-radius: 8px; background: #fff; border: 1px solid var(--line); text-decoration: none; }
.pager a.is-active { background: var(--ink); color: #fff; }

/* Band */
.band { background: #0d2b57; color: #eaf1fb; margin-top: 48px; padding: 56px 0; }
.band h2 { color: #fff; }
.band-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.post-stack { display: grid; gap: 10px; }
.post-chip { background: #16396e; border-radius: 12px; padding: 14px 16px; text-decoration: none; color: #eaf1fb; display: grid; gap: 4px; }
.post-chip:hover { background: #1d4886; color: #fff; }
.band .muted { color: #b9c8de; }
@media (max-width: 820px) { .band-grid { grid-template-columns: 1fr; } }

.badge { display: inline-block; font: 600 .74rem var(--head); text-transform: uppercase; letter-spacing: .05em; background: #e5f5e7; color: #1f7a2e; border-radius: 6px; padding: .15em .55em; }
.badge-question { background: #e0ecff; color: #1f4f96; }
.badge-review { background: #fff0cc; color: #7a5600; }
.badge-classroom { background: #fde4e1; color: #8a221b; }
.badge-pending { background: #fff0cc; color: #7a5600; }

.book-promo { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: center; padding-bottom: 48px; }
.book-promo img { border-radius: 10px; box-shadow: var(--shadow); transform: rotate(-2deg); }
@media (max-width: 640px) { .book-promo { grid-template-columns: 1fr; } .book-promo img { max-width: 200px; } }

/* Article */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding: 28px 0 48px; }
.crumbs { font-size: .9rem; color: var(--ink-soft); margin-bottom: 16px; }
.article-head { border-top: 8px solid var(--cat); padding-top: 20px; margin-bottom: 28px; }
.article-meta { font-size: .9rem; color: var(--ink-soft); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.disclosure-note { font-size: .82rem; color: var(--ink-soft); background: #fff; border: 1px dashed var(--line); border-radius: 10px; padding: .6em .9em; }
.prose { font-size: 1.08rem; max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.4em 0; padding: .8em 1.2em; background: var(--sage); border-radius: 12px; border-left: 5px solid var(--blue); }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .5em .7em; text-align: left; vertical-align: top; }
.prose th { background: var(--sage); font-family: var(--head); }
.prose .tip { background: #fff4d1; border-radius: 12px; padding: .9em 1.2em; }
.article-side { display: grid; gap: 18px; align-content: start; position: sticky; top: 90px; }
.side-box { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.side-box h2 { font-size: 1.1rem; }
.side-box ul { padding-left: 1.1em; margin: 0; }
.side-classroom { background: var(--sage-deep); }
.article-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 28px 0; }
.rec-btn, .share-btn, .print-btn { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: .45em 1em; font: 600 .92rem var(--head); cursor: pointer; color: var(--ink); }
.rec-btn svg { fill: none; stroke: var(--apple); stroke-width: 2; }
.rec-btn.is-on { background: #fde4e1; border-color: var(--apple); }
.rec-btn.is-on svg { fill: var(--apple); }
.rec-count { color: var(--ink-soft); }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } .article-side { position: static; } }

/* Comments */
.comments { border-top: 2px solid var(--line); padding-top: 28px; }
.comment-form, .reply form { display: grid; gap: 8px; margin-bottom: 24px; }
textarea, input[type=text], input[type=email], input[type=password], input[type=search], input:not([type]), input[type=number], select { width: 100%; font: inherit; padding: .6em .8em; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
textarea:focus, input:focus, select:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(11, 99, 206, .2); }
.comment-form .btn, .reply .btn { justify-self: start; }
.comment-list, .comment-replies { list-style: none; padding: 0; margin: 0; }
.comment { background: #fff; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.comment-replies { margin-top: 12px; padding-left: 20px; border-left: 3px solid var(--sage); }
.comment-replies .comment { box-shadow: none; background: var(--paper); }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; font-size: .92rem; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font: 600 .9rem var(--head); }
.comment-text p:last-child { margin-bottom: 4px; }
.reply summary { cursor: pointer; font-size: .88rem; color: var(--leaf-dark); margin-top: 6px; }
.report-form { display: inline; }
.join-prompt { background: var(--sage); padding: 1em 1.2em; border-radius: 12px; }

/* Community */
.post-list { display: grid; gap: 12px; padding-bottom: 24px; }
.post-row { background: #fff; border-radius: var(--radius); padding: 18px 20px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); display: grid; gap: 4px; }
.post-row h2 { font-size: 1.2rem; margin: 4px 0 0; }
.post-row p { margin: 0; color: var(--ink-soft); }
.post-row .muted { font-size: .85rem; }
.post-row:hover { color: var(--ink); outline: 2px solid var(--sage-deep); }
.post-head { padding: 12px 0 8px; }
.panel { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.new-post form, .admin-form { display: grid; gap: 8px; }
.new-post .btn, .admin-form .btn { justify-self: start; }
fieldset { border: 0; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
legend { font-weight: 700; margin-bottom: 6px; width: 100%; }
.radio, .check { display: flex; gap: 8px; align-items: center; font-size: .96rem; }
.radio input, .check input { width: auto; accent-color: var(--apple); }

/* Auth */
.auth { display: grid; place-items: center; padding: 48px 0; }
.auth-card { background: #fff; border-radius: 20px; padding: 32px; width: min(460px, 100%); box-shadow: var(--shadow); }
.auth-card form { display: grid; gap: 8px; margin: 16px 0; }
.hp { position: absolute; left: -9999px; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: 32px; }
.plain-list { padding-left: 1.1em; }
@media (max-width: 820px) { .account-grid { grid-template-columns: 1fr; } }

/* Shoppable classroom */
.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; padding-bottom: 32px; }
.room { position: relative; border-radius: 18px; overflow: visible; box-shadow: var(--shadow); max-width: 640px; }
.room > img { border-radius: 18px; width: 100%; user-select: none; }
.spot { position: absolute; transform: translate(-50%, -50%); z-index: 2; }
.spot:hover, .spot.is-open, .spot:focus-within { z-index: 5; }
.spot-dot { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; background: var(--apple); color: #fff; font: 700 .9rem var(--head); cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); animation: pulse 2.2s infinite; padding: 0; }
.spot-dot.no-asin { outline: 3px dashed var(--sun); outline-offset: 2px; }
.spot.is-hint .spot-dot, .spot-dot:hover { background: var(--leaf); transform: scale(1.15); }
.spot-card { display: none; position: absolute; width: 240px; background: #fff; color: var(--ink); border-radius: 14px; padding: 14px 16px; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); opacity: 0; visibility: hidden; transition: opacity .15s, transform .15s; font-size: .92rem; }
.spot-card strong { font-family: var(--head); font-size: 1.05rem; display: block; margin-bottom: 4px; }
.spot-card p { margin: 0 0 10px; color: var(--ink-soft); }
.spot-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.spot-right { left: 26px; }
.spot-left { right: 26px; }
.spot-down { top: -10px; }
.spot-up { bottom: -10px; }
@media (hover: hover) { .spot:hover .spot-card { display: block; opacity: 1; visibility: visible; } }
.spot.is-open .spot-card, .spot:focus-within .spot-card { display: block; opacity: 1; visibility: visible; }
.shop-list { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); position: sticky; top: 90px; }
.shop-list ol { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 4px; }
.shop-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; }
.shop-list li:hover { background: var(--sage); }
.shop-list label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.shop-list input { width: auto; accent-color: var(--apple); }
.num { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--apple); color: #fff; font: 700 .78rem var(--head); display: grid; place-items: center; }
@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; }
  .shop-list { position: static; }
  .spot-card { position: fixed; left: 16px; right: 16px; bottom: 16px; top: auto; width: auto; z-index: 50; }
}

/* Admin hotspot editor */
.room-editor { cursor: crosshair; touch-action: none; }
.room-editor .spot-dot { animation: none; cursor: grab; }
.room-editor .spot-new .spot-dot { background: var(--sun); color: var(--ink); }
.spot.save-failed .spot-dot { background: #000; }
.spot-table { display: grid; gap: 8px; }
.spot-row { display: grid; grid-template-columns: 28px 1.2fr 120px 1fr 1.4fr 64px 64px auto auto auto; gap: 6px; align-items: center; }
.spot-row input { padding: .4em .5em; font-size: .88rem; }
@media (max-width: 1100px) { .spot-row { grid-template-columns: 28px 1fr 1fr; } }

/* Admin */
.admin-nav { padding-top: 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding-bottom: 20px; }
.stat { background: #fff; border-radius: 12px; padding: 16px; box-shadow: var(--shadow); display: grid; }
.stat-n { font: 700 2rem var(--head); }
.stat-k { color: var(--ink-soft); font-size: .9rem; }
.mod-item { border-top: 1px solid var(--line); padding: 12px 0; }
.mod-item blockquote { margin: 6px 0 10px; color: var(--ink-soft); background: var(--paper); padding: 8px 12px; border-radius: 8px; }
.inline-form { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table .is-banned { opacity: .5; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.form-row label { display: grid; gap: 4px; }
.admin-form label { font-weight: 600; font-size: .92rem; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; }
.form-actions { display: flex; gap: 10px; }

/* Books */
.book-grid { display: grid; gap: 24px; padding-bottom: 24px; }
.book { background: #fff; border-radius: 18px; padding: 24px; box-shadow: var(--shadow); display: grid; grid-template-columns: 340px 1fr; gap: 32px; align-items: center; }
.book-images { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.book-images img { border-radius: 8px; box-shadow: var(--shadow); }
@media (max-width: 760px) { .book { grid-template-columns: 1fr; } }

/* Ads */
.ad { margin: 24px auto; text-align: center; min-height: 90px; }
.ad-placeholder { width: min(728px, 100% - 32px); display: grid; place-items: center; background: repeating-linear-gradient(45deg, #f1ede2, #f1ede2 10px, #ece7da 10px, #ece7da 20px); color: #a39c8b; font: 600 .75rem var(--head); text-transform: uppercase; letter-spacing: .1em; border-radius: 8px; }
.ad-sidebar.ad-placeholder { width: 100%; min-height: 250px; margin: 0; }

/* Footer */
.site-footer { background: var(--sage-deep); margin-top: 48px; border-top: 4px solid transparent; border-image: var(--rainbow) 1; padding: 48px 0 16px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 32px; }
.site-footer h2 { font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .94rem; }
.signup { display: flex; gap: 8px; flex-wrap: wrap; }
.signup input { flex: 1 1 180px; }
.footer-legal { border-top: 1px solid rgba(27, 35, 48, .15); margin-top: 32px; padding-top: 16px; font-size: .84rem; color: var(--ink-soft); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Print: articles print cleanly for the classroom */
@media print {
  .site-header, .site-footer, .article-side, .comments, .article-actions, .ad, .disclosure-note, .crumbs { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .article-layout { display: block; }
}

@media (max-width: 420px) {
  .header-row { gap: 10px; }
  .brand-text { font-size: 1.15rem; }
  .brand-mark svg { width: 32px; height: 32px; }
  .brand img { height: 40px; }
}

/* Meet Amy page */
.meet { background: linear-gradient(180deg, #fff7f2 0%, var(--paper) 100%); padding: 48px 0 32px; }
.meet-grid { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 56px; align-items: center; }
.meet-photo { position: relative; margin: 0 0 40px; }
.meet-photo img { width: 100%; height: auto; border: 10px solid #fff; border-radius: 6px; box-shadow: 0 14px 34px rgba(27, 35, 48, .18); transform: rotate(-2deg); }
.meet-badge { position: absolute; left: -12px; bottom: -36px; background: #cfe4d4; color: var(--ink); font: 700 1.7rem/1.05 'Caveat', cursive; padding: 14px 22px; border-radius: 30px 40px 28px 44px; max-width: 250px; transform: rotate(-3deg); box-shadow: var(--shadow); }
.meet-badge span { color: var(--pink); }
.meet-copy h1 { font-size: clamp(2.4rem, 5.5vw, 3.6rem); margin-bottom: .4em; }
.meet-name span:nth-child(1) { color: var(--pink); }
.meet-name span:nth-child(2) { color: var(--yellow); }
.meet-name span:nth-child(3) { color: var(--green); }
.meet-copy p { font-size: 1.12rem; max-width: 56ch; }
.meet-lead { font-weight: 700; }
.meet-copy .heart { color: var(--pink); }
.meet-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding-bottom: 16px; }
@media (max-width: 820px) {
  .meet-grid { grid-template-columns: 1fr; gap: 32px; }
  .meet-photo { max-width: 380px; margin-inline: auto; margin-bottom: 44px; }
  .meet-badge { font-size: 1.45rem; left: 0; }
}

/* Around the Classroom */
.around-head { align-items: flex-end; }
.around-sections { display: grid; gap: 22px; padding-bottom: 24px; }
.center-block { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; border-top: 6px solid var(--cat); scroll-margin-top: calc(var(--hdr, 130px) + 16px); }
.center-block-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.center-block-head h2 { margin: 0 0 2px; font-size: 1.35rem; }
.center-block-head h2 a { color: var(--ink); text-decoration: none; }
.center-block-head h2 a:hover { color: var(--cat); }
.center-block-head p { margin: 0; }
.center-block.is-current { box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat) 35%, transparent), var(--shadow); }
.center-note { background: var(--paper); border-radius: 10px; padding: 12px 16px; margin: 14px 0 0; font-size: 1.18rem; line-height: 1.55; color: var(--ink); }
.center-empty { color: var(--ink-soft); background: var(--paper); border: 2px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; margin: 0; }
/* Up to 4 photos side by side. Change --photo to make them bigger or smaller. */
.photo-grid { --photo: 135px; display: grid; grid-template-columns: repeat(4, var(--photo)); gap: 16px; }
.photo-grid.is-large { --photo: 198px; }
.photo-grid a { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--sage); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.photo-grid a:hover img { transform: scale(1.04); }
.earlier-head { margin: 18px 0 0; }
.room-card { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; text-decoration: none; color: var(--ink); }
.room-card img { width: 72px; height: 96px; object-fit: cover; border-radius: 8px; }
.week-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.week-strip a { position: relative; display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); color: #fff; text-decoration: none; }
.week-strip img { width: 100%; height: 100%; object-fit: cover; }
.week-strip span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font: 600 .9rem var(--head); background: linear-gradient(transparent, rgba(0,0,0,.65)); }
@media (max-width: 900px) {
  .photo-grid, .photo-grid.is-large { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 90%; }
}
@media (max-width: 520px) {
  .photo-grid, .photo-grid.is-large { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 100%; }
  .center-block { padding: 16px 14px; }
  .center-note { font-size: 1.08rem; }
}

/* Center buttons stay pinned under the main menu */
.center-nav { background: #fff; border-top: 1px solid var(--line); }
.center-nav .chip-row { flex-wrap: nowrap; overflow-x: auto; padding: 10px 0; scrollbar-width: none; scroll-behavior: smooth; }
.center-nav .chip-row::-webkit-scrollbar { display: none; }
.center-nav .chip { flex: none; }
@media (min-width: 1100px) { .center-nav .chip-row { flex-wrap: wrap; } }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(10, 14, 20, .88); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 56px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 8px; }
.lightbox figcaption { color: #fff; margin-top: 12px; font-size: .95rem; text-align: center; }
.lightbox button { position: fixed; background: rgba(255,255,255,.15); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.3); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
@media (max-width: 520px) { .lightbox figure { padding: 60px 8px; } .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; } }

/* Admin: centers */
.admin-week { border-top: 1px solid var(--line); padding: 16px 0; }
.admin-week.is-focus { background: #f3f8ff; margin: 0 -24px; padding: 16px 24px; }
.week-theme { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.week-theme input { width: auto; flex: 1 1 200px; }
.admin-post { margin: 10px 0 14px; }
.admin-post h3 { font-size: 1rem; margin: 0 0 6px; }
.admin-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.admin-thumb { position: relative; }
.admin-thumb img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; }
.admin-thumb button { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; line-height: 1; }
.admin-note { display: flex; gap: 8px; align-items: flex-start; }
.admin-note textarea { flex: 1; }
.center-row { border-bottom: 1px dashed var(--line); padding-bottom: 8px; }

/* Article editor (admin) */
.admin-edit { margin: 0 0 10px; }
.editor { border: 1.5px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.editor-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: var(--sage); border-bottom: 1px solid var(--line); }
.editor-bar button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; font: 600 .88rem var(--head); cursor: pointer; color: var(--ink); }
.editor-bar button:hover { border-color: var(--blue); }
.editor-bar button.is-on { background: var(--blue); color: #fff; }
.editor-bar button:disabled { opacity: .4; cursor: default; }
.editor-sep { width: 1px; background: var(--line); margin: 0 4px; }
.editor-area { min-height: 420px; max-height: 70vh; overflow-y: auto; padding: 18px 22px; outline: none; max-width: none; }
.editor-area:focus { box-shadow: inset 0 0 0 2px rgba(11, 99, 206, .25); }
.editor-source { border: 0; border-radius: 0; min-height: 420px; }

/* Our Shop */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; padding-bottom: 12px; }
.shop-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.shop-img { position: relative; aspect-ratio: 1; background: var(--sage); }
.shop-img img { width: 100%; height: 100%; object-fit: cover; }
.shop-flag { position: absolute; top: 12px; left: 12px; background: var(--ink); color: #fff; font: 600 .8rem var(--head); padding: 4px 10px; border-radius: 999px; }
.shop-flag.is-coming { background: var(--orange); }
.shop-card.is-soldout .shop-img img { filter: grayscale(.6); opacity: .75; }
.shop-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.shop-body h2 { font-size: 1.15rem; margin: 0 0 6px; }
.shop-meta { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; }
.shop-price { font: 700 1.15rem var(--head); color: var(--red); }
.shop-desc { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.shop-desc p { margin: 0 0 .6em; }
.shop-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.shop-buttons .btn { white-space: normal; text-align: center; }
.btn-etsy { background: #f1641e; }
.btn-etsy:hover { background: #d4520f; }
.btn-fb { background: #1877f2; }
.btn-fb:hover { background: #0f63d1; }
.shop-admin-img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; }
.shop-admin-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
