:root {
  --cream: #F7F1EA;
  --cream-deep: #EFE4D8;
  --blush: #E8C4C0;
  --blush-deep: #D9A8A4;
  --sage: #B7C4B2;
  --sage-deep: #8FA38A;
  --ink: #2C2622;
  --ink-soft: #5C534C;
  --ink-mute: #8A7F76;
  --paper: rgba(255, 252, 248, 0.82);
  --paper-solid: #FFFCF8;
  --line: rgba(44, 38, 34, 0.08);
  --line-strong: rgba(44, 38, 34, 0.14);
  --shadow: 0 24px 60px rgba(74, 48, 42, 0.08);
  --shadow-soft: 0 10px 30px rgba(74, 48, 42, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar: 248px;
  --font-serif: "Cormorant Garamond", "Noto Serif TC", Georgia, serif;
  --font-sans: "Noto Sans TC", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(232,196,192,.4), transparent 55%),
    radial-gradient(900px 500px at 95% 5%, rgba(183,196,178,.32), transparent 50%),
    linear-gradient(180deg, #FBF6F0 0%, var(--cream) 45%, #F3EAE1 100%);
  font-family: var(--font-sans); font-weight: 400; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }
i.req { font-style: normal; color: var(--blush-deep); }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }

.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .4; animation: drift 18s ease-in-out infinite alternate; }
.blob-a { width: 300px; height: 300px; background: #f0cfc9; top: 6%; left: -5%; }
.blob-b { width: 260px; height: 260px; background: #c9d5c4; top: 50%; right: -6%; animation-delay: -6s; }
.blob-c { width: 200px; height: 200px; background: #f2e0c8; bottom: 8%; left: 35%; animation-delay: -12s; }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(20px,-14px,0) scale(1.06); } }

.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }

/* Sidebar */
.sidebar {
  position: sticky; top: 0; height: 100vh;
  padding: 22px 16px 18px;
  display: flex; flex-direction: column; gap: 18px;
  background: rgba(255,252,248,.72); backdrop-filter: blur(16px);
  border-right: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 11px; padding: 4px 6px; transition: opacity .2s; }
.brand:hover { opacity: .78; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px rgba(255,255,255,.7), var(--shadow-soft); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 500; }
.brand-text em { font-family: var(--font-serif); font-size: .72rem; color: var(--ink-mute); }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 14px;
  color: var(--ink-soft); font-size: .92rem; font-weight: 500;
  transition: background .2s, color .2s;
  text-align: left; width: 100%;
}
.nav-item:hover { background: rgba(232,196,192,.22); color: var(--ink); }
.nav-item[aria-current="page"] {
  background: linear-gradient(135deg, rgba(232,196,192,.45), rgba(183,196,178,.35));
  color: var(--ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.nav-ico { width: 1.2em; text-align: center; opacity: .7; font-size: .95rem; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--blush-deep); color: #fff;
  font-size: .7rem; font-weight: 600; display: grid; place-items: center;
}

.sidebar-foot { position: relative; padding-top: 8px; border-top: 1px solid var(--line); }
.ghost-link { color: var(--ink-mute); font-size: 1.1rem; letter-spacing: .15em; padding: 6px 8px; border-radius: 8px; }
.ghost-link:hover { background: var(--cream-deep); }
.more-menu {
  position: absolute; bottom: 48px; left: 0; right: 0;
  background: var(--paper-solid); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; z-index: 5;
}
.more-menu button {
  width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px;
  font-size: .86rem; color: var(--ink-soft);
}
.more-menu button:hover { background: var(--cream); }
.side-meta { margin-top: 8px; font-size: .72rem; color: var(--ink-mute); padding: 0 8px; }

/* Main */
.main-wrap { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 28px 8px; position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, rgba(251,246,240,.92), rgba(251,246,240,.7) 70%, transparent);
  backdrop-filter: blur(8px);
}
.topbar-title { flex: 1; min-width: 0; }
.eyebrow {
  margin: 0 0 2px; font-family: var(--font-serif);
  font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute);
}
.topbar h1 {
  margin: 0; font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 500; letter-spacing: .01em;
}
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--paper); border: 1px solid var(--line); display: none;
}
.mobile-only { display: none; }

