/* ============================================================
   Maloca — shared styles
   All pages import this file. Page-specific overrides go at 
   the bottom of each HTML file inside a <style> block.
   ============================================================ */

/* ── Design tokens ── */
:root {
  --cream:       #F7F4EF;
  --cream-mid:   #EDE9E2;
  --cream-dk:    #DDD8CF;
  --ink:         #1A1714;
  --ink-mid:     #3D3A35;
  --ink-lt:      #7A7670;
  --ink-ghost:   #B8B4AD;
  --copper:      #C8722A;
  --rule:        #E2DDD6;
  --white:       #FFFFFF;
  --green:       #3DAA6A;
}

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

/* ── Base ── */
body {
  font-family: 'Outfit', sans-serif;
  background: var(--cream);
  color: var(--ink);
}

/* ── Shared wordmark ── */
.wordmark       { font-size: 20px; font-weight: 300; letter-spacing: -0.03em; color: var(--ink); }
.wordmark span  { color: var(--copper); font-weight: 500; }

/* ── Shared form fields ── */
.field { margin-bottom: 14px; }
.field label {
  font-size: 9px; font-weight: 600; color: var(--ink-ghost);
  text-transform: uppercase; letter-spacing: 0.18em;
  display: block; margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  border: 1px solid var(--rule);
  border-bottom: 2px solid var(--ink);
  padding: 11px 14px;
  font-size: 15px;
  font-family: 'Outfit', sans-serif;
  color: var(--ink);
  outline: none;
  background: var(--cream);
  border-radius: 0;
  transition: border-bottom-color 0.2s;
}
.field input:focus,
.field select:focus { border-bottom-color: var(--copper); background: var(--white); }
.field select {
  font-size: 14px;
  padding: 11px 36px 11px 14px;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237A7670' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* ── Shared buttons ── */
.btn-primary {
  width: 100%; padding: 16px;
  background: var(--ink); color: var(--cream);
  border: none; font-size: 12px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  cursor: pointer; font-family: 'Outfit', sans-serif;
  touch-action: manipulation; transition: background 0.2s;
}
.btn-primary:hover { background: var(--copper); }

.btn-secondary {
  width: 100%; padding: 11px 0;
  background: transparent; color: var(--ink-lt);
  border: 1px solid var(--rule);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; font-family: 'Outfit', sans-serif;
  touch-action: manipulation;
}

/* ── Section heading ── */
.section-head {
  font-size: 9px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.22em; color: var(--ink-ghost);
  margin: 24px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

/* ── Person blocks (used on setup & sidebar) ── */
.person-block {
  background: var(--cream); border: 1px solid var(--rule);
  padding: 16px; margin-bottom: 4px;
}
.person-block.p1 { border-left: 3px solid var(--copper); }
.person-block.p2 { border-left: 3px solid var(--ink); }

/* ── Error text ── */
.form-error { color: #C0392B; font-size: 11px; margin-top: 8px; display: none; }

/* ── Commute "split the cap" toggle (setup) ── */
.commute-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}
.commute-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--copper);
  cursor: pointer;
  flex-shrink: 0;
}
.commute-toggle-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
.commute-toggle-hint {
  font-size: 11px;
  color: var(--ink-ghost);
  line-height: 1.4;
  margin-top: 6px;
}

/* ── Header (map page) ── */
header {
  height: 52px; background: var(--ink);
  display: flex; align-items: center; padding: 0 16px;
  flex-shrink: 0; z-index: 1001;
  border-bottom: 2px solid var(--copper); gap: 12px;
}
.header-logo { font-size: 15px; font-weight: 300; letter-spacing: -0.02em; color: var(--cream); white-space: nowrap; }
.header-logo span { color: var(--copper); font-weight: 500; }
/* ── Header command bar ── */
#header-controls {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; min-width: 0; overflow: hidden;
}
.hdr-ctrl-item {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px; padding: 4px 8px 4px 9px;
  white-space: nowrap;
}
.hdr-ctrl-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: rgba(247,244,239,0.45);
  white-space: nowrap;
}
.hdr-ctrl-item select {
  background: transparent; border: none; outline: none;
  font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--cream); cursor: pointer;
  -webkit-appearance: none; appearance: none;
  padding-right: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(200,114,42,0.7)'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0 center;
}
.hdr-ctrl-item select option { background: #1a1714; color: var(--cream); }
.hdr-ctrl-sep {
  font-size: 14px; color: rgba(247,244,239,0.2); flex-shrink: 0;
}
#header-search-btn {
  background: var(--copper); border: none; border-radius: 6px;
  color: white; font-size: 11px; font-weight: 700; padding: 5px 9px;
  cursor: pointer; flex-shrink: 0; font-family: inherit;
  transition: opacity 0.15s;
}
#header-search-btn:hover { opacity: 0.85; }
#header-results {
  font-size: 11px; font-weight: 600; color: rgba(247,244,239,0.6);
  white-space: nowrap; padding-left: 4px;
}
#header-clear-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.15); border-radius: 5px;
  color: rgba(247,244,239,0.45); font-size: 11px; padding: 3px 7px;
  cursor: pointer; font-family: inherit; flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
