/* PlakatHjælp — a warm, tactile app experience. Loaded after the base and law styles. */
:root {
  --forest: #343941;
  --forest-dark: #252a31;
  --ink: #292d34;
  --muted: #757773;
  --paper: #f6f4ef;
  --line: #e6e2d9;
  --gold: #b58b35;
  --gold-soft: #dfc58d;
  --sage: #f2e8d2;
  --radius: 22px;
  --surface: #fffefa;
  --shadow-soft: 0 6px 20px #34394105, 0 24px 48px #34394105;
  --shadow-card: 0 2px 4px #34394103, 0 12px 28px #34394107;
  --ease-out: cubic-bezier(.2, .75, .25, 1);
  color-scheme: light;
}

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  background: radial-gradient(ellipse at 79% 13%, #efe3c72e 0, transparent 42%), var(--paper);
  padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: #dfc58d80; color: var(--ink); }
.app-shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100dvh; }
.main-content {
  width: 100%;
  max-width: 1536px;
  margin: 0 auto;
  padding: 0 44px calc(138px + env(safe-area-inset-bottom)) 116px;
  min-width: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: calc(17px + env(safe-area-inset-top)) 40px 17px;
  min-height: 86px;
  border-bottom: 1px solid #ffffffd9;
  background: #f6f4efdd;
  box-shadow: 0 4px 20px #34394104;
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  backdrop-filter: blur(24px) saturate(1.3);
}
.topbar .brand { color: var(--ink); flex-shrink: 0; min-height: 44px; }
.topbar .brand img { width: 195px; height: auto; display: block; }
.topbar .main-nav {
  flex-direction: row;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px;
  overflow: auto;
  max-width: 100%;
  border: 1px solid #e8e3d8;
  border-radius: 18px;
  background: #e9e6de70;
  scrollbar-width: none;
}
.topbar .main-nav::-webkit-scrollbar { display: none; }
.topbar .nav-item {
  color: #777972;
  font-size: 12px;
  font-weight: 500;
  min-height: 44px;
  padding: 11px 16px;
  gap: 8px;
  border-radius: 13px;
  transition: color .2s, background .2s, box-shadow .2s, transform .2s var(--ease-out);
}
.topbar .nav-item .icon { width: 17px; height: 17px; }
.topbar .nav-item:hover { background: #fffefa99; color: var(--ink); }
.topbar .nav-item.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 2px 6px #34394107, 0 1px 1px #34394105;
}
.topbar .nav-count { background: #3439410a; color: #666b70; margin-left: 0; padding: 3px 6px; }
.topbar .active .nav-count { background: #f1e4c4; color: #8a6d30; }
.topbar-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar-tools button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  min-height: 44px;
  border: 1px solid #e6e0d4;
  border-radius: 14px;
  background: #ffffff85;
  color: #696b67;
  transition: transform .2s var(--ease-out), background .2s, box-shadow .2s;
}
.topbar-tools button .icon { width: 19px; height: 19px; }
.topbar-tools button:hover { background: #fff; color: var(--ink); box-shadow: var(--shadow-card); transform: translateY(-2px); }

.demo-strip {
  margin: 0;
  padding: 14px 0 0;
  border: 0;
  background: transparent;
  color: #888980;
  font-size: 10px;
  gap: 16px;
}
.demo-strip > span:first-child { font-size: 9px; font-weight: 500; letter-spacing: .9px; }
.demo-dot { width: 5px; height: 5px; background: #b99c5e; box-shadow: 0 0 0 3px #dfc58d20; }
.page-header.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, .88fr);
  align-items: center;
  gap: 28px;
  min-height: 390px;
  padding: 42px 8px 40px 0;
  isolation: isolate;
}
.hero-copy { min-width: 0; position: relative; z-index: 2; }
.campaign-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid #ded4bc;
  border-radius: 100px;
  background: #fffbf2b3;
  color: #8e7745;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 500;
  box-shadow: 0 2px 6px #b58b3504;
  margin-top: 17px;
}
.campaign-chip .icon { width: 13px; height: 13px; }
.campaign-chip #campaign-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.page-header.hero h1 {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(46px, 4.7vw, 76px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.065em;
  margin: 0 0 19px;
  color: #30343a;
}
.page-header.hero h1 > span {
  color: #ae8538;
  background: linear-gradient(115deg, #907033, #ba9344 48%, #c4a661);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-header.hero p { font-size: 14px; line-height: 1.75; max-width: 410px; color: #7c7d77; }
.hero .header-actions { margin: 27px 0 0; gap: 10px; }
.btn {
  min-height: 46px;
  padding: 12px 17px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 600;
  transition: background .2s, border-color .2s, box-shadow .2s, transform .2s var(--ease-out);
}
.btn.primary {
  color: #3c3527;
  border-color: #d5b877;
  background: linear-gradient(145deg, #ebd8a7, #dfc58d 70%);
  box-shadow: 0 2px 3px #b58b3510, 0 6px 14px #b58b3515, inset 0 1px 0 #fff8;
}
.btn.primary:hover { background: linear-gradient(145deg, #efddaf, #d8bc7b); box-shadow: 0 5px 14px #b58b3528; transform: translateY(-2px); }
.btn.secondary { background: #fffefaab; border-color: #e0dcd2; color: #656861; box-shadow: 0 2px 3px #34394102; }
.btn.secondary:hover { background: #fffefa; border-color: #cfc8b8; transform: translateY(-2px); box-shadow: 0 5px 12px #34394107; }
.btn:active { transform: translateY(1px); }

/* Three-dimensional hero: float belongs to the outer object; pointer tilt to its front. */
.hero-visual {
  width: 100%;
  height: 325px;
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1100px;
  transform-style: preserve-3d;
  pointer-events: none;
  overflow: clip;
}
.hero-visual::before {
  content: '';
  position: absolute;
  width: 350px;
  height: 300px;
  max-width: 105%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #e4c67e65 0, #ecdab737 40%, transparent 70%);
  filter: blur(14px);
}
.scene-orbit {
  position: absolute;
  width: min(92%, 385px);
  aspect-ratio: 1.4;
  border: 1px solid #cab4773b;
  border-radius: 50%;
  transform: rotate(-22deg);
}
.scene-orbit::after {
  content: '';
  position: absolute;
  inset: 23px -14px;
  border: 1px solid #cab47729;
  border-radius: 50%;
  transform: rotate(47deg);
}
.poster-object {
  position: relative;
  width: 180px;
  height: 238px;
  transform-style: preserve-3d;
  transform: rotateX(10deg) rotateY(-20deg) rotateZ(9deg);
  animation: poster-float 7s ease-in-out infinite;
  pointer-events: auto;
  will-change: transform;
}
.poster-back {
  position: absolute;
  inset: 3px -9px -7px 7px;
  border-radius: 19px;
  background: linear-gradient(110deg, #b5995a, #f4e7c6 34%, #b89a5a);
  transform: translateZ(-12px);
  box-shadow: 4px 7px 0 #b49759, 8px 14px 0 #d8bf88;
}
.poster-front {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 21px;
  border-radius: 18px;
  border: 1px solid #fff6;
  background: linear-gradient(145deg, #f9ebc5 0%, #e8cf91 44%, #ceac62 100%);
  box-shadow: inset 1px 1px 0 #fff9, inset -1px -1px 0 #8c692d20, 16px 24px 38px #8a6e3330;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateZ(1px);
  transform-style: preserve-3d;
  transition: transform .3s var(--ease-out);
  overflow: hidden;
}
.poster-front::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 8%, #ffffff50 32%, transparent 55%);
  border-radius: inherit;
}
.poster-front::after {
  content: '';
  position: absolute;
  inset: 13px;
  border: 1px solid #fff5;
  border-radius: 9px;
}
.poster-symbol { width: 68px; height: 75px; color: #514332; stroke-width: 1.25; position: relative; filter: drop-shadow(0 1px 0 #fff5); }
.poster-lines { width: 75px; height: 5px; position: relative; background: #77613b80; border-radius: 3px; box-shadow: 0 13px 0 #77613b3b; }
.poster-lines::after { content: ''; display: block; width: 42px; height: 4px; margin: 26px auto 0; background: #77613b24; border-radius: 3px; }
.poster-shadow { position: absolute; width: 190px; height: 25px; bottom: 10px; left: 50%; transform: translateX(-50%) rotate(-8deg); border-radius: 50%; background: #84714a25; filter: blur(14px); }
.scene-pill {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 15px;
  border-radius: 15px;
  color: #67665f;
  font-size: 11px;
  line-height: 1.4;
  background: #fffefad9;
  border: 1px solid #ffffff;
  box-shadow: 0 10px 30px #71634b12, inset 0 1px 0 #fff;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: pill-float 8s ease-in-out infinite;
}
.scene-pill .icon { width: 18px; height: 18px; color: #ad863e; }
.scene-pill strong, .scene-pill [id] { color: #383b39; font-weight: 600; font-variant-numeric: tabular-nums; }
.scene-pill-top { top: 29px; right: 2%; transform: rotate(3deg); }
.scene-pill-bottom { bottom: 23px; left: 0; transform: rotate(-4deg); animation-delay: -3s; }
@keyframes poster-float {
  0%, 100% { transform: translateY(0) rotateX(10deg) rotateY(-20deg) rotateZ(9deg); }
  50% { transform: translateY(-12px) rotateX(7deg) rotateY(-16deg) rotateZ(7deg); }
}
@keyframes pill-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

.stats { gap: 14px; margin-bottom: 22px; }
.stat-card {
  padding: 23px 22px 20px;
  border-radius: 20px;
  background: linear-gradient(145deg, #fffefa, #fffdf8);
  border: 1px solid #fff;
  box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease-out), box-shadow .35s;
}
.stat-card::after { content: ''; position: absolute; inset: 0; border: 1px solid #e8e3d380; border-radius: inherit; pointer-events: none; }
.stat-card span:not(.stat-icon) { font-size: 11px; line-height: 1.55; color: #777970; }
.stat-card strong { font-size: 37px; font-weight: 500; letter-spacing: -1.8px; margin: 13px 0 7px; color: #373b3c; }
.stat-card small { color: #94958c; font-size: 9px; }
.stat-icon, .stat-icon.green, .stat-icon.neutral, .stat-icon.orange { width: 35px; height: 35px; border-radius: 12px; color: #9b8046; background: #f3ecdd; }
.stat-icon.neutral { color: #7c807b; background: #efefea; }
.stat-icon .icon { width: 18px; height: 18px; }
.sponsor-section { padding: 18px 22px; margin-bottom: 22px; background: #eeebe28c; border: 1px solid #e7e1d4; border-radius: 18px; box-shadow: inset 0 1px 0 #fff8; }
.sponsor-heading h2 { font-size: 11px; font-weight: 500; color: #828174; }
.sponsor-heading > span { font-size: 9px; color: #969284; }
.sponsor-brands { gap: 12px; margin-top: 14px; }
.sponsor-brands > span { padding: 9px 8px; font-size: 12px; letter-spacing: -.3px; background: transparent; color: #7b7464; border-right: 1px solid #d9d2c2; border-radius: 0; }
.sponsor-brands > span:last-child { border-right: 0; }
.workspace { border: 1px solid #e7e2d6; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-soft); scroll-margin-top: calc(24px + env(safe-area-inset-top)); }
.workspace-heading { padding: 28px 26px 20px; }
.workspace-heading h2 { font-size: 20px; font-weight: 600; letter-spacing: -.55px; }
.workspace-heading #visible-count { font-size: 11px; color: #8a8b82; margin-top: 7px; }
.area-tag { background: #f2eee5; color: #9a8b6b; padding: 7px 10px; border-radius: 20px; font-size: 10px; }
.filter-bar { padding: 0 26px 22px; gap: 9px; }
.filter-bar select, .search-field input { height: 44px; min-height: 44px; border-radius: 12px; border: 1px solid #e4dfd4; font-size: 12px; background: #f8f7f2; }
.filter-bar select { color: #747970; padding-left: 12px; max-width: 200px; }
.search-field { min-width: 140px; }
.search-field input { padding-left: 37px; background: #fffefa; color: var(--ink); }
.search-field .icon { left: 13px; color: #9a9b90; width: 16px; height: 16px; }
.map-layout { grid-template-columns: minmax(0, 1fr) 290px; min-height: 470px; border-color: #e6e0d4; }
#map { height: 470px; }
.map-wrap, .leaflet-container { background: #eaeae0; }
.leaflet-tile-pane { filter: saturate(.15) sepia(.12) contrast(.97); }
.detail-panel { max-height: 470px; padding: 27px 24px; background: #fffefa; border-color: #e6e0d4; }
.detail-title { font-size: 22px; font-weight: 500; letter-spacing: -.6px; }
.detail-meta { font-size: 11px; line-height: 1.6; }
.detail-grid { gap: 18px 12px; margin: 23px 0; }
.detail-grid dt { font-size: 10px; color: #92948a; }
.detail-grid dd { font-size: 12px; }
.detail-note { background: #f5f2e9; border-radius: 12px; font-size: 12px; padding: 13px; }
.detail-actions .btn, .detail-more .btn { min-height: 44px; font-size: 12px; }
.detail-status-label { color: #83877b; font-size: 11px; }
.status-select { min-height: 44px; border-radius: 12px; border-color: #e0dacf; font-size: 12px; }
.detail-more summary, .text-button { min-height: 44px; display: flex; align-items: center; font-size: 12px; }
.detail-more { margin-top: 12px; }
.status-badge { padding: 6px 9px; border-radius: 7px; font-size: 10px; }
.status-badge.installed { background: #efebe1; color: #716653; }
.status-badge.planned { background: #ede9e1; color: #8b7960; }
.status-badge.issue { background: #f3e6ca; color: #937127; }
.status-badge.removed { background: #f0f0ec; color: #92958b; }
.map-tools { right: 16px; top: 16px; gap: 8px; }
.map-tool { width: 44px; height: 44px; border-radius: 13px; color: #655c48; background: #fffefaf5; border: 1px solid #e0dacd !important; box-shadow: 0 4px 12px #34394112 !important; }
.map-tool:hover { background: #fff; transform: translateY(-1px); }
.leaflet-control-zoom { border-radius: 13px !important; border-color: #e0dacd !important; box-shadow: 0 4px 12px #34394112 !important; }
.leaflet-control-zoom a { width: 44px !important; height: 44px !important; line-height: 44px !important; color: #655c48 !important; background: #fffefa !important; }
.map-tip { padding: 9px 12px; font-size: 10px; background: #fffefaf0; border-color: #e4dcc9; border-radius: 10px; color: #88816f; box-shadow: 0 4px 12px #34394105; }
.pin { width: 33px; height: 33px; border: 3px solid #fffefa; background: #343941; box-shadow: 0 2px 2px #3439411c, 0 6px 12px #34394133; font-size: 11px; transition: box-shadow .2s, background .2s; }
.pin.planned, .legend-dot.planned { background: #b7a888; }
.pin.issue, .legend-dot.issue { background: #bc944a; }
.pin.removed, .legend-dot.removed { background: #a6aaa0; }
.pin.selected { outline: 3px solid #dfc58d; outline-offset: 4px; box-shadow: 0 4px 16px #b58b3540; }
.map-legend { padding: 17px 26px; gap: 17px; font-size: 10px; color: #8a8d80; }
.map-legend small { font-size: 10px; color: #a0a292; }
.legend-dot { width: 8px; height: 8px; }
.table-scroll { min-height: 350px; }
table { font-size: 12px; }
th { background: #f5f3ec; color: #8e8d7f; padding: 17px 24px; }
td { padding: 17px 24px; border-color: #eee9dc; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: #fbf7ed; }
td .btn { min-height: 44px; }
.muted { font-size: 11px; }
.removal-heading { padding: 27px 26px 0; border-color: #ece6d8; }
.removal-heading h3 { font-size: 20px; font-weight: 500; letter-spacing: -.5px; }
#removal-list { padding: 22px 26px; }
.removal-card { padding: 20px 0; border-color: #ece6d8; }
.removal-info h3 { font-size: 14px; font-weight: 500; }
.removal-info p { font-size: 11px; }
.removal-actions .btn { min-height: 44px; font-size: 11px; }
.deadline-card { margin-top: 22px; padding: 24px 26px; border: 1px solid #e7dfcc; border-radius: 20px; background: linear-gradient(110deg, #f1eada80, #f8f5ed); box-shadow: inset 0 1px 0 #fff9; }
.deadline-icon { width: 44px; height: 44px; border-radius: 15px; color: #a98943; background: #e9dcc0; }
.deadline-copy h3 { font-size: 13px; font-weight: 500; }
.deadline-copy p { font-size: 11px; color: #939080; }
.date-summary { font-size: 10px; color: #97866a; }
.progress-track { background: #e6dfd0; height: 5px; }
#deadline-progress { background: linear-gradient(90deg, #b58b35, #d3b774); transition: width .7s var(--ease-out); }
.page-footer { padding: 25px 3px 0; color: #a09e92; font-size: 10px; }
.page-footer a { color: #938b78; }

/* Always-available controls, lifted above the canvas. */
.action-rail {
  position: fixed;
  z-index: 1050;
  left: calc(20px + env(safe-area-inset-left));
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 7px;
  width: 56px;
  border: 1px solid #fff;
  border-radius: 20px;
  background: #fffefaad;
  box-shadow: 0 5px 15px #34394105, 0 20px 40px #34394109;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.rail-button { position: relative; display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; margin-left: -2px; border: 0; border-radius: 13px; background: transparent; color: #858579; transition: background .2s, color .2s, transform .2s var(--ease-out); }
.rail-button .icon { width: 21px; height: 21px; }
.rail-button[data-action=add] { background: #f0e0b9; color: #8d6c2c; box-shadow: inset 0 1px 0 #fff8; }
.rail-button:hover { background: #ede7d9; color: #655439; transform: translateY(-2px); }
.rail-button > span { position: absolute; top: 50%; left: calc(100% + 15px); transform: translate(3px, -50%); padding: 8px 12px; background: #343941; color: #fffefa; border-radius: 9px; font-size: 11px; font-weight: 500; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s, transform .2s; box-shadow: 0 4px 12px #34394118; }
.rail-button:hover > span, .rail-button:focus-visible > span { opacity: 1; transform: translate(0, -50%); }
.action-dock {
  position: fixed;
  z-index: 1100;
  left: calc(96px + env(safe-area-inset-left));
  bottom: calc(22px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: min(380px, calc(100vw - 32px));
  padding: 7px;
  border: 1px solid #ffffff35;
  border-radius: 23px;
  color: #fffefa;
  background: #343941ec;
  box-shadow: 0 5px 10px #34394112, 0 18px 48px #34394125, inset 0 1px 0 #fff1;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}
.dock-button, .dock-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 0; border-radius: 16px; padding: 12px 14px; font-size: 11px; font-weight: 500; white-space: nowrap; transition: background .2s, box-shadow .2s, transform .2s var(--ease-out); }
.dock-button { background: transparent; color: #c3c4bf; }
.dock-button .icon { width: 19px; height: 19px; }
.dock-button.active { background: #ffffff11; color: #f4e5bf; }
.dock-button:hover { background: #ffffff17; color: #fff; }
.dock-primary { background: linear-gradient(140deg, #eed8a3, #dabb77); color: #4a3d27; font-weight: 600; padding: 12px 18px; box-shadow: inset 0 1px 0 #fff7, 0 3px 8px #171d2330; }
.dock-primary .icon { width: 19px; height: 19px; }
.dock-primary:hover { background: linear-gradient(140deg, #f6e2b3, #e2c386); transform: translateY(-2px); box-shadow: inset 0 1px 0 #fff7, 0 5px 12px #171d2350; }
.dock-primary:active, .dock-button:active { transform: translateY(1px); }

.dialog { border-radius: 24px; border: 1px solid #e7e0d1; background: #fffefa; padding: 30px; box-shadow: 0 20px 90px #292d3438; max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.dialog[open] { animation: dialog-arrive .32s var(--ease-out) both; }
.dialog::backdrop { background: #252a3170; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.dialog-header h2 { font-size: 25px; font-weight: 500; letter-spacing: -.7px; }
.close-button { width: 44px; height: 44px; min-width: 44px; border-radius: 14px; background: #f1eee5; color: #8a887c; transition: background .2s, transform .2s; }
.close-button:hover { background: #e9e1cf; transform: rotate(5deg); }
.form-intro, .dialog > p { font-size: 13px; line-height: 1.75; }
.field { font-size: 12px; font-weight: 500; margin-top: 19px; gap: 8px; }
.field input, .field select, .field textarea { min-height: 46px; border-radius: 12px; background: #f8f6ef; border-color: #e5dfd1; font-size: 14px; padding: 11px 13px; }
.field input[type=file] { font-size: 12px; }
.field .optional { font-size: 10px; }
.field-hint { font-size: 11px; }
.form-note { background: #f1eddf; color: #8a8270; border-radius: 13px; font-size: 11px; line-height: 1.75; padding: 15px; }
.dialog-actions { padding-top: 20px; margin-top: 25px; border-color: #e6dfcf; }
.help-list { font-size: 13px; color: #7c8074; }
.help-list li { margin: 7px 0; }
.toast { bottom: calc(105px + env(safe-area-inset-bottom)); border-radius: 16px; background: #343941; padding: 15px 20px; font-size: 12px; box-shadow: 0 10px 32px #34394120; }
@keyframes dialog-arrive { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Law outcomes retain their original traffic-light semantics. */
#view-rules { padding: 30px 26px; }
.law-heading h2 { font-size: 28px; font-weight: 500; letter-spacing: -.8px; }
.law-heading p { font-size: 13px; line-height: 1.75; }
.law-snapshot, .law-context, .law-note-card { border-radius: 15px; background: #f4f0e5; }
.law-card { border-radius: 18px; border-color: #e7dfcf; background: #fffefa; box-shadow: 0 6px 14px #34394104; }
.law-card h3 { font-size: 18px; font-weight: 500; }
.law-step-button { min-height: 44px; border-radius: 12px; border-color: #e0d7c4; background: #fffefa; }
.law-step-button.active { background: #f0e1be; border-color: #d6b978; }
.law-check { border-radius: 13px; border-color: #e5dece; }
.law-check summary, .law-sources summary { min-height: 44px; }
.law-dialog .field input, .law-dialog .field select, .law-dialog .field textarea { font-size: 14px; }
.law-dialog { overscroll-behavior: contain; }
.law-result { scroll-margin-top: 114px; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #b58b35; outline-offset: 4px; }
input, select, textarea { transition: border-color .2s, box-shadow .2s, background .2s; }
input:focus, select:focus, textarea:focus { border-color: #bfa366; box-shadow: 0 0 0 4px #dfc58d20; background: #fffefa; }
[data-reveal] { opacity: 1; transform: none; }
html.motion-ready [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .65s var(--ease-out), transform .65s var(--ease-out); transition-delay: var(--reveal-delay, 0ms); }
html.motion-ready [data-reveal].is-visible, html.motion-ready [data-reveal].is-revealed { opacity: 1; transform: translateY(0); }
@media (hover: hover) and (pointer: fine) { .stat-card:hover { transform: translateY(-4px); box-shadow: 0 4px 6px #34394104, 0 20px 34px #3439410a; } }

@media (min-width: 1600px) {
  .page-header.hero { min-height: 435px; padding-top: 50px; padding-bottom: 50px; }
  .hero-visual { height: 345px; }
  .poster-object { width: 195px; height: 258px; }
  #map { height: 520px; }
  .map-layout { height: auto; min-height: 520px; }
  .detail-panel { max-height: 520px; }
}
@media (max-width: 1200px) {
  .topbar { padding-left: 25px; padding-right: 25px; gap: 16px; }
  .topbar .brand img { width: 174px; }
  .topbar .nav-item { padding: 11px 12px; font-size: 11px; }
  .main-content { padding-left: 104px; padding-right: 30px; }
  .page-header.hero { gap: 12px; min-height: 355px; grid-template-columns: minmax(0, 1.16fr) minmax(250px, .84fr); }
  .hero-visual { height: 300px; }
  .page-header.hero h1 { font-size: clamp(44px, 5.25vw, 64px); }
  .stat-card { padding: 20px 17px 18px; }
  .stat-icon { width: 30px; height: 30px; }
  .stat-card strong { font-size: 33px; }
  .map-layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .detail-panel { padding: 23px 21px; }
  .scene-pill { padding: 10px 12px; font-size: 10px; }
}
@media (max-width: 1020px) {
  html { scroll-padding-top: 136px; }
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 18px; padding-top: calc(12px + env(safe-area-inset-top)); padding-bottom: 10px; }
  .topbar .main-nav { grid-column: 1 / -1; grid-row: 2; width: max-content; max-width: 100%; justify-self: center; }
  .topbar-tools { grid-column: 2; grid-row: 1; }
  .topbar .brand img { width: 185px; }
  .workspace { scroll-margin-top: calc(19px + env(safe-area-inset-top)); }
  .page-header.hero h1 { font-size: 46px; }
  .page-header.hero p { font-size: 13px; }
  .hero-visual { height: 270px; }
  .poster-object { width: 148px; height: 198px; }
  .poster-symbol { width: 55px; height: 61px; }
  .scene-pill-top { top: 12px; right: -4px; }
  .scene-pill-bottom { bottom: 12px; left: -4px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-icon { display: grid; }
  .stat-card { padding: 22px; }
}
@media (max-width: 760px) {
  .main-content { padding: 0 22px calc(132px + env(safe-area-inset-bottom)); }
  .topbar { padding-left: 22px; padding-right: 22px; }
  .action-rail { display: none; }
  .action-dock { left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); }
  .demo-strip { font-size: 9px; padding-top: 12px; }
  .demo-strip > span:first-child { font-size: 8px; letter-spacing: .6px; }
  .page-header.hero { min-height: 0; padding: 31px 0 30px; grid-template-columns: minmax(0, 1.15fr) minmax(200px, .85fr); gap: 8px; }
  .page-header.hero h1 { font-size: 43px; }
  .hero .header-actions { flex-wrap: wrap; }
  .hero .header-actions .btn { padding: 11px 13px; font-size: 11px; }
  .workspace-heading { padding: 24px 22px 18px; }
  .filter-bar { padding: 0 22px 20px; }
  .map-layout { display: flex; flex-direction: column; min-height: 0; height: auto; }
  #map, .map-wrap { height: 370px; }
  .detail-panel { max-height: none; border-left: 0; border-top: 1px solid var(--line); }
  .detail-empty { min-height: 145px; }
  .detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .detail-actions .status-select, .detail-more { grid-column: 1 / -1; }
  .map-legend { padding: 16px 22px; }
  .sponsor-section { padding: 16px 20px; }
  .deadline-card { padding: 21px; }
  .dialog { padding: 26px 23px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 125px; }
  .topbar { gap: 7px 10px; padding: calc(9px + env(safe-area-inset-top)) 16px 9px; }
  .topbar .brand img { width: 173px; }
  .topbar-tools { gap: 5px; }
  .topbar-tools button { width: 44px; height: 44px; border-radius: 13px; }
  .topbar .main-nav { width: 100%; justify-self: stretch; justify-content: space-between; gap: 2px; border-radius: 15px; padding: 3px; }
  .topbar .nav-item { min-height: 44px; padding: 10px 9px; font-size: 10px; gap: 5px; border-radius: 11px; }
  .topbar .nav-item .icon { width: 15px; height: 15px; }
  .topbar .nav-count { font-size: 9px; padding: 2px 4px; }
  .main-content { padding: 0 16px calc(128px + env(safe-area-inset-bottom)); }
  .demo-strip { padding-top: 13px; flex-wrap: nowrap; gap: 7px; line-height: 1.5; }
  .demo-strip > span:last-child { max-width: 125px; text-align: right; font-size: 8px; }
  .page-header.hero {
    grid-template-columns: minmax(0, 4fr) minmax(0, 3fr);
    grid-template-rows: auto auto auto auto;
    align-items: center;
    gap: 0 5px;
    padding: 26px 0 26px;
  }
  .hero-copy { display: contents; }
  .campaign-chip { grid-column: 1; grid-row: 3; justify-self: start; font-size: 9px; padding: 5px 9px; gap: 5px; margin-top: 13px; position: relative; z-index: 2; }
  .campaign-chip .icon { width: 12px; height: 12px; }
  .page-header.hero h1 { grid-column: 1; grid-row: 1; font-size: clamp(31px, 8.6vw, 43px); letter-spacing: -.06em; line-height: 1.12; margin: 0 0 13px; position: relative; z-index: 2; }
  .page-header.hero p { grid-column: 1; grid-row: 2; max-width: none; font-size: 11px; line-height: 1.65; position: relative; z-index: 2; }
  .hero .header-actions { grid-column: 1 / -1; grid-row: 4; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 8px; margin: 21px 0 0; width: 100%; }
  .hero .header-actions .btn { font-size: 11px; min-height: 46px; white-space: normal; padding: 10px 12px; }
  .hero-visual { grid-column: 2; grid-row: 1 / span 3; height: 207px; align-self: center; }
  .hero-visual::before { width: 175px; height: 180px; max-width: 140%; filter: blur(8px); }
  .scene-orbit { width: 135%; aspect-ratio: 1.4; }
  .scene-orbit::after { inset: 13px -8px; }
  .poster-object { width: 110px; height: 147px; border-radius: 14px; }
  .poster-front { border-radius: 13px; gap: 14px; box-shadow: inset 1px 1px 0 #fff9, inset -1px -1px 0 #8c692d20, 10px 16px 23px #8a6e3326; }
  .poster-front::after { inset: 9px; border-radius: 5px; }
  .poster-back { inset: 2px -5px -5px 4px; border-radius: 14px; box-shadow: 3px 5px 0 #b49759, 5px 9px 0 #d8bf88; }
  .poster-symbol { width: 45px; height: 49px; }
  .poster-lines { width: 48px; height: 3px; box-shadow: 0 8px 0 #77613b3b; }
  .poster-lines::after { width: 27px; height: 3px; margin-top: 16px; }
  .poster-shadow { width: 115px; height: 18px; bottom: 7px; filter: blur(10px); }
  .scene-pill { gap: 4px; padding: 7px 8px; border-radius: 10px; font-size: 8px; max-width: 145px; }
  .scene-pill .icon { width: 12px; height: 12px; }
  .scene-pill-top { top: 0; right: -1px; }
  .scene-pill-bottom { bottom: 3px; left: -10px; }
  .stats { gap: 10px; margin-bottom: 18px; }
  .stat-card { padding: 17px 15px 16px; border-radius: 17px; gap: 5px; }
  .stat-card span:not(.stat-icon) { font-size: 10px; max-width: 130px; }
  .stat-card strong { font-size: 32px; margin: 10px 0 6px; letter-spacing: -1.4px; }
  .stat-card small { font-size: 8px; line-height: 1.6; }
  .stat-icon, .stat-icon.green, .stat-icon.neutral, .stat-icon.orange { width: 27px; height: 27px; border-radius: 9px; }
  .stat-icon .icon { width: 14px; height: 14px; }
  .sponsor-section { padding: 14px 15px; border-radius: 15px; margin-bottom: 18px; }
  .sponsor-heading { flex-direction: row; align-items: center; gap: 8px; }
  .sponsor-heading h2 { font-size: 10px; }
  .sponsor-heading > span { max-width: 110px; text-align: right; font-size: 8px; }
  .sponsor-brands { grid-template-columns: 1fr 1fr; gap: 4px 10px; margin-top: 9px; }
  .sponsor-brands > span { font-size: 11px; padding: 7px 4px; }
  .sponsor-brands > span:nth-child(2) { border-right: 0; }
  .workspace { border-radius: 20px; scroll-margin-top: calc(26px + env(safe-area-inset-top)); }
  .workspace-heading { padding: 22px 18px 17px; }
  .workspace-heading h2 { font-size: 17px; letter-spacing: -.4px; }
  .workspace-heading #visible-count { font-size: 10px; margin-top: 6px; }
  .workspace-heading .area-tag { display: none; }
  .filter-bar { display: grid; grid-template-columns: 1fr 1fr; padding: 0 18px 18px; gap: 8px; }
  .filter-bar label { min-width: 0; }
  .filter-bar select { max-width: none; width: 100%; font-size: 16px; }
  .search-field input, .status-select { font-size: 16px; }
  .search-field { grid-column: 1 / -1; min-width: 0; }
  .filter-bar label:last-child { grid-column: 1 / -1; }
  .filter-bar select, .search-field input { font-size: 16px; }
  .search-field input { padding-left: 36px; }
  #map, .map-wrap { height: 335px; }
  .map-layout { min-height: 0; }
  .map-tools { top: 13px; right: 13px; }
  .map-tip { font-size: 9px; padding: 8px 9px; bottom: 27px; }
  .detail-panel { padding: 23px 19px; }
  .detail-title { font-size: 22px; }
  .detail-grid { gap: 16px 10px; }
  .detail-grid dt { font-size: 9px; }
  .detail-grid dd { font-size: 11px; }
  .detail-actions { gap: 8px; }
  .detail-actions .btn { min-height: 46px; white-space: normal; font-size: 11px; }
  .status-select { font-size: 16px; }
  .map-legend { padding: 16px 18px; gap: 13px; font-size: 9px; }
  .map-legend small { flex-basis: 100%; font-size: 9px; }
  .deadline-card { padding: 19px 17px; gap: 12px; border-radius: 17px; margin-top: 18px; flex-wrap: wrap; }
  .deadline-icon { width: 36px; height: 36px; border-radius: 12px; }
  .deadline-copy { flex-basis: calc(100% - 50px); }
  .deadline-copy h3 { font-size: 12px; }
  .deadline-copy p { font-size: 10px; }
  .date-summary { margin-left: 48px; max-width: none; text-align: left; font-size: 10px; }
  .page-footer { gap: 10px; font-size: 9px; padding-top: 23px; }
  .removal-heading { padding: 23px 18px 0; }
  .removal-heading h3 { font-size: 18px; }
  .removal-heading p { font-size: 12px; }
  #removal-list { padding: 22px 18px; }
  .removal-card { flex-direction: column; align-items: flex-start; gap: 14px; }
  .removal-actions { width: 100%; }
  .removal-actions .btn { flex: 1; min-height: 46px; }
  .action-dock { padding: 6px; gap: 4px; border-radius: 21px; width: max-content; max-width: min(380px, calc(100vw - 28px - env(safe-area-inset-left) - env(safe-area-inset-right))); }
  .dock-button, .dock-primary { min-height: 48px; border-radius: 15px; font-size: 10px; gap: 6px; padding: 12px 12px; }
  .dock-primary { font-size: 11px; padding: 12px 16px; }
  .dock-button .icon, .dock-primary .icon { width: 18px; height: 18px; }
  .dialog { padding: 25px 20px; border-radius: 21px; max-width: calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)); }
  .dialog-header h2 { font-size: 23px; }
  .field { font-size: 12px; }
  .field input, .field select, .field textarea, .law-dialog .field input, .law-dialog .field select, .law-dialog .field textarea { font-size: 16px; }
  .field input[type=file] { font-size: 16px; }
  .form-row { gap: 11px; }
  .dialog-actions .btn { min-height: 46px; }
  .law-dialog { padding: 24px 19px !important; }
  #view-rules { padding: 24px 18px; }
  .law-heading h2 { font-size: 25px; }
  .law-heading { gap: 12px; }
  .law-card-grid, .law-extras { grid-template-columns: 1fr; }
  .law-card { padding: 20px; border-radius: 16px; }
  .law-step-button { font-size: 10px; padding: 10px 4px; }
  .law-result { scroll-margin-top: 155px; }
  .law-check summary { min-height: 48px; }
  .toast { font-size: 12px; bottom: calc(101px + env(safe-area-inset-bottom)); }
}
@media (max-width: 389px) {
  .topbar .brand img { width: 158px; }
  .topbar .nav-item { padding-left: 7px; padding-right: 7px; font-size: 9px; gap: 4px; }
  .topbar .nav-item .icon { width: 14px; height: 14px; }
  .topbar .nav-count { display: none; }
  .page-header.hero h1 { font-size: 31px; }
  .hero .header-actions { grid-template-columns: 1fr; }
  .hero .header-actions .btn { min-height: 46px; }
  .hero .header-actions .btn.secondary { order: 2; }
  .hero-visual { height: 197px; }
  .poster-object { width: 101px; height: 137px; }
  .scene-pill { font-size: 7px; padding: 6px 7px; }
  .dock-button { padding: 12px 10px; font-size: 9px; }
  .dock-primary { padding: 12px 12px; font-size: 10px; }
  .stat-card { padding-left: 13px; padding-right: 13px; }
  .stat-icon, .stat-icon.green, .stat-icon.neutral, .stat-icon.orange { width: 24px; height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .001ms !important; transition-delay: 0ms !important; }
  .poster-object { transform: rotateX(10deg) rotateY(-20deg) rotateZ(9deg); will-change: auto; }
  .poster-front { transform: translateZ(1px); }
  .scene-pill { translate: none; }
  html.motion-ready [data-reveal], html.motion-ready [data-reveal].is-visible, html.motion-ready [data-reveal].is-revealed { opacity: 1; transform: none; }
  .stat-card:hover, .btn:hover, .topbar-tools button:hover, .rail-button:hover, .dock-primary:hover, .dock-button:active, .dock-primary:active, .close-button:hover, .map-tool:hover { transform: none; }
}
