/* Shared app styles — do not edit per client. Colours, fonts and sizes are in theme.css. */
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent;}
html,body{height:100%;overflow:hidden;background:var(--canopy);font-family:var(--font-body);color:var(--ink);}
h1,h2,h3,.serif{font-family:var(--font-display);}
button{font-family:inherit;}

/* ───────── ROTATE GATE ───────── */
#rotate-gate{position:fixed;inset:0;z-index:20000;background:linear-gradient(160deg,var(--canopy) 0%,var(--canopy-mid) 55%,var(--forest) 100%);display:none;align-items:center;justify-content:center;flex-direction:column;color:var(--parchment);text-align:center;padding:32px;}
#rotate-gate.show{display:flex;}
.rotate-icon{width:72px;height:72px;margin-bottom:22px;animation:tilt 1.8s ease-in-out infinite;}
@keyframes tilt{0%,100%{transform:rotate(0deg);}50%{transform:rotate(90deg);}}
.rotate-title{font-size:22px;font-weight:600;margin-bottom:8px;}
.rotate-sub{font-size:14px;color:var(--sage);max-width:280px;line-height:1.6;}

/* ───────── HOME SCREEN (all routes) ───────── */
#home-screen{position:fixed;inset:0;z-index:9999;background:radial-gradient(120% 90% at 50% 0%, var(--forest) 0%, var(--splash-mid) 45%, var(--splash-deep) 100%);display:flex;overflow-y:auto;transition:opacity .4s ease, transform .4s ease;}
#home-screen.hidden{opacity:0;pointer-events:none;transform:scale(1.02);}
.home-inner{margin:auto;width:100%;max-width:340px;padding:40px 24px;display:flex;flex-direction:column;align-items:center;}
.splash-word{font-size:13px;letter-spacing:.3em;color:var(--sage);text-transform:uppercase;font-weight:600;}
.splash-title{font-size:38px;font-weight:600;color:var(--parchment);margin-top:4px;}
.splash-tag{font-family:var(--font-display);font-style:italic;font-weight:400;color:var(--on-dark-soft);font-size:14px;margin-top:14px;max-width:280px;text-align:center;line-height:1.6;}

.route-list{width:100%;margin-top:28px;display:flex;flex-direction:column;gap:10px;}
.route-card{width:100%;background:var(--glass-faint);border:1px solid var(--sage-line);border-radius:16px;padding:16px 18px;text-align:left;cursor:pointer;color:var(--parchment);display:flex;align-items:center;justify-content:space-between;gap:10px;}
.route-card:active{background:var(--glass-med);}
.route-card .rc-label{font-size:16px;font-weight:600;}
.route-card .rc-dist{font-size:12px;color:var(--sage);margin-top:2px;}
.route-card .rc-arrow{font-size:20px;color:var(--sage);flex-shrink:0;}


/* ───────── APP SHELL ───────── */
#app{display:flex;flex-direction:column;height:100%;height:100dvh;background:var(--parchment);}
#header{background:var(--canopy);padding:14px 16px 12px;flex-shrink:0;z-index:100;display:flex;align-items:center;gap:12px;}
.h-identity{display:flex;align-items:center;gap:10px;background:none;border:none;cursor:pointer;padding:0;flex:1;min-width:0;text-align:left;}
.h-text{flex:1;min-width:0;}
.h-title{font-size:17px;font-weight:600;color:var(--parchment);line-height:1.1;}
.h-sub{font-size:10.5px;letter-spacing:.08em;color:var(--sage);margin-top:2px;}

/* walk dropdown — right-aligned in the header row */
.walk-dd{position:relative;flex-shrink:0;max-width:55%;}
.walk-dd[hidden]{display:none;}
.walk-dd select{display:block;max-width:100%;appearance:none;-webkit-appearance:none;border:none;border-radius:999px;background:var(--dropdown-bg);color:var(--dropdown-fg);font:600 13px var(--font-body);padding:9px 34px 9px 16px;cursor:pointer;text-overflow:ellipsis;box-shadow:var(--shadow-fab);}
.walk-dd select:focus-visible{outline:2px solid var(--sage);outline-offset:2px;}
.walk-dd select option{color:var(--ink);background:var(--card);}
.walk-dd::after{content:"";position:absolute;right:15px;top:50%;width:7px;height:7px;border-right:2px solid var(--dropdown-fg);border-bottom:2px solid var(--dropdown-fg);transform:translateY(-70%) rotate(45deg);pointer-events:none;}

