/* ============================================================
   IRONLOG — Component styles
   ============================================================ */

/* ---------------- NAV ---------------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(14,14,16,0.82); backdrop-filter: blur(14px) saturate(1.2); border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--chalk); }
.brand-mark { display: inline-flex; gap: 2.5px; align-items: flex-end; height: 22px; }
.brand-mark i { width: 4px; background: var(--ox); display: block; }
.brand-mark i:nth-child(1) { height: 12px; } .brand-mark i:nth-child(2) { height: 22px; } .brand-mark i:nth-child(3) { height: 16px; }
.brand-word { font-size: 24px; letter-spacing: 0.04em; }
.nav-links { display: flex; gap: 4px; }
.nav-link { text-decoration: none; color: var(--steel); font-weight: 600; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; padding: 8px 14px; border-radius: var(--r-sm); transition: color .2s, background .2s; position: relative; }
.nav-link:hover { color: var(--chalk); }
.nav-link.on { color: var(--chalk); }
.nav-link.on::after { content:""; position:absolute; left:14px; right:14px; bottom:2px; height:2px; background: var(--ox); }
.nav-right { display: flex; align-items: center; gap: 8px; min-width: 92px; justify-content: flex-end; }
.nav-lock { padding: 9px; }
.admin-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ox-bright); border: 1px solid rgba(200,71,58,0.4); padding: 6px 8px 6px 12px; border-radius: var(--r-sm); }
.admin-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ox-bright); box-shadow: 0 0 0 3px var(--ox-wash); animation: pulse 2s infinite; }
.nav-progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--ox); transform-origin: 0 50%; transform: scaleX(0); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

@media (max-width: 860px) { .nav-links { display: none; } }

/* ---------------- HERO ---------------- */
.hero-top { max-width: 1000px; }
.hero-h { font-size: clamp(54px, 11vw, 124px); margin: 16px 0 0; text-transform: uppercase; line-height: 0.96; }
.hero-lede { font-size: clamp(16px, 2vw, 20px); max-width: 540px; margin-top: 30px; }

