:root {
  color-scheme: light;
  --bg: #f6f5f2;
  --panel: #ffffff;
  --ink: #1f2328;
  --muted: #6b7078;
  --line: #e7e4de;
  --soft: #f1efea;
  --accent: #e8742a;
  --accent-ink: #b9561a;
  --accent-soft: #fdf0e6;
  --good: #3f8f5a;
  --bad: #d14343;
  --gold: #f2b84b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 20, 20, .05), 0 6px 24px rgba(20, 20, 20, .05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  margin: 0;
  color: var(--ink);
  font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 20px; font-weight: 650; }
h2 { font-size: 15px; font-weight: 650; }
.muted { color: var(--muted); margin: 2px 0 0; }
.small { font-size: 12px; }

/* Structure : barre latérale + contenu */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; width: 100%; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: #efede8; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 16px; padding: 14px 10px 14px;
}
.sb-top { display: flex; flex-direction: column; gap: 10px; padding: 2px 6px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.logo { width: 22px; height: 22px; }
.tag { font-size: 11px; font-weight: 500; color: var(--muted); border: 1px solid #dcd8d0; border-radius: 99px; padding: 1px 7px; }
.wallet { display: flex; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 99px;
  padding: 3px 10px 3px 6px; font-weight: 650; font-variant-numeric: tabular-nums; font-size: 13px;
}
.pill svg { width: 18px; height: 18px; }
.pill.pulse { animation: pulse .5s ease; }
@keyframes pulse { 40% { transform: scale(1.12); border-color: var(--gold); } }
.sb-nav { display: flex; flex-direction: column; gap: 14px; }
.sb-group { display: flex; flex-direction: column; gap: 1px; }
.sb-label { font-size: 11.5px; font-weight: 600; color: #8f8b83; padding: 0 10px 4px; }
.sb-item {
  display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 9px;
  border: 0; background: none; border-radius: 8px; padding: 6px 10px; text-align: left; color: #4a4e55; font-weight: 500;
}
.sb-item:hover { background: rgba(0, 0, 0, .045); color: var(--ink); }
.sb-item.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.07); }
.sb-item svg { width: 20px; height: 20px; }
.sb-item .count { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
.sb-item .count.hot { color: #fff; background: var(--accent); border-radius: 99px; padding: 0 6px; font-weight: 600; }
.sb-sub { display: flex; flex-direction: column; gap: 1px; margin: 1px 0 2px 19px; padding-left: 8px; border-left: 1px solid #dcd8d0; }
.sb-sub .sb-item { padding: 4px 8px; font-size: 13px; grid-template-columns: 1fr auto; }
.sb-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 0 2px; }
.me-card {
  display: grid; grid-template-columns: 34px 1fr; gap: 9px; align-items: center; text-align: left;
  border: 1px solid var(--line); background: var(--panel); border-radius: 11px; padding: 7px 9px;
}
.me-card:hover { border-color: #d5d0c7; }
.me-card .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(180deg, #e6f0f5, #f5f2ea); display: grid; place-items: center; }
.me-card .av svg { width: 30px; height: 30px; overflow: visible; }
.me-card b { display: block; font-size: 13px; }
.me-card span { display: block; font-size: 11.5px; color: var(--muted); }
.sb-foot .link { align-self: flex-start; padding-left: 8px; }

main { min-width: 0; width: 100%; max-width: 1320px; padding: 22px 24px; display: flex; flex-direction: column; }
.view { flex: 1; }
.view { display: none; }
.view.on { display: block; }

/* Cartes */
.card, .stage-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card { padding: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }

.btn {
  border: 1px solid var(--line); background: var(--panel);
  border-radius: 9px; padding: 7px 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #33383f; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.link { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.link:hover { color: var(--ink); }

/* Icônes sticker */
svg.i3d { overflow: visible; filter: drop-shadow(0 1px 1.1px rgba(70, 45, 20, .28)); }
.i3d-base > * { fill: #fff; stroke: #fff; stroke-width: 3.4; stroke-linejoin: round; }

/* Chambre */
.room-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.stage-card { overflow: hidden; }
.stage-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 0; min-height: 58px; }
.stage {
  position: relative;
  background: linear-gradient(180deg, #d7e9f3 0%, #eef5f8 70%, #f6f8f6 100%);
  margin: 12px; border-radius: 12px;
  display: flex; justify-content: center; align-items: center;
  min-height: 380px; overflow: hidden;
  touch-action: manipulation;
}
.stage svg.room { width: 100%; max-width: 720px; height: auto; max-height: 64vh; display: block; }
.stage.placing svg.room { cursor: crosshair; }
.room .obj { cursor: pointer; }
.room .obj.sel { filter: drop-shadow(0 0 2px var(--accent)) drop-shadow(0 0 2px var(--accent)); }
.stage.placing .obj, .stage.placing .mascot-g { pointer-events: none; }
.room.readonly .obj { cursor: default; }
.mascot-g { cursor: pointer; }
.cloud { position: absolute; width: 90px; height: 30px; background: #fff; border-radius: 30px; opacity: .8; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 40px; height: 40px; top: -18px; left: 14px; }
.cloud::after { width: 30px; height: 30px; top: -12px; left: 44px; }
.cloud.a { top: 26px; left: 8%; animation: drift 40s linear infinite; }
.cloud.b { top: 60px; right: 10%; transform: scale(.7); animation: drift 55s linear infinite reverse; }
@keyframes drift { 50% { translate: 40px 0; } }

.sel-bar { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tray { border-top: 1px solid var(--line); padding: 12px 18px 16px; }
.tray-head { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; margin-bottom: 8px; flex-wrap: wrap; }
.tray-head .muted { font-weight: 400; font-size: 12.5px; margin: 0; }
.inv { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; min-height: 20px; }
.inv-item {
  flex: 0 0 auto; width: 84px; border: 1px solid var(--line); background: var(--soft);
  border-radius: 10px; padding: 6px 4px 5px; text-align: center; position: relative;
}
.inv-item:hover { border-color: #cfcac1; background: #ece9e3; }
.inv-item.on { border-color: var(--accent); background: var(--accent-soft); }
.inv-item svg { width: 60px; height: 46px; display: block; margin: 0 auto; }
.inv-item span { display: block; font-size: 11px; line-height: 1.2; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-item b { position: absolute; top: 4px; right: 6px; font-size: 11px; color: var(--muted); }
.inv-empty { color: var(--muted); font-size: 13px; padding: 6px 0; }

/* Panneau latéral */
.side { display: flex; flex-direction: column; gap: 16px; }
.pet { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.pet-avatar { width: 96px; height: 96px; border-radius: 50%; background: linear-gradient(180deg, #e6f0f5, #f5f2ea); display: grid; place-items: center; }
.pet-avatar svg { width: 84px; height: 84px; overflow: visible; }
.pet h2 { display: flex; align-items: center; gap: 6px; }
.bubble { background: var(--soft); border-radius: 10px 10px 10px 3px; padding: 7px 10px; margin: 6px 0 8px; font-size: 13px; }
.mood { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.mood-bar { flex: 1; height: 6px; background: var(--soft); border-radius: 9px; overflow: hidden; }
.mood-bar i { display: block; height: 100%; border-radius: 9px; transition: width .6s ease; }

.cap { height: 4px; background: var(--soft); border-radius: 9px; overflow: hidden; margin: 8px 0 12px; }
.cap-bar { height: 100%; background: var(--gold); border-radius: 9px; transition: width .5s ease; }
.task-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.task-form input {
  grid-column: 1; grid-row: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font: inherit; background: var(--panel);
}
.task-form > .btn { grid-column: 2; grid-row: 1; }
.task-form .sizes { grid-column: 1 / -1; grid-row: 2; }
.task-form .sizes button { flex: 1; justify-content: center; }
.task-form input:focus { outline: 2px solid #f6c9a8; border-color: var(--accent); }
.sizes { display: flex; gap: 4px; background: var(--soft); border-radius: 9px; padding: 3px; }
.sizes button { border: 0; background: none; border-radius: 7px; padding: 4px 8px; font-size: 12.5px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.sizes button svg { width: 12px; height: 12px; }
.sizes button.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.task-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.task {
  display: grid; grid-template-columns: 22px 1fr auto auto; gap: 10px; align-items: center;
  padding: 8px 6px; border-radius: 9px;
}
.task:hover { background: var(--soft); }
.check {
  width: 20px; height: 20px; border-radius: 50%; border: 1.6px solid #c9c4bb; background: var(--panel);
  display: grid; place-items: center; padding: 0;
}
.check:hover { border-color: var(--good); }
.check svg { width: 12px; height: 12px; opacity: 0; }
.task.is-done .check { background: var(--good); border-color: var(--good); }
.task.is-done .check svg { opacity: 1; }
.task.is-done .t-title { color: var(--muted); text-decoration: line-through; }
.t-title { overflow-wrap: anywhere; }
.reward { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: #a87a1c; font-variant-numeric: tabular-nums; }
.reward svg { width: 12px; height: 12px; }
.del { border: 0; background: none; color: #b5b0a7; padding: 2px; border-radius: 6px; display: grid; place-items: center; }
.del:hover { color: var(--bad); background: #fbeaea; }
.del svg { width: 14px; height: 14px; }
.task.pop { animation: pop .45s ease; }
@keyframes pop { 30% { transform: scale(1.03); background: #eaf5ee; } }
.done-wrap { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.done-wrap summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 4px 6px; }
.note { font-size: 12px; color: var(--muted); margin: 12px 0 0; padding: 9px 11px; background: var(--soft); border-radius: 9px; }
.empty-tasks { color: var(--muted); font-size: 13px; padding: 10px 6px; }

/* Boutique */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.seg { display: flex; gap: 2px; background: var(--soft); padding: 3px; border-radius: 10px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 550; color: var(--muted); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.shop-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.shop-card .prev { background: linear-gradient(180deg, #e8f1f6, #f6f5f0); height: 140px; display: grid; place-items: center; }
.shop-card .prev svg { width: 78%; height: 120px; overflow: visible; }
.shop-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.shop-card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }
.shop-card h3 { font-size: 14px; font-weight: 600; }
.price { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; font-variant-numeric: tabular-nums; }
.price svg { width: 16px; height: 16px; }
.owned { font-size: 12px; color: var(--muted); }

/* Équipe */
.team-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.boards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.board h2 { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.board h2 svg { width: 20px; height: 20px; }
.board ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.board li { display: grid; grid-template-columns: 18px 26px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.board li.me { font-weight: 650; }
.board li .rank { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.board li .av svg { width: 26px; height: 26px; overflow: visible; }
.board .bar { height: 5px; border-radius: 9px; background: var(--soft); grid-column: 3 / 5; margin-top: -3px; overflow: hidden; }
.board .bar i { display: block; height: 100%; border-radius: 9px; }
.board .val { font-variant-numeric: tabular-nums; color: var(--muted); }
.mates { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.mate { padding: 0; overflow: hidden; text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); }
.mate:hover { border-color: #d5d0c7; transform: translateY(-1px); }
.mate { transition: transform .15s ease, border-color .15s ease; }
.mate .thumb { background: linear-gradient(180deg, #d7e9f3, #f1f5f4); height: 150px; display: grid; place-items: center; }
.mate .thumb svg { width: 92%; height: 140px; }
.mate .meta { padding: 10px 14px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mate .meta b { display: block; font-size: 14px; }
.mate .meta span { color: var(--muted); font-size: 12.5px; }
.stats { display: flex; gap: 10px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.stats span { display: inline-flex; align-items: center; gap: 3px; }
.stats svg { width: 13px; height: 13px; }
.visit-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.badge-empty { font-size: 11px; color: var(--muted); background: var(--soft); border-radius: 99px; padding: 1px 7px; }

/* Effets */
.float {
  position: absolute; pointer-events: none; font-weight: 700; color: #a87a1c;
  display: flex; align-items: center; gap: 4px; animation: floatUp 1.1s ease-out forwards; z-index: 5;
}
.float svg { width: 18px; height: 18px; }
@keyframes floatUp { from { opacity: 0; transform: translateY(6px); } 15% { opacity: 1; } to { opacity: 0; transform: translateY(-46px); } }
.heart { position: absolute; width: 22px; height: 22px; pointer-events: none; animation: heartUp 1.3s ease-out forwards; z-index: 5; }
@keyframes heartUp { from { opacity: 0; transform: translate(0, 0) scale(.6); } 20% { opacity: 1; } to { opacity: 0; transform: translate(var(--dx), -70px) scale(1.1); } }
.speech {
  position: absolute; background: #fff; border-radius: 10px; padding: 6px 10px; font-size: 12.5px; font-weight: 500;
  box-shadow: 0 4px 14px rgba(0,0,0,.1); pointer-events: none; transform: translate(-50%, -100%); white-space: nowrap;
  animation: speech 2.4s ease forwards; z-index: 6;
}
@keyframes speech { 0% { opacity: 0; margin-top: 6px; } 10%, 85% { opacity: 1; margin-top: 0; } 100% { opacity: 0; } }

.mascot-g .m-bob { animation: bob 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes bob { 50% { transform: scale(1.05, .95); } }
.eyes { animation: blink 5s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }

/* Modale et notifications */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(25, 25, 25, .35); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.sheet { background: var(--panel); border-radius: 16px; width: min(640px, 100%); max-height: 86vh; overflow: auto; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.x { border: 0; background: var(--soft); border-radius: 8px; width: 30px; height: 30px; display: grid; place-items: center; }
.x svg { width: 15px; height: 15px; }
.gift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.gift { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 8px; text-align: center; }
.gift:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.gift:disabled { opacity: .4; cursor: not-allowed; }
.gift svg.p { width: 90px; height: 64px; display: block; margin: 0 auto 4px; overflow: visible; }
.gift span { display: block; font-size: 12.5px; }
.onb-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 10px 0 14px; }
.onb-sp { border: 1.5px solid var(--line); background: var(--soft); border-radius: 12px; padding: 8px 4px; }
.onb-sp.on { border-color: var(--accent); background: var(--accent-soft); }
.onb-sp svg { width: 100%; height: 64px; overflow: visible; }
.onb-sp span { display: block; font-size: 12px; color: var(--muted); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); padding: 0; }
.sw.on { box-shadow: 0 0 0 2px var(--accent); }
.field { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font: inherit; margin: 6px 0 16px; }
.label { font-weight: 600; font-size: 13px; }

.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; border-radius: 11px; padding: 9px 14px; font-size: 13px; box-shadow: 0 8px 30px rgba(0,0,0,.18); display: flex; align-items: center; gap: 10px; animation: toastIn .25s ease; }
.toast button { background: rgba(255,255,255,.14); border: 0; color: #fff; border-radius: 7px; padding: 3px 9px; font-weight: 600; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

.foot { padding: 22px 0 4px; color: var(--muted); font-size: 12.5px; }

/* Tâches */
.tasks-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.stat { background: var(--soft); border-radius: 10px; padding: 10px; }
.stat b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 90px; margin-top: 14px; }
.week div { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; font-size: 11px; color: var(--muted); }
.week i { display: block; width: 100%; max-width: 26px; border-radius: 5px 5px 2px 2px; background: #cfe5d6; min-height: 3px; }
.week div.today i { background: var(--good); }
.hist { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.hist li { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.hist li span:first-child { overflow-wrap: anywhere; }
.hist .d { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* Notes */
.notes-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.notes-list { padding: 10px; position: sticky; top: 22px; max-height: calc(100vh - 140px); overflow: auto; }
.search { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font: inherit; background: var(--soft); margin-bottom: 8px; }
.search:focus { outline: 2px solid #f6c9a8; border-color: var(--accent); background: var(--panel); }
#note-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.n-item { width: 100%; border: 0; background: none; text-align: left; border-radius: 9px; padding: 8px 10px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.n-item:hover { background: var(--soft); }
.n-item.on { background: var(--accent-soft); }
.n-item b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-item .when { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.n-item .ex { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-item .pin { width: 12px; height: 12px; color: var(--accent); vertical-align: -1px; margin-right: 4px; }
.n-group { font-size: 11.5px; font-weight: 600; color: #8f8b83; padding: 8px 10px 3px; }
.note-editor { padding: 0; min-height: 60vh; display: flex; flex-direction: column; }
.ne-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ne-bar .muted { margin: 0 auto 0 0; font-size: 12px; }
.ne-title { border: 0; font: inherit; font-size: 24px; font-weight: 700; letter-spacing: -.01em; padding: 20px 26px 6px; outline: none; background: none; width: 100%; }
.ne-body { border: 0; font: inherit; font-size: 14.5px; line-height: 1.6; padding: 6px 26px 26px; outline: none; resize: none; flex: 1; min-height: 50vh; background: none; width: 100%; }
.ne-foot { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.ne-foot .reward-ok { color: var(--good); font-weight: 600; }
.icon-btn { border: 0; background: none; border-radius: 8px; width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.icon-btn.on { color: var(--accent); }
.icon-btn.danger:hover { color: var(--bad); background: #fbeaea; }
.icon-btn svg { width: 16px; height: 16px; }
.note-empty { margin: auto; text-align: center; color: var(--muted); padding: 40px; }
.note-empty svg { width: 64px; height: 64px; overflow: visible; display: block; margin: 0 auto 10px; }

@media (max-width: 1100px) {
  .room-layout, .tasks-layout { grid-template-columns: minmax(0, 1fr); }
  .boards { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: column; gap: 8px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); background: rgba(239, 237, 232, .94); backdrop-filter: blur(10px); }
  .sb-top { flex-direction: row; justify-content: space-between; align-items: center; padding: 0 4px; }
  .sb-nav { flex-direction: row; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .sb-group { flex-direction: row; gap: 2px; }
  .sb-label, .sb-sub, .sb-foot { display: none; }
  .sb-item { grid-template-columns: 16px auto auto; padding: 6px 10px; white-space: nowrap; }
  .sb-item svg { width: 16px; height: 16px; }
  .notes-layout { grid-template-columns: minmax(0, 1fr); }
  .notes-list { position: static; max-height: 260px; }
}
@media (max-width: 640px) {
  main { padding: 12px 16px; }
  .stage { min-height: 260px; margin: 10px; }
  .stage-head { flex-direction: column; }
  .sel-bar { justify-content: flex-start; }
  .onb-grid { grid-template-columns: repeat(3, 1fr); }
  .pet { grid-template-columns: 76px 1fr; }
  .pet-avatar { width: 76px; height: 76px; }
  .pet-avatar svg { width: 66px; height: 66px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