#main{flex:1;display:flex;flex-direction:column;overflow:hidden;position:relative;min-height:0;}
#map-container{flex:1;position:relative;min-height:0;}
#map{position:absolute;inset:0;background:var(--parchment);}

.map-fab{position:absolute;z-index:500;width:40px;height:40px;border-radius:50%;background:var(--card);border:1px solid var(--line);display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:var(--shadow-fab);padding:0;}
#locate-btn{top:12px;right:12px;}
#facts-btn{top:12px;left:12px;}
#facts-btn.has-new::after{content:'';position:absolute;top:5px;right:5px;width:8px;height:8px;border-radius:50%;background:var(--copper);border:1.5px solid var(--card);}
.map-fab svg{width:18px;height:18px;stroke:var(--canopy);}

#route-warning{display:none;position:absolute;top:60px;left:12px;right:12px;z-index:499;background:var(--warning-bg);color:var(--on-dark);font-size:12px;line-height:1.5;padding:10px 12px;border-radius:12px;}


/* Map-handle now closes the open info card — hidden entirely otherwise */
#map-handle{display:none;position:absolute;bottom:-1px;left:50%;transform:translateX(-50%);z-index:1200;background:var(--card);border:1px solid var(--line);border-bottom:none;border-radius:14px 14px 0 0;width:60px;height:26px;align-items:center;justify-content:center;cursor:pointer;color:var(--forest);}
#map-handle.show{display:flex;}
@media (max-width:359px){#map-handle{left:auto;right:12px;transform:none;}}   /* very narrow phones: keep the close tab clear of the map credit */
/* map credit: stays at the bottom edge of the map and never moves. Bottom-left keeps it clear of the centred close tab. */
.leaflet-control-attribution{font-size:10px;line-height:1.5;padding:0 4px;white-space:nowrap;}

/* ───────── PANEL (only appears once a stop/tab is selected) ───────── */
#panel{background:var(--card);border-top:1px solid var(--line);overflow-y:auto;-webkit-overflow-scrolling:touch;flex-shrink:0;max-height:0;transition:max-height .35s cubic-bezier(.4,0,.2,1);}
#panel.open{max-height:var(--panel-card-height);}       /* short content: stop card, About */
#panel.full-open{max-height:var(--panel-list-height);}  /* browsable lists: stops, about */

#card-view,#walk-info-view,#about-view{display:none;}
#card-view.active,#walk-info-view.active,#about-view.active{display:block;}
#walk-info-view,#about-view{padding:16px 16px 18px;}

.badge{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;padding:4px 10px 4px 8px;border-radius:20px;}
.b-start{background:var(--badge-start-bg);color:var(--badge-start-fg);}
.b-parking{background:var(--badge-parking-bg);color:var(--badge-parking-fg);}
.b-legend{background:var(--badge-legend-bg);color:var(--badge-legend-fg);} .b-nature{background:var(--badge-nature-bg);color:var(--badge-nature-fg);}
.b-history{background:var(--badge-history-bg);color:var(--badge-history-fg);} .b-viewpoint{background:var(--badge-viewpoint-bg);color:var(--badge-viewpoint-fg);}
.b-geology{background:var(--badge-geology-bg);color:var(--badge-geology-fg);} .b-fact{background:var(--badge-fact-bg);color:var(--badge-fact-fg);}
.b-default{background:var(--badge-default-bg);color:var(--badge-default-fg);}

#active-card{padding:16px 16px 18px;}
.card-head{display:flex;align-items:flex-start;gap:12px;}
.card-icon{width:75px;height:75px;border-radius:11px;background:var(--sage-soft);flex-shrink:0;overflow:hidden;display:flex;align-items:center;justify-content:center;}
.card-icon img{width:100%;height:100%;object-fit:cover;}
.card-meta{flex:1;min-width:0;}
.card-title{font-size:19px;font-weight:600;line-height:1.2;}
.card-dist{font-size:11.5px;color:var(--mist);margin-top:3px;}
.card-desc{font-size:14px;line-height:1.65;color:var(--ink-soft);margin-top:10px;}
.card-full-link{display:inline-flex;align-items:center;gap:5px;margin-top:10px;font-size:12.5px;font-weight:700;color:var(--copper);cursor:pointer;}

.card-stepnav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line);}
.step-btn{display:inline-flex;align-items:center;gap:4px;padding:8px 12px;border-radius:10px;border:1px solid var(--line);background:var(--sage-soft);color:var(--forest);font-size:12.5px;font-weight:700;cursor:pointer;}
.step-btn:disabled{opacity:.35;cursor:default;}
.step-label{font-size:11px;color:var(--mist);font-weight:600;letter-spacing:.02em;}

