/*
 * IN-PLAN Checklist Tool — page-scoped styles.
 *
 * Loaded only on the "In-Plan Checklist Tool" page template via a conditional
 * <link> in header.php that comes AFTER the manual style.css link, so these
 * rules win the cascade over theme defaults where they overlap.
 *
 * The :root block below avoids duplicating values already defined by
 * style.css (--fedarene-* colour tokens and --gray-* scale). The legacy
 * --fed-* / --sec-* / --coral / --blue / --teal / etc. names are kept as
 * aliases because the rules and the inline-style attributes in the tool's
 * markup still reference them.
 */

:root {
  /* Aliases onto the theme's existing --fedarene-* tokens (defined in style.css). */
  --fed-primary:      var(--fedarene-primary);
  --fed-primary-dark: var(--fedarene-primary-dark);
  --fed-primary-rgb:  var(--fedarene-primary-rgb);
  --fed-golden:       var(--fedarene-golden);
  --fed-golden-dark:  #eab35f;
  --fed-black:        var(--fedarene-black);
  --fed-white:        var(--fedarene-white);
  --fed-lt-blue:      var(--fedarene-light-blue);
  --fed-lt-green:     var(--fedarene-light-green);
  --fed-lt-pink:      var(--fedarene-light-pink);

  /* Grays: only the ones not already in style.css. */
  --gray-200: #e9ecef;

  /* Sector semantic (specific to the tool, not in style.css). */
  --sec-spatial:       #456091;
  --sec-climate:       #7BB591;
  --sec-mobility:      #C89550;
  --sec-energy:        #C47AA0;
  --sec-spatial-soft:  #BFDFE5;
  --sec-climate-soft:  #DCF1CF;
  --sec-mobility-soft: #F4C67E;
  --sec-energy-soft:   #EFC9E2;

  /* Legacy short aliases referenced by inline styles in the markup and by JS. */
  --coral:  #C47AA0;
  --blue:   #456091;
  --teal:   #34496e;
  --mint:   #7BB591;
  --gold:   #F4C67E;
  --dark:   #000000;
  --mid:    #666666;
  --light:  #f8f9fa;
  --border: #dee2e6;
  --white:  #ffffff;
  --radius: 8px;

  /* Use the theme's loaded fonts (no Google Fonts dependency). */
  --serif: 'P22 Mackinac Pro', Georgia, 'Times New Roman', serif;
  --sans:  'Gordita', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

.inplan-tool, .inplan-tool * { box-sizing: border-box; margin: 0; padding: 0; }
.inplan-tool {
  font-family: var(--sans);
  background: var(--gray-50);
  color: var(--fed-black);
  display: block;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.inplan-tool h1, .inplan-tool h2, .inplan-tool h3, .inplan-tool h4, .inplan-tool h5, .inplan-tool h6 { font-family: var(--serif); font-weight: 400; line-height: 1.2; }

/* HEADER */
.inplan-tool > header {
  background: var(--fed-white);
  color: var(--fed-black);
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  border-bottom: 1px solid var(--gray-300);
  z-index: 100;
  position: sticky;
  top: 58px; /* Height of the theme main navbar (matches style.css:3436 .project-subnav). */
}
.header-logo {
  background: var(--fed-white);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--gray-300);
}
.header-logo img { height: 46px; }
.header-title {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray-600);
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--gray-300);
}
.header-title strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  font-style: italic;
  color: var(--fed-primary);
  letter-spacing: -0.01em;
  text-transform: none;
  line-height: 1;
  margin-bottom: 3px;
}
.tabs {
  display: flex;
  gap: 0;
  margin-left: 0;
}
.tab-btn {
  padding: 0 26px;
  background: none;
  border: none;
  color: var(--gray-600);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}
.tab-btn:hover { color: var(--fed-primary); }
.tab-btn.active {
  color: var(--fed-primary);
  border-bottom-color: var(--fed-golden);
  font-weight: 700;
}

