body.owner { font-size: 1.08rem; background: radial-gradient(ellipse at 70% -10%, rgba(92, 10, 12, 0.22), transparent 55%), var(--void); min-height: 100vh; }

/* Connexion */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.login[hidden] { display: none; }
.login-card {
  width: min(400px, 100%); text-align: center; padding: 2rem 2rem 2.4rem;
  border: 1px solid var(--line-strong); background: linear-gradient(180deg, rgba(23, 22, 21, 0.9), rgba(8, 8, 8, 0.95));
}
.login-card img { width: 180px; height: 180px; margin: 0 auto 0.6rem; -webkit-mask-image: radial-gradient(circle, #000 60%, transparent 71%); mask-image: radial-gradient(circle, #000 60%, transparent 71%); }
.login-card .field { text-align: left; margin-top: 1.2rem; }
.login-card .btn { width: 100%; margin-top: 0.4rem; }
.login-card .back { display: inline-block; margin-top: 1.4rem; color: var(--stone-400); text-decoration: none; font-style: italic; }
.login-card .back:hover { color: var(--bone); }

/* Structure */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.app[hidden] { display: none; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.6rem;
  padding: 1.4rem 1rem; border-right: 1px solid var(--line); background: rgba(10, 9, 9, 0.85);
}
.side-brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; padding: 0 0.4rem; }
.side-brand img { width: 52px; height: 52px; border-radius: 50%; }
.side-brand span { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--bone-bright); }
.side-brand em { font-style: normal; font-family: var(--font-caps); font-size: 0.7rem; letter-spacing: 0.35em; color: var(--stone-400); }
.side-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.side-nav button {
  display: flex; align-items: center; gap: 0.85rem; padding: 0.75rem 0.9rem; border: 1px solid transparent; border-radius: var(--radius);
  background: none; cursor: pointer; text-align: left;
  font-family: var(--font-caps); font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone-300);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.side-nav button .rune { font-size: 1.1rem; width: 1.2rem; text-align: center; color: var(--stone-500); letter-spacing: 0; transition: color 0.2s; }
.side-nav button:hover { color: var(--bone-bright); background: rgba(217, 211, 200, 0.04); }
.side-nav button.is-active { color: var(--bone-bright); border-color: rgba(179, 20, 27, 0.5); background: linear-gradient(90deg, rgba(179, 20, 27, 0.2), transparent); }
.side-nav button.is-active .rune { color: var(--ember-hot); text-shadow: var(--glow); }
.badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ember); color: #fff; font-family: var(--font-caps); font-size: 0.7rem; letter-spacing: 0; display: grid; place-items: center; }
.badge:empty { display: none; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 0.5rem; }
.side-foot .btn { width: 100%; }

.main { padding: clamp(1rem, 3vw, 2.4rem); min-width: 0; }
.warn-bar { border: 1px solid rgba(201, 151, 58, 0.5); background: rgba(201, 151, 58, 0.09); padding: 0.7rem 1rem; margin-bottom: 1.4rem; color: #e7c27a; }
.warn-bar[hidden] { display: none; }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; color: var(--bone-bright); text-decoration: underline; text-underline-offset: 3px; }

.view-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.view-head h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.view-head .kicker { margin-bottom: 0.3rem; }
.view-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }

.panel { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(23, 22, 21, 0.7), rgba(10, 9, 9, 0.7)); padding: 1.3rem 1.4rem; }
.panel + .panel { margin-top: 1.2rem; }
.panel-title { font-family: var(--font-caps); font-size: 0.78rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--stone-300); margin: 0 0 1rem; display: flex; align-items: center; gap: 0.6rem; justify-content: space-between; font-weight: 600; }
.empty { color: var(--stone-500); font-style: italic; padding: 0.6rem 0; margin: 0; }