.photo-strip{display:flex;gap:8px;margin-top:12px;overflow-x:auto;padding-bottom:2px;}
.photo-thumb{width:150px;height:96px;border-radius:12px;flex-shrink:0;overflow:hidden;border:1px solid var(--line);background:var(--sage-soft);cursor:pointer;position:relative;}
.photo-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.photo-thumb .pt-cap{position:absolute;left:0;right:0;bottom:0;background:linear-gradient(transparent,var(--photo-shade));color:var(--white);font-size:10px;padding:12px 8px 6px;}

/* ───────── STOP LIST (accordion) ───────── */
#stop-list{display:none;padding:4px 0;}
#stop-list.active{display:block;}
.sl-row{border-bottom:1px solid var(--line);}
.sl-item{display:flex;align-items:center;gap:10px;padding:12px 16px;cursor:pointer;}
.sl-chevron{width:26px;height:26px;border-radius:8px;background:var(--sage-soft);display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;transition:transform .2s;color:var(--forest);}
.sl-chevron.open{transform:rotate(90deg);}
.sl-icon{width:30px;height:30px;border-radius:10px;background:var(--sage-soft);flex-shrink:0;overflow:hidden;display:flex;align-items:center;justify-content:center;}
.sl-icon img{width:100%;height:100%;object-fit:cover;}
.sl-info{flex:1;min-width:0;}
.sl-name{font-size:14.5px;font-weight:600;}
.sl-cat{font-size:11px;color:var(--mist);margin-top:1px;}
.sl-expand{max-height:0;overflow:hidden;transition:max-height .3s ease;background:var(--sage-soft);}
.sl-expand.open{max-height:4000px;}   /* was 600px, which cut off long descriptions */
.sl-expand-inner{padding:14px 16px 18px 52px;}
.sl-expand .card-desc{margin-top:0;}
.sl-view-map{display:inline-block;margin-top:10px;font-size:12px;font-weight:700;color:var(--copper);cursor:pointer;}

/* ───────── BOTTOM NAV ───────── */
#bottom-nav{background:var(--canopy);display:flex;flex-shrink:0;min-height:var(--nav-height);padding-bottom:env(safe-area-inset-bottom,0px);}
/* PHONES (under 600px): icon above the label, exactly as before */
.bn-tab{flex:1;min-width:0;height:var(--nav-height);padding:0 4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;cursor:pointer;color:var(--nav-idle);border:none;background:transparent;font-family:inherit;}
.bn-tab.active{color:var(--sage);}
/* the icon is an SVG file used as a mask, so it takes the tab's colour (idle / active) */
.bn-icon{width:var(--nav-icon-size-phone);height:var(--nav-icon-size-phone);flex-shrink:0;background-color:currentColor;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;}
.bn-label{min-width:0;font-size:var(--nav-label-size-phone);font-weight:600;letter-spacing:.04em;text-transform:var(--nav-label-case);line-height:1.2;word-spacing:.2em;text-align:center;overflow-wrap:break-word;}
/* TABLET / DESKTOP (600px and up): icon beside the label on one line, larger.
   (The 600px breakpoint is a number in this rule — change it here if you want it elsewhere.) */
