*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --blue-light: #DBEAFE;
  --yellow: #F59E0B;
  --green: #16A34A;
  --red: #EF4444;
  --bg: #EFF6FF;
  --white: #FFFFFF;
  --text: #1E293B;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --badge-video: #EF4444;
  --badge-game: #16A34A;
  --badge-worksheet: #9333EA;
  --radius: 1rem;
  --shadow: 0 2px 12px rgba(37, 99, 235, 0.1);
  --shadow-hover: 0 8px 28px rgba(37, 99, 235, 0.18);
}

body {
  font-family: 'Nunito', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── layout ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-narrow { max-width: 860px; }
.main { flex: 1; padding: 2rem 0 4rem; }

/* ── header ── */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo img {
  height: 3.5rem;
  width: auto;
  display: block;
}

.nav { display: flex; gap: 0.25rem; }
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: 0.5rem;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover {
  background: var(--blue-light);
  color: var(--blue);
}
.nav-link.active {
  background: var(--blue);
  color: white;
}

/* ── hero ── */
.hero { text-align: center; padding: 2rem 0 1.5rem; }
.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 0.4rem;
}
.hero p { font-size: 1.1rem; color: var(--text-muted); font-weight: 600; }

/* ── type toggle ── */
.type-toggle {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.type-btn {
  background: white;
  border: 2px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  cursor: pointer;
  transition: all 0.15s;
}
.type-btn:hover { border-color: var(--blue); color: var(--blue); }
.type-btn.active { background: var(--blue); border-color: var(--blue); color: white; }

/* ── filter panel ── */
.filters {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.filter-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.filter-label {
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 0.35rem;
  min-width: 3.5rem;
  flex-shrink: 0;
}
.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pill {
  background: #F1F5F9;
  border: 2px solid transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: 2rem;
  cursor: pointer;
  transition: all 0.15s;
}
.pill:hover { border-color: var(--blue); color: var(--blue); }
.pill.active { background: var(--blue); border-color: var(--blue); color: white; }

/* ── active filter bar ── */
.active-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
}
.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--blue-light);
  color: var(--blue);
  padding: 0.2rem 0.5rem 0.2rem 0.7rem;
  border-radius: 2rem;
}
.active-filter-chip button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blue);
  font-size: 0.8rem;
  line-height: 1;
  padding: 0 0.1rem;
}
.clear-all {
  background: none;
  border: none;
  cursor: pointer;
  color: #EF4444;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: underline;
  padding: 0;
}

/* ── content grid ── */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.5rem;
}
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  padding: 3rem 1rem;
  font-weight: 600;
}

/* ── cards ── */
.card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-coming-soon { opacity: 0.82; }

.card-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #E2E8F0;
  overflow: hidden;
  flex-shrink: 0;
}
.card-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-thumb-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
}

.badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 0.4rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-video { background: var(--badge-video); }
.badge-game { background: var(--badge-game); }
.badge-worksheet { background: var(--badge-worksheet); }

.coming-soon-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-body {
  padding: 0.875rem 1rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: auto; }

