/* ========================================================================
   신안APT 냄새 리포트 · Linear 다크 시스템 응용
   ======================================================================== */

/* --- Design tokens (dark default, light auto) --------------------------- */
:root {
  color-scheme: dark light;

  /* Surface ladder */
  --canvas:            #010102;
  --surface-1:         #0f1011;
  --surface-2:         #141516;
  --surface-3:         #18191a;
  --surface-4:         #191a1b;
  --hairline:          #23252a;
  --hairline-strong:   #34343a;
  --hairline-tertiary: #3e3e44;

  /* Ink */
  --ink:            #f7f8f8;
  --ink-muted:      #d0d6e0;
  --ink-subtle:     #8a8f98;
  --ink-tertiary:   #62666d;

  /* Brand — lavender ONLY for CTA/brand/focus/link */
  --primary:        #5e6ad2;
  --primary-hover:  #828fff;
  --primary-focus:  #5e69d1;
  --on-primary:     #ffffff;

  /* Semantic */
  --success:        #27a644;
  --danger:         #e15353;

  /* Intensity — NOT lavender. Traffic-light gradient: light-yellow → amber → red */
  --intensity-1:    #eab308;  /* light yellow */
  --intensity-2:    #e0a000;  /* amber */
  --intensity-3:    #e15353;  /* red */
  --intensity-1-bg: rgba(234,179,8,0.20);
  --intensity-2-bg: rgba(224,160,0,0.28);
  --intensity-3-bg: rgba(225,83,83,0.28);

  /* Heatmap cells (dark) */
  --cell-0-bg:      transparent;
  --cell-0-border:  var(--hairline);
  --cell-1-bg:      rgba(234,179,8,0.18);
  --cell-1-border:  transparent;
  --cell-2-bg:      rgba(224,160,0,0.32);
  --cell-2-border:  transparent;
  --cell-3-bg:      rgba(225,83,83,0.36);
  --cell-3-border:  transparent;

  /* Primary tints */
  --primary-tint-15: rgba(94,106,210,0.15);
  --primary-tint-20: rgba(94,106,210,0.20);

  /* Shape */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 9999px;

  /* Spacing */
  --sp-xxs: 4px;
  --sp-xs: 8px;
  --sp-sm: 12px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;

  /* Layout */
  --content-max: 480px;
  --tabbar-h: 64px;
  --header-h: 56px;

  /* Motion */
  --dur-fast: 120ms;
  --dur-med:  200ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- Light palette (auto system) ---------------------------------------- */
@media (prefers-color-scheme: light) {
  :root {
    --canvas:            #fafafa;
    --surface-1:         #ffffff;
    --surface-2:         #f2f3f5;
    --surface-3:         #e9ebef;
    --surface-4:         #dfe2e7;
    --hairline:          #e5e7eb;
    --hairline-strong:   #c9cdd4;
    --hairline-tertiary: #b3b8c1;

    --ink:            #0d0e10;
    --ink-muted:      #4a4d55;
    --ink-subtle:     #6b7280;
    --ink-tertiary:   #9ca3af;

    --primary:        #5e6ad2;
    --primary-hover:  #4b56b8;
    --primary-focus:  #5e69d1;

    --intensity-1:    #a16207;  /* light bg needs deeper text */
    --intensity-2:    #b45309;
    --intensity-3:    #b91c1c;
    --intensity-1-bg: #fef3c7;
    --intensity-2-bg: #fde68a;
    --intensity-3-bg: #fecaca;

    --cell-0-bg:      transparent;
    --cell-0-border:  var(--hairline);
    --cell-1-bg:      #fef9c3;
    --cell-1-border:  transparent;
    --cell-2-bg:      #fef3c7;
    --cell-2-border:  transparent;
    --cell-3-bg:      #fecaca;
    --cell-3-border:  transparent;

    --primary-tint-15: rgba(94,106,210,0.14);
    --primary-tint-20: rgba(94,106,210,0.22);
  }
}

/* --- Reset & base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Jua', 'Gaegu', 'Apple SD Gothic Neo', 'Malgun Gothic',
               'Noto Sans KR', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
button:disabled { cursor: not-allowed; }
input, select { font: inherit; color: inherit; }
a { color: var(--primary); text-underline-offset: 2px; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--primary-focus);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* Visually hidden (accessible label) */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 8px 12px;
  background: var(--surface-2);
  color: var(--ink);
  border-radius: var(--r-md);
  z-index: 100;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* --- App shell ---------------------------------------------------------- */
.app {
  max-width: var(--content-max);
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  background: var(--canvas);
}

/* --- Header ------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  padding: 0 var(--sp-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  padding-top: env(safe-area-inset-top, 0px);
}
.header__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--ink);
}
.header__brand .brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--primary);
  display: inline-block;
}

/* --- Date pill (header trigger) ----------------------------------------- */
.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease);
}
.date-pill:hover { background: var(--surface-3); }
.date-pill--past {
  background: var(--primary-tint-15);
  color: var(--ink);
  border-color: var(--primary-tint-20);
}
.date-pill__hidden {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* --- Main region -------------------------------------------------------- */
.main {
  flex: 1;
  padding: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

/* --- Top segment tabs (sticky, always-visible screen switch) ------------ */
.topseg {
  position: sticky;
  top: var(--header-h);
  z-index: 9;
  display: flex;
  gap: 8px;
  padding: 10px var(--sp-md);
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
}
.topseg__item {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  color: var(--ink-muted);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.topseg__item svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.topseg__item:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.topseg__item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.topseg__item.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* --- Tabbar ------------------------------------------------------------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: var(--surface-1);
  border-top: 1px solid var(--hairline-strong);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  backdrop-filter: saturate(1.2);
}
.tabbar__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  height: var(--tabbar-h);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
  min-height: 44px;
  text-decoration: none;
}
.tabbar__item .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-subtle);
}
.tabbar__item .icon svg {
  width: 22px;
  height: 22px;
  display: block;
}
.tabbar__item:hover { color: var(--ink); }
.tabbar__item:hover .icon { color: var(--ink-muted); }
.tabbar__item.is-active {
  color: var(--primary);
  font-weight: 700;
}
.tabbar__item.is-active .icon { color: var(--primary); }
.tabbar__item.is-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}
.tabbar__item { position: relative; }
.tabbar__item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  border-radius: var(--r-md);
}