@media (min-width:600px){
  .bn-tab{flex-direction:row;gap:8px;padding:0 8px;}
  .bn-icon{width:var(--nav-icon-size);height:var(--nav-icon-size);}
  .bn-label{font-size:var(--nav-label-size);font-weight:700;letter-spacing:.06em;line-height:1.15;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
}

/* ───────── PROXIMITY ALERT ───────── */
#prox-alert{position:absolute;left:10px;right:10px;bottom:-200px;z-index:700;background:var(--canopy);border-radius:18px;padding:14px;box-shadow:var(--shadow-float);display:flex;gap:12px;align-items:center;transition:bottom .45s cubic-bezier(.2,.9,.3,1.15);visibility:hidden;}
#prox-alert.show{bottom:14px;visibility:visible;}
.prox-x{position:absolute;top:6px;right:8px;width:22px;height:22px;border-radius:50%;border:none;background:var(--glass-med);color:var(--on-dark-soft);font-size:14px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;}
.prox-x svg{width:11px;height:11px;}
.prox-icon{width:44px;height:44px;border-radius:12px;background:var(--copper);flex-shrink:0;overflow:hidden;display:flex;align-items:center;justify-content:center;}
.prox-icon img{width:100%;height:100%;object-fit:cover;}
.prox-text{flex:1;min-width:0;}
.prox-eyebrow{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--sage);font-weight:700;}
.prox-title{font-size:15px;color:var(--white);font-weight:600;margin-top:1px;}
.prox-actions{display:flex;flex-direction:column;gap:6px;flex-shrink:0;}
.prox-btn{padding:7px 12px;border-radius:9px;font-size:11.5px;font-weight:700;border:none;cursor:pointer;}
.prox-btn.view{background:var(--sage);color:var(--canopy);}
.prox-btn.dismiss{background:transparent;color:var(--on-dark-muted);}

/* ───────── FULLSCREEN DETAIL MODAL ───────── */
#detail-modal{position:fixed;inset:0;z-index:9000;background:var(--parchment);display:none;flex-direction:column;transform:translateY(3%);opacity:0;transition:transform .3s cubic-bezier(.2,.8,.3,1),opacity .3s;}
#detail-modal.open{display:flex;transform:translateY(0);opacity:1;}
.dm-hero{position:relative;flex-shrink:0;height:34%;min-height:170px;background:linear-gradient(160deg,var(--forest),var(--canopy));display:flex;align-items:flex-end;padding:18px;overflow:hidden;}
.dm-hero img.dm-hero-icon{position:absolute;right:18px;top:18px;width:56px;height:56px;border-radius:16px;object-fit:cover;box-shadow:var(--shadow-hero-icon);}
.dm-close{position:absolute;top:14px;left:14px;width:36px;height:36px;border-radius:50%;background:var(--close-btn-bg);border:none;color:var(--white);font-size:18px;cursor:pointer;z-index:2;display:flex;align-items:center;justify-content:center;line-height:1;padding:0;}
.dm-close svg{width:16px;height:16px;}
.dm-hero-text{position:relative;z-index:1;}
.dm-hero .badge{margin-bottom:8px;}
.dm-hero-title{font-size:26px;font-weight:600;color:var(--white);}
.dm-body{flex:1;overflow-y:auto;padding:20px 20px 40px;-webkit-overflow-scrolling:touch;}
.dm-desc{font-size:15.5px;line-height:1.75;color:var(--ink-soft);}
.dm-photos{display:flex;gap:10px;margin:16px 0;overflow-x:auto;}
.dm-photos .photo-thumb{width:180px;height:120px;}
.dm-sub-block{margin-top:18px;padding-top:16px;border-top:1px solid var(--line);}
.dm-sub-label{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--mist);font-weight:700;margin-bottom:10px;}
.dm-sub-card{padding:12px;background:var(--sage-soft);border-radius:12px;margin-bottom:8px;}
.dm-sub-title{font-size:14px;font-weight:700;color:var(--forest);}
.dm-sub-desc{font-size:13px;color:var(--ink-softer);margin-top:4px;line-height:1.55;}