/* PAGE CONTAINER
   NOTE: Original tool was a fixed-viewport SPA (html/body height 100vh, inner
   panes with flex:1 + overflow:hidden to own all scrolling). Inside the theme
   chrome we can't own the viewport, so we let the page flow naturally and let
   the browser/theme scroll. Inner scroll panes (.guide-scroll, .gloss-scroll,
   .table-scroll) drop flex:1/overflow:auto on desktop and just render their
   content; the old fixed-height behaviour survives only inside the mobile
   media query below (which already disables it anyway). */
.app-body { display: block; background: var(--gray-50); }
.inplan-tool .page { display: none; }
.inplan-tool .page.active { display: block; }

/* CONTROLS */
.controls {
  background: var(--fed-white);
  border-bottom: 1px solid var(--gray-300);
  padding: 12px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}
.ctrl-group { display: flex; align-items: center; gap: 5px; }
.ctrl-label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-right: 6px;
  white-space: nowrap;
}
.ctrl-sep { width: 1px; height: 22px; background: var(--gray-300); margin: 0 6px; }

.filter-btn {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--gray-300);
  background: var(--fed-white);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1.4;
}
.filter-btn:hover { border-color: var(--fed-primary); color: var(--fed-primary); transform: translateY(-1px); }
.filter-btn.active { color: var(--fed-white); border-color: transparent; font-weight: 700; }
.filter-btn[data-sector="all"].active,
.filter-btn[data-level="all"].active,
.filter-btn[data-status="all"].active { background: var(--fed-primary); }
.filter-btn[data-sector="spatial"].active  { background: var(--sec-spatial); }
.filter-btn[data-sector="climate"].active  { background: var(--sec-climate); }
.filter-btn[data-sector="mobility"].active { background: var(--sec-mobility); }
.filter-btn[data-sector="energy"].active   { background: var(--sec-energy); }
.filter-btn[data-level="Strategic"].active   { background: var(--fed-primary); }
.filter-btn[data-level="Operational"].active { background: var(--fed-primary-dark); }
.filter-btn[data-level="Both"].active        { background: var(--fed-black); }
.filter-btn[data-status="Implemented"].active     { background: var(--sec-climate); }
.filter-btn[data-status="Planned"].active         { background: var(--fed-golden); color: var(--fed-black); }
.filter-btn[data-status="Not implemented"].active { background: var(--gray-600); }

.search-wrap { margin-left: auto; position: relative; }
.search-wrap input {
  padding: 7px 14px 7px 32px;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  font-size: 0.82rem;
  width: 220px;
  outline: none;
  font-family: var(--sans);
  background: var(--gray-50);
  color: var(--fed-black);
  transition: all 0.15s ease;
}
.search-wrap input:focus {
  border-color: var(--fed-primary);
  background: var(--fed-white);
  box-shadow: 0 0 0 3px rgba(var(--fed-primary-rgb), 0.14);
}
.search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-600);
  font-size: 0.82rem;
  pointer-events: none;
}

/* STATS ROW */
.stats-row {
  background: var(--fed-white);
  border-bottom: 1px solid var(--gray-300);
  padding: 10px 24px;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-shrink: 0;
}
.stat-item { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-family: var(--sans); }
.stat-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.stat-num { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; line-height: 1; color: var(--fed-black); }
.stat-lbl { color: var(--gray-600); font-size: 0.76rem; }
.progress-wrap { background: var(--gray-100); border-radius: 999px; height: 6px; flex: 1; overflow: hidden; min-width: 100px; }
.progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--fed-lt-green), var(--fed-golden)); transition: width 0.4s ease; }
.result-count { margin-left: auto; font-size: 0.76rem; color: var(--gray-600); white-space: nowrap; font-family: var(--sans); font-style: italic; }

/* TABLE SCROLL — no longer an internal scroll pane; the page scrolls instead. */
.table-scroll { overflow-x: auto; background: var(--fed-white); }

/* TABLE */
.cl-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cl-table thead { position: sticky; top: 0; z-index: 10; }
.cl-table th {
  background: var(--fed-primary);
  color: var(--fed-white);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 12px;
  text-align: left;
  border-right: 1px solid rgba(255,255,255,0.12);
  white-space: nowrap;
}
.cl-table th:last-child { border-right: none; }