/* Tableau de bord */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.stat { border: 1px solid var(--line); padding: 1.2rem 1.3rem; background: var(--stone-900); position: relative; overflow: hidden; cursor: pointer; text-align: left; transition: border-color 0.2s; }
.stat:hover { border-color: rgba(179, 20, 27, 0.5); }
.stat strong { display: block; font-family: var(--font-display); font-size: 3.2rem; line-height: 1; color: var(--bone-bright); }
.stat span { font-family: var(--font-caps); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--stone-400); }
.stat .rune { position: absolute; right: 0.6rem; top: 0.1rem; font-size: 4.4rem; color: rgba(217, 211, 200, 0.05); }
.stat.hot strong { color: var(--ember-hot); text-shadow: var(--glow); }
.dash-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.2rem; align-items: start; }
.dash-grid .panel + .panel { margin-top: 0; }

/* Lignes de RDV */
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 110px 1fr auto; gap: 1rem; align-items: center; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row-when { font-family: var(--font-caps); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--stone-300); line-height: 1.3; }
.row-when b { display: block; font-size: 1.05rem; color: var(--bone-bright); }
.row-main strong { color: var(--bone-bright); font-weight: 600; font-size: 1.15rem; }
.row-main small { display: block; color: var(--stone-400); font-size: 0.98rem; }
.row-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }

.tag { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--font-caps); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; padding: 0.2rem 0.55rem; border: 1px solid currentColor; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.tag.pending { color: var(--warn); }
.tag.confirmed { color: var(--ember-hot); }
.tag.done { color: var(--ok); }
.tag.refused, .tag.cancelled { color: var(--stone-500); }
.tag.owner { color: var(--stone-400); }

.mini { min-height: 32px; padding: 0.3rem 0.8rem; font-size: 0.64rem; letter-spacing: 0.14em; }

/* Agenda */
.agenda { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.2rem; align-items: start; }
.month-head { display: flex; align-items: center; gap: 0.6rem; }
.month-head strong { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--bone-bright); text-transform: capitalize; min-width: 230px; text-align: center; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.month .dow { font-family: var(--font-caps); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone-500); padding: 0.5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.mday {
  min-height: 112px; padding: 0.4rem; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0;
  background: rgba(10, 9, 9, 0.6); cursor: pointer; display: flex; flex-direction: column; gap: 3px; text-align: left; min-width: 0;
  transition: background 0.15s;
}
.mday:hover { background: rgba(217, 211, 200, 0.05); }
.mday.out { opacity: 0.35; }
.mday.closed { background: repeating-linear-gradient(135deg, rgba(10, 9, 9, 0.6) 0 8px, rgba(23, 22, 21, 0.6) 8px 9px); }
.mday.blocked { background: repeating-linear-gradient(135deg, rgba(92, 10, 12, 0.25) 0 8px, rgba(10, 9, 9, 0.6) 8px 16px); }
.mday.sel { outline: 1px solid var(--ember-hot); outline-offset: -1px; box-shadow: inset 0 0 24px rgba(179, 20, 27, 0.25); }
.mday-num { font-family: var(--font-caps); font-size: 0.85rem; color: var(--stone-300); display: flex; justify-content: space-between; align-items: center; }
.mday.today .mday-num b { background: var(--ember); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; }
.mday-num small { font-size: 0.6rem; letter-spacing: 0.1em; color: var(--ember-hot); text-transform: uppercase; }
.chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.chip { font-size: 0.82rem; line-height: 1.25; padding: 2px 5px; border-left: 2px solid var(--ember-hot); background: rgba(179, 20, 27, 0.16); color: var(--bone-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.pending { border-color: var(--warn); background: rgba(201, 151, 58, 0.12); }
.chip.done { border-color: var(--ok); background: rgba(143, 163, 122, 0.12); }
.chip-more { font-size: 0.78rem; color: var(--stone-400); }
.legend { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: 0.8rem; color: var(--stone-400); font-size: 0.95rem; }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 0.4rem; vertical-align: -1px; border-left: 2px solid; }
.day-panel { position: sticky; top: 1rem; }
.day-panel h2 { font-family: var(--font-display); font-size: 2rem; font-weight: 600; margin: 0; color: var(--bone-bright); text-transform: capitalize; line-height: 1.05; }
.day-meta { color: var(--stone-400); margin: 0.3rem 0 1rem; font-style: italic; }
.day-tools { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.day-item { border: 1px solid var(--line); padding: 0.8rem 0.9rem; margin-bottom: 0.6rem; background: rgba(5, 5, 5, 0.5); }
.day-item header { display: flex; justify-content: space-between; gap: 0.5rem; align-items: center; }
.day-item header b { font-family: var(--font-caps); color: var(--bone-bright); letter-spacing: 0.05em; }
.day-item p { margin: 0.3rem 0; color: var(--stone-300); font-size: 1rem; }
.day-item .row-actions { justify-content: flex-start; margin-top: 0.5rem; }

/* Demandes */
.tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tabs button { font-family: var(--font-caps); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; padding: 0.5rem 0.95rem; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--stone-300); cursor: pointer; }
.tabs button[aria-selected=true] { color: var(--bone-bright); border-color: var(--ember); background: rgba(179, 20, 27, 0.16); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.card { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(23, 22, 21, 0.75), rgba(10, 9, 9, 0.75)); padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.6rem; }
.card.unread { border-color: rgba(179, 20, 27, 0.55); box-shadow: inset 3px 0 0 var(--ember-hot); }
.card-head { display: flex; justify-content: space-between; gap: 0.6rem; align-items: start; }
.card-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--bone-bright); line-height: 1.05; }
.card-head small { display: block; color: var(--stone-400); font-size: 0.95rem; }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.9rem; margin: 0; }
.card dt { font-family: var(--font-caps); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--stone-500); padding-top: 0.3rem; }
.card dd { margin: 0; color: var(--bone); overflow-wrap: anywhere; }
.card dd a { color: var(--bone-bright); }
.card .desc { white-space: pre-wrap; color: var(--stone-300); border-left: 2px solid var(--line-strong); padding-left: 0.8rem; margin: 0; }
.refs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.refs a { width: 78px; height: 78px; border: 1px solid var(--line-strong); display: block; overflow: hidden; }
.refs img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.refs a:hover img { transform: scale(1.08); }
.card-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: auto; padding-top: 0.6rem; border-top: 1px solid var(--line); }