/* --- Home: map card ----------------------------------------------------- */
.map-card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.map-card__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
}
.seg-view {
  display: inline-flex;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  padding: 2px;
  gap: 2px;
}
.seg-view__btn {
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
}
.seg-view__btn.is-active {
  background: var(--surface-3);
  color: var(--ink);
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 12px;
}

/* --- SVG map ------------------------------------------------------------ */
.map-wrap {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--canvas);
}
.map-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 2278 / 937;
  min-width: 600px; /* prevent buildings being too small on mobile */
}
.map-inner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  filter: brightness(0.9);
}
@media (prefers-color-scheme: light) {
  .map-inner img { filter: none; }
}
.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.b { cursor: pointer; }
.b .b-circle {
  fill: rgba(15,16,17,0.55);
  stroke: var(--hairline-strong);
  stroke-width: 3;
  transition: stroke var(--dur-fast) var(--ease), fill var(--dur-fast) var(--ease);
}
@media (prefers-color-scheme: light) {
  .b .b-circle { fill: rgba(255,255,255,0.7); }
}
.b:hover .b-circle,
.b:focus-visible .b-circle {
  stroke: var(--ink);
  stroke-width: 4;
}
.b.selected .b-circle {
  fill: var(--primary-tint-20);
  stroke: var(--primary);
  stroke-width: 4;
}
.b-label {
  fill: var(--ink);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: var(--canvas);
  stroke-width: 6;
  stroke-linejoin: round;
}
.b-badge {
  pointer-events: none;
}
.b-badge__bg {
  fill: var(--intensity-3);
  stroke: var(--canvas);
  stroke-width: 3;
}
.b-badge__text {
  fill: #ffffff;
  font-size: 30px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}