/* Column widths */
.col-num   { width: 40px; }
.col-elem  { width: auto; min-width: 300px; }
.col-sec   { width: 200px; }
.col-lvl   { width: 140px; }
.col-rel   { width: 135px; }
.col-sta   { width: 190px; }
.col-com   { width: 220px; }

.cl-table td {
  padding: 10px 14px;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--fed-black);
}
.cl-table tr:hover td { background: var(--gray-50); }
.cl-table tr.sub-item td { background: #fcfcfc; }
.cl-table tr.sub-item td.elem-cell {
  padding-left: 28px;
  color: var(--gray-600);
  font-style: italic;
  font-size: 0.8rem;
}
.cl-table tr.sub-item:hover td { background: var(--gray-50); }

.row-num { color: var(--gray-400); font-size: 0.78rem; text-align: center; font-family: var(--serif); font-style: italic; }

/* SECTOR BADGES */
.sec-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.sec-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.3;
  font-family: var(--sans);
  letter-spacing: 0.02em;
}
.sec-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.sb-spatial  { background: var(--sec-spatial-soft);  color: var(--fed-primary-dark); }
.sb-climate  { background: var(--sec-climate-soft);  color: #3b7554; }
.sb-mobility { background: var(--sec-mobility-soft); color: #7a4e10; }
.sb-energy   { background: var(--sec-energy-soft);   color: #8b3f68; }

/* LEVEL BADGE */
.level-badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  font-family: var(--sans);
}
.lv-s { background: rgba(var(--fed-primary-rgb), 0.12); color: var(--fed-primary); }
.lv-o { background: rgba(244, 198, 126, 0.3); color: #7a4e10; }
.lv-b { background: var(--fed-black); color: var(--fed-white); }

/* SELECTS */
select.inline-sel {
  width: 100%;
  padding: 6px 9px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.78rem;
  font-family: var(--sans);
  background: var(--fed-white);
  cursor: pointer;
  outline: none;
  color: var(--fed-black);
  appearance: auto;
  transition: all 0.15s ease;
}
select.inline-sel:hover { border-color: var(--fed-primary); }
select.inline-sel:focus { border-color: var(--fed-primary); box-shadow: 0 0 0 3px rgba(var(--fed-primary-rgb), 0.14); }
select.status-sel.s-implemented { border-color: var(--sec-climate); background: var(--sec-climate-soft); color: #3b7554; }
select.status-sel.s-planned     { border-color: var(--fed-golden);  background: rgba(244,198,126,0.22); color: #7a4e10; }
select.status-sel.s-not         { border-color: var(--gray-300);    background: var(--gray-50); color: var(--gray-600); }

textarea.comment-ta {
  width: 100%;
  padding: 6px 9px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.78rem;
  font-family: var(--sans);
  resize: none;
  height: 36px;
  outline: none;
  line-height: 1.4;
  background: var(--fed-white);
  color: var(--fed-black);
  transition: all 0.15s ease;
}
textarea.comment-ta:focus {
  border-color: var(--fed-primary);
  height: 68px;
  overflow: auto;
  box-shadow: 0 0 0 3px rgba(var(--fed-primary-rgb), 0.14);
}

/* GUIDE PAGE */
.guide-scroll { padding: 40px 28px; background: var(--gray-50); }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 1100px; margin: 0 auto; }
.guide-card {
  background: var(--fed-white);
  border-radius: var(--radius);
  padding: 32px 36px;
  box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.05);
  border: 1px solid var(--gray-100);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.guide-card:hover { transform: translateY(-5px); box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.08); }
.guide-card.full { grid-column: 1 / -1; }
.guide-card h2 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--fed-black);
  margin-bottom: 20px;
  padding-bottom: 14px;
  position: relative;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.guide-card h2::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 40px; height: 2px;
  background: var(--fed-golden);
}
.guide-card p {
  font-family: var(--sans);
  font-size: 0.94rem;
  line-height: 1.65;
  color: #333;
  margin-bottom: 10px;
}
.sector-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--gray-50);
  font-family: var(--sans);
  font-size: 0.9rem;
}
.sector-row strong { font-weight: 700; color: var(--fed-black); }
.sdot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.col-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.9rem;
  margin-bottom: 10px;
  font-family: var(--sans);
}
.col-pill {
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

/* GLOSSARY PAGE */
.gloss-scroll { padding: 40px 28px; background: var(--gray-50); }
.gloss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; max-width: 1200px; margin: 0 auto; }
.gloss-card {
  background: var(--fed-white);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.05);
  border-left: 4px solid var(--fed-primary);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gloss-card:hover { transform: translateY(-4px); box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1); }