/* Galerie */
.upload { display: grid; grid-template-columns: 220px 1fr; gap: 1.2rem; align-items: start; }
.upload-drop { aspect-ratio: 1; border: 1px dashed var(--line-strong); display: grid; place-items: center; text-align: center; cursor: pointer; padding: 1rem; color: var(--stone-400); position: relative; overflow: hidden; }
.upload-drop:hover, .upload-drop.is-over { border-color: var(--ember); background: rgba(179, 20, 27, 0.07); }
.upload-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upload-drop .rune { display: block; font-size: 2.4rem; color: var(--ember-hot); }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.gal-item { border: 1px solid var(--line); background: var(--stone-900); display: flex; flex-direction: column; }
.gal-item img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.gal-item .gal-body { padding: 0.7rem; display: flex; flex-direction: column; gap: 0.5rem; }
.gal-item input, .gal-item select { padding: 0.45rem 0.6rem; font-size: 0.98rem; }
.gal-item .row-actions { justify-content: space-between; }

/* Réglages */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; align-items: start; }
.settings-grid .panel + .panel { margin-top: 0; }
.settings-grid .span2 { grid-column: 1 / -1; }
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table td { padding: 0.35rem 0.4rem 0.35rem 0; border-bottom: 1px solid var(--line); }
.hours-table td:first-child { width: 120px; }
.hours-table input[type=time] { padding: 0.4rem 0.5rem; }
.hours-table label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.hours-table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ember); }
.service-row { display: grid; grid-template-columns: 1fr 150px 40px; gap: 0.5rem; margin-bottom: 0.5rem; align-items: start; }
.service-row textarea { grid-column: 1 / 3; min-height: 60px; }
.service-row + .service-row { border-top: 1px solid var(--line); padding-top: 0.6rem; }
.hint { color: var(--stone-500); font-style: italic; font-size: 0.95rem; margin: -0.6rem 0 1rem; }

/* Modale */
.modal { position: fixed; inset: 0; z-index: 300; background: rgba(3, 3, 3, 0.82); display: grid; place-items: center; padding: 1rem; backdrop-filter: blur(4px); }
.modal[hidden] { display: none; }
.modal-card { width: min(640px, 100%); max-height: 92vh; overflow: auto; border: 1px solid var(--line-strong); background: linear-gradient(180deg, #181716, #0b0a0a); padding: 1.4rem 1.6rem; animation: pop 0.25s ease-out; }
.modal-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.modal-card h2 { margin: 0; font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; color: var(--bone-bright); }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.6rem; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } }

/* Notifications */
.toasts { position: fixed; bottom: 1.2rem; right: 1.2rem; z-index: 400; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { padding: 0.8rem 1.1rem; border: 1px solid var(--line-strong); border-left: 3px solid var(--ok); background: #121110; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); animation: pop 0.25s ease-out; max-width: 360px; }
.toast.err { border-left-color: var(--ember-hot); }
.toast.warn { border-left-color: var(--warn); }

@media (max-width: 1180px) {
  .agenda { grid-template-columns: 1fr; }
  .day-panel { position: static; }
  .dash-grid, .settings-grid { grid-template-columns: 1fr; }
}
.artist-photo-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.artist-photo-row img, .artist-photo-empty { width: 96px; height: 120px; object-fit: cover; border: 1px solid var(--line-strong); filter: grayscale(1); }
.artist-photo-empty { display: grid; place-items: center; font-size: 2.4rem; color: var(--stone-500); }
.artist-photo-row label input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* Éléments mobiles (cachés sur ordinateur) */
.mtop { display: none; }
.side-nav .short { display: none; }
.fab {
  display: none; position: fixed; right: 1rem; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 35;
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #d01e22, #7e0d11); color: #fff; font-size: 2.1rem; line-height: 1;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65), 0 0 22px rgba(255, 59, 47, 0.35);
}
.fab:active { transform: scale(0.94); }

/* Confirmation intégrée */
.modal.dialog { z-index: 350; }
.dialog-card { width: min(420px, 100%); }
.dialog-card h2 { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; margin: 0 0 0.4rem; color: var(--bone-bright); }
.dialog-card p { color: var(--stone-300); margin: 0 0 1rem; }
#dialogInput { margin-bottom: 0.8rem; }

/* Sélecteur Liste / Mois */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; padding: 0.45rem 1.1rem; border-radius: 999px; cursor: pointer; font-family: var(--font-caps); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--stone-300); }
.seg button[aria-selected=true] { background: rgba(179, 20, 27, 0.25); color: var(--bone-bright); box-shadow: inset 0 0 0 1px var(--ember); }