/* ── chips ── */
.chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 0.35rem;
}
.chip-subject { background: #FEF3C7; color: #92400E; }
.chip-year    { background: #E0F2FE; color: #075985; }
.chip-topic   { background: #F3E8FF; color: #6B21A8; }

/* ── video watch page ── */
.back-link {
  display: inline-block;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.back-link:hover { text-decoration: underline; }

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-hover);
}
.video-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

.video-title {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.video-chips { margin-bottom: 1rem; }
.video-description {
  color: var(--text-muted);
  line-height: 1.75;
  font-size: 0.975rem;
  margin-bottom: 2.5rem;
}

.resources-section { margin-top: 2rem; }
.resources-section h2,
.related-section h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 1.25rem;
}

/* ── worksheet embed ── */
#resource-games { margin-bottom: 1rem; }
.worksheet-resource {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.worksheet-resource-title { font-size: 1rem; font-weight: 800; margin-bottom: 0.75rem; }
.worksheet-preview-wrap {
  position: relative; width: 100%; padding-bottom: 77%; height: 0; margin-bottom: 0.75rem;
}
.worksheet-preview {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border: none; border-radius: 0.5rem;
}
.btn-open-worksheet {
  display: inline-block; padding: 0.5rem 1.25rem;
  background: var(--blue); color: white; border-radius: 0.5rem;
  font-weight: 700; font-size: 0.9rem; text-decoration: none;
  transition: background 0.15s;
}
.btn-open-worksheet:hover { background: var(--blue-dark); }

/* ── game page ── */
.score-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #DCFCE7;
  border: 2px solid #16A34A;
  border-radius: 0.75rem;
  padding: 0.6rem 1.25rem;
  margin-bottom: 1.25rem;
  font-weight: 800;
}
.score-label { color: #166534; font-size: 0.95rem; }
.score-value { color: #14532D; font-size: 1.5rem; margin-left: auto; }

.game-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: #1E293B;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-hover);
}
.game-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-weight: 700;
  font-size: 1rem;
  z-index: 1;
}
.game-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 2;
}

.external-game-link {
  font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem;
}
.external-game-link a { color: var(--blue); font-weight: 700; }

/* ── about page ── */
.about-wrap { display: flex; justify-content: center; }
.about-content {
  background: white;
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  max-width: 720px;
  width: 100%;
}
.about-content h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 0.4rem;
}
.about-content .tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.about-content h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 2rem 0 0.6rem;
  color: var(--text);
}
.about-content p {
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0.5rem;
}
.about-content a { color: var(--blue); font-weight: 700; }

.audience-cards {
  display: flex;
  gap: 1rem;
  margin: 1.25rem 0;
  flex-wrap: wrap;
}
.audience-card {
  flex: 1;
  min-width: 160px;
  background: var(--bg);
  border-radius: 0.75rem;
  padding: 1.25rem 1rem;
  text-align: center;
}
.audience-card .ac-icon { font-size: 2.5rem; margin-bottom: 0.4rem; }
.audience-card h3 { font-weight: 800; font-size: 1rem; margin-bottom: 0.3rem; }
.audience-card p { font-size: 0.875rem; color: var(--text-muted); }