.gloss-card h3 {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--fed-black);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.gloss-card p {
  font-family: var(--sans);
  font-size: 0.87rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* BOTTOM BAR */
.bottom-bar {
  background: var(--fed-white);
  border-top: 1px solid var(--gray-300);
  padding: 12px 24px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}
.act-btn {
  padding: 9px 24px;
  border-radius: 999px;
  border: none;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-save { background: var(--fed-black); color: var(--fed-white); }
.btn-save:hover { background: #333; transform: translateY(-2px); box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.18); }
.btn-export { background: var(--fed-golden); color: var(--fed-black); }
.btn-export:hover { background: var(--fed-golden-dark); transform: translateY(-2px); box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15); }
.save-hint { font-size: 0.78rem; color: var(--gray-600); margin-left: 8px; font-family: var(--sans); font-style: italic; }
.footer-link {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--fed-primary);
  text-decoration: none;
  letter-spacing: 0.02em;
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
  transition: all 0.18s ease;
}
.footer-link:hover { color: var(--fed-primary-dark); border-bottom-color: var(--fed-golden); }

.hidden { display: none !important; }

/* ==========================================================
   MOBILE & TABLET — release the fixed app-shell, stack layout,
   turn the checklist table into labeled cards.
   ========================================================== */
@media (max-width: 900px) {
  .inplan-tool {
	height: auto;
	min-height: 100%;
	overflow-x: hidden;
	overflow-y: auto;
  }
  .inplan-tool { display: block; }
  .app-body { display: block; overflow: visible; background: var(--gray-50); }
  .inplan-tool .page { display: none; }
  .inplan-tool .page.active { display: block; }
  .table-scroll { overflow: visible; background: transparent; padding: 14px; }

  /* Sticky header preserved for wayfinding (under the theme main navbar). */
  .inplan-tool > header {
	position: sticky; top: 58px;
	flex-wrap: wrap;
	box-shadow: 0 1px 0 var(--gray-300), 0 2px 8px rgba(0,0,0,0.03);
  }
  .header-logo { padding: 8px 14px; border-right: 1px solid var(--gray-300); }
  .header-logo img { height: 38px; }
  .header-title {
	padding: 0 14px;
	font-size: 0.6rem;
	letter-spacing: 0.14em;
	flex: 1;
	min-width: 0;
	border-right: none;
  }
  .header-title strong { font-size: 1.2rem; }
  .tabs {
	width: 100%;
	order: 3;
	border-top: 1px solid var(--gray-300);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
  }
  .tab-btn {
	padding: 14px 18px;
	font-size: 0.7rem;
	flex: 1;
	min-width: max-content;
  }
  /* Controls */
  .controls {
	padding: 14px;
	gap: 10px;
	flex-direction: column;
	align-items: stretch;
  }
  .ctrl-sep { display: none; }
  .ctrl-group {
	flex-wrap: wrap;
	width: 100%;
	gap: 6px;
	padding-bottom: 10px;
	border-bottom: 1px dashed var(--gray-200);
  }
  .ctrl-group:last-of-type { border-bottom: none; padding-bottom: 0; }
  .ctrl-label {
	width: 100%;
	margin-right: 0;
	margin-bottom: 4px;
	font-size: 0.64rem;
  }
  .search-wrap { margin-left: 0; width: 100%; }
  .search-wrap input { width: 100%; font-size: 0.9rem; padding: 10px 16px 10px 36px; }
  .search-icon { left: 14px; }

  /* Stats row */
  .stats-row {
	padding: 14px;
	gap: 14px 18px;
	flex-wrap: wrap;
  }
  .stat-item { font-size: 0.78rem; }
  .progress-wrap { flex-basis: 100%; order: 5; margin-top: 4px; }
  #prog-pct { order: 6; }
  .result-count { margin-left: 0; width: 100%; order: 7; text-align: right; font-size: 0.72rem; }

  /* TABLE → CARD LIST */
  .cl-table, .cl-table tbody { display: block; width: 100%; }
  .cl-table thead { display: none; }
  .cl-table tr {
	display: block;
	background: var(--fed-white);
	border: 1px solid var(--gray-200);
	border-left: 4px solid var(--fed-primary);
	border-radius: 10px;
	padding: 16px 18px 14px;
	margin-bottom: 12px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  .cl-table tr.sub-item { border-left-color: var(--gray-300); background: var(--fed-white); }
  .cl-table tr:hover td,
  .cl-table tr.sub-item:hover td { background: transparent; }
  .cl-table td {
	display: block;
	width: 100%;
	padding: 8px 0;
	border: none;
	font-size: 0.88rem;
	color: var(--fed-black);
  }
  .cl-table td::before {
	content: attr(data-label);
	display: block;
	font-family: var(--sans);
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gray-600);
	margin-bottom: 5px;
  }
  .cl-table td.row-num {
	display: inline-block;
	width: auto;
	padding: 0;
	margin-bottom: 6px;
	font-family: var(--serif);
	font-style: italic;
	font-size: 0.9rem;
	color: var(--fed-primary);
	letter-spacing: 0.04em;
  }
  .cl-table td.row-num::before {
	content: 'Nº';
	display: inline;
	margin-right: 4px;
	font-family: var(--sans);
	font-style: normal;
	font-size: 0.6rem;
	color: var(--gray-600);
  }
  .cl-table td.elem-cell {
	font-family: var(--serif);
	font-size: 1.05rem;
	font-weight: 500;
	color: var(--fed-black);
	line-height: 1.35;
	padding-top: 0;
	padding-bottom: 12px;
	margin-bottom: 6px;
	border-bottom: 1px solid var(--gray-100);
  }
  .cl-table td.elem-cell::before { display: none; }
  .cl-table tr.sub-item td.elem-cell {
	padding-left: 0;
	font-style: italic;
	font-size: 0.95rem;
	color: var(--gray-600);
  }
  textarea.comment-ta { height: 52px; font-size: 0.88rem; }
  textarea.comment-ta:focus { height: 104px; }
  select.inline-sel { padding: 9px 12px; font-size: 0.88rem; }

  /* Guide */
  .guide-scroll { padding: 24px 14px; }
  .guide-grid { grid-template-columns: 1fr; gap: 14px; }
  .guide-card { padding: 24px 22px; }
  .guide-card:hover { transform: none; }
  .guide-card h2 { font-size: 1.45rem; }

  /* Glossary */
  .gloss-scroll { padding: 24px 14px; }
  .gloss-grid { grid-template-columns: 1fr; }
  .gloss-card:hover { transform: none; }

  /* Bottom bar — sticky for quick Save/Export access */
  .bottom-bar {
	padding: 12px 14px;
	flex-wrap: wrap;
	gap: 10px;
	position: sticky;
	bottom: 0;
	z-index: 50;
	box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
  }
  .act-btn { flex: 1; min-width: 140px; padding: 11px 18px; }
  .save-hint { width: 100%; margin-left: 0; text-align: center; order: 10; }
  .footer-link { margin-left: 0; width: 100%; text-align: center; order: 11; padding-top: 4px; }
}

@media (max-width: 480px) {
  .header-title { display: none; }
  .header-logo { padding: 8px 12px; }
  .header-logo img { height: 34px; }
  .tab-btn { padding: 12px 10px; font-size: 0.64rem; letter-spacing: 0.1em; }
  .stat-item { font-size: 0.72rem; gap: 4px; }
  .stat-num { font-size: 1rem; }
  .stats-row { gap: 10px 14px; }
  .filter-btn { font-size: 0.72rem; padding: 6px 11px; }
  .cl-table tr { padding: 14px 14px 12px; }
  .cl-table td.elem-cell { font-size: 1rem; }
  .guide-card { padding: 22px 18px; }
  .guide-card h2 { font-size: 1.3rem; }
}
