:root {
  --header-height: 78px;
  --bg: #f4f7fb;
  --bg-soft: rgba(255, 255, 255, 0.8);
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --surface-dark: linear-gradient(180deg, #121722 0%, #1d0f15 44%, #420d17 100%);
  --text: #101520;
  --text-soft: #616b7c;
  --border: rgba(185, 27, 52, 0.12);
  --border-strong: rgba(185, 27, 52, 0.22);
  --accent: #c1122f;
  --accent-strong: #8f1024;
  --accent-soft: rgba(193, 18, 47, 0.1);
  --accent-glow: rgba(193, 18, 47, 0.24);
  --cool: #0f4c5c;
  --cool-soft: rgba(15, 76, 92, 0.1);
  --success: #1b7f5b;
  --warning: #cc7a00;
  --danger: #b42318;
  --shadow-xl: 0 36px 80px rgba(11, 19, 34, 0.16);
  --shadow-lg: 0 18px 42px rgba(14, 20, 34, 0.1);
  --shadow-sm: 0 10px 24px rgba(14, 20, 34, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --scrollbar-track: rgba(198, 205, 217, 0.56);
  --scrollbar-thumb: #6c7688;
  --scrollbar-thumb-hover: #4e586c;
  --scrollbar-thumb-border: rgba(248, 250, 255, 0.92);
  --scrollbar-size: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(193, 18, 47, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 76, 92, 0.14), transparent 26%),
    linear-gradient(180deg, #fbfcfe 0%, #f2f5fb 50%, #eef2f8 100%);
  font-family: "Segoe UI Variable", "Aptos", "Bahnschrift", "Trebuchet MS", sans-serif;
  overflow-x: hidden;
  position: relative;
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

body,
.app-sidebar,
.table-wrap,
textarea {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

body::-webkit-scrollbar,
.app-sidebar::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
textarea::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

body::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

body::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #818b9d 0%, var(--scrollbar-thumb) 100%);
  border-radius: 999px;
  border: 3px solid var(--scrollbar-thumb-border);
}

body::-webkit-scrollbar-thumb:hover,
.table-wrap::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #8b96a9 0%, var(--scrollbar-thumb-hover) 100%);
}

body::-webkit-scrollbar-button,
.app-sidebar::-webkit-scrollbar-button,
.table-wrap::-webkit-scrollbar-button,
textarea::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  display: none;
}

.app-sidebar {
  scrollbar-color: rgba(213, 220, 232, 0.86) rgba(255, 255, 255, 0.08);
}

.app-sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.app-sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(226, 231, 240, 0.96) 0%, rgba(136, 146, 164, 0.92) 100%);
  border-radius: 999px;
  border: 3px solid rgba(29, 35, 48, 0.94);
}

.app-sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(236, 239, 246, 0.98) 0%, rgba(155, 164, 181, 0.96) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 21, 32, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 21, 32, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 88%);
  pointer-events: none;
  z-index: 0;
}

.page-glow {
  position: fixed;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(86px);
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
}

.page-glow-left {
  left: -8rem;
  top: -8rem;
  background: rgba(193, 18, 47, 0.26);
}

.page-glow-right {
  right: -10rem;
  top: 14rem;
  background: rgba(15, 76, 92, 0.16);
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: none;
  margin: 0;
  padding: 0;
}

.workspace-shell {
  display: block;
}

.workspace-shell.sidebar-expanded .app-sidebar {
  width: 248px;
}

.workspace-shell.sidebar-expanded .main-stage {
  margin-left: 272px;
}