.ba-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(16px, 3vw, 40px); align-items: stretch; margin-top: clamp(40px, 6vw, 72px); }
.ba-col { display: flex; }
.ba-col > .editable { flex: 1 1 auto; display: flex; min-width: 0; }
.ba-card { padding: 18px; width: 100%; display: flex; flex-direction: column; }
.ba-tagrow { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.ba-which { font-size: 26px; letter-spacing: 0.04em; }
.ba-date { font-size: 14px; }
.ba-img { aspect-ratio: 4/5; border-radius: var(--r-sm); width: 100%; }
.ba-upload { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: rgba(14,14,16,0.85); border: 1px solid var(--line-strong); font-size: 11px; padding: 8px 14px; z-index: 3; }
.ba-foot { margin-top: 16px; }
.ba-bw { font-size: clamp(44px, 6vw, 72px); line-height: 1; }
.ba-unit { font-family: var(--font-head); font-weight: 600; font-size: 0.4em; color: var(--steel); margin-left: 6px; letter-spacing: 0.04em; }

.ba-delta { display: flex; align-items: center; }
.ba-delta-inner { background: var(--ink-2); border: 1px solid var(--ox); border-radius: var(--r); padding: 26px 28px; text-align: center; min-width: 200px; box-shadow: 0 0 60px -20px rgba(176,57,46,0.6); position: relative; }
.ba-delta-num { font-size: clamp(56px, 8vw, 92px); color: var(--ox-bright); line-height: 0.9; }
.ba-delta-days { font-size: 19px; letter-spacing: 0.14em; margin-top: 2px; }
.ba-delta-sub { font-size: 12px; margin-top: 4px; }

@media (max-width: 880px) {
  .ba-grid { grid-template-columns: 1fr 1fr; }
  .ba-delta { grid-column: 1 / -1; order: 3; justify-content: center; }
  .ba-delta-inner { display: flex; gap: 26px; align-items: center; min-width: 0; }
  .ba-delta-inner .hairline { display: none; }
}
@media (max-width: 560px) {
  .ba-grid { grid-template-columns: 1fr; }
  /* stack as BEFORE → WEIGHT → AFTER so the weight sits in the middle */
  .ba-col:first-of-type { order: 0; }
  .ba-delta { order: 1; grid-column: auto; }
  .ba-col:last-of-type { order: 2; }
  .ba-delta-inner { flex-direction: column; gap: 6px; }
}

/* ---------------- GOAL ---------------- */
.goal-band { position: relative; padding: clamp(70px, 10vw, 130px) 0; text-align: center; background:
  linear-gradient(180deg, transparent, rgba(176,57,46,0.05) 50%, transparent),
  repeating-linear-gradient(45deg, rgba(244,241,234,0.015) 0 14px, transparent 14px 28px); }
.goal-rule { height: 2px; background: linear-gradient(90deg, transparent, var(--ox), transparent); opacity: .55; }
.goal-inner { display: inline-block; }
.goal-h { font-size: clamp(52px, 11vw, 150px); text-transform: uppercase; line-height: 0.9; }
.goal-h { background: linear-gradient(180deg, var(--chalk), var(--chalk-2)); -webkit-background-clip: text; background-clip: text; }
.goal-sub { font-size: clamp(16px, 2.2vw, 22px); margin-top: 18px; max-width: 620px; margin-inline: auto; }

/* ---------------- PRs ---------------- */
.pr-grid { display: grid; gap: 16px; }
.pr-grid-main { grid-template-columns: repeat(3, 1fr); }
.pr-grid-other { grid-template-columns: repeat(6, 1fr); margin-top: 16px; }
.pr-cell { display: flex; }
.pr-card { padding: 22px; width: 100%; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.pr-card::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background: var(--steel-3); transition: background .3s; }
.pr-card:hover::before { background: var(--ox); }
.pr-new::before { background: var(--ox); }
.pr-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 24px; }
.pr-name { font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--chalk-2); line-height: 1.2; }
.pr-numrow { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.pr-num { font-size: clamp(56px, 7vw, 92px); line-height: 0.85; }
.pr-num-sm { font-size: clamp(40px, 5vw, 56px); }
.pr-unit { font-size: 16px; color: var(--steel); letter-spacing: 0.08em; text-transform: uppercase; }
.pr-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.pr-trend { display: flex; flex-direction: column; gap: 4px; }
.pr-delta { font-size: 11px; color: var(--gym-bright); letter-spacing: 0.08em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 4px; }
.pr-updated { font-size: 11px; }
.pr-pen { position: absolute; top: 14px; right: 14px; opacity: 0; transition: opacity .2s; }
.pr-card:hover .pr-pen { opacity: 1; }
.pr-grid-main .pr-cell .pr-pen { /* big cards keep pen via Editable, hide internal */ display: none; }

.pr-divider { display: flex; align-items: center; gap: 18px; margin: 44px 0 0; }
.pr-divider .eyebrow { white-space: nowrap; }

@media (max-width: 1024px) { .pr-grid-other { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .pr-grid-main { grid-template-columns: 1fr 1fr; } .pr-grid-main .pr-cell:first-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .pr-grid-main, .pr-grid-other { grid-template-columns: 1fr 1fr; } .pr-num { font-size: 56px; } }

/* ---------------- PHILOSOPHY ---------------- */
.philo { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.philo-inner { max-width: 880px; margin: 0 auto; position: relative; padding-top: 20px; }
.philo-mark { position: absolute; top: -40px; left: -10px; font-size: 200px; color: var(--ox); opacity: 0.16; line-height: 1; pointer-events: none; }
.philo-quote { margin: 0; }
.philo-lead { font-family: var(--font-head); font-weight: 500; font-size: clamp(24px, 3.6vw, 40px); line-height: 1.28; letter-spacing: 0.005em; color: var(--chalk); text-wrap: balance; }
.philo-body { font-size: clamp(16px, 1.8vw, 19px); color: var(--steel); line-height: 1.7; margin-top: 22px; max-width: 680px; }
.philo-by { margin-top: 28px; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ox-bright); }

/* ---------------- SUPPLEMENTS ---------------- */
.supp-wrap { max-width: 760px; }
.supp-card { padding: clamp(20px, 3vw, 34px); }
.supp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.supp-title { font-size: clamp(24px, 3.4vw, 36px); letter-spacing: 0.02em; }
.supp-rule-thick { height: 6px; background: var(--chalk); margin: 14px 0; border-radius: 1px; }
.supp-list { list-style: none; margin: 0; padding: 0; }
.supp-row { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.supp-row:last-child { border-bottom: 0; }
.supp-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.supp-name { font-size: 17px; letter-spacing: 0.02em; }
.supp-note { font-size: 12.5px; }
.supp-amt { font-size: clamp(28px, 4vw, 40px); line-height: 1; white-space: nowrap; }
.supp-unit { font-family: var(--font-head); font-weight: 600; font-size: 0.42em; color: var(--steel); margin-left: 4px; }
.supp-actions { display: inline-flex; gap: 6px; }
.supp-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 6px; }
@media (max-width: 520px) {
  .supp-row { flex-wrap: wrap; }
  .supp-amt { order: 5; }
  .supp-row .tag { order: 4; }
}

/* ---------------- CALENDAR ---------------- */
.cal-stats { display: flex; gap: clamp(18px, 3vw, 40px); }
.cal-stat { display: flex; flex-direction: column; gap: 4px; }
.cal-stat-num { font-size: clamp(34px, 4vw, 50px); line-height: 0.9; display: inline-flex; align-items: center; gap: 8px; }
.cal-stat-lbl { letter-spacing: 0.2em; }
.cal-card { padding: clamp(16px, 2.4vw, 28px); }
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.cal-nav { display: flex; align-items: center; gap: 16px; }
.cal-month { display: flex; align-items: baseline; gap: 10px; }
.cal-month-name { font-size: 26px; letter-spacing: 0.04em; text-transform: uppercase; }
.cal-month-year { font-size: 18px; }
.cal-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cal-legend { display: flex; gap: 14px; }
.lg { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel); display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 600; }
.lg::before { content:""; width: 9px; height: 9px; border-radius: 2px; }
.lg-gym::before { background: var(--gym); } .lg-rest::before { background: var(--rest); } .lg-none::before { background: var(--steel-3); }
.cal-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; }
.cal-toggle-btn { font-family: var(--font-head); font-weight: 600; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; padding: 7px 14px; background: transparent; color: var(--steel); border: 0; cursor: pointer; transition: background .2s, color .2s; }
.cal-toggle-btn.on { background: var(--ox); color: var(--chalk); }