.content-types {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.ct-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.ct-badge.video { background: #FEE2E2; color: #991B1B; }
.ct-badge.game  { background: #DCFCE7; color: #166534; }
.ct-badge.ws    { background: #F3E8FF; color: #6B21A8; }

/* ── footer ── */
.site-footer {
  background: var(--blue-dark);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 1.25rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

/* ── responsive ── */
@media (max-width: 640px) {
  .logo-text { font-size: 1rem; }
  .hero { padding: 1.25rem 0 1rem; }
  .filters { padding: 1rem; }
  .filter-group { flex-direction: column; gap: 0.35rem; }
  .filter-label { min-width: unset; padding-top: 0; }
  .content-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 1rem; }
  .about-content { padding: 1.5rem 1.25rem; }
  .type-toggle { gap: 0.4rem; }
  .type-btn { padding: 0.4rem 0.9rem; font-size: 0.9rem; }
}

/* ── nav alignment ── */
.nav { align-items: center; }

/* ── visitor auth widget ── */
.visitor-widget {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; font-weight: 700;
}
.visitor-widget-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--blue-light);
  flex-shrink: 0;
}
.visitor-widget-initials {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800; flex-shrink: 0;
}
.visitor-widget-link {
  color: var(--blue); text-decoration: none; font-weight: 700;
}
.visitor-widget-link:hover { text-decoration: underline; }
.visitor-signout-btn {
  background: none; border: 1.5px solid var(--border);
  border-radius: 0.4rem; padding: 0.25rem 0.6rem;
  font-family: inherit; font-size: 0.78rem; font-weight: 700;
  color: var(--text-muted); cursor: pointer; transition: all 0.15s;
}
.visitor-signout-btn:hover { border-color: var(--red); color: var(--red); }

/* ── add-to-plan button ── */
.btn-add-to-plan {
  display: block; width: 100%; margin-top: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: var(--blue-light); color: var(--blue);
  border: 1.5px solid var(--blue); border-radius: 0.5rem;
  font-family: inherit; font-size: 0.8rem; font-weight: 700;
  cursor: pointer; transition: background 0.15s, color 0.15s; text-align: center;
}
.btn-add-to-plan:hover { background: var(--blue); color: white; }
.btn-add-to-plan--detail {
  display: inline-block; width: auto; margin-bottom: 1rem;
}

/* ── add-to-plan popover ── */
.atp-popover {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 8px 28px rgba(0,0,0,0.15);
  padding: 0.75rem; min-width: 220px; max-width: 280px;
  z-index: 500; position: absolute;
}
.atp-popover-title {
  font-size: 0.78rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.5rem;
}
.atp-plan-list { display: flex; flex-direction: column; gap: 0.25rem; }
.atp-loading { font-size: 0.85rem; color: var(--text-muted); }
.atp-plan-btn {
  display: block; width: 100%; text-align: left;
  padding: 0.4rem 0.6rem; border: none; background: none;
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; border-radius: 0.4rem; transition: background 0.1s;
}
.atp-plan-btn:hover:not(:disabled) { background: var(--blue-light); }
.atp-plan-btn--added { color: var(--green); font-weight: 700; }
.atp-new-plan-btn {
  display: block; width: 100%; text-align: left;
  padding: 0.4rem 0.6rem; border: 1.5px dashed var(--border);
  background: none; font-family: inherit; font-size: 0.875rem;
  font-weight: 700; color: var(--text-muted); cursor: pointer;
  border-radius: 0.4rem; margin-top: 0.4rem; transition: all 0.1s;
}
.atp-new-plan-btn:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.atp-close {
  position: absolute; top: 0.4rem; right: 0.6rem;
  background: none; border: none; cursor: pointer;
  font-size: 0.95rem; color: var(--text-muted); line-height: 1;
}
.atp-signin-prompt { font-size: 0.875rem; color: var(--text-muted); padding: 0.25rem 0; line-height: 1.5; }

/* ── myplan page ── */
.myplan-auth-wall {
  display: flex; align-items: center; justify-content: center;
  flex: 1; padding: 4rem 1.5rem;
}
.myplan-signin-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 2.5rem 2rem;
  max-width: 380px; width: 100%; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.myplan-signin-card h1 { font-size: 1.5rem; font-weight: 800; color: var(--blue); }
.myplan-signin-card p  { color: var(--text-muted); font-size: 0.9rem; }

.myplan-layout {
  display: flex; min-height: calc(100vh - 5rem - 3.5rem);
}

/* ── myplan sidebar ── */
.myplan-sidebar {
  width: 260px; flex-shrink: 0;
  background: var(--white); border-right: 2px solid var(--border);
  display: flex; flex-direction: column;
}
.myplan-sidebar-header {
  padding: 1rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.myplan-sidebar-title { font-size: 1rem; font-weight: 800; color: var(--blue); }
.btn-new-plan {
  padding: 0.35rem 0.75rem; background: var(--blue); color: white;
  border: none; border-radius: 0.5rem; font-family: inherit;
  font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: background 0.15s;
  white-space: nowrap;
}
.btn-new-plan:hover { background: var(--blue-dark); }
.plan-list { list-style: none; overflow-y: auto; flex: 1; padding: 0.5rem 0; }
.plan-list-item {
  padding: 0.65rem 1rem; cursor: pointer;
  font-size: 0.9rem; font-weight: 600; color: var(--text);
  transition: background 0.1s; border-left: 3px solid transparent;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.plan-list-item:hover { background: var(--blue-light); }
.plan-list-item--active {
  background: var(--blue-light); border-left-color: var(--blue);
  color: var(--blue); font-weight: 700;
}

/* ── myplan main ── */
.myplan-main { flex: 1; padding: 1.5rem 2rem; overflow-y: auto; }
.myplan-empty-state {
  color: var(--text-muted); font-size: 1rem; font-weight: 600;
  text-align: center; margin-top: 4rem;
}
.myplan-detail-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem; gap: 0.75rem; flex-wrap: wrap;
}
.myplan-plan-name-wrap { display: flex; align-items: center; gap: 0.5rem; }
.myplan-plan-name { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.btn-icon {
  background: none; border: 1.5px solid var(--border);
  border-radius: 0.4rem; padding: 0.2rem 0.5rem;
  cursor: pointer; font-size: 0.9rem; color: var(--text-muted); transition: all 0.15s;
}
.btn-icon:hover { border-color: var(--blue); color: var(--blue); }
.btn-delete-plan {
  padding: 0.35rem 0.85rem; background: none;
  border: 1.5px solid var(--red); color: var(--red);
  border-radius: 0.5rem; font-family: inherit;
  font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: all 0.15s;
}
.btn-delete-plan:hover { background: var(--red); color: white; }

/* ── plan item rows ── */
.plan-items-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.plan-item-row {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 0.875rem 1rem;
  display: flex; align-items: flex-start; gap: 0.75rem;
  box-shadow: var(--shadow);
}
.plan-item-reorder { display: flex; flex-direction: column; gap: 0.2rem; flex-shrink: 0; }
.btn-reorder {
  background: none; border: 1.5px solid var(--border); border-radius: 0.3rem;
  width: 1.6rem; height: 1.6rem; font-size: 0.7rem; cursor: pointer;
  color: var(--text-muted); display: flex; align-items: center;
  justify-content: center; transition: all 0.1s; padding: 0;
}
.btn-reorder:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.btn-reorder:disabled { opacity: 0.3; cursor: default; }
.plan-item-thumb {
  width: 60px; height: 44px; border-radius: 0.4rem; flex-shrink: 0;
  background: var(--blue-light); display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem; overflow: hidden;
}
.plan-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plan-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.plan-item-title {
  font-size: 0.95rem; font-weight: 700; color: var(--text);
  text-decoration: none; line-height: 1.3;
}
.plan-item-title:hover { color: var(--blue); }
.plan-item-type { font-size: 0.7rem; font-weight: 800; }
.item-note-wrap { display: flex; align-items: flex-start; gap: 0.4rem; }
.item-note {
  flex: 1; border: 1.5px solid var(--border); border-radius: 0.4rem;
  padding: 0.35rem 0.6rem; font-family: inherit; font-size: 0.875rem;
  color: var(--text); resize: vertical; outline: none; transition: border-color 0.15s;
}
.item-note:focus { border-color: var(--blue); }
.item-note-saved {
  font-size: 0.75rem; color: var(--green); flex-shrink: 0;
  opacity: 0; transition: opacity 0.2s; margin-top: 0.35rem;
}
.item-note-saved.visible { opacity: 1; }
.btn-remove-item {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 1rem; padding: 0.2rem;
  flex-shrink: 0; transition: color 0.1s; line-height: 1;
}
.btn-remove-item:hover { color: var(--red); }
.myplan-items-empty { color: var(--text-muted); font-size: 0.95rem; font-weight: 600; padding: 2rem 0; }
.plan-name-input {
  font-size: 1.4rem; font-weight: 800;
  border: 1.5px solid var(--blue); border-radius: 0.4rem;
  padding: 0.15rem 0.5rem; font-family: inherit; outline: none;
  color: var(--text);
}
.plan-new-input {
  width: calc(100% - 1.5rem); margin: 0.4rem 0.75rem;
  padding: 0.4rem 0.6rem; border: 1.5px solid var(--blue);
  border-radius: 0.4rem; font-family: inherit; font-size: 0.9rem; outline: none;
}

@media (max-width: 640px) {
  .myplan-layout { flex-direction: column; }
  .myplan-sidebar { width: 100%; border-right: none; border-bottom: 2px solid var(--border); max-height: 200px; }
  .myplan-main { padding: 1rem; }
  .plan-item-thumb { display: none; }
  .visitor-widget-link, .visitor-signout-btn { font-size: 0.75rem; }
}