.workspace-body {
  position: relative;
  padding-top: calc(var(--header-height) + 14px);
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-height: 78px;
  padding: 16px 24px;
  background: rgba(15, 19, 31, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.site-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: "Bahnschrift", "Segoe UI Variable", sans-serif;
  letter-spacing: 0.02em;
}

.site-brand-main {
  color: #ffffff;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 800;
}

.site-brand-accent {
  color: #ff5d78;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 800;
}

.site-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-header .button-ghost {
  color: #f7f9ff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.app-sidebar {
  position: fixed;
  top: calc(var(--header-height) + 16px);
  left: 0;
  bottom: 20px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 92px;
  padding: 16px 12px;
  color: #f8faff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 26%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), transparent 24%),
    var(--surface-dark);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: none;
  border-radius: 0 24px 24px 0;
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
  overflow-x: hidden;
  min-height: auto;
  will-change: transform, opacity, width;
  transition: width 220ms ease, padding 220ms ease, transform 220ms ease, opacity 220ms ease;
}

.app-sidebar::after {
  content: "";
  position: absolute;
  inset: auto -3rem -4rem auto;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(193, 18, 47, 0.34), transparent 68%);
  pointer-events: none;
}

.sidebar-backdrop {
  position: fixed;
  inset: var(--header-height) 0 0;
  z-index: 18;
  border: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  background: rgba(8, 12, 21, 0.46);
  backdrop-filter: blur(6px);
  transition: opacity 220ms ease;
}