/* ───────── FACTS DRAWER ───────── */
#facts-drawer{position:fixed;inset:0;z-index:8500;display:none;}
#facts-drawer.open{display:block;}
.fd-scrim{position:absolute;inset:0;background:var(--scrim-light);}
.fd-panel{position:absolute;top:0;right:0;bottom:0;width:86%;max-width:380px;background:var(--card);display:flex;flex-direction:column;transform:translateX(100%);transition:transform .3s cubic-bezier(.2,.8,.3,1);}
#facts-drawer.open .fd-panel{transform:translateX(0);}
.fd-head{background:var(--canopy);padding:18px 18px 14px;flex-shrink:0;position:relative;}
.fd-close{position:absolute;top:14px;right:14px;width:30px;height:30px;border-radius:50%;border:none;background:var(--glass-soft);color:var(--white);font-size:17px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;}
.fd-close svg{width:14px;height:14px;}
.fd-title{font-size:19px;font-weight:600;color:var(--white);padding-right:30px;}
.fd-sub{font-size:12px;color:var(--sage);margin-top:2px;}
.fd-list{flex:1;overflow-y:auto;padding:8px 0;}
.fd-item{display:flex;gap:12px;padding:12px 18px;border-bottom:1px solid var(--line);cursor:pointer;}
.fd-icon{width:34px;height:34px;border-radius:10px;background:var(--sage-soft);flex-shrink:0;display:flex;align-items:center;justify-content:center;overflow:hidden;}
.fd-icon img{width:100%;height:100%;object-fit:cover;}
.fd-name{font-size:14px;font-weight:600;}
.fd-desc{font-size:12px;color:var(--mist);margin-top:2px;line-height:1.4;}

/* ───────── ABOUT (panel view, same format as Stops / Walk info) ───────── */
.about-head{display:flex;align-items:center;gap:12px;}
.about-head img{width:52px;height:52px;border-radius:14px;object-fit:cover;}
.about-eyebrow{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--mist);font-weight:700;}
.about-name{font-size:18px;font-weight:600;margin-top:2px;}
.about-blurb{font-size:14px;line-height:1.65;color:var(--ink-soft);margin-top:14px;}
.about-actions{display:flex;gap:8px;margin-top:18px;}
.about-btn{flex:1;padding:11px;border-radius:12px;border:none;font-weight:700;font-size:13px;cursor:pointer;}
.about-btn.visit{background:var(--copper);color:var(--white);}
.about-btn.close{background:var(--sage-soft);color:var(--forest);}

/* ───────── LIGHTBOX ───────── */
#lightbox{position:fixed;inset:0;z-index:9800;background:var(--lightbox-bg);display:none;flex-direction:column;align-items:center;justify-content:center;}
#lightbox.open{display:flex;}
.lb-stage{max-width:92vw;max-height:70vh;display:flex;align-items:center;justify-content:center;}
#lb-img{max-width:92vw;max-height:70vh;border-radius:10px;object-fit:contain;}
.lb-caption{color:var(--on-dark);font-size:14px;margin-top:16px;max-width:80vw;text-align:center;line-height:1.5;}
.lb-count{color:var(--sage);font-size:11px;margin-top:8px;letter-spacing:.05em;}
.lb-close{position:absolute;top:18px;right:18px;width:38px;height:38px;border-radius:50%;background:var(--glass-soft);border:none;color:var(--white);font-size:20px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1;padding:0;}
.lb-close svg{width:16px;height:16px;}
.lb-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;background:var(--glass-soft);border:none;color:var(--white);font-size:26px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;}
.lb-nav svg{width:20px;height:20px;}
.lb-prev{left:14px;} .lb-next{right:14px;}

/* ───────── ABOUT PAGE EXTRAS ───────── */
.key-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px;}
.key-item{display:flex;align-items:center;gap:8px;background:var(--sage-soft);border-radius:12px;padding:8px 10px;}
.key-icon{width:26px;height:26px;border-radius:8px;overflow:hidden;flex-shrink:0;background:var(--white);}
.key-icon img{width:100%;height:100%;object-fit:cover;}
.wp-pin.key-swatch{width:20px;height:20px;margin:3px;box-shadow:none;}
.key-label{font-size:11.5px;font-weight:600;color:var(--forest);line-height:1.3;}

