/* FuneralFlow brand identity — memorial path concept derived from the user-supplied original design. */
:root{
  --brand-plum:#321b39;
  --brand-plum-deep:#241329;
  --brand-porcelain:#f8f4ed;
  --brand-copper:#d49371;
  --brand-eucalyptus:#78958b;
}

/* The setup/profile entry point carries the full lockup. Operational screens stay content-first. */
.setup-card{position:relative;overflow:hidden}
.setup-card>.product-mark{display:none}
.setup-card::before{
  content:"";
  display:block;
  width:min(100%,330px);
  aspect-ratio:760/420;
  margin:-8px auto 4px;
  background:url("assets/funeralflow-lockup.svg") center/contain no-repeat;
}
.setup-card .eyebrow{margin-top:-2px}

/* A quiet brand signature in Settings, without reintroducing a global header. */
.settings::after{
  content:"";
  display:block;
  height:64px;
  border-top:1px solid var(--line);
  background:url("assets/funeralflow-mark.svg") center/34px 46px no-repeat;
  opacity:.72;
}

/* Preserve semantic action/readiness green while allowing the brand to lead typography and ambient surfaces. */
body{background:linear-gradient(180deg,#faf7f1 0%,var(--bg) 28%,var(--bg) 100%)}
.hero h1,.screen-head h1,.funeral-head h1,.setup-card h1{letter-spacing:-.025em}
.eyebrow{color:var(--primary)}
.bottom-nav button.active{box-shadow:inset 0 0 0 1px rgba(53,111,103,.08)}
.nav-brand{display:none}

@media(max-width:560px){
  .setup{padding:18px}
  .setup-card{padding:22px}
  .setup-card::before{width:min(100%,260px);margin:-4px auto 0}
}

@media(min-width:900px){
  .setup-card::before{width:350px}
}

/* Phone navigation becomes a stable left rail when the workspace has desktop room. */
@media(min-width:1120px){
  .app{padding:0 0 0 224px}
  .screen{max-width:1180px;padding:42px 40px 64px}
  .bottom-nav{
    inset:24px auto 24px 24px;
    width:184px;
    max-width:none;
    transform:none;
    border:1px solid var(--line);
    border-radius:24px;
    padding:20px 12px;
    display:flex;
    flex-direction:column;
    gap:8px;
    box-shadow:var(--shadow);
  }
  .nav-brand{display:block;height:92px;margin:0 8px 12px;background:url("assets/funeralflow-lockup.svg") center/contain no-repeat}
  .bottom-nav button{min-height:58px;padding:0 14px;display:grid;grid-template-columns:28px 1fr;place-items:center start;align-content:center;gap:10px;text-align:left}
  .bottom-nav button b{font-size:21px}
  .bottom-nav button span{font-size:14px}
}

@media(prefers-color-scheme:dark){
  :root{
    --ink:#fffaf3;
    --muted:#c3b8c2;
    --bg:#211725;
    --surface:#2b2030;
    --line:#49394c;
    --primary:#a9d8cc;
    --primary2:#477f74;
    --accent:#e2a07d;
    --ok:#8db4a9;
    --warn:#ddb96e;
    --danger:#e18a8a;
    --wait:#b4a6dd;
    --shadow:0 10px 34px rgba(0,0,0,.22);
  }

  body{background:linear-gradient(180deg,#281a2d 0%,var(--bg) 30%,var(--bg) 100%);color:var(--ink)}
  .stat,.panel,.settings,.secondary,.back,.arrangement-card,.setup-card,.modal,.modal header,.modal footer{background:var(--surface);color:var(--ink);border-color:var(--line)}
  .bottom-nav{background:rgba(37,25,42,.97);border-color:var(--line);box-shadow:0 -8px 30px rgba(0,0,0,.28)}
  .bottom-nav button{color:var(--muted)}
  .bottom-nav button.active{color:#fff;background:#416f66;box-shadow:inset 0 0 0 1px #75aa9d}
  .primary{background:var(--primary2);color:#fff}
  .primary:active{background:#386960}
  button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline-color:#b7e5d9}
  .funeral-row:active,.contact-row:active,.task-row:active,.arrangement-card:active{background:#34273a}
  .arr-icon,.avatar,.check,.modal header button{background:#3a2c3f;color:var(--primary)}
  .check.done{background:#304d47}
  .setup-card input,.modal-body input,.modal-body select,.modal-body textarea{background:#241b29;color:var(--ink);border-color:#57475a}
  .setup-card input::placeholder,.modal-body input::placeholder,.modal-body textarea::placeholder{color:#aaa0a9;opacity:1}
  .notice,.toggle,.choice-list label,.detail-grid>div{background:#34283a}
  .task-row:disabled,.arrangement-card:disabled{background:#2e2333}
  .task-row:disabled:active,.arrangement-card:disabled:active{background:#2e2333}
  .readiness{background:#3a3021;border-color:#594d3a}
  .readiness.ok{background:#243a35;border-color:#38544d}
  .readiness.danger{background:#42282d;border-color:#634047}
  .readiness.wait{background:#312b45;border-color:#4c4265}
  .pill{background:#3a303c;color:#e9e0e7}
  .pill.ok{background:#29443e;color:#c9e5dd}
  .pill.warn{background:#4b3d24;color:#efd497}
  .pill.danger{background:#4b2e33;color:#f2b5b5}
  .pill.wait{background:#393351;color:#d8cff3}
  .impact-review{background:#3d3424}
  .briefing-status{background:#4b3d24}
  .briefing-status.ok{background:#29443e}
  .briefing-status.danger{background:#4b2e33}
  .briefing-status.wait{background:#393351}
  .system-warning{background:#4b2e33;color:#ffd4d4;border-color:#69434a}
  .connection-status{background:#4b3d24;color:#f0d79f;border-color:#66583f}
  #toast{background:#f7f0e9;color:#26192d}
}