.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 8px; }
.cal-dow span { text-align: center; font-family: var(--font-head); font-weight: 600; font-size: 12px; letter-spacing: 0.1em; color: var(--steel-2); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-grid-week { grid-template-columns: repeat(7, 1fr); }
.cal-cell { aspect-ratio: 1 / 1; }
.cal-empty { background: transparent; }
.cal-day { position: relative; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--ink-2); cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: 8px; transition: transform .18s cubic-bezier(.16,1,.3,1), border-color .2s, background .2s, box-shadow .2s; overflow: hidden; }
.cal-day:hover { transform: translateY(-2px); border-color: var(--steel-2); z-index: 2; }
.cal-date { font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--chalk-2); }
.cal-pip { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 2px; }
.cal-vol { position: absolute; bottom: 7px; left: 8px; font-size: 10px; }
.status-gym  { background: linear-gradient(180deg, rgba(74,126,88,0.20), rgba(74,126,88,0.06)); border-color: rgba(74,126,88,0.45); }
.status-gym .cal-pip { background: var(--gym-bright); }
.status-rest { background: linear-gradient(180deg, rgba(158,64,57,0.18), rgba(158,64,57,0.05)); border-color: rgba(158,64,57,0.42); }
.status-rest .cal-pip { background: var(--rest-bright); }
.status-none { opacity: 0.55; }
.status-none:hover { opacity: 1; }
.cal-day.is-sel { border-color: var(--ox); box-shadow: 0 0 0 2px var(--ox), 0 12px 30px -12px rgba(176,57,46,0.7); transform: translateY(-3px); z-index: 3; }
.cal-day.is-today .cal-date { color: var(--chalk); }
.cal-today-tag { position: absolute; bottom: 6px; right: 7px; font-family: var(--font-head); font-weight: 700; font-size: 8px; letter-spacing: 0.1em; color: var(--ox-bright); }
.cal-edit-hint { position: absolute; top: 7px; left: 7px; color: var(--chalk); opacity: 0; transition: opacity .2s; }
.cal-day:hover .cal-edit-hint { opacity: .7; }
.cal-week-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
@media (max-width: 620px) {
  .cal-day { padding: 5px; border-radius: 4px; }
  .cal-date { font-size: 12px; }
  .cal-vol, .cal-today-tag { display: none; }
  .cal-grid, .cal-dow { gap: 5px; }
  .cal-stats { width: 100%; justify-content: space-between; }
}