#header-clear-btn:hover { border-color: rgba(255,255,255,0.35); color: var(--cream); }
#auth-container { margin-left: auto; }

/* ── Maloca Agent reset popup ── */
#nest-reset-popup {
  display: none; position: fixed; inset: 0; z-index: 9998;
  align-items: flex-end; justify-content: center;
  padding-bottom: 32px; pointer-events: none;
}
#nest-reset-popup-inner {
  background: var(--ink); border: 1px solid rgba(200,114,42,0.4);
  border-radius: 14px; padding: 18px 20px;
  max-width: 320px; width: calc(100% - 40px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  pointer-events: all;
}
#nest-reset-title {
  font-size: 13px; font-weight: 700; color: var(--cream); margin-bottom: 6px;
}
#nest-reset-body {
  font-size: 12px; color: rgba(247,244,239,0.6); line-height: 1.5; margin-bottom: 14px;
}
#nest-reset-actions { display: flex; gap: 8px; }
#nest-reset-open-btn {
  flex: 1; background: var(--copper); color: white; border: none;
  border-radius: 8px; padding: 9px 12px; font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
#nest-reset-close-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.2); color: rgba(247,244,239,0.55);
  border-radius: 8px; padding: 9px 12px; font-size: 12px; cursor: pointer; font-family: inherit;
}

/* ── Sidebar layout ── */
.app-shell   { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.main        { display: flex; flex: 1; overflow: hidden; position: relative; }
#map         { flex: 1; }

.sidebar {
  width: 300px; flex-shrink: 0; background: var(--white);
  border-right: 1px solid var(--rule); display: flex;
  flex-direction: column; z-index: 1000; transition: transform 0.25s ease;
}
.sidebar.collapsed { transform: translateX(-300px); position: absolute; height: 100%; }
.toggle-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  left: 300px; z-index: 1002; background: var(--ink); color: var(--copper);
  border: none; border-radius: 0 4px 4px 0; width: 22px; height: 48px;
  cursor: pointer; font-size: 14px; transition: left 0.25s ease; touch-action: manipulation;
}
.toggle-btn.collapsed { left: 0; }

