/* =========================================================
   Make Disciples — Retro Phase 1 + sticky navigation repair (v3.15)
   Shared 1970s theme foundation, navigation, dialogs, Home,
   Appearance preview, and compatibility styling.
   Internal palette id remains "futuristic" for backup safety.
   ========================================================= */

body.retro-theme{
  color-scheme:dark;
  --retro-ink:#17140e;
  --retro-ink-soft:#211b12;
  --retro-brown:#3f2111;
  --retro-brown-2:#5b2c12;
  --retro-rust:#8d3b13;
  --retro-orange:#bd5a18;
  --retro-mustard:#d7941c;
  --retro-gold:#e1ad45;
  --retro-olive:#5d6037;
  --retro-olive-dark:#3e4328;
  --retro-cream:#f2dfbd;
  --retro-paper:#e8c996;
  --retro-paper-light:#f8e9cc;
  --retro-muted:#c6a979;
  --retro-line:#c98622;
  --retro-danger:#b43f27;
  --bg:var(--retro-ink);
  --bg-mid:var(--retro-ink-soft);
  --panel:var(--retro-brown);
  --panel-deep:#25150d;
  --gold:var(--retro-mustard);
  --gold-bright:var(--retro-cream);
  --gold-dark:var(--retro-rust);
  --text:var(--retro-cream);
  --muted:var(--retro-muted);
  --subtle:#9d8055;
  --line:rgba(215,148,28,.78);
  --line-soft:rgba(232,201,150,.20);
  --danger:#f0a08d;
  --success:#a8b56f;
  --purple:#aa7aa8;
  --font-display:"Cooper Black","Rockwell Extra Bold","Bookman Old Style",Georgia,serif;
  --font-body:"Trebuchet MS","Segoe UI",Arial,sans-serif;
  background:
    radial-gradient(ellipse at 105% 10%,rgba(93,96,55,.48) 0 16%,transparent 16.4%),
    radial-gradient(ellipse at -8% 86%,rgba(141,59,19,.46) 0 18%,transparent 18.5%),
    radial-gradient(circle at 68% -8%,rgba(189,90,24,.20),transparent 30rem),
    linear-gradient(180deg,#201b12 0%,#17140e 42%,#0f0e0a 100%)!important;
  color:var(--retro-cream)!important;
  font-family:var(--font-body)!important;
}

body.retro-theme::before{
  content:""!important;
  position:fixed!important;
  inset:0!important;
  z-index:-1!important;
  pointer-events:none!important;
  opacity:.24!important;
  background:
    repeating-linear-gradient(0deg,rgba(255,244,218,.022) 0 1px,transparent 1px 4px),
    repeating-linear-gradient(90deg,rgba(20,12,7,.035) 0 1px,transparent 1px 5px)!important;
}
body.retro-theme::after{content:none!important}

body.retro-theme .app-shell{width:min(100%,900px);position:relative}
body.retro-theme .app-shell::before,
body.retro-theme .app-shell::after{
  content:"";position:fixed;pointer-events:none;z-index:-1;opacity:.82
}
body.retro-theme .app-shell::before{
  width:185px;height:520px;right:-70px;top:23vh;border-radius:48% 0 0 48%;
  background:
    radial-gradient(ellipse at 0 50%,transparent 0 26%,var(--retro-olive-dark) 27% 36%,transparent 37% 45%,var(--retro-mustard) 46% 55%,transparent 56% 64%,var(--retro-rust) 65% 74%,transparent 75%)
}
body.retro-theme .app-shell::after{
  width:165px;height:430px;left:-80px;bottom:-70px;border-radius:0 52% 52% 0;
  background:
    radial-gradient(ellipse at 100% 50%,transparent 0 25%,var(--retro-rust) 26% 37%,transparent 38% 48%,var(--retro-orange) 49% 60%,transparent 61% 71%,var(--retro-mustard) 72% 83%,transparent 84%)
}

/* ---------- Brand / scripture ---------- */
body.retro-theme .brand{
  position:relative;isolation:isolate;overflow:hidden;
  margin:0 0 16px;padding:24px 30% 22px 22px;text-align:left;
  border:1px solid rgba(225,173,69,.94);border-radius:28px;
  background:
    linear-gradient(180deg,rgba(255,244,218,.22),transparent 18%),
    linear-gradient(145deg,var(--retro-paper-light),var(--retro-paper));
  box-shadow:inset 0 0 0 4px rgba(75,39,17,.08),0 15px 28px rgba(0,0,0,.30)!important
}
body.retro-theme .brand::before{
  content:"";position:absolute;z-index:-1;right:0;top:0;bottom:0;width:31%;
  background:linear-gradient(90deg,
    var(--retro-olive-dark) 0 18%,var(--retro-mustard) 18% 38%,
    var(--retro-orange) 38% 58%,var(--retro-rust) 58% 78%,var(--retro-brown) 78% 100%);
  clip-path:polygon(34% 0,100% 0,100% 100%,4% 100%,23% 82%,7% 64%,27% 45%,8% 25%)
}
body.retro-theme .brand::after{
  content:"";position:absolute;z-index:-1;inset:7px;border:1px solid rgba(91,44,18,.20);border-radius:20px;pointer-events:none
}
body.retro-theme .brand-medallion{
  width:72px;height:72px;margin:0 0 12px;border:0;border-radius:50%;
  display:grid;place-items:center;background:var(--retro-rust)!important;
  box-shadow:0 0 0 7px var(--retro-mustard),0 0 0 9px var(--retro-brown),5px 7px 0 rgba(63,33,17,.18)!important
}
body.retro-theme .brand-medallion::before{
  content:"✿"!important;position:static!important;display:block;
  color:var(--retro-cream);font-family:Georgia,serif;font-size:47px;line-height:1;
  border:0!important;text-shadow:0 2px 0 rgba(63,33,17,.28)
}
body.retro-theme .brand-medallion svg{display:none!important}
body.retro-theme .brand h1{
  position:relative;z-index:1;margin:0;color:var(--retro-brown)!important;
  font-family:var(--font-display)!important;font-weight:900!important;
  font-size:clamp(2.1rem,8.4vw,4rem)!important;line-height:.95!important;
  letter-spacing:-.035em!important;text-transform:none!important;white-space:normal!important;
  text-shadow:0 2px 0 rgba(255,246,219,.62)!important
}
body.retro-theme .scripture{position:relative;z-index:1;margin:13px 0 0;width:auto;color:var(--retro-brown);font-family:Georgia,serif!important}
body.retro-theme .scripture em{display:block;color:#5a3118!important;font-size:clamp(.96rem,3.8vw,1.25rem);font-weight:700}
body.retro-theme .scripture strong{
  justify-content:flex-start;margin-top:8px;color:var(--retro-rust)!important;
  font-family:var(--font-display)!important;font-size:clamp(.87rem,3.3vw,1.05rem);letter-spacing:.03em
}
body.retro-theme .scripture strong::before{display:none!important}
body.retro-theme .scripture strong::after{width:58px;background:var(--retro-rust)!important;box-shadow:none!important}

/* ---------- Permanent navigation shield ---------- */
body.retro-theme .nav-shield{
  background:
    linear-gradient(180deg,rgba(30,25,16,.995),rgba(19,16,11,.995))!important;
  box-shadow:0 12px 22px rgba(0,0,0,.34)!important
}
body.retro-theme .nav-dock{position:relative}
body.retro-theme .connected-menu{
  position:relative;overflow:hidden;margin-bottom:12px!important;
  border:2px solid var(--retro-mustard)!important;border-radius:24px!important;
  background:linear-gradient(180deg,#4a2816,#2a170e)!important;
  box-shadow:inset 0 0 0 4px rgba(20,12,7,.42),inset 0 1px 0 rgba(255,230,174,.20),0 10px 20px rgba(0,0,0,.32)!important
}
body.retro-theme .connected-menu::before{
  content:""!important;position:absolute!important;inset:5px!important;border:1px solid rgba(242,223,189,.22)!important;border-radius:17px!important;pointer-events:none!important
}
body.retro-theme .connected-menu::after{content:none!important}
body.retro-theme .menu-button{
  min-height:78px!important;padding:9px 5px!important;border:0!important;border-right:1px solid rgba(232,201,150,.22)!important;
  border-radius:0!important;background:transparent!important;color:var(--retro-paper)!important;
  box-shadow:none!important;font-family:Georgia,serif!important;font-weight:700!important
}
body.retro-theme .menu-button:last-child{border-right:0!important}
body.retro-theme .menu-button svg{width:28px!important;height:28px!important;stroke:currentColor!important;fill:none!important;stroke-width:1.85!important}
body.retro-theme .menu-button span{font-size:.82rem!important;letter-spacing:.01em}
body.retro-theme .menu-button.active:not(.ui2-pressing){
  color:#fff1d0!important;background:
    linear-gradient(180deg,rgba(255,230,174,.16),transparent 18%),
    linear-gradient(180deg,var(--retro-orange),var(--retro-rust))!important;
  box-shadow:inset 0 0 0 2px rgba(255,228,166,.30),inset 0 -8px 14px rgba(77,25,6,.20)!important
}
body.retro-theme .menu-button.active::before,
body.retro-theme .menu-button.active::after{content:none!important}
body.retro-theme .sub-menu{margin-bottom:18px!important}
body.retro-theme .sub-menu .menu-button{min-height:70px!important}
body.retro-theme .settings-sub-menu{border-color:var(--retro-olive)!important;background:linear-gradient(180deg,#434426,#292b1b)!important}
body.retro-theme .settings-sub-menu .menu-button.active:not(.ui2-pressing){background:linear-gradient(180deg,var(--retro-mustard),#a96012)!important;color:#24150d!important}

/* ---------- Shared paper/panel system ---------- */
body.retro-theme :is(.page-panel,.card,.metric,.notice,.empty-state,.dialog,.settings-row){
  position:relative;border:1px solid rgba(91,44,18,.72)!important;
  border-radius:22px!important;background:
    repeating-linear-gradient(0deg,rgba(91,44,18,.018) 0 1px,transparent 1px 4px),
    linear-gradient(145deg,var(--retro-paper-light),var(--retro-paper))!important;
  color:var(--retro-brown)!important;
  box-shadow:inset 0 1px 0 rgba(255,249,229,.70),inset 0 0 0 4px rgba(91,44,18,.04),0 11px 22px rgba(0,0,0,.24)!important;
  overflow:hidden
}
body.retro-theme :is(.page-panel,.card,.metric,.notice,.empty-state,.dialog,.settings-row)::before{
  content:""!important;position:absolute!important;inset:6px!important;border:1px solid rgba(91,44,18,.13)!important;border-radius:15px!important;pointer-events:none!important
}
body.retro-theme :is(.page-panel,.card,.metric,.notice,.empty-state,.dialog,.settings-row)::after{content:none!important}
body.retro-theme .page-panel{padding:20px;margin-bottom:18px}
body.retro-theme .page-heading{position:relative;z-index:1;gap:13px}
body.retro-theme .heading-icon{
  width:52px;height:52px;border:2px solid var(--retro-brown)!important;border-radius:15px!important;
  background:var(--retro-mustard)!important;color:var(--retro-brown)!important;
  box-shadow:3px 4px 0 rgba(91,44,18,.24)!important
}
body.retro-theme .heading-icon svg{width:28px!important;height:28px!important;stroke-width:1.9!important}
body.retro-theme .page-heading h2,
body.retro-theme .section-heading h3{
  margin:0;color:var(--retro-brown)!important;font-family:var(--font-display)!important;
  font-weight:900!important;letter-spacing:-.025em!important;line-height:1!important
}
body.retro-theme .page-heading h2{font-size:clamp(1.9rem,7vw,3rem)!important}
body.retro-theme .section-heading h3{font-size:clamp(1.45rem,5.4vw,2.1rem)!important}
body.retro-theme .page-sub{position:relative;z-index:1;color:#6d4b2b!important;font-family:Georgia,serif!important;font-size:1rem!important}
body.retro-theme .section-heading{position:relative;z-index:1;margin-bottom:14px}

/* Home gets alternating 1970s panel characters. */
body.retro-theme .home-quick-panel{
  border-color:var(--retro-mustard)!important;background:
    radial-gradient(circle at 88% 10%,rgba(215,148,28,.26),transparent 9rem),
    linear-gradient(145deg,var(--retro-olive),var(--retro-olive-dark))!important;color:var(--retro-cream)!important
}
body.retro-theme .home-quick-panel :is(.section-heading h3){color:var(--retro-cream)!important}
body.retro-theme .home-goal-panel{
  border-color:var(--retro-line)!important;background:
    linear-gradient(90deg,var(--retro-brown) 0 67%,transparent 67%),
    linear-gradient(135deg,var(--retro-mustard) 0 18%,var(--retro-orange) 18% 38%,var(--retro-rust) 38% 58%,var(--retro-olive) 58% 78%,var(--retro-cream) 78%)!important;
  color:var(--retro-cream)!important
}
body.retro-theme .home-goal-panel :is(.section-heading h3,.progress-row){color:var(--retro-cream)!important}

/* ---------- Home metrics ---------- */
body.retro-theme .metrics-grid{position:relative;z-index:1;gap:12px}
body.retro-theme .metric{min-height:134px;padding:15px;gap:13px;text-align:left!important;align-items:stretch!important}
body.retro-theme .metric:nth-child(4n+1){background:linear-gradient(145deg,#f6e2bd,#e6bd78)!important}
body.retro-theme .metric:nth-child(4n+2){background:linear-gradient(145deg,#6d7140,#4e522f)!important;color:var(--retro-cream)!important;border-color:#b87d18!important}
body.retro-theme .metric:nth-child(4n+3){background:linear-gradient(145deg,#d77e27,#a94813)!important;color:var(--retro-cream)!important;border-color:#f0be5b!important}
body.retro-theme .metric:nth-child(4n+4){background:linear-gradient(145deg,#633117,#3c2113)!important;color:var(--retro-cream)!important;border-color:#cb8120!important}
body.retro-theme .metric-heading{gap:10px}
body.retro-theme .metric-icon{
  width:44px;height:44px;flex:0 0 44px;border:2px solid currentColor!important;border-radius:50%!important;
  background:rgba(248,233,204,.20)!important;color:inherit!important;box-shadow:none!important
}
body.retro-theme .metric-icon svg{width:24px!important;height:24px!important;stroke:currentColor!important}
body.retro-theme .metric-label{color:inherit!important;font-family:var(--font-body)!important;font-weight:900!important;text-transform:uppercase;letter-spacing:.045em;font-size:.76rem!important}
body.retro-theme .metric-value{color:inherit!important;font-family:var(--font-display)!important;font-weight:900!important;font-size:2.65rem!important;text-align:center!important;text-shadow:0 2px rgba(255,247,224,.14)}

/* ---------- Buttons / actions / press feedback ---------- */
body.retro-theme .quick-grid{position:relative;z-index:1;gap:10px}
body.retro-theme .action{
  min-height:54px;padding:10px 13px;border:2px solid var(--retro-brown)!important;border-radius:17px!important;
  background:linear-gradient(180deg,var(--retro-paper-light),var(--retro-paper))!important;
  color:var(--retro-brown)!important;font-family:var(--font-body)!important;font-weight:900!important;
  box-shadow:0 4px 0 var(--retro-brown),inset 0 1px 0 rgba(255,255,255,.65)!important
}
body.retro-theme .action svg{stroke:currentColor!important;fill:none!important}
body.retro-theme .action.primary:not(.ui2-pressing),
body.retro-theme .action.active:not(.ui2-pressing){
  border-color:#6b2a0d!important;background:linear-gradient(180deg,#d66f22,var(--retro-orange))!important;
  color:#fff0ce!important;box-shadow:0 4px 0 #6b2a0d,inset 0 1px 0 rgba(255,238,195,.35)!important
}
body.retro-theme .action.danger:not(.ui2-pressing){background:#f1d3b8!important;color:#8d2d1d!important;border-color:#8d2d1d!important;box-shadow:0 4px 0 #8d2d1d!important}
body.retro-theme .action:disabled{opacity:.45!important;filter:grayscale(.4)}
body.retro-theme :is(.menu-button,.action,.settings-row,.settings-toggle-row,.dialog-close,.time-inline-action,.time-scope-option,.time-month-shift,.time-year-shift,.time-goal-option)::after{content:none!important}
body.retro-theme .ui2-pressing{
  transform:translateY(2px) scale(.965)!important;
  background:linear-gradient(180deg,#f2ba4f,var(--retro-mustard))!important;
  color:#30180c!important;border-color:#f8dc94!important;
  box-shadow:inset 0 4px 10px rgba(100,45,7,.22),0 1px 0 #6b2a0d!important;
  filter:saturate(1.08) brightness(1.03)!important;transition:transform .06s ease!important
}
body.retro-theme .ui2-pressing :is(span,strong,small){color:inherit!important}
body.retro-theme .ui2-pressing svg{color:inherit!important;stroke:currentColor!important}
body.retro-theme .ui2-color-release{animation:retroColorRelease .18s cubic-bezier(.18,.78,.22,1) both!important}
@keyframes retroColorRelease{0%{transform:translateY(2px) scale(.965)}58%{transform:translateY(-1px) scale(1.018)}100%{transform:none}}

/* ---------- Cards, goal, lists ---------- */
body.retro-theme .card-list{position:relative;z-index:1;gap:12px}
body.retro-theme .card{padding:16px}
body.retro-theme .card-title{color:var(--retro-brown)!important;font-family:var(--font-display)!important;font-weight:900!important;font-size:1.35rem!important}
body.retro-theme .card-kicker{color:var(--retro-rust)!important;font-weight:900!important;text-transform:uppercase;letter-spacing:.04em}
body.retro-theme .card p{color:#715034!important}
body.retro-theme .card-actions{gap:10px}
body.retro-theme .progress-row{position:relative;z-index:1;color:#6b4b2f!important;font-family:Georgia,serif;font-weight:700}
body.retro-theme .progress-track{position:relative;z-index:1;height:15px;border:2px solid var(--retro-brown)!important;border-radius:999px!important;background:#f5e2bf!important;overflow:hidden;box-shadow:inset 0 2px 4px rgba(63,33,17,.22)!important}
body.retro-theme .progress-fill{height:100%;background:repeating-linear-gradient(90deg,var(--retro-mustard) 0 22px,var(--retro-orange) 22px 44px,var(--retro-rust) 44px 66px,var(--retro-olive) 66px 88px)!important;box-shadow:none!important}
body.retro-theme .empty-state{padding:26px;color:#68482e!important}
body.retro-theme .empty-state svg{width:38px!important;height:38px!important;stroke:var(--retro-rust)!important;fill:none!important}
body.retro-theme .notice{padding:14px;color:#68482e!important}
body.retro-theme .notice strong{color:var(--retro-rust)!important}

/* ---------- Dialogs and forms ---------- */
body.retro-theme .dialog-layer.open{background:rgba(20,14,9,.72)!important;backdrop-filter:blur(7px)}
body.retro-theme .dialog{width:min(92vw,650px);border-color:var(--retro-mustard)!important}
body.retro-theme .dialog-head{border-bottom:2px solid rgba(91,44,18,.28)!important}
body.retro-theme .dialog-head h3{color:var(--retro-brown)!important;font-family:var(--font-display)!important;font-weight:900!important;font-size:1.65rem!important}
body.retro-theme .dialog-close{
  width:42px;height:42px;border:2px solid var(--retro-brown)!important;border-radius:50%!important;
  background:var(--retro-orange)!important;color:#fff0ce!important;box-shadow:0 3px 0 var(--retro-brown)!important
}
body.retro-theme .dialog-body{color:#604027!important}
body.retro-theme .dialog-actions{border-top:2px solid rgba(91,44,18,.20)!important}
body.retro-theme :is(input,select,textarea,.form-control,.search-field){
  color-scheme:light!important;border:2px solid rgba(91,44,18,.58)!important;border-radius:14px!important;
  background:#fff0d1!important;color:var(--retro-brown)!important;box-shadow:inset 0 2px 4px rgba(91,44,18,.10)!important
}
body.retro-theme :is(input,textarea)::placeholder{color:#98734c!important;opacity:1}
body.retro-theme :is(input,select,textarea,.form-control):focus{outline:none!important;border-color:var(--retro-orange)!important;box-shadow:0 0 0 3px rgba(189,90,24,.20)!important}
body.retro-theme label,
body.retro-theme .form-field,
body.retro-theme .form-field legend{color:var(--retro-brown)!important}
body.retro-theme select option{background:#fff0d1;color:var(--retro-brown)}
body.retro-theme .toast{border:2px solid var(--retro-mustard)!important;border-radius:18px!important;background:#3d2213!important;color:var(--retro-cream)!important;box-shadow:0 12px 28px rgba(0,0,0,.40)!important}

/* ---------- Appearance preview and Phase-1 settings compatibility ---------- */
.retro-swatch{
  position:relative!important;overflow:hidden!important;border:2px solid #4c2714!important;border-radius:15px!important;
  background:
    radial-gradient(circle at 24% 25%,#f3dfb8 0 8%,#bd5a18 8.5% 17%,#d7941c 17.5% 25%,transparent 25.5%),
    linear-gradient(130deg,#17140e 0 42%,#5d6037 42% 53%,#d7941c 53% 64%,#bd5a18 64% 75%,#8d3b13 75% 86%,#3f2111 86%)!important;
  box-shadow:inset 0 0 0 3px rgba(242,223,189,.16),0 4px 9px rgba(63,33,17,.20)!important
}
.retro-swatch::before{
  content:"";position:absolute;left:12%;right:35%;bottom:14%;height:28%;border-radius:8px;
  background:#f2dfbd;border:1px solid #5b2c12;box-shadow:3px 3px 0 rgba(91,44,18,.28)
}
.retro-swatch::after{content:"RETRO";position:absolute;left:16%;bottom:20%;font:900 9px/1 Georgia,serif;color:#5b2c12;letter-spacing:.04em}
body.retro-theme .appearance-choice,
body.retro-theme .settings-hero,
body.retro-theme .settings-block,
body.retro-theme .settings-status-card,
body.retro-theme .settings-toggle-row,
body.retro-theme .settings-stat,
body.retro-theme .settings-note,
body.retro-theme .settings-danger-zone,
body.retro-theme .settings-help-list details{
  border:1px solid rgba(91,44,18,.58)!important;border-radius:18px!important;
  background:linear-gradient(145deg,var(--retro-paper-light),var(--retro-paper))!important;
  color:var(--retro-brown)!important;box-shadow:inset 0 1px rgba(255,255,255,.62),0 7px 14px rgba(0,0,0,.16)!important
}
body.retro-theme :is(.settings-hero h3,.settings-block-head h4,.settings-status-card strong,.settings-toggle-copy strong,.settings-stat strong,.appearance-copy strong,.settings-help-list summary){color:var(--retro-brown)!important;font-family:var(--font-display)!important}
body.retro-theme :is(.settings-eyebrow,.settings-block-head p,.settings-status-card small,.settings-status-card span,.settings-toggle-copy span,.settings-stat>span:last-child,.appearance-copy span){color:#765437!important}
body.retro-theme .appearance-choice.active{border:3px solid var(--retro-orange)!important;box-shadow:inset 0 0 0 3px rgba(242,223,189,.70),0 8px 17px rgba(63,33,17,.22)!important}
body.retro-theme .appearance-active-label{background:var(--retro-orange)!important;color:#fff0ce!important;border-color:#71300f!important}
body.retro-theme .settings-toggle-switch{border-color:#6f4a2a!important;background:#d7bb8a!important}
body.retro-theme .settings-toggle-row.active .settings-toggle-switch{background:var(--retro-orange)!important}
body.retro-theme .settings-segmented{border:2px solid var(--retro-brown)!important;border-radius:16px!important;background:#f3debb!important;overflow:hidden}
body.retro-theme .settings-segmented button{background:transparent!important;color:var(--retro-brown)!important;border-radius:0!important}
body.retro-theme .settings-segmented button.active:not(.ui2-pressing){background:var(--retro-olive)!important;color:var(--retro-cream)!important}

/* ---------- Compatibility styling for pages awaiting later Retro phases ---------- */
body.retro-theme :is(
  .contact-action-panel,.contact-card,.contact-empty,.contact-filter-panel,.contact-search-wrap,
  .visit-card,.visit-tab-panel,.visit-choice,.picker-choice,.visit-contact-choice,.visit-resource-choice,
  .time-page,.time-goal-card,.time-chart-panel,.time-entry-card,.service-month-card,.hours-trend-card,
  .map-toolbar,.map-filter-panel,.map-list-panel,.map-contact-card,.map-location-card,.map-summary-panel,
  .recurring-card,.history-card,.history-item,.conversation-panel,.location-panel,
  .settings-toolbox-dropdown,.toolbox-manage-row,.toolbox-type-group,.settings-page
){
  border-color:rgba(91,44,18,.58)!important;background:linear-gradient(145deg,var(--retro-paper-light),var(--retro-paper))!important;
  color:var(--retro-brown)!important;box-shadow:0 8px 16px rgba(0,0,0,.17)!important
}
body.retro-theme :is(
  .contact-action,.contact-filter,.contact-reset,.visit-tab,.visit-choice,.picker-choice,
  .map-filter,.map-search-reset,.map-small-action,.map-inline-action,
  .time-inline-action,.time-scope-option,.time-month-shift,.time-year-shift,.time-goal-option,
  .history-action,.toolbox-manage-actions button,.visit-resource-choice,.study-lesson-list-choice
):not(.active):not(.ui2-pressing){
  border:2px solid var(--retro-brown)!important;border-radius:14px!important;
  background:#f5e2bf!important;color:var(--retro-brown)!important;box-shadow:0 3px 0 var(--retro-brown)!important
}
body.retro-theme :is(
  .contact-action.active,.contact-filter.active,.visit-tab.active,.visit-choice.active,.picker-choice.active,
  .map-filter.active,.time-scope-option.active,.time-goal-option.active,.visit-resource-choice.active
):not(.ui2-pressing){
  border-color:#6d2d0d!important;background:linear-gradient(180deg,var(--retro-orange),var(--retro-rust))!important;
  color:#fff0ce!important;box-shadow:0 3px 0 #6d2d0d!important
}
body.retro-theme :is(.contact-name,.visit-card h3,.time-entry-copy h3,.time-goal-card strong,.service-month-card strong,.history-card h4,.toolbox-manage-row strong){color:var(--retro-brown)!important}
body.retro-theme :is(.contact-meta,.visit-card p,.time-entry-copy p,.time-goal-footer,.service-month-card p,.history-card p,.toolbox-manage-row span){color:#765437!important}
body.retro-theme :is(.map-filter-panel,.map-summary-panel,.map-toolbar){border-radius:18px!important}
body.retro-theme :is(#map,#pickerMap){border:3px solid var(--retro-brown)!important;border-radius:20px!important;filter:sepia(.24) saturate(.72) contrast(.95)!important}

/* Prevent any old Black & Gold decorative shine from leaking into Retro. */
body.retro-theme :is(
  .contact-action,.contact-filter,.visit-tab,.visit-choice,.picker-choice,.map-filter,
  .map-small-action,.map-inline-action,.history-action,.toolbox-manage-actions button,
  .time-inline-action,.time-scope-option,.time-month-shift,.time-year-shift,.time-goal-option,
  .appearance-choice,.settings-toggle-row,.settings-menu-button
)::before,
body.retro-theme :is(
  .contact-action,.contact-filter,.visit-tab,.visit-choice,.picker-choice,.map-filter,
  .map-small-action,.map-inline-action,.history-action,.toolbox-manage-actions button,
  .time-inline-action,.time-scope-option,.time-month-shift,.time-year-shift,.time-goal-option,
  .appearance-choice,.settings-toggle-row,.settings-menu-button
)::after{content:none!important;display:none!important}

@media(max-width:520px){
  body.retro-theme .brand{padding:20px 25% 18px 17px;border-radius:24px}
  body.retro-theme .brand::before{width:25%}
  body.retro-theme .brand-medallion{width:60px;height:60px;box-shadow:0 0 0 5px var(--retro-mustard),0 0 0 7px var(--retro-brown),4px 5px 0 rgba(63,33,17,.18)!important}
  body.retro-theme .brand-medallion::before{font-size:39px!important}
  body.retro-theme .brand h1{font-size:2.25rem!important}
  body.retro-theme .scripture em{font-size:.93rem!important}
  body.retro-theme .scripture strong{font-size:.82rem!important}
  body.retro-theme .page-panel{padding:14px;border-radius:18px!important}
  body.retro-theme .menu-button{min-height:72px!important}
  body.retro-theme .sub-menu .menu-button{min-height:66px!important}
  body.retro-theme .metric{min-height:118px;padding:12px 10px}
  body.retro-theme .metric-value{font-size:2.18rem!important}
  body.retro-theme .metric-label{font-size:.68rem!important}
  body.retro-theme .metric-icon{width:38px;height:38px;flex-basis:38px}
  body.retro-theme .quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.retro-theme .action{padding:9px 8px;font-size:.82rem}
  body.retro-theme .card-actions{grid-template-columns:1fr}
}

@media(max-width:365px){
  body.retro-theme .brand{padding-right:18%;padding-left:14px}
  body.retro-theme .brand::before{width:18%;opacity:.72}
  body.retro-theme .brand h1{font-size:2rem!important}
  body.retro-theme .menu-button span{font-size:.70rem!important}
  body.retro-theme .metrics-grid{gap:9px}
  body.retro-theme .metric{min-height:110px}
}

@media(prefers-reduced-motion:reduce){
  body.retro-theme .ui2-color-release{animation:none!important;transform:none!important}
}


/* =========================================================
   v3.15 — Retro fixed-navigation repair
   Retro previously declared .nav-dock as position:relative with
   greater specificity than the shared .nav-dock.is-docked rule.
   This explicit state keeps both navigation rows fixed after the
   header scrolls away and preserves the opaque navigation shield.
   ========================================================= */
body.retro-theme .nav-dock:not(.is-docked){
  position:relative!important;
  z-index:82!important;
  width:100%!important;
}
body.retro-theme .nav-dock.is-docked{
  position:fixed!important;
  top:var(--ui2-dock-top,calc(var(--safe-top) + 5px))!important;
  left:50%!important;
  right:auto!important;
  width:var(--ui2-dock-width,min(calc(100vw - 20px - var(--safe-left) - var(--safe-right)),936px))!important;
  transform:translateX(-50%)!important;
  z-index:90!important;
  padding:0!important;
  filter:drop-shadow(0 14px 22px rgba(0,0,0,.48))!important;
}
body.retro-theme .nav-dock.is-docked .main-menu,
body.retro-theme .nav-dock.is-docked .sub-menu{
  background:linear-gradient(180deg,#4a2816,#28160d)!important;
  box-shadow:
    inset 0 0 0 4px rgba(20,12,7,.42),
    inset 0 1px 0 rgba(255,230,174,.20),
    0 10px 20px rgba(0,0,0,.32)!important;
}
body.retro-theme .nav-dock.is-docked .main-menu{margin-bottom:7px!important}
body.retro-theme .nav-dock.is-docked .sub-menu{margin-bottom:0!important}
body.retro-theme .nav-dock.is-docked + .nav-spacer{
  height:var(--ui2-nav-dock-height,160px)!important;
}
body.retro-theme.ui2-nav-docked .nav-shield{
  display:block!important;
  background:linear-gradient(180deg,#201b12 0%,#17140e 100%)!important;
  box-shadow:0 12px 22px rgba(0,0,0,.34)!important;
}
@media(max-width:440px){
  body.retro-theme .nav-dock.is-docked{
    width:min(calc(100vw - 16px - var(--safe-left) - var(--safe-right)),940px)!important;
  }
}