/* day detail */
.cal-detail { margin-top: 22px; background: linear-gradient(180deg, var(--panel) 0%, var(--ink-2) 100%); border: 1px solid var(--line); border-left: 3px solid var(--ox); border-radius: var(--r); padding: clamp(20px, 3vw, 32px); }
.cal-detail-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--steel-2); text-align: center; border-left-color: var(--steel-3); }
.cal-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.cal-detail-title { font-size: clamp(26px, 4vw, 40px); text-transform: uppercase; margin: 10px 0 4px; }
.cal-detail-date { font-size: 13px; }
.cal-detail-meta { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 30px); }
.cdm { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cdm-num { font-size: clamp(26px, 3vw, 36px); line-height: 1; }
.cdm-lbl { letter-spacing: 0.16em; }
.cal-ex-list { list-style: none; margin: 0; padding: 0; }
.cal-ex { display: grid; grid-template-columns: 34px 1fr auto auto; align-items: center; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); opacity: 0; animation: exIn .5s cubic-bezier(.16,1,.3,1) forwards; }
.cal-ex:last-child { border-bottom: 0; }
@keyframes exIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.cal-ex-idx { font-size: 12px; }
.cal-ex-name { font-size: 16px; letter-spacing: 0.02em; }
.cal-ex-scheme { font-size: 17px; display: inline-flex; align-items: baseline; gap: 3px; color: var(--chalk); }
.cal-ex-scheme b { font-weight: 600; }
.cal-ex-scheme .x, .cal-ex-scheme .at { color: var(--steel-2); margin: 0 2px; font-size: 0.85em; }
.cal-ex-scheme .at { color: var(--ox-bright); }
.cal-ex-vol { font-size: 12px; text-align: right; min-width: 72px; }
.cal-rest-block { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.cal-note { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.cal-note .eyebrow { display: block; margin-bottom: 6px; }
.cal-note p { margin: 0; color: var(--chalk-2); font-size: 15px; font-style: italic; }
@media (max-width: 620px) {
  .cal-ex { grid-template-columns: 26px 1fr; row-gap: 2px; }
  .cal-ex-scheme { grid-column: 2; justify-self: start; }
  .cal-ex-vol { grid-column: 2; justify-self: start; text-align: left; }
  .cal-detail-meta { width: 100%; justify-content: space-between; }
}

/* log editor rows */
.logex-list { display: flex; flex-direction: column; gap: 10px; }
.logex-row { display: flex; align-items: center; gap: 7px; }
.logex-name { flex: 1 1 auto; min-width: 0; }
.logex-n { width: 56px; text-align: center; padding-left: 6px; padding-right: 6px; }
.logex-w { width: 70px; text-align: center; padding-left: 6px; padding-right: 6px; }
.logex-u { width: 64px; padding: 11px 6px; }
.logex-x { color: var(--steel-2); font-size: 14px; }

/* ---------------- CHAT ---------------- */
.chat-fab { position: fixed; bottom: 26px; right: 26px; z-index: 70; width: 60px; height: 60px; border-radius: 50%; background: var(--ox); color: var(--chalk); border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 16px 40px -10px rgba(176,57,46,0.7); transition: transform .25s cubic-bezier(.16,1,.3,1), background .2s; }
.chat-fab:hover { transform: scale(1.06); background: var(--ox-bright); }
.chat-fab.is-open { background: var(--panel-2); border: 1px solid var(--line-strong); }
.chat-fab-pulse { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ox); animation: ring 2.4s ease-out infinite; }
@keyframes ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }

.chat-panel { position: fixed; bottom: 100px; right: 26px; z-index: 69; width: 400px; max-width: calc(100vw - 36px); height: min(640px, calc(100vh - 130px)); background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: translateY(20px) scale(.97); pointer-events: none; transform-origin: bottom right; transition: opacity .28s cubic-bezier(.16,1,.3,1), transform .28s cubic-bezier(.16,1,.3,1); }
.chat-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 16px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.chat-id { display: flex; align-items: center; gap: 12px; }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--ox); color: var(--chalk); display: flex; align-items: center; justify-content: center; font-size: 16px; letter-spacing: 0.04em; }
.chat-name { font-size: 15px; letter-spacing: 0.1em; }
.chat-status { font-size: 11.5px; color: var(--steel); display: inline-flex; align-items: center; gap: 6px; }
.chat-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gym-bright); box-shadow: 0 0 0 3px rgba(94,154,109,0.2); }
.chat-list { flex: 1 1 auto; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.chat-row { display: flex; }
.chat-row.user { justify-content: flex-end; }
.chat-row.ai { justify-content: flex-start; }
.bubble { max-width: 84%; padding: 12px 15px; border-radius: 14px; font-size: 14.5px; line-height: 1.55; }
.bubble p { margin: 0; }
.bubble-ai { background: var(--panel-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; color: var(--chalk-2); }
.bubble-user { background: var(--ox); color: var(--chalk); border-bottom-right-radius: 4px; }
.bubble-imgs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.bubble-img { width: 64px; height: 64px; border-radius: 6px; }
.typing { display: inline-flex; gap: 5px; align-items: center; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--steel); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-chips { display: flex; gap: 8px; padding: 0 14px 12px; flex-wrap: wrap; }
.chip { font-family: var(--font-head); font-weight: 500; font-size: 12px; letter-spacing: 0.02em; color: var(--chalk-2); background: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 20px; padding: 7px 12px; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.chip:hover { border-color: var(--ox); color: var(--chalk); background: var(--ox-wash); }
.chat-attachments { display: flex; gap: 8px; padding: 0 14px 8px; flex-wrap: wrap; }
.chat-attach { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--steel); background: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.chat-attach button { background: none; border: 0; color: var(--steel); cursor: pointer; display: inline-flex; padding: 0; margin-left: 2px; }
.chat-attach button:hover { color: var(--ox-bright); }
.chat-input { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--panel-2); }
.chat-text { flex: 1 1 auto; background: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 22px; padding: 11px 16px; color: var(--chalk); font-family: var(--font-body); font-size: 14.5px; outline: none; transition: border-color .2s; }
.chat-text:focus { border-color: var(--ox); }
.chat-send { width: 42px; height: 42px; border-radius: 50%; background: var(--ox); color: var(--chalk); border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; transition: background .2s, transform .15s; }
.chat-send:hover:not(:disabled) { background: var(--ox-bright); }
.chat-send:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 520px) {
  .chat-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100vh; border-radius: 0; }
  .chat-fab { bottom: 18px; right: 18px; }
}