/* --- Home: selected + intensity ---------------------------------------- */
.selection-line {
  font-size: 13px;
  color: var(--ink-muted);
  padding: 4px 4px 0;
}
.selection-line strong {
  color: var(--ink);
  font-weight: 600;
}

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: var(--ink-subtle);
  text-transform: none;
  margin: 0 0 8px;
}

.intensity {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-1);
}
.intensity__btn {
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px;
  border-right: 1px solid var(--hairline);
  color: var(--ink-muted);
  background: var(--surface-1);
  transition: background var(--dur-fast) var(--ease);
}
.intensity__btn:last-child { border-right: none; }
.intensity__btn:hover { background: var(--surface-2); }
.intensity__btn .num {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.intensity__btn .label { font-size: 12px; color: var(--ink-subtle); }
.intensity__btn[aria-checked="true"] {
  background: var(--surface-2);
  color: var(--ink);
}
.intensity__btn[data-level="1"][aria-checked="true"] {
  background: var(--intensity-1-bg);
  border-color: var(--intensity-1);
}
.intensity__btn[data-level="2"][aria-checked="true"] {
  background: var(--intensity-2-bg);
  border-color: var(--intensity-2);
}
.intensity__btn[data-level="3"][aria-checked="true"] {
  background: var(--intensity-3-bg);
  border-color: var(--intensity-3);
}
.intensity__btn[data-level="1"][aria-checked="true"] .num { color: var(--intensity-1); }
.intensity__btn[data-level="2"][aria-checked="true"] .num { color: var(--intensity-2); }
.intensity__btn[data-level="3"][aria-checked="true"] .num { color: var(--intensity-3); }
.intensity__btn[aria-checked="true"] .label { color: var(--ink); font-weight: 600; }

/* --- CTA ---------------------------------------------------------------- */
.cta {
  width: 100%;
  min-height: 48px;
  border-radius: var(--r-md);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.cta:hover:not([aria-disabled="true"]) { background: var(--primary-hover); }
.cta:active:not([aria-disabled="true"]) { transform: scale(0.98); }
.cta[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.cta__badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.16);
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  margin-left: 6px;
}

.hint {
  font-size: 13px;
  color: var(--danger);
  min-height: 18px;
  margin-top: 6px;
}
.hint--info { color: var(--ink-subtle); }

/* Shake anim (respect reduced motion) */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.shake { animation: shake 220ms var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .shake { animation: none; }
  .cta:active { transform: none; }
}

/* --- Recent line -------------------------------------------------------- */
.recent {
  font-size: 12px;
  color: var(--ink-subtle);
  padding: 8px 4px 0;
}

/* --- Stats: KPI --------------------------------------------------------- */
.kpi {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-sm);
}
.kpi__card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.kpi__num {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.6px;
  line-height: 1.2;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.kpi__label {
  font-size: 12px;
  color: var(--ink-muted);
}

/* --- Stats toolbar ------------------------------------------------------ */
.stats-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
}
.select-pill {
  background: var(--surface-1);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 8px 12px;
  font-size: 13px;
  min-height: 36px;
}