.sidebar-rail {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 14%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.08));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-rail-brand,
.rail-button {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 14px;
  color: rgba(248, 250, 255, 0.82);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.sidebar-rail-brand:hover,
.rail-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-rail-brand {
  margin-bottom: 4px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.sidebar-rail-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  align-items: center;
}

.rail-button.active {
  color: #ffffff;
  background: linear-gradient(180deg, #ff2768 0%, #d10f45 100%);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 24px rgba(209, 15, 69, 0.24);
}

.rail-button.rail-toggle {
  margin-top: auto;
}

.nav-icon,
.sidebar-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-icon {
  width: 18px;
  height: 18px;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.sidebar-drawer {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
  padding: 20px 18px 18px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-18px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.app-sidebar.expanded .sidebar-drawer {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.sidebar-drawer-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.sidebar-collapse {
  min-width: 84px;
}

.sidebar-brand,
.sidebar-nav,
.sidebar-actions,
.sidebar-panel {
  position: relative;
  z-index: 1;
}

.sidebar-kicker,
.eyebrow,
.metric-label,
th,
.field label,
.inline-stat-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
}

.sidebar-kicker,
.eyebrow {
  color: rgba(248, 250, 255, 0.6);
}

.sidebar-logo {
  margin: 10px 0 12px;
  font-family: "Bahnschrift", "Segoe UI Variable", sans-serif;
  font-size: clamp(2rem, 4.2vw, 2.8rem);
  line-height: 0.92;
  letter-spacing: 0.04em;
}

.sidebar-logo span {
  color: #ff6b81;
}

.sidebar-description {
  margin: 0;
  color: rgba(248, 250, 255, 0.76);
  font-size: 0.93rem;
  line-height: 1.6;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.sidebar-nav-minimal {
  flex: 1 1 auto;
  position: relative;
  z-index: 1;
  align-content: start;
}

.sidebar-group {
  display: grid;
  gap: 10px;
}

.sidebar-group-label {
  color: rgba(248, 250, 255, 0.48);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar-link {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px 14px 14px 12px;
  text-align: left;
  color: rgba(248, 250, 255, 0.74);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: none;
}

.sidebar-link:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.sidebar-link.active {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(193, 18, 47, 0.32)),
    rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 107, 129, 0.4);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.2);
}

.sidebar-link-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(248, 250, 255, 0.86);
}

.sidebar-link.active .sidebar-link-icon {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.sidebar-link-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 250, 255, 0.92);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.sidebar-link.active .sidebar-link-index {
  background: rgba(255, 255, 255, 0.16);
}

.sidebar-link-content {
  display: grid;
  gap: 6px;
}

.sidebar-link-label {
  font-size: 1rem;
  font-weight: 700;
}

.sidebar-link-minimal {
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 12px;
}

.sidebar-link-minimal .sidebar-link-label {
  font-size: 0.95rem;
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 180ms ease;
}

.workspace-shell.sidebar-expanded .sidebar-link-minimal {
  padding: 12px 14px;
}

.workspace-shell.sidebar-expanded .sidebar-link-minimal .sidebar-link-label {
  opacity: 1;
  width: auto;
}

.sidebar-toggle {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0 auto;
  border-radius: 14px;
  color: rgba(248, 250, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-link-caption {
  color: inherit;
  font-size: 0.84rem;
  line-height: 1.45;
}

.sidebar-actions {
  display: grid;
  gap: 10px;
}

.sidebar-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

.sidebar-panel-accent {
  background:
    linear-gradient(145deg, rgba(193, 18, 47, 0.22), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.04);
}

.sidebar-big-value {
  margin-top: 8px;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.sidebar-inline-stats {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.inline-stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.inline-stat-label {
  color: rgba(248, 250, 255, 0.58);
  letter-spacing: 0.12em;
}

.inline-stat-value {
  color: #ffffff;
  font-size: 0.95rem;
}

.main-stage {
  display: grid;
  gap: 18px;
  margin-left: 116px;
  padding: 0 24px 32px;
  transition: margin-left 220ms ease;
}

.topbar,
.section-panel,
.meal-card,
.summary-table,
.anthro-group,
.kicker {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(251, 252, 255, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.topbar::after {
  content: none;
}

.topbar-title,
.section-title,
.meal-title {
  margin: 8px 0 0;
  font-family: "Bahnschrift", "Segoe UI Variable", sans-serif;
  letter-spacing: 0.02em;
}

.topbar-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.topbar-copy,
.section-copy,
.metric-note,
.empty-note,
.plan-item-meta,
.plan-item-note {
  color: var(--text-soft);
  line-height: 1.6;
}

.topbar-copy {
  margin: 12px 0 0;
  max-width: 60ch;
}

.topbar-badges,
.pill-strip,
.meal-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
}

.pill-ghost {
  color: var(--accent-strong);
  background: rgba(193, 18, 47, 0.08);
  border: 1px solid rgba(193, 18, 47, 0.14);
}

.stack {
  display: grid;
  gap: 18px;
}

.section-panel,
.summary-table {
  padding: 24px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-title {
  font-size: 1.24rem;
}

.section-copy {
  margin: 8px 0 0;
}

.field-grid,
.field-grid-expanded {
  display: grid;
  gap: 14px;
}

.field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid-expanded {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
th,
.metric-label {
  color: var(--text-soft);
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(248, 250, 254, 0.96);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 15px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--border-strong);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  background: var(--surface-strong);
  border-color: rgba(193, 18, 47, 0.36);
  box-shadow: 0 0 0 4px rgba(193, 18, 47, 0.12);
  transform: translateY(-1px);
}

textarea {
  min-height: 104px;
  resize: vertical;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #e12546);
  box-shadow: 0 18px 30px rgba(193, 18, 47, 0.24);
}

.button-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(17, 24, 39, 0.08);
}

.button-ghost:hover {
  border-color: rgba(193, 18, 47, 0.24);
  box-shadow: var(--shadow-sm);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.metric-card {
  position: relative;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 254, 0.92));
  border: 1px solid rgba(193, 18, 47, 0.1);
  border-radius: 20px;
  overflow: hidden;
}

.metric-card::after {
  content: none;
}

.metric-value {
  margin-top: 8px;
  font-family: "Bahnschrift", "Segoe UI Variable", sans-serif;
  font-size: 1.95rem;
  line-height: 1;
}

.metric-note {
  margin-top: 8px;
  font-size: 0.9rem;
}

.meal-grid,
.plan-visual-grid,
.anthro-layout,
.kicker-grid {
  display: grid;
  gap: 18px;
}

.meal-grid {
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}

.plan-visual-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.meal-card {
  padding: 20px;
  animation: card-fade 280ms ease both;
}

.meal-card-readonly {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 252, 0.94)),
    linear-gradient(145deg, rgba(193, 18, 47, 0.06), transparent 40%);
}

.meal-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.meal-title {
  font-size: 1.16rem;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(193, 18, 47, 0.08);
  border: 1px solid rgba(193, 18, 47, 0.12);
  font-size: 0.82rem;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(17, 24, 39, 0.06);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.72);
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(248, 250, 254, 0.96);
}

td:last-child,
th:last-child {
  text-align: right;
}

.compact {
  min-width: 96px;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.status.good {
  color: var(--success);
  background: rgba(27, 127, 91, 0.12);
}

.status.warn {
  color: var(--warning);
  background: rgba(204, 122, 0, 0.12);
}

.status.bad {
  color: var(--danger);
  background: rgba(180, 35, 24, 0.1);
}

.summary-table-tight table {
  min-width: 0;
}

.plan-overview {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 249, 253, 0.94));
}

.plan-items {
  display: grid;
  gap: 12px;
}

.plan-item {
  padding: 14px;
  border: 1px solid rgba(193, 18, 47, 0.1);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(193, 18, 47, 0.06), transparent 45%),
    rgba(255, 255, 255, 0.8);
}

.plan-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 8px;
}