/* ───────── MAP MARKERS ───────── */
.wp-pin {
    width: 42px;
    height: 42px;
    /* Square with rounded corners */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border: 2px solid var(--forest);
    box-shadow: var(--shadow-pin);
    overflow: hidden;
    /* Remove the map-pin rotation */
    transform: none;
}

    .wp-pin.off-walk {
        background: var(--pin-offroute-fill);
        border-color: var(--pin-offroute-border);
        border-width: 3px;
        border-style: solid;
    }

    .wp-pin.on-map-active {
        background: var(--sage);
    }

    .wp-pin.start-pin {
        border-color: var(--copper);
    }

    .wp-pin img {
        width: 100%;
        height: 100%;
        /* Don't crop the artwork */
        object-fit: cover;
        /* Remove the old counter-rotation and enlargement */
        transform: none;
    }
.char-marker{width:44px;height:44px;border-radius:50%;overflow:hidden;border:2px solid var(--white);box-shadow:var(--shadow-marker);background:var(--white);}
.char-marker img{width:100%;height:100%;object-fit:cover;}
.leaflet-control-zoom a{background:var(--card) !important;color:var(--forest) !important;}
.leaflet-top.leaflet-right .leaflet-control-zoom{margin-top:56px;}  /* sits under the locate button, clear of the Facts button */
.leaflet-popup-content{font-family:var(--font-body);font-size:13px;line-height:1.5;}

/* ───────── INSTALL PROMPT ───────── */
#install-prompt{position:fixed;inset:0;z-index:10100;display:none;align-items:flex-end;justify-content:center;}
#install-prompt.open{display:flex;}
.ip-scrim{position:absolute;inset:0;background:var(--scrim);opacity:0;transition:opacity .3s;}
#install-prompt.open .ip-scrim{opacity:1;}
.ip-sheet{position:relative;background:var(--card);width:100%;max-width:480px;border-radius:24px 24px 0 0;padding:28px 24px calc(28px + env(safe-area-inset-bottom,0px));text-align:center;transform:translateY(100%);transition:transform .35s cubic-bezier(.2,.8,.3,1);box-shadow:var(--shadow-sheet);}
#install-prompt.open .ip-sheet{transform:translateY(0);}
.ip-icon{width:64px;height:64px;border-radius:18px;overflow:hidden;margin:0 auto 16px;box-shadow:var(--shadow-icon);}
.ip-icon img{width:100%;height:100%;object-fit:cover;}
.ip-title{font-family:var(--font-display);font-size:20px;font-weight:600;color:var(--ink);}
.ip-sub{font-size:13.5px;line-height:1.6;color:var(--ink-soft);margin-top:8px;padding:0 6px;}
.ip-btn{width:100%;padding:13px;border-radius:14px;border:none;font-weight:700;font-size:14.5px;cursor:pointer;margin-top:10px;}
.ip-btn.primary{background:var(--copper);color:var(--white);}
.ip-btn.secondary{background:var(--sage-soft);color:var(--forest);}
.ip-steps{margin-top:20px;display:flex;flex-direction:column;gap:12px;text-align:left;}
.ip-step{display:flex;align-items:center;gap:12px;background:var(--sage-soft);border-radius:14px;padding:12px 14px;font-size:13.5px;color:var(--forest);font-weight:500;}
.ip-step strong{font-weight:700;}
.ip-step-text{flex:1;min-width:0;}
.ip-step-icon{flex-shrink:0;width:26px;height:26px;color:var(--copper);}
.ip-step-icon svg{width:100%;height:100%;}

/* ───────── LOGOS (sizes/shape set in the THEME block) ───────── */
.splash-logo{display:block;height:var(--logo-splash-height);width:90%;border-radius:var(--logo-splash-radius);margin-bottom:10px;}
.h-logo{display:block;height:var(--logo-header-height);width:auto;padding-bottom:10px;flex-shrink:0;}
.rotate-icon{color:var(--sage);}
.dm-hero-art{color:var(--moss);}