/* ---------------- FOOTER ---------------- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding-top: clamp(48px, 6vw, 80px); background: var(--ink-2); }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 48px; }
.footer-cols { display: flex; gap: clamp(40px, 8vw, 90px); }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col .eyebrow { margin-bottom: 6px; }
.footer-link { color: var(--steel); text-decoration: none; font-size: 14px; transition: color .2s; display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; cursor: pointer; padding: 0; font-family: var(--font-body); text-align: left; }
.footer-link:hover { color: var(--chalk); }
.footer-base { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; border-top: 1px solid var(--line); }
.footer-toggle { font-family: var(--font-head); font-weight: 600; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel-2); background: none; border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: var(--r-sm); transition: color .2s, border-color .2s; }
.footer-toggle:hover { color: var(--ox-bright); border-color: var(--line-strong); }

/* ---------------- PANEL GATE ---------------- */
.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; }
.gate-bg { position: absolute; inset: 0; background:
  radial-gradient(circle at 50% 30%, rgba(176,57,46,0.12), transparent 60%),
  repeating-linear-gradient(45deg, rgba(244,241,234,0.014) 0 16px, transparent 16px 32px); }
.gate-card { position: relative; z-index: 2; width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 40px 36px; text-align: center; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; align-items: center; }
.gate-card.shake { animation: shake .45s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-9px)} 40%,80%{transform:translateX(9px)} }
.gate-brand { margin-bottom: 26px; }
.gate-lock { width: 56px; height: 56px; border-radius: 50%; background: var(--ox-wash); border: 1px solid rgba(200,71,58,0.4); color: var(--ox-bright); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.gate-h { font-size: 44px; letter-spacing: 0.04em; }
.gate-sub { margin: 6px 0 24px; font-size: 14.5px; }
.gate-input { text-align: center; letter-spacing: 0.3em; font-size: 18px; margin-bottom: 14px; }
.gate-btn { width: 100%; justify-content: center; }
.gate-back { display: inline-block; margin-top: 20px; text-decoration: none; font-size: 13px; transition: color .2s; }
.gate-back:hover { color: var(--chalk); }
.gate-hint { font-size: 11px; margin-top: 16px; letter-spacing: 0.04em; }

/* code tag */
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.85em; background: var(--ink-2); padding: 1px 5px; border-radius: 4px; color: var(--ox-bright); }

/* ============================================================
   THE WALL — admin-managed journey blocks (DB-stored divs)
   ============================================================ */
.wall-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 40px;
}
.wall-cell { min-width: 0; }
.wall-side { grid-column: span 1; }
.wall-wide { grid-column: span 2; }
.wall-full { grid-column: span 4; }

.wall-block {
  height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wall-img {
  width: 100%;
  height: 200px;
  border-radius: var(--r);
  overflow: hidden;
}
.wall-wide .wall-img, .wall-full .wall-img { height: 260px; }
.wall-title {
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--chalk);
}
.wall-body { font-size: 14.5px; margin: 0; }
.wall-stat-num {
  font-size: clamp(48px, 7vw, 84px);
  line-height: 0.9;
  color: var(--ox-bright);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.wall-stat-lbl {
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
}
.wall-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  padding-top: 8px;
}
.wall-empty {
  margin-top: 40px;
  padding: 48px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  color: var(--steel);
}

@media (max-width: 900px) {
  .wall-grid { grid-template-columns: repeat(2, 1fr); }
  .wall-wide, .wall-full { grid-column: span 2; }
  .wall-side { grid-column: span 1; }
}
@media (max-width: 560px) {
  .wall-grid { grid-template-columns: 1fr; gap: 14px; }
  .wall-side, .wall-wide, .wall-full { grid-column: span 1; }
  .wall-img { height: 200px; }
}

/* ============================================================
   Misc backend-wiring polish
   ============================================================ */
.btn-danger { border-color: var(--rest); color: var(--rest-bright); }
.btn-danger:hover { background: rgba(158, 64, 57, 0.14); border-color: var(--rest-bright); }

.gate-err { color: var(--ox-bright); font-weight: 500; }

/* Gentle fade-in once data has hydrated from the server */
.hydrating main { opacity: 0.55; transition: opacity .35s ease; }
.hydrated main { opacity: 1; transition: opacity .35s ease; }