/* --- Heatmap ------------------------------------------------------------ */
.heatmap {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.heatmap__scroll {
  /* wrapper only; scroll happens on .heatmap__grid so sticky grid items work */
}
.heatmap__grid {
  display: grid;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.heatmap__cell {
  min-width: 0;  /* grid template controls; row label z-index stays on top */
  min-height: 24px;
  border: 1px solid var(--cell-0-border);
  border-radius: 3px;
  margin: 2px;
  position: relative;
  display: block;
  padding: 0;
  background: var(--cell-0-bg);
}
.heatmap__cell.lv-1 { background: var(--cell-1-bg); border-color: var(--cell-1-border); }
.heatmap__cell.lv-2 { background: var(--cell-2-bg); border-color: var(--cell-2-border); }
.heatmap__cell.lv-3 { background: var(--cell-3-bg); border-color: var(--cell-3-border); }
.heatmap__cell:hover, .heatmap__cell:focus-visible {
  outline: 2px solid var(--primary-focus);
  outline-offset: -2px;
}
.heatmap__row-label {
  position: sticky;
  left: 0;
  background: var(--surface-1);
  border-right: 1px solid var(--hairline);
  padding: 4px 10px;
  font-size: 12px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  min-width: 68px;
  z-index: 3;
  box-shadow: 2px 0 4px rgba(0,0,0,0.04);
}
.heatmap__col-header {
  padding: 4px 2px;
  font-size: 10px;
  color: var(--ink-subtle);
  text-align: center;
  border-bottom: 1px solid var(--hairline);
  min-width: 0;  /* grid template controls */
  white-space: nowrap;
}
.heatmap__col-header--label {
  border-right: 1px solid var(--hairline);
  background: var(--surface-1);
  position: sticky;
  left: 0;
  z-index: 4;
}
.legend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--hairline);
  font-size: 11px;
  color: var(--ink-muted);
  overflow-x: auto;
}
.legend__item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend__sw {
  width: 12px; height: 12px; border-radius: 3px;
  border: 1px solid var(--cell-0-border); background: var(--cell-0-bg);
}
.legend__sw.lv-1 { background: var(--cell-1-bg); border-color: var(--cell-1-border); }
.legend__sw.lv-2 { background: var(--cell-2-bg); border-color: var(--cell-2-border); }
.legend__sw.lv-3 { background: var(--cell-3-bg); border-color: var(--cell-3-border); }

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--ink-muted);
  font-size: 14px;
}
.empty-state a { color: var(--primary); text-decoration: none; }

/* --- Secondary button --------------------------------------------------- */
.btn-secondary {
  width: 100%;
  min-height: 44px;
  background: var(--surface-1);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-secondary:hover { background: var(--surface-2); }

/* --- Toast -------------------------------------------------------------- */
#toast-region {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: toast-in 200ms var(--ease);
  max-width: 90vw;
}
.toast--error { border-color: var(--intensity-3); }
.toast--success { border-color: var(--success); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Bottom sheet ------------------------------------------------------- */
#sheet-region { position: relative; z-index: 30; }
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 30;
  animation: fade-in 160ms var(--ease);
}
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 31;
  background: var(--surface-3);
  border-top-left-radius: var(--r-xl);
  border-top-right-radius: var(--r-xl);
  border-top: 1px solid var(--hairline);
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  max-width: var(--content-max);
  margin: 0 auto;
  animation: sheet-in 220ms var(--ease);
}
@keyframes sheet-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.sheet__handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--hairline-strong);
  margin: 0 auto 12px;
}
.sheet__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
}
.sheet__section { margin-bottom: 16px; }
.sheet__section-label {
  display: block;
  font-size: 12px;
  color: var(--ink-subtle);
  margin-bottom: 8px;
}
.sheet__row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  color: var(--ink-muted);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
}
.chip.is-active {
  background: var(--primary-tint-15);
  border-color: var(--primary);
  color: var(--ink);
}

/* --- My reports (cancel) ------------------------------------------------ */
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 4px 10px;
  margin-left: 6px;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  color: var(--primary);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.link-btn:hover {
  background: var(--primary-tint-10, var(--surface-2));
  border-color: var(--primary);
}
.link-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.my-card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 16px;
  margin: 16px 0;
}
.my-card__head { margin-bottom: 8px; }
.my-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.my-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--canvas);
}
.my-item__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.my-item__name { font-weight: 500; }
.my-item__intensity {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-muted);
}
.my-item__intensity.intensity-2 { color: var(--intensity-2, #b26a00); }
.my-item__intensity.intensity-3 { color: var(--intensity-3, #b53131); }
.my-item__time { color: var(--ink-subtle); font-size: 13px; }

/* Print styles */
@media print {
  body { background: white; color: black; }
  .no-print { display: none !important; }
}