/* ───────── LOAD PROBLEM (offline on first visit / content failed) ───────── */
.load-problem{text-align:center;max-width:300px;}
.lp-icon{width:64px;height:64px;color:var(--sage);margin-bottom:18px;}
.lp-icon svg{width:100%;height:100%;}
.lp-title{font-family:var(--font-display);font-size:24px;font-weight:600;color:var(--parchment);}
.lp-text{font-size:14px;line-height:1.65;color:var(--on-dark-soft);margin-top:10px;}
.lp-btn{margin-top:22px;padding:13px 28px;border-radius:14px;border:none;background:var(--copper);color:var(--white);font-weight:700;font-size:14.5px;cursor:pointer;}

/* ───────── RICH TEXT (tags allowed in content.xml descriptions / blurb) ───────── */
.rich p{margin:0 0 .8em;}
.rich > :last-child{margin-bottom:0;}
.rich a{color:var(--copper);font-weight:600;text-decoration:underline;text-underline-offset:2px;}
.rich ul,.rich ol{margin:0 0 .8em;padding-left:1.3em;}
.rich li{margin:.25em 0;}
.rich h3,.rich h4{font-family:var(--font-display);color:var(--ink);line-height:1.25;margin:1em 0 .35em;}
.rich h3{font-size:1.15em;} .rich h4{font-size:1em;}
.rich blockquote{margin:.8em 0;padding:.1em 0 .1em 1em;border-left:3px solid var(--sage);color:var(--ink-softer);}
.rich hr{border:0;border-top:1px solid var(--line);margin:1em 0;}
.rich small{font-size:.85em;color:var(--mist);}

/* ───────── LOADING + OFFLINE STATUS + TOAST ───────── */
.spinner{width:34px;height:34px;border:3px solid var(--glass-line);border-top-color:var(--sage);border-radius:50%;animation:spin .9s linear infinite;}
.spinner.sm{width:14px;height:14px;border-width:2px;flex-shrink:0;}
@keyframes spin{to{transform:rotate(360deg);}}
@media (prefers-reduced-motion:reduce){.spinner{animation-duration:3s;}}
.boot-loader{display:flex;flex-direction:column;align-items:center;gap:12px;padding:18px 0;color:var(--on-dark-soft);}
.boot-msg{font-size:13px;letter-spacing:.02em;}
.offline-status{margin-top:18px;display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;line-height:1.45;color:var(--on-dark-muted);text-align:center;}
.offline-status[hidden]{display:none;}
.offline-status.ready{color:var(--sage);}
.install-help{margin-top:16px;border:1px solid var(--line);border-radius:14px;padding:12px 14px;font-size:12.5px;line-height:1.5;color:var(--ink);}
.install-help p{margin-top:6px;}
.install-help .ih-title{font-weight:700;color:var(--forest);font-size:13px;}
.device-card{margin-top:16px;background:var(--sage-soft);border-radius:14px;padding:2px 14px;}
.dc-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-top:1px solid var(--line);}
.dc-row:first-child{border-top:0;}
.dc-k{flex:0 0 62px;font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;font-weight:700;color:var(--forest);}
.dc-v{flex:1;min-width:0;font-size:12.5px;line-height:1.45;color:var(--forest);}
.dc-btn{flex-shrink:0;border:none;border-radius:999px;background:var(--copper);color:var(--white);font:700 12px var(--font-body);padding:8px 14px;cursor:pointer;}
#toast{position:fixed;left:50%;bottom:calc(76px + env(safe-area-inset-bottom,0px));transform:translate(-50%,16px);z-index:10200;max-width:min(90vw,360px);background:var(--warning-bg);color:var(--on-dark);font:600 12.5px/1.45 var(--font-body);padding:10px 16px;border-radius:20px;text-align:center;opacity:0;pointer-events:none;transition:opacity .3s ease,transform .3s ease;box-shadow:var(--shadow-fab);}
#toast.show{opacity:1;transform:translate(-50%,0);}