.plan-item-head strong {
  font-size: 0.98rem;
}

.plan-item-head span {
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.86rem;
}

.plan-item-meta {
  font-size: 0.86rem;
}

.plan-item-note {
  margin-top: 6px;
  font-size: 0.9rem;
}

.empty-note {
  margin: 0;
  padding: 18px;
  border-radius: 18px;
  background: rgba(248, 250, 254, 0.86);
  border: 1px dashed rgba(193, 18, 47, 0.18);
}

.anthro-group {
  padding: 20px;
}

.anthro-group h3 {
  margin: 0 0 16px;
  font-family: "Bahnschrift", "Segoe UI Variable", sans-serif;
  letter-spacing: 0.02em;
}

.kicker-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.kicker {
  padding: 18px;
  border: 1px solid rgba(17, 24, 39, 0.08);
}

.kicker strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Bahnschrift", "Segoe UI Variable", sans-serif;
  font-size: 1.38rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.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;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .app-sidebar {
    width: 84px;
  }

  .main-stage {
    margin-left: 108px;
  }

  .workspace-shell.sidebar-expanded .app-sidebar {
    width: 220px;
  }

  .workspace-shell.sidebar-expanded .main-stage {
    margin-left: 244px;
  }
}

@media (max-width: 860px) {
  .workspace-body {
    padding-top: calc(var(--header-height) + 12px);
  }

  .site-header {
    padding: 14px 16px;
  }

  .topbar,
  .section-header,
  .meal-header {
    flex-direction: column;
    align-items: stretch;
  }

  .meal-grid,
  .plan-visual-grid,
  .kicker-grid {
    grid-template-columns: 1fr;
  }

  .field-grid,
  .field-grid-expanded {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    top: calc(var(--header-height) + 12px);
    left: 12px;
    bottom: 16px;
    width: min(82vw, 320px);
    margin: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(calc(-100% - 20px));
  }

  .main-stage {
    margin-left: 0;
    padding: 0 16px 24px;
  }

  .workspace-shell.sidebar-expanded .app-sidebar {
    width: min(82vw, 320px);
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  .workspace-shell.sidebar-expanded .main-stage {
    margin-left: 0;
  }

  .workspace-shell.sidebar-expanded .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-link-minimal .sidebar-link-label {
    opacity: 1;
    width: auto;
  }

  .sidebar-toggle {
    margin: 0 0 8px;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 12px;
  }

  .topbar,
  .section-panel,
  .meal-card,
  .summary-table,
  .anthro-group {
    padding: 18px;
  }

  .site-header-actions {
    width: 100%;
  }

  .site-header-actions .button {
    flex: 1;
  }

  .button-menu-trigger {
    min-width: 100%;
  }

  .main-stage {
    padding: 0 12px 20px;
  }

  .sidebar-actions {
    grid-template-columns: 1fr;
  }

  .sidebar-link {
    padding: 14px 12px;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  table {
    min-width: 640px;
  }
}