.content { padding: 8px 28px 40px; flex: 1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; font-weight: 500; font-size: .9rem;
  transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
  border: 1px solid transparent;
}
.btn:active { transform: scale(.98); }
.btn.sm { padding: 8px 14px; font-size: .82rem; }
.btn.primary {
  background: linear-gradient(135deg, #C98B84, #B47A74);
  color: #fff; box-shadow: 0 8px 22px rgba(180,122,116,.28);
}
.btn.primary:hover { box-shadow: 0 10px 26px rgba(180,122,116,.36); }
.btn.soft { background: var(--paper); border-color: var(--line); color: var(--ink-soft); }
.btn.soft:hover { background: #fff; }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-soft); }
.btn.sage { background: linear-gradient(135deg, #A8BCA2, #8FA38A); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* Cards / panels */
.grid-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-soft);
}
.stat-card .label { font-size: .78rem; color: var(--ink-mute); letter-spacing: .04em; }
.stat-card .value { font-family: var(--font-serif); font-size: 2rem; font-weight: 500; margin-top: 4px; line-height: 1.1; }
.stat-card .sub { font-size: .78rem; color: var(--ink-soft); margin-top: 6px; }
.stat-card.warn .value { color: #B47A74; }
.stat-card.ok .value { color: var(--sage-deep); }

.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow-soft); margin-bottom: 16px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2, .section-title {
  margin: 0; font-family: var(--font-serif); font-size: 1.35rem; font-weight: 500;
}
.panel-head .hint, .hint { font-size: .82rem; color: var(--ink-mute); font-weight: 300; }

.dash-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px; border-radius: 12px; border: 1px solid transparent;
  transition: background .15s, border-color .15s; cursor: pointer; text-align: left; width: 100%;
}
.list-row:hover { background: rgba(255,255,255,.7); border-color: var(--line); }
.list-row .meta { flex: 1; min-width: 0; }
.list-row .meta strong { display: block; font-weight: 500; font-size: .92rem; }
.list-row .meta span { font-size: .78rem; color: var(--ink-mute); }
.pill {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 500; background: var(--cream-deep); color: var(--ink-soft);
  white-space: nowrap;
}
.pill.stage-inquiry { background: #F4E0DC; }
.pill.stage-quote { background: #F0E0D0; }
.pill.stage-making { background: #E4E0F0; }
.pill.stage-delivery { background: #DCE6D8; }
.pill.stage-done { background: #D0DCC8; }
.pill.alert { background: #F4D5D0; color: #8A4A44; }
.pill.ok { background: #D8E4D4; color: #3E5A3A; }

.empty {
  text-align: center; padding: 28px 16px; color: var(--ink-mute); font-size: .9rem;
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
}

/* Kanban */
.kanban {
  display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr));
  gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start;
}
.kanban-col {
  background: rgba(255,252,248,.55); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; min-height: 280px;
}
.kanban-col h3 {
  margin: 0 0 12px; font-size: .82rem; font-weight: 600; letter-spacing: .06em;
  color: var(--ink-soft); display: flex; align-items: center; justify-content: space-between;
}
.kanban-col h3 b { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 500; color: var(--ink); }
.order-card {
  background: var(--paper-solid); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow-soft);
  cursor: pointer; transition: transform .15s, box-shadow .2s; text-align: left; width: 100%;
}
.order-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.order-card .code { font-size: .72rem; color: var(--ink-mute); letter-spacing: .04em; }
.order-card .name { font-weight: 500; margin: 4px 0 6px; }
.order-card .flowers { font-size: .78rem; color: var(--ink-soft); }
.order-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 8px; }
.order-card .amt { font-family: var(--font-serif); font-size: 1rem; }

/* CRM */
.crm-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; min-height: 60vh; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 12px; margin-bottom: 12px;
}
.search-box input { flex: 1; border: 0; background: transparent; outline: none; }
.cust-list { max-height: calc(100vh - 200px); overflow: auto; }
.cust-item {
  width: 100%; text-align: left; padding: 12px; border-radius: 12px; margin-bottom: 4px;
  border: 1px solid transparent;
}
.cust-item:hover, .cust-item.active { background: rgba(255,255,255,.75); border-color: var(--line); }
.cust-item strong { display: block; font-weight: 500; }
.cust-item span { font-size: .78rem; color: var(--ink-mute); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--cream-deep); font-size: .7rem; margin-right: 4px; color: var(--ink-soft); }

.crm-detail .hero-line {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px;
}
.crm-detail h2 { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 500; margin: 0; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; color: var(--ink-soft); }
.field span { font-weight: 500; color: var(--ink-mute); font-size: .75rem; letter-spacing: .04em; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  background: rgba(255,255,255,.7); outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blush); box-shadow: 0 0 0 3px rgba(232,196,192,.35);
}
.field.full { grid-column: 1 / -1; }

.memo-list li, .pref-chips { margin-bottom: 8px; }
.memo-card {
  background: rgba(255,255,255,.65); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start;
}
.memo-card strong { display: block; font-weight: 500; }
.memo-card em { font-style: normal; font-size: .78rem; color: var(--ink-mute); }

/* Inquiry compose */
.inquiry-layout {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 22px; align-items: start;
}
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.55); font-size: .86rem; color: var(--ink-soft);
  transition: background .15s, border-color .15s, transform .1s;
}
.chip:hover { background: #fff; }
.chip[aria-pressed="true"] {
  background: linear-gradient(135deg, #F4E0DC, #E8D5C8);
  border-color: transparent; color: var(--ink); font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.chip.flower[aria-pressed="true"] {
  background: var(--chip-bg, linear-gradient(135deg, #F4E0DC, #E8D5C8));
}
.style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.style-card {
  text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,.55);
}
.style-card .name { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 500; margin: 0 0 4px; }
.style-card .desc { font-size: .78rem; color: var(--ink-mute); margin: 0; }
.style-card[aria-pressed="true"] { border-color: transparent; box-shadow: 0 0 0 2px rgba(180,122,116,.35); }
.style-card.bloom[aria-pressed="true"] { background: linear-gradient(145deg, #F8E8E4, #F0D8D2); }
.style-card.grace[aria-pressed="true"] { background: linear-gradient(145deg, #E8E4F2, #D8D4E8); }
.style-card.terra[aria-pressed="true"] { background: linear-gradient(145deg, #F2E4D4, #E8D4BE); }
.style-card.auto[aria-pressed="true"] { background: linear-gradient(145deg, #E4ECDD, #D4E0CE); }

.step {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #F4E4DF, #E8D5C8);
  font-family: var(--font-serif); font-size: .85rem; color: var(--ink-soft);
}
.panel-head.with-step { justify-content: flex-start; gap: 12px; }

.palette-strip { display: flex; gap: 6px; margin-top: 12px; height: 10px; }
.palette-strip span { flex: 1; border-radius: 999px; }

.stage-wrap .stage {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-soft); position: sticky; top: 88px;
}
.stage-kicker { font-family: var(--font-serif); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 4px; }
.stage h3 { margin: 0 0 12px; font-family: var(--font-serif); font-size: 1.25rem; font-weight: 500; }
.bouquet-frame {
  position: relative; aspect-ratio: 320 / 360;
  background: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.85), rgba(247,241,234,.4));
  border-radius: 16px; overflow: hidden;
}
.bouquet-frame svg { width: 100%; height: 100%; }
.empty-hint {
  position: absolute; inset: 0; display: grid; place-items: center;
  text-align: center; padding: 24px; font-size: .86rem; color: var(--ink-mute);
  pointer-events: none;
}
.empty-hint.hide { opacity: 0; }
.stage-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.stage-tags li { padding: 4px 10px; border-radius: 999px; background: var(--cream-deep); font-size: .75rem; color: var(--ink-soft); }

.card-preview { margin: 12px 0; }
.card-sheet {
  background: linear-gradient(160deg, #FFF9F4, #F7EDE4);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.card-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 8px; }
.card-body { font-family: var(--font-serif); font-size: 1.15rem; min-height: 2.4em; white-space: pre-wrap; }
.card-body.is-empty { color: var(--ink-mute); font-style: italic; }
.card-sign { margin-top: 10px; font-size: .78rem; color: var(--ink-mute); text-align: right; }
.char-count { font-size: .72rem; color: var(--ink-mute); text-align: right; display: block; margin-top: 4px; }
.form-status { font-size: .86rem; color: #B47A74; min-height: 1.2em; margin: 8px 0; }
.submit-btn {
  width: 100%; margin-top: 8px; padding: 14px 20px; border-radius: 999px;
  background: linear-gradient(135deg, #C98B84, #B47A74); color: #fff;
  font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 10px 28px rgba(180,122,116,.3);
}
.submit-btn:disabled { opacity: .45; }

/* Inventory */
.inv-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.inv-table th, .inv-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.inv-table th { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); font-weight: 500; }
.qty-ctrl { display: inline-flex; align-items: center; gap: 6px; }
.qty-ctrl button {
  width: 28px; height: 28px; border-radius: 8px; background: var(--cream-deep); color: var(--ink-soft);
}
.qty-ctrl button:hover { background: var(--blush); color: #fff; }
.qty-ctrl input { width: 52px; text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; }

/* Reminders */
.rem-card {
  background: var(--paper-solid); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow-soft);
}
.rem-card.due-today { border-color: rgba(180,122,116,.35); box-shadow: 0 0 0 3px rgba(232,196,192,.25); }
.rem-card .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.rem-card h3 { margin: 0; font-size: 1rem; font-weight: 500; }
.rem-card .msg {
  font-size: .88rem; color: var(--ink-soft); background: var(--cream);
  border-radius: 10px; padding: 10px 12px; margin: 10px 0; white-space: pre-wrap;
}
.rem-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Feedback */
.stars { display: inline-flex; gap: 4px; }
.stars button { font-size: 1.3rem; opacity: .35; transition: opacity .15s, transform .1s; }
.stars button.on, .stars button:hover { opacity: 1; transform: scale(1.08); }

/* Drawer */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(44,38,34,.28); z-index: 40; backdrop-filter: blur(2px);
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%);
  background: #FFFCF8; z-index: 50; box-shadow: -20px 0 60px rgba(74,48,42,.12);
  padding: 22px 22px calc(22px + var(--safe-b)); overflow: auto;
  animation: slideIn .25s ease;
}
@keyframes slideIn { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.drawer-head h2 { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 500; margin: 0; }
.close-btn { width: 36px; height: 36px; border-radius: 10px; background: var(--cream); color: var(--ink-soft); }

/* Toast */
.toast-wrap {
  position: fixed; bottom: calc(20px + var(--safe-b)); left: 50%; transform: translateX(-50%);
  z-index: 80; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: rgba(44,38,34,.92); color: #FFF8F2; padding: 12px 18px; border-radius: 999px;
  font-size: .86rem; box-shadow: var(--shadow); animation: toastIn .3s ease;
  pointer-events: auto; max-width: 90vw;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(44,38,34,.35); z-index: 70;
  display: grid; place-items: center; padding: 20px; backdrop-filter: blur(3px);
}
.modal {
  width: min(420px, 100%); background: #FFFCF8; border-radius: 20px;
  padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.modal h3 { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 500; margin: 0 0 10px; }
.modal p { color: var(--ink-soft); font-size: .9rem; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

.timeline { border-left: 2px solid var(--cream-deep); margin: 12px 0 12px 8px; padding-left: 14px; }
.timeline li { margin-bottom: 10px; font-size: .86rem; color: var(--ink-soft); }
.timeline li strong { color: var(--ink); }

.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.result-mini {
  background: linear-gradient(160deg, #FFF9F4, #F3EAE1); border-radius: 14px;
  padding: 14px; border: 1px solid var(--line); margin-top: 12px;
}
.result-mini p { font-family: var(--font-serif); font-size: 1.05rem; }

@media (max-width: 1100px) {
  .grid-stats { grid-template-columns: 1fr 1fr; }
  .dash-grid, .crm-layout, .inquiry-layout, .split-2 { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(5, minmax(180px, 1fr)); }
  .stage-wrap .stage { position: static; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); z-index: 60;
    transform: translateX(-105%); transition: transform .25s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: none; }
  .mobile-only { display: grid; place-items: center; }
  .content { padding: 8px 16px 32px; }
  .topbar { padding: 14px 16px 6px; }
  .field-grid { grid-template-columns: 1fr; }
}