/* ── Tabs ── */
.tabs { display: flex; border-bottom: 1px solid var(--rule); flex-shrink: 0; background: var(--cream); }
.tab {
  flex: 1; padding: 0 2px; height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; white-space: nowrap;
  font-size: 9px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-ghost); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  touch-action: manipulation; transition: color 0.15s;
}
.tab.active { color: var(--ink); border-bottom-color: var(--copper); }
.tab-content { display: none; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tab-content.active { display: flex; flex-direction: column; }

/* ── Sidebar section ── */
.section { padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.section-title { font-size: 9px; text-transform: uppercase; letter-spacing: 0.22em; color: var(--ink-ghost); font-weight: 600; margin-bottom: 10px; }

/* ── Person cards (sidebar) ── */
.person-card { padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--rule); background: var(--cream); }
.person-card.p1 { border-left: 3px solid var(--copper); }
.person-card.p2 { border-left: 3px solid var(--ink-mid); }
.person-header { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.person-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.person-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.person-station { font-size: 11px; color: var(--ink-lt); padding-left: 16px; }

/* ── Sidebar labels/selects ── */
label { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-ghost); margin-bottom: 5px; margin-top: 10px; font-weight: 600; }
select { width: 100%; border: 1px solid var(--rule); border-bottom: 2px solid var(--ink-mid); font-size: 14px; padding: 9px 32px 9px 10px; outline: none; background: var(--cream); color: var(--ink); font-family: 'Outfit', sans-serif; -webkit-appearance: none; appearance: none; border-radius: 8px; touch-action: manipulation; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237A7670' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
select:focus { border-bottom-color: var(--copper); }
.select-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ── Sidebar buttons ── */
.btn-primary-sm { width: 100%; padding: 13px 0; background: var(--ink); color: var(--cream); border: none; font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; margin-bottom: 8px; font-family: 'Outfit', sans-serif; margin-top: 10px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background 0.2s; border-radius: 8px; }
.btn-primary-sm:hover { background: var(--copper); }
.btn-secondary-sm { width: 100%; padding: 11px 0; background: transparent; color: var(--ink-lt); border: 1px solid var(--rule); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; font-family: 'Outfit', sans-serif; touch-action: manipulation; border-radius: 8px; }

/* ── Results stats ── */
.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.stat-box { padding: 12px; text-align: center; border: 1px solid var(--rule); background: var(--cream); }
.stat-box.green { border-color: #A8DEC0; background: #F0FAF4; }
.stat-value { font-size: 30px; font-weight: 300; line-height: 1; letter-spacing: -0.02em; }
.stat-value.green { color: var(--green); }
.stat-value.grey  { color: var(--ink-mid); }
.stat-label { font-size: 9px; color: var(--ink-ghost); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.18em; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-lt); margin-bottom: 5px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.data-note { font-size: 11px; color: var(--ink-ghost); margin-top: 8px; line-height: 1.5; }

/* ── Area detail ── */
.area-placeholder { padding: 32px 16px; text-align: center; color: var(--ink-ghost); }
.area-placeholder-icon { font-size: 32px; margin-bottom: 12px; }
.area-placeholder-text { font-size: 13px; line-height: 1.6; }
.area-title { font-size: 18px; font-weight: 500; color: var(--ink); }
.area-sub   { font-size: 11px; color: var(--ink-ghost); margin-bottom: 4px; }
.area-commute { font-size: 12px; color: var(--ink-lt); margin-bottom: 2px; }
.agent-link { display: block; font-size: 13px; color: var(--copper); text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--rule); font-weight: 500; }
.agent-link:last-child { border-bottom: none; }

/* ── Lifestyle stats ── */
.lifestyle-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 4px; }
.lifestyle-stat { background: var(--cream); border: 1px solid var(--rule); padding: 10px 6px; text-align: center; }
.lifestyle-num  { font-size: 18px; font-weight: 300; color: var(--ink); line-height: 1; }
.lifestyle-lbl  { font-size: 9px; color: var(--ink-ghost); text-transform: uppercase; letter-spacing: 0.12em; margin-top: 3px; line-height: 1.3; }
.lifestyle-loading { font-size: 12px; color: var(--ink-ghost); padding: 12px 0; text-align: center; }
.ts-nearby { background: #F0FAF4; border: 1px solid #A8DEC0; padding: 8px 10px; margin-top: 4px; font-size: 12px; color: var(--green); font-weight: 600; }
.ts-far    { background: var(--cream); border: 1px solid var(--rule); padding: 8px 10px; margin-top: 4px; font-size: 12px; color: var(--ink-lt); }

/* ── Score display (AI panels) ── */
.score-display { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.score-circle  { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; flex-shrink: 0; }
.score-detail  { font-size: 12px; color: var(--ink-lt); line-height: 1.5; }
.crime-low  { background: #dcfce7; color: #16a34a; }
.crime-mid  { background: #fef9c3; color: #ca8a04; }
.crime-high { background: #fee2e2; color: #dc2626; }
.noise-low  { background: #dcfce7; color: #16a34a; }
.noise-mid  { background: #fef9c3; color: #ca8a04; }
.noise-high { background: #fee2e2; color: #dc2626; }
.datenight  { background: #f3e8ff; color: #9333ea; }

/* ── EV chargers ── */
.ev-row { display: flex; justify-content: space-between; font-size: 11px; padding: 2px 0; }
.ev-band { color: var(--ink-lt); }
.ev-count { font-weight: 700; color: var(--ink); }

/* ── Bills ── */
.bills-card { background: var(--cream); border: 1px solid var(--rule); padding: 10px 12px; margin-bottom: 8px; }
.bills-card-title { font-size: 9px; font-weight: 600; color: var(--ink-ghost); text-transform: uppercase; letter-spacing: 0.18em; margin-bottom: 8px; }
.bills-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 12px; border-bottom: 1px solid var(--rule); }
.bills-row:last-of-type { border-bottom: none; }
.bills-label { color: var(--ink-lt); }
.bills-value { font-weight: 600; color: var(--ink); }

/* ── Score buttons ── */
.score-block { margin-top: 4px; }
.score-row   { display: flex; gap: 3px; margin-bottom: 8px; flex-wrap: nowrap; }
.score-btn   { flex: 1; min-width: 0; height: 30px; border: 1px solid var(--rule); background: var(--cream); font-size: 11px; font-weight: 600; color: var(--ink-lt); cursor: pointer; display: flex; align-items: center; justify-content: center; touch-action: manipulation; padding: 0; border-radius: 6px; transition: all 0.12s; }
.score-btn.active-p1 { background: var(--copper); color: var(--white); border-color: var(--copper); }
.score-btn.active-p2 { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.comment-box { width: 100%; border: 1px solid var(--rule); border-bottom: 2px solid var(--rule); padding: 8px 10px; font-size: 12px; font-family: 'Outfit', sans-serif; color: var(--ink); resize: none; outline: none; line-height: 1.5; background: var(--cream); border-radius: 0; transition: border-bottom-color 0.15s; }
.comment-box:focus { border-bottom-color: var(--copper); }
.save-btn { width: 100%; margin-top: 10px; padding: 12px; background: var(--ink); color: var(--cream); border: none; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; font-family: 'Outfit', sans-serif; touch-action: manipulation; transition: background 0.2s; }
.save-btn:hover { background: var(--copper); }
.save-confirm { text-align: center; font-size: 11px; color: var(--green); margin-top: 6px; display: none; }

/* ── Results list ── */
.results-empty { padding: 32px 16px; text-align: center; color: var(--ink-ghost); }
.result-card { margin-bottom: 6px; padding: 12px; border: 1px solid var(--rule); background: var(--cream); cursor: pointer; border-left: 3px solid transparent; transition: border-left-color 0.15s; }
.result-card:hover { border-left-color: var(--copper); }
.result-card.top1 { background: #F0FAF4; border-left-color: var(--green); }
.result-card.top2 { background: #FEF9EE; border-left-color: #D4A843; }
.result-card.top3 { background: #FEF4EE; border-left-color: var(--copper); }
.result-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.result-name  { font-size: 14px; font-weight: 600; color: var(--ink); }
.result-total { font-size: 20px; font-weight: 300; color: var(--green); letter-spacing: -0.02em; }
.result-scores  { display: flex; gap: 10px; font-size: 12px; color: var(--ink-lt); margin-bottom: 4px; }
.result-comment { font-size: 11px; color: var(--ink-ghost); font-style: italic; margin-top: 3px; }
.rank-badge { display: inline-block; font-size: 8px; background: var(--ink); color: var(--cream); padding: 2px 6px; font-weight: 600; margin-left: 5px; vertical-align: middle; letter-spacing: 0.1em; }

/* ── All Areas table ── */
.table-header-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--rule); background: var(--cream); flex-shrink: 0; }
.table-filter-label { font-size: 10px; color: var(--ink-ghost); letter-spacing: 0.06em; }
.areas-table-wrap  { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.areas-table-empty { padding: 24px 16px; text-align: center; font-size: 12px; color: var(--ink-ghost); }
.areas-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.areas-table th { position: sticky; top: 0; background: var(--cream); border-bottom: 2px solid var(--ink); padding: 8px 6px; text-align: left; font-size: 9px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-ghost); white-space: nowrap; }
.areas-table td { padding: 9px 6px; border-bottom: 1px solid var(--rule); color: var(--ink-mid); vertical-align: middle; }
.areas-table tr:hover td { background: var(--cream-mid); }
.area-name-cell { font-weight: 600; color: var(--ink); cursor: pointer; }
.area-name-cell:hover { color: var(--copper); }
.veto-btn { border: none; padding: 4px 8px; font-size: 10px; font-weight: 600; cursor: pointer; font-family: inherit; touch-action: manipulation; transition: all 0.15s; }
.veto-btn.hiding  { background: #FEF0EE; color: #C0392B; border: 1px solid #F0A8A0; }
.veto-btn.showing { background: var(--cream); color: var(--ink-ghost); border: 1px solid var(--rule); }
.veto-check { width: 16px; height: 16px; cursor: pointer; accent-color: var(--copper); }
.veto-row td { opacity: 0.4; }
.veto-row .veto-cell { opacity: 1; }
.veto-row .area-name-cell { text-decoration: line-through; color: var(--ink-ghost); }

/* ── Gym markers/toggles ── */
.gym-marker { border-radius: 3px; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; box-shadow: 0 2px 8px rgba(26,23,20,0.2); overflow: hidden; border: 2px solid var(--white); }
.gym-marker img { width: 24px; height: 24px; object-fit: contain; }
.ts-marker { background: var(--ink); border: 2px solid var(--copper); display: flex; align-items: center; justify-content: center; font-size: 16px; width: 28px; height: 28px; box-shadow: 0 2px 6px rgba(26,23,20,0.25); }
.gym-toggles { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.gym-filter-row { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--rule); border-radius: 10px; background: var(--cream); }
.gym-filter-logo { width: 36px; height: 36px; flex-shrink: 0; border-radius: 6px; overflow: hidden; border: 1px solid var(--rule); background: #fff; display: flex; align-items: center; justify-content: center; }
.gym-filter-logo img { width: 32px; height: 32px; object-fit: contain; }
.gym-filter-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.gym-filter-name { font-size: 11px; font-weight: 600; color: var(--ink); }
.gym-filter-brand { font-size: 10px; color: var(--ink-lt); }
.gym-filter-select { font-family: inherit; font-size: 11px; border: 1px solid var(--rule); border-radius: 6px; padding: 4px 6px; background: var(--white); color: var(--ink); cursor: pointer; }
.gym-toggle-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 6px; border: 1px solid var(--rule); background: var(--cream); cursor: pointer; font-family: inherit; font-size: 10px; color: var(--ink-lt); touch-action: manipulation; width: 64px; min-height: 64px; text-align: center; line-height: 1.2; border-radius: 10px; transition: all 0.15s; }
.gym-toggle-btn.active { background: #F0FAF4; border-color: var(--green); color: var(--green); font-weight: 600; }
.gym-toggle-btn img { width: 32px; height: 32px; object-fit: contain; }
.gym-toggle-name { font-size: 10px; word-break: break-word; max-width: 56px; }
.gym-pick-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--rule); background: var(--white); cursor: pointer; font-size: 9px; color: var(--ink-lt); font-family: inherit; touch-action: manipulation; transition: all 0.15s; border-radius: 10px; }
.gym-pick-btn img { width: 26px; height: 26px; object-fit: contain; }
.gym-pick-btn.selected { border-color: var(--copper); background: var(--cream); color: var(--copper); font-weight: 600; }
.gym-pick-btn.none-btn { font-size: 10px; font-weight: 500; }
.gym-picker { display: grid; grid-template-columns: repeat(6,1fr); gap: 6px; margin-top: 6px; }

/* ── TS filter toggle ── */
.ts-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--rule); margin-top: 10px; }
.ts-toggle-label { font-size: 11px; color: var(--ink-lt); }
.toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: var(--cream-dk); border: 1px solid var(--rule); transition: .3s; border-radius: 20px; }
.toggle-slider:before { position: absolute; content: ""; height: 12px; width: 12px; left: 3px; bottom: 3px; background: var(--white); transition: .3s; border-radius: 50%; }
input:checked + .toggle-slider { background: var(--copper); border-color: var(--copper); }
input:checked + .toggle-slider:before { transform: translateX(16px); }


/* ── Running parks toggle button ── */
#parks-toggle-btn { position: absolute; bottom: 24px; right: 14px; z-index: 900; background: var(--white); border: 1px solid var(--rule); border-radius: 20px; padding: 6px 13px; font-size: 11px; font-weight: 600; color: var(--ink-mid); cursor: pointer; box-shadow: 0 2px 8px rgba(26,23,20,0.12); transition: background 0.15s, color 0.15s; font-family: inherit; }
#parks-toggle-btn.active { background: #16a34a; color: #fff; border-color: #15803d; }

/* ── Transit toggle button ── */
#transit-toggle-btn { position: absolute; bottom: 88px; right: 14px; z-index: 900; background: var(--white); border: 1px solid var(--rule); border-radius: 20px; padding: 6px 13px; font-size: 11px; font-weight: 600; color: var(--ink-mid); cursor: pointer; box-shadow: 0 2px 8px rgba(26,23,20,0.12); transition: background 0.15s, color 0.15s; font-family: inherit; }
#transit-toggle-btn.active { background: #003688; color: #fff; border-color: #002060; }

/* ── Transit line chips ── */
.tl-section-label { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-ghost); margin: 6px 0 4px; }
.tl-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.tl-chip { display: flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 10px; border: 1px solid var(--rule); font-size: 10px; font-weight: 600; color: var(--ink-mid); background: var(--white); cursor: pointer; font-family: inherit; transition: background 0.12s, color 0.12s, border-color 0.12s; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── Gym brand toggle buttons (above parks toggle) ── */
.gym-brand-btn { background: var(--white); border: 1px solid var(--rule); border-radius: 20px; padding: 5px 12px; font-size: 11px; font-weight: 600; color: var(--ink-mid); cursor: pointer; box-shadow: 0 2px 8px rgba(26,23,20,0.12); transition: background 0.15s, color 0.15s, border-color 0.15s; font-family: inherit; white-space: nowrap; }
.gym-brand-btn.active { background: #1e40af; color: #fff; border-color: #1e3a8a; }

/* ── Guest banner ── */
.guest-banner { background: #fef9c3; border: 1px solid #fde047; padding: 8px 10px; font-size: 11px; color: #854d0e; margin-bottom: 8px; display: none; }
.edit-profile-btn { font-size: 10px; color: var(--copper); background: none; border: none; cursor: pointer; font-family: inherit; padding: 0; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; }

/* ── Council Tax ── */
.ct-row { padding: 10px 12px; border-radius: 8px; background: var(--cream-mid); border-left: 3px solid var(--copper); }
.ct-row.ct-top5      { border-left-color: #c9922a; }
.ct-row.ct-mid       { border-left-color: #3DAA6A; }
.ct-row.ct-expensive { border-left-color: #e11d48; }
.ct-borough { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.ct-rank-label { display: block; font-size: 13px; }
.ct-top5      .ct-rank-label { color: #c9922a; font-weight: 700; }
.ct-mid       .ct-rank-label { color: #3DAA6A; }
.ct-expensive .ct-rank-label { color: #e11d48; }

/* ── Property links ── */
.property-link { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-decoration: none; margin-bottom: 8px; transition: opacity 0.15s; }
.property-link:hover { opacity: 0.85; }
.rm-link { background: #00deb6; color: #0a0a0a; }
.zo-link { background: #6B2FA0; color: #ffffff; }

/* ── Maloca Agent input suggestions dropdown ── */
#filter-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 46px; /* right aligns with left edge of Ask button */
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(26,23,20,0.12);
  z-index: 200;
  overflow: hidden;
}
.nf-suggestion {
  padding: 9px 13px;
  font-size: 12px; color: #374151;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.1s;
  line-height: 1.4;
}
.nf-suggestion:last-child { border-bottom: none; }
.nf-suggestion:hover { background: #f8fafc; color: #1a1f36; }

/* ── Results stat boxes rounded ── */
.stat-box { border-radius: 8px; }

/* ────────────────────────────────────────────────────────────
   VIEWINGS TAB  (.vc-* = calendar,  .vw-* = viewing cards)
   ──────────────────────────────────────────────────────────── */

/* Viewings tab: fixed height layout — no scroll on the outer container */
#content-viewings.active { overflow: hidden; }

/* Outer wrapper — fills the tab-content flex column */
.vc-wrap { display: flex; flex-direction: column; flex: 1; overflow: hidden; padding: 0; }

/* Top bar: title + Add button */
.vc-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--rule);
}
.vc-add-btn {
  padding: 5px 13px; font-size: 11px; font-weight: 700;
  font-family: inherit; cursor: pointer; border-radius: 6px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--cream);
  transition: opacity 0.15s;
}
.vc-add-btn:hover { opacity: 0.8; }

/* Calendar grid — compact, doesn't grow */
#vc-calendar { flex-shrink: 0; padding: 6px 10px 2px; }

.vc-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.vc-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.vc-nav {
  background: none; border: none; font-size: 16px; cursor: pointer;
  color: var(--ink-mid); padding: 2px 6px; line-height: 1;
}
.vc-nav:hover { color: var(--ink); }

.vc-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
}
.vc-dow {
  font-size: 9px; font-weight: 600; color: var(--ink-ghost);
  text-align: center; padding-bottom: 2px;
}
.vc-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 500; border-radius: 5px; cursor: pointer;
  color: var(--ink); transition: background 0.1s;
}
.vc-day:hover { background: var(--rule); }
.vc-empty   { cursor: default; }
.vc-empty:hover { background: none; }

/* Dot colours for days with viewings */
.vc-day-green  { background: #d1fae5; color: #065f46; }
.vc-day-amber  { background: #fef3c7; color: #92400e; }
.vc-day-red    { background: #fee2e2; color: #991b1b; }

/* Today ring */
.vc-today { outline: 2px solid var(--copper); outline-offset: -2px; }

/* Selected day — circle outline, preserves background colour */
.vc-selected { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 50%; }

/* Day panel — fills remaining height below calendar */
#vc-day-panel { border-top: 1px solid var(--rule); flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* Scrollable card area inside the panel */
.vc-card-content { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 14px; }

/* Arrow navigation bar at the bottom */
.vc-card-nav {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; border-top: 1px solid var(--rule);
  font-size: 11px; color: var(--ink-mid);
}
.vc-card-nav-btn {
  background: transparent; border: 1px solid var(--rule); border-radius: 5px;
  padding: 5px 12px; font-size: 11px; font-family: inherit; cursor: pointer; color: var(--ink);
}
.vc-card-nav-btn:disabled { color: var(--ink-ghost); cursor: default; }

/* Individual viewing card */
.vw-card {
  border: 1px solid var(--rule); border-radius: 10px;
  padding: 10px 12px; background: #fafaf9;
}
.vw-card-address { font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.vw-card-meta    { font-size: 11px; color: var(--ink-mid); margin-bottom: 2px; }
.vw-card-agent   { font-size: 11px; color: var(--ink-ghost); }
.vw-approx       { font-size: 10px; color: var(--ink-ghost); margin-top: 3px; }

.vw-status-badge {
  display: inline-block; margin-top: 5px; padding: 2px 8px;
  border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: 0.03em;
}
.vw-status-viewed  { background: #d1fae5; color: #065f46; }
.vw-status-skipped { background: #f3f4f6; color: #6b7280; }

.vw-listing-btn {
  font-size: 11px; font-weight: 600; color: var(--copper);
  text-decoration: none;
}
.vw-listing-btn:hover { text-decoration: underline; }

.vw-card-actions { display: flex; gap: 6px; margin-top: 8px; }
.vw-btn {
  padding: 4px 10px; font-size: 11px; font-weight: 600; font-family: inherit;
  border-radius: 5px; cursor: pointer; border: 1px solid var(--rule);
  background: #fff; color: var(--ink); transition: background 0.1s;
}
.vw-btn:hover    { background: var(--rule); }
.vw-btn-done     { border-color: #6ee7b7; color: #065f46; }
.vw-btn-done:hover { background: #d1fae5; }
.vw-btn-skip     { color: var(--ink-ghost); }
.vw-btn-edit     { color: #92400e; border-color: #fde68a; }
.vw-btn-edit:hover { background: #fef3c7; }
.vw-btn-del      { color: #dc2626; border-color: #fecaca; }
.vw-btn-del:hover { background: #fee2e2; }

/* ── Viewings filter toggle (Upcoming / Viewed) ── */
.vc-filter-toggle { display: flex; padding: 8px 12px; border-bottom: 1px solid var(--rule); }
.vc-filter-btn { flex: 1; padding: 5px; font-size: 11px; font-weight: 600; font-family: inherit; cursor: pointer; border: 1px solid var(--rule); background: #fff; color: var(--ink-mid); }
.vc-filter-btn:first-child { border-radius: 6px 0 0 6px; }
.vc-filter-btn:last-child  { border-radius: 0 6px 6px 0; border-left: none; }
.vc-filter-btn.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* ── Shortlist badges + buttons on viewing cards ── */
.vw-shortlisted-badge { display:inline-block; font-size: 10px; color: #d97706; font-weight: 700; padding: 2px 7px; background: #fef3c7; border-radius: 4px; margin-left: 4px; }
.vw-btn-undo      { color: #1e40af; border-color: #bfdbfe; }
.vw-btn-undo:hover { background: #dbeafe; }
.vw-btn-shortlist { color: #92400e; border-color: #fde68a; }
.vw-btn-shortlist:hover { background: #fef3c7; }

/* ── Non-negotiables checklist (on viewed cards) ── */
.nn-checklist { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); }
.nn-checklist-header { font-size: 10px; font-weight: 700; color: var(--ink-mid); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.nn-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; }
.nn-badge-all  { background: #d1fae5; color: #065f46; }
.nn-badge-some { background: #fef3c7; color: #92400e; }
.nn-badge-none { background: #f3f4f6; color: #6b7280; }
.nn-row { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.nn-label { flex: 1; font-size: 11px; color: var(--ink); }
.nn-btn { width: 28px; height: 28px; border-radius: 5px; border: 1px solid var(--rule); background: #fff; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; font-family: inherit; transition: background 0.1s; }
.nn-tick-btn:hover  { background: #d1fae5; border-color: #6ee7b7; }
.nn-cross-btn:hover { background: #fee2e2; border-color: #fca5a5; }
.nn-active-tick  { background: #d1fae5; border-color: #6ee7b7; color: #065f46; font-weight: 700; }
.nn-active-cross { background: #fee2e2; border-color: #fca5a5; color: #dc2626; font-weight: 700; }
.nn-notes { width: 100%; margin-top: 8px; padding: 8px 10px; font-size: 12px; font-family: inherit; background: var(--cream); border: 1px solid var(--rule); border-bottom: 2px solid var(--ink); outline: none; border-radius: 0; resize: vertical; box-sizing: border-box; min-height: 56px; }

/* ── Non-negotiables setup modal inputs/chips ── */
.nn-setup-input { width: 100%; padding: 8px 10px; font-size: 12px; font-family: inherit; background: var(--cream); border: 1px solid var(--rule); border-bottom: 2px solid var(--ink); outline: none; border-radius: 0; box-sizing: border-box; }
.nn-chip { padding: 4px 10px; font-size: 11px; font-weight: 600; font-family: inherit; border: 1px solid #d1d5db; background: #f9fafb; border-radius: 20px; cursor: pointer; color: var(--ink-mid); transition: background 0.1s; }
.nn-chip:hover { background: var(--cream); }
.nn-chip:disabled { opacity: 0.4; cursor: default; }

/* ── Shortlist tab — league table ── */
.sl-league { padding: 10px 14px 4px; }
.sl-league-row { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.sl-league-meta { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.sl-league-rank { color: var(--ink-ghost); font-size: 11px; font-weight: 400; margin-right: 5px; }
.sl-score-bar-wrap { height: 4px; background: var(--rule); border-radius: 2px; }
.sl-score-bar { height: 4px; border-radius: 2px; transition: width 0.4s; }

/* ── Tinder comparison card ── */
.sl-tinder { margin: 12px 14px; border: 2px solid var(--copper); border-radius: 12px; overflow: hidden; }
.sl-tinder-header { padding: 8px 12px; background: #fef3c7; font-size: 11px; font-weight: 700; color: #92400e; }
.sl-tinder-row { display: grid; grid-template-columns: 1fr 1fr; }
.sl-tinder-cell { padding: 10px; border-right: 1px solid var(--rule); }
.sl-tinder-cell:last-child { border-right: none; }
.sl-tinder-addr  { font-size: 11px; font-weight: 700; color: var(--ink); margin-bottom: 4px; line-height: 1.3; }
.sl-tinder-notes { font-size: 10px; color: var(--ink-mid); line-height: 1.4; margin-bottom: 8px; min-height: 34px; }
.sl-tinder-btn { width: 100%; padding: 6px; font-size: 11px; font-weight: 700; font-family: inherit; cursor: pointer; border: none; border-radius: 6px; background: var(--ink); color: var(--cream); }
.sl-tinder-btn:hover { opacity: 0.85; }

/* ── Shortlist property cards ── */
.sl-card { margin: 8px 14px; border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; background: #fafaf9; }
.sl-card-addr  { font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.sl-card-meta  { font-size: 11px; color: var(--ink-mid); margin-bottom: 5px; }
.sl-card-notes { font-size: 11px; color: var(--ink-mid); font-style: italic; margin-bottom: 8px; line-height: 1.4; }
.sl-rating { display: flex; gap: 3px; margin-bottom: 8px; flex-wrap: wrap; }
.sl-rating-dot { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--rule); background: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-ghost); transition: all 0.1s; }
.sl-rating-dot:hover { border-color: var(--copper); color: var(--copper); }
.sl-rating-dot.active { background: var(--copper); border-color: var(--copper); color: #fff; }

/* ── Couple link modal ── */
.lm-overlay { position: fixed; inset: 0; background: rgba(26,23,20,0.5); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.lm-modal { background: var(--cream); border-radius: 14px; width: 300px; overflow: hidden; box-shadow: 0 20px 60px rgba(26,23,20,0.25); }
.lm-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--rule); font-size: 13px; font-weight: 700; color: var(--ink); }
.lm-close { background: none; border: none; cursor: pointer; font-size: 14px; color: var(--ink-ghost); padding: 0; line-height: 1; }
.lm-section { padding: 14px 16px; }
.lm-section-title { font-size: 11px; font-weight: 700; color: var(--ink-ghost); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.lm-hint { font-size: 11px; color: var(--ink-mid); line-height: 1.5; margin-bottom: 10px; }
.lm-divider { height: 1px; background: var(--rule); }
.lm-btn { width: 100%; padding: 9px; background: var(--ink); color: var(--cream); border: none; border-radius: 8px; font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer; }
.lm-btn-danger { background: #fee2e2; color: #991b1b; }
.lm-input { width: 100%; padding: 9px 12px; border: 1px solid var(--rule); border-bottom: 2px solid var(--ink); border-radius: 6px; font-size: 15px; font-family: inherit; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; background: #fff; }
.lm-code { font-size: 28px; font-weight: 700; letter-spacing: 0.2em; color: var(--ink); text-align: center; padding: 10px 0 4px; }
.lm-linked-badge { font-size: 14px; font-weight: 700; color: #16a34a; margin-bottom: 8px; }

/* Address autocomplete suggestions */
#vc-address-suggestions, #wl-address-suggestions {
  display: none; position: fixed;
  background: #fff; border: 1px solid var(--rule); border-top: none;
  border-radius: 0 0 8px 8px; box-shadow: 0 6px 16px rgba(26,23,20,0.1);
  z-index: 9999; max-height: 180px; overflow-y: auto;
}
.vc-suggestion {
  padding: 8px 10px; font-size: 11px; color: var(--ink); cursor: pointer;
  border-bottom: 1px solid var(--rule); line-height: 1.4;
}
.vc-suggestion:last-child { border-bottom: none; }
.vc-suggestion:hover { background: #f8fafc; }

/* 24-hr time hint */
.vc-field-hint { font-size: 10px; font-weight: 400; color: var(--ink-ghost); margin-left: 5px; }

/* Add form */
#vc-add-wrap { border-top: 1px solid var(--rule); padding: 14px 14px 4px; max-height: 55vh; overflow-y: auto; }
.vc-form { display: flex; flex-direction: column; gap: 10px; }
.vc-form-field { display: flex; flex-direction: column; gap: 4px; }
.vc-form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vc-form-field label { font-size: 11px; font-weight: 700; color: var(--ink); }
.vc-form-field input,
.vc-form-field select {
  width: 100%; padding: 8px 10px; font-size: 12px; font-family: inherit;
  background: var(--cream); border: 1px solid var(--rule);
  border-bottom: 2px solid var(--ink); outline: none; border-radius: 0;
  box-sizing: border-box;
}

/* ── Tutorial spotlight tour ────────────────────────────────── */

/* Dark backdrop — blocks all interaction behind the card */
#tut-overlay {
  position: fixed; inset: 0;
  background: rgba(26,23,20,0.65);
  z-index: 10000;
  pointer-events: all;
}

/* Copper spotlight frame — floats over the highlighted element */
#tut-frame {
  position: fixed;
  z-index: 10001;
  pointer-events: none;
  border: 3px solid var(--copper);
  border-radius: 8px;
  box-shadow: 0 0 0 4px rgba(200,114,42,0.18), 0 0 20px rgba(200,114,42,0.35);
  display: none;
}

/* Tutorial card */
#tut-card {
  position: fixed;
  z-index: 10002;
  width: 280px;
  background: var(--cream);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(26,23,20,0.28);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 16px;
  gap: 8px;
  /* Default: centered — overridden by JS when anchoring to an element */
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}

.tut-icon {
  font-size: 40px;
  line-height: 1;
  text-align: center;
}
.tut-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  text-align: center;
}
.tut-text {
  font-size: 12px;
  color: var(--ink-mid, #5a5550);
  line-height: 1.65;
  text-align: center;
}
.tut-counter {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--copper);
  text-align: center;
  margin-top: 2px;
}
.tut-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  border-top: 1px solid var(--rule);
  padding-top: 12px;
}
.tut-spacer { flex: 1; }

.tut-btn-skip {
  background: none; border: none;
  color: var(--ink-ghost, #b0a898);
  font-size: 11px; font-family: inherit;
  cursor: pointer; padding: 4px 2px;
}
.tut-btn-skip:hover { color: var(--ink-lt, #7a7468); }

.tut-btn-back {
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink-mid, #5a5550);
  font-size: 11px; font-weight: 600; font-family: inherit;
  border-radius: 7px; padding: 6px 12px;
  cursor: pointer;
}
.tut-btn-back:hover { border-color: var(--ink-lt, #7a7468); }

.tut-btn-next {
  background: var(--ink);
  color: var(--cream);
  border: none;
  font-size: 12px; font-weight: 700; font-family: inherit;
  border-radius: 7px; padding: 7px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.tut-btn-next:hover { background: var(--copper); }

/* Guide button in header */
#tutorial-guide-btn {
  background: transparent;
  color: var(--ink-ghost, #b0a898);
  border: 1px solid var(--rule);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px; font-weight: 600;
  font-family: inherit;
  margin-right: 6px;
  transition: color 0.15s, border-color 0.15s;
}
#tutorial-guide-btn:hover {
  color: var(--ink);
  border-color: var(--ink-lt, #7a7468);
}

@media (max-width: 380px) {
  #tut-card   { width: calc(100vw - 32px); padding: 18px 16px 14px; }
  .tut-icon   { font-size: 32px; }
  .tut-heading { font-size: 14px; }
  .tut-text   { font-size: 11px; }
}