/* Agenda en liste */
.alist { display: flex; flex-direction: column; gap: 1rem; max-width: 860px; }
.aday { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(23, 22, 21, 0.8), rgba(10, 9, 9, 0.8)); }
.aday.is-today { border-color: rgba(179, 20, 27, 0.6); box-shadow: 0 0 24px rgba(179, 20, 27, 0.12); }
.aday.is-blocked { background: repeating-linear-gradient(135deg, rgba(92, 10, 12, 0.2) 0 8px, rgba(10, 9, 9, 0.75) 8px 16px); }
.aday-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); }
.aday-head strong { display: block; font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1.05; color: var(--bone-bright); }
.aday-head strong::first-letter { text-transform: uppercase; }
.aday-head small { color: var(--stone-400); font-style: italic; font-size: 0.95rem; }
.aday.is-today .aday-head strong { color: var(--ember-hot); text-shadow: var(--glow); }
.aday .empty { padding: 0.7rem 0.9rem; }
.alist-items { display: flex; flex-direction: column; }
.aitem {
  display: grid; grid-template-columns: 58px 1fr auto; gap: 0.8rem; align-items: center; width: 100%; text-align: left;
  padding: 0.8rem 0.9rem; background: none; border: 0; border-bottom: 1px solid var(--line); border-left: 3px solid var(--ember-hot);
  color: inherit; cursor: pointer; transition: background 0.15s;
}
.aitem:last-child { border-bottom: 0; }
.aitem:hover, .aitem:active { background: rgba(217, 211, 200, 0.05); }
.aitem.pending { border-left-color: var(--warn); }
.aitem.done { border-left-color: var(--ok); opacity: 0.75; }
.aitem-time { font-family: var(--font-caps); font-size: 1rem; line-height: 1.2; color: var(--bone-bright); }
.aitem-time small { display: block; font-size: 0.72rem; color: var(--stone-500); }
.aitem-main { min-width: 0; }
.aitem-main strong { display: block; font-weight: 600; font-size: 1.12rem; color: var(--bone-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aitem-main small { display: block; color: var(--stone-400); font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alist-foot { margin: 0.2rem 0 0; }
.today-panel { margin-bottom: 1.2rem; border-color: rgba(179, 20, 27, 0.45); }
.today-panel + .stats { margin-top: 0; }
.row-main { cursor: pointer; }

/* Fiche rendez-vous */
.desc { white-space: pre-wrap; color: var(--stone-300); border-left: 2px solid var(--line-strong); padding-left: 0.8rem; margin: 0; }
.sheet-status { margin: 0 0 0.9rem; color: var(--stone-400); font-style: italic; }
.sheet-dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 0 0 1rem; }
.sheet-dl dt { font-family: var(--font-caps); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--stone-500); padding-top: 0.35rem; }
.sheet-dl dd { margin: 0; color: var(--bone); overflow-wrap: anywhere; }
.sheet .desc { margin-bottom: 1rem; }
.sheet .desc.note { font-style: italic; border-left-color: var(--warn); }
.sheet .refs { margin-bottom: 1rem; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.9rem; margin-top: 0.4rem; border-top: 1px solid var(--line); }
.sheet-actions.contact:empty { display: none; }

@keyframes sheet { from { transform: translateY(60px); opacity: 0; } }

@media (max-width: 860px) {
  body.owner { font-size: 1.04rem; }
  body.modal-open { overflow: hidden; }
  .app { grid-template-columns: 1fr; padding-bottom: calc(66px + env(safe-area-inset-bottom)); }

  .mtop {
    display: flex; align-items: center; gap: 0.7rem; position: sticky; top: 0; z-index: 30;
    padding: calc(0.5rem + env(safe-area-inset-top)) 1rem 0.5rem;
    background: rgba(6, 6, 6, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .mtop img { width: 36px; height: 36px; border-radius: 50%; }
  .mtop strong { flex: 1; font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--bone-bright); line-height: 1; }
  .mtop-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: none; color: var(--stone-300); cursor: pointer; }
  .mtop-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

  .side {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 40;
    padding: 0 0 env(safe-area-inset-bottom); flex-direction: row; gap: 0;
    background: rgba(8, 8, 8, 0.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-right: 0; border-top: 1px solid var(--line);
  }
  .side-brand, .side-foot { display: none; }
  .side-nav { flex-direction: row; width: 100%; gap: 0; }
  .side-nav button {
    flex: 1; min-width: 0; flex-direction: column; justify-content: center; gap: 0.15rem; min-height: 62px; padding: 0.5rem 0.1rem;
    border: 0; border-radius: 0; position: relative; text-align: center; font-size: 0.54rem; letter-spacing: 0.08em;
  }
  .side-nav button .lbl { display: none; }
  .side-nav button .short { display: block; }
  .side-nav button .rune { font-size: 1.4rem; width: auto; }
  .side-nav button.is-active { background: none; border: 0; }
  .side-nav button.is-active::before { content: ''; position: absolute; top: 0; left: 24%; right: 24%; height: 2px; background: var(--ember-hot); box-shadow: var(--glow); }
  .side-nav .badge { position: absolute; top: 5px; left: calc(50% + 7px); margin: 0; min-width: 18px; height: 18px; font-size: 0.6rem; }

  .main { padding: 1rem 1rem 1.6rem; }
  .warn-bar { font-size: 0.95rem; padding: 0.6rem 0.8rem; margin-bottom: 1rem; }
  .view-head { margin-bottom: 1rem; }
  .view-head > div:first-child { display: none; }
  .view-head:not(:has(.view-actions > :not(.desk))) { display: none; }
  .view-actions { width: 100%; }
  .view-actions .desk { display: none; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -1rem; padding: 0 1rem 2px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { white-space: nowrap; padding: 0.6rem 1rem; }
  .seg { flex: 1; }
  .seg button { flex: 1; padding: 0.55rem 0.6rem; }

  .mini { min-height: 40px; padding: 0.4rem 0.9rem; font-size: 0.66rem; }
  .panel { padding: 1rem; }
  .panel-title { font-size: 0.72rem; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; margin-bottom: 1rem; }
  .stat { padding: 0.8rem 0.9rem; }
  .stat strong { font-size: 2.3rem; }
  .stat span { font-size: 0.6rem; letter-spacing: 0.14em; }
  .stat .rune { font-size: 3rem; }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }

  .row { grid-template-columns: 74px 1fr; gap: 0.3rem 0.8rem; }
  .row-actions { grid-column: 1 / -1; justify-content: flex-start; }

  .cards { grid-template-columns: 1fr; }
  .card { padding: 1rem; }
  .card-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
  .card-actions .btn { width: 100%; padding-inline: 0.3rem; }
  .sheet-actions { display: grid; grid-template-columns: repeat(2, 1fr); }
  .sheet-actions .btn { width: 100%; }

  .agenda { grid-template-columns: 1fr; }
  .agenda .panel-title { flex-wrap: wrap; }
  .month-head { flex: 1; justify-content: space-between; }
  .month-head strong { min-width: 0; font-size: 1.35rem; white-space: nowrap; }
  .month-head .icon-btn { width: 44px; height: 44px; }
  .agenda .panel-title > .btn { width: 100%; }
  .mday { min-height: 54px; padding: 0.3rem; }
  .mday-num { font-size: 0.8rem; }
  .mday-num small, .chip-more { display: none; }
  .mday.today .mday-num b { width: 22px; height: 22px; }
  .chips { flex-direction: row; flex-wrap: wrap; margin-top: 2px; }
  .chip { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; font-size: 0; background: var(--ember-hot); }
  .chip.pending { background: var(--warn); }
  .chip.done { background: var(--ok); }
  .day-panel { position: static; scroll-margin-top: 70px; }
  .legend { gap: 0.4rem 1rem; font-size: 0.9rem; }

  .upload { grid-template-columns: 1fr; }
  .upload-drop { max-width: none; aspect-ratio: 16 / 10; }
  .gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .gal-item .row-actions { flex-wrap: wrap; gap: 0.4rem; }
  .gal-item .row-actions .btn { width: 100%; }

  .hours-table td:first-child { width: auto; }
  .hours-table input[type=time] { padding: 0.45rem 0.3rem; font-size: 1rem; }
  .service-row { grid-template-columns: 1fr 44px; }
  .service-row [name=sname] { grid-column: 1; grid-row: 1; }
  .service-row .icon-btn { grid-column: 2; grid-row: 1; width: 44px; height: 44px; }
  .service-row [name=sprice], .service-row textarea { grid-column: 1 / -1; }

  .modal { padding: 0; place-items: end stretch; }
  .modal-card {
    width: 100%; max-height: 92vh; border-bottom: 0; border-radius: 16px 16px 0 0;
    padding: 0 1rem calc(1rem + env(safe-area-inset-bottom)); animation: sheet 0.28s ease-out;
  }
  .modal-card header {
    position: sticky; top: 0; z-index: 2; margin: 0 -1rem 1rem; padding: 1.1rem 1rem 0.7rem;
    background: #171615; border-bottom: 1px solid var(--line);
  }
  .modal-card header::before { content: ''; position: absolute; top: 6px; left: 50%; width: 42px; height: 4px; margin-left: -21px; border-radius: 2px; background: var(--stone-700); }
  .modal-card h2 { font-size: 1.8rem; }
  .modal .field-row > .field { flex-basis: 140px; }
  .modal-actions {
    position: sticky; bottom: calc(-1rem - env(safe-area-inset-bottom)); z-index: 2; margin: 0 -1rem;
    padding: 0.8rem 1rem calc(0.8rem + env(safe-area-inset-bottom));
    background: #0d0c0c; border-top: 1px solid var(--line);
  }
  .modal-actions .btn { flex: 1; }
  .modal.dialog { place-items: center; padding: 1rem; }
  .modal.dialog .modal-card { border-radius: 6px; border-bottom: 1px solid var(--line-strong); padding: 1.3rem; animation: pop 0.2s ease-out; }
  .modal.dialog .modal-actions { position: static; margin: 0; padding: 0; background: none; border: 0; }

  .toasts { left: 1rem; right: 1rem; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
  .fab { display: grid; place-items: center; }
}
