/* BrainBox — styles */

:root {
  --font: "Segoe Print", "Chalkboard SE", "Bradley Hand", "Comic Sans MS", "Comic Neue", cursive;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --accent: #ffe08a;
  --bar-bg: rgba(22, 24, 23, 0.74);
  --bar-line: rgba(255, 255, 255, 0.08);
  --text: #ece9df;
  --f: 16px;
  --ledge: 12px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1c1e1c; }
body {
  position: fixed;
  inset: 0;
  font-family: var(--ui);
  color: var(--text);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }

/* ------------------------------------------------------------------ */
/* Mise en page                                                        */
/* ------------------------------------------------------------------ */

#app {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "top" "stage" "tools";
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(120% 90% at 50% 32%, #3b3f3b 0%, #2a2d2a 55%, #1a1c1a 100%);
}

#topbar {
  grid-area: top;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 4px;
  min-width: 0;
}
#stage {
  grid-area: stage;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  touch-action: none;
}
#toolbar {
  grid-area: tools;
  display: flex;
  justify-content: center;
  padding: 4px 10px 12px;
  min-width: 0;
}

/* Écran bas et large (téléphone couché) : barres sur les côtés */
.side #app {
  grid-template-rows: minmax(0, 1fr);
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "top stage tools";
}
.side #topbar { flex-direction: column; justify-content: space-between; padding: 8px 2px 8px 8px; }
.side #toolbar { flex-direction: column; justify-content: center; padding: 6px 8px 6px 2px; }
.side .bar, .side .group { flex-direction: column; }
.side .sep { width: 24px; height: 1px; margin: 3px 0; }
.side .btn.wide { width: 40px; padding: 0; }
.side .btn.wide .label { display: none; }
.side .tools-bar { max-height: 100%; overflow-y: auto; scrollbar-width: none; }

/* ------------------------------------------------------------------ */
/* Barres et boutons                                                   */
/* ------------------------------------------------------------------ */

.bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: var(--bar-bg);
  border: 1px solid var(--bar-line);
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  min-width: 0;
}
.group { display: flex; align-items: center; gap: 2px; }
.sep { width: 1px; height: 24px; background: rgba(255, 255, 255, 0.12); margin: 0 4px; flex: none; }

.btn {
  appearance: none;
  border: 0;
  background: transparent;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  touch-action: manipulation;
  flex: none;
  position: relative;
  font-size: 14px;
  white-space: nowrap;
  transition: background-color 0.15s, transform 0.1s, opacity 0.15s;
}
@media (hover: hover) { .btn:hover { background: rgba(255, 255, 255, 0.08); } }
.btn:active { transform: scale(0.93); }
.btn:disabled { opacity: 0.32; pointer-events: none; }
.btn:focus-visible, .menu-item:focus-visible, .seg-opt:focus-visible, .theme-opt:focus-visible, .day:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.btn.wide { width: auto; padding: 0 14px 0 11px; }
.btn.accent { background: rgba(255, 224, 138, 0.15); color: var(--accent); }
.btn.small { width: 36px; height: 36px; border-radius: 10px; }
.label { font-size: 14px; font-weight: 500; letter-spacing: 0.01em; }

.ico {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  pointer-events: none;
}
#moreBtn .ico { fill: currentColor; }

.tool.active { background: rgba(255, 255, 255, 0.15); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); color: #fff; }
.tool.active::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 14px;
  height: 2px;
  margin-left: -7px;
  border-radius: 2px;
  background: var(--accent);
}

/* Couleurs */
.colors { display: flex; gap: 0; }
.colors.wrap { flex-wrap: wrap; gap: 6px; padding: 0 2px 6px; }
.color {
  appearance: none;
  border: 0;
  background: transparent;
  width: 34px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  flex: none;
}
.colors.wrap .color { width: 44px; height: 44px; }
.color i, .swatch {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 55%),
    var(--c, #fff);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18), 0 0 0 1px var(--edge, transparent);
  transition: transform 0.15s, box-shadow 0.15s;
}
.colors.wrap .color i { width: 28px; height: 28px; }
.color.active i, .swatch { box-shadow: 0 0 0 2px #1d1f1e, 0 0 0 4px var(--ring, var(--c, #fff)); transform: scale(1.04); }
.color:active i { transform: scale(0.9); }

.size-dot {
  display: block;
  width: var(--d, 10px);
  height: var(--d, 10px);
  border-radius: 50%;
  background: var(--c, #fff);
  transition: width 0.15s, height 0.15s;
}
.size-dot.ring { background: transparent; box-shadow: inset 0 0 0 2px var(--text); }

/* Écrans étroits : couleurs regroupées */
#colorBtn { display: none; }
.compact #colors, .compact #sizeBtn { display: none; }
.compact #colorBtn { display: inline-flex; }
.compact .btn { width: 39px; height: 40px; }
.compact .btn.wide { width: auto; padding: 0 12px 0 9px; }
.compact .sep { margin: 0 2px; }
.compact #toolbar { padding-left: 6px; padding-right: 6px; }
.tiny .btn.wide .label { display: none; }
.tiny .btn.wide { width: 40px; padding: 0; }

/* ------------------------------------------------------------------ */
/* Tableau                                                             */
/* ------------------------------------------------------------------ */

.board {
  position: relative;
  flex: none;
  width: var(--bw, 300px);
  height: var(--bh, 200px);
  margin-bottom: var(--ledge);
  transition: opacity 0.25s;
}
body.loading .board { opacity: 0; }
.board::before {
  content: "";
  position: absolute;
  inset: 0 0 calc(-1 * var(--ledge)) 0;
  border-radius: 4px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.board.switching { animation: boardSwap 0.34s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes boardSwap {
  from { opacity: 0.2; transform: scale(0.965); }
  to { opacity: 1; transform: none; }
}

#surface {
  position: absolute;
  left: var(--f);
  top: var(--f);
  width: var(--sw, 100px);
  height: var(--sh, 100px);
  overflow: hidden;
  touch-action: none;
  box-shadow: inset 0 2px 9px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  cursor: crosshair;
}
#surface.tool-text { cursor: text; }
#surface.tool-eraser { cursor: none; }
#surface.tool-move { cursor: grab; }
#surface.grabbing { cursor: grabbing; }
#surface canvas { position: absolute; left: 0; top: 0; display: block; }
#content { z-index: 1; }
#live { z-index: 2; }

/* Cadre : 4 pièces à onglets */
.frame { position: absolute; }
.fr-top { left: 0; top: 0; width: 100%; height: var(--f); clip-path: polygon(0 0, 100% 0, calc(100% - var(--f)) 100%, var(--f) 100%); }
.fr-bottom { left: 0; bottom: 0; width: 100%; height: var(--f); clip-path: polygon(var(--f) 0, calc(100% - var(--f)) 0, 100% 100%, 0 100%); }
.fr-left { left: 0; top: 0; width: var(--f); height: 100%; clip-path: polygon(0 0, 100% var(--f), 100% calc(100% - var(--f)), 0 100%); }
.fr-right { right: 0; top: 0; width: var(--f); height: 100%; clip-path: polygon(0 var(--f), 100% 0, 100% 100%, 0 calc(100% - var(--f))); }

/* Bois */
.board.wood {
  --wood-a: #b47c46;
  --wood-b: #8b5a2f;
  --grain-h: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='48'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.005 .42' numOctaves='4' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .22 0 0 0 0 .11 0 0 0 0 .04 1.5 0 0 0 -.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --grain-v: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='480'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.42 .005' numOctaves='4' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .22 0 0 0 0 .11 0 0 0 0 .04 1.5 0 0 0 -.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
}
.board.wood.theme-black { --wood-a: #74492b; --wood-b: #4d2f1a; }
.board.wood .fr-top { background: linear-gradient(to bottom, rgba(255, 236, 210, 0.3), rgba(255, 255, 255, 0) 32%, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, 0.38)), var(--grain-h), linear-gradient(to bottom, var(--wood-a), var(--wood-b)); }
.board.wood .fr-bottom { background: linear-gradient(to top, rgba(255, 236, 210, 0.2), rgba(255, 255, 255, 0) 32%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.4)), var(--grain-h), linear-gradient(to bottom, var(--wood-b), var(--wood-a)); }
.board.wood .fr-left { background: linear-gradient(to right, rgba(255, 236, 210, 0.26), rgba(255, 255, 255, 0) 32%, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, 0.38)), var(--grain-v), linear-gradient(to right, var(--wood-a), var(--wood-b)); }
.board.wood .fr-right { background: linear-gradient(to left, rgba(255, 236, 210, 0.16), rgba(255, 255, 255, 0) 32%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.42)), var(--grain-v), linear-gradient(to left, var(--wood-b), var(--wood-a)); }

/* Métal (tableau blanc) */
.board.metal .fr-top,
.board.metal .fr-bottom {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, rgba(0, 0, 0, 0.025) 1px 3px),
    linear-gradient(to bottom, #fbfcfc 0%, #d7dbde 34%, #b3b9be 62%, #e4e7e9 100%);
}
.board.metal .fr-bottom { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, rgba(0, 0, 0, 0.025) 1px 3px), linear-gradient(to top, #f3f5f6 0%, #d1d5d8 34%, #aab0b5 62%, #dfe2e4 100%); }
.board.metal .fr-left,
.board.metal .fr-right {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 1px, rgba(0, 0, 0, 0.025) 1px 3px),
    linear-gradient(to right, #f6f7f8 0%, #d3d7da 34%, #afb5ba 62%, #e2e5e7 100%);
}
.board.metal .fr-right { background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 1px, rgba(0, 0, 0, 0.025) 1px 3px), linear-gradient(to left, #eef0f1 0%, #ccd0d3 34%, #a9afb4 62%, #dcdfe1 100%); }
.cap {
  display: none;
  position: absolute;
  width: calc(var(--f) * 1.35);
  height: calc(var(--f) * 1.35);
  background: linear-gradient(140deg, #6a7077, #3b4046 70%);
  border-radius: 32%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 3px rgba(0, 0, 0, 0.45);
  z-index: 2;
}
.board.metal .cap { display: block; }
.c-tl { left: calc(var(--f) * -0.18); top: calc(var(--f) * -0.18); }
.c-tr { right: calc(var(--f) * -0.18); top: calc(var(--f) * -0.18); }
.c-bl { left: calc(var(--f) * -0.18); bottom: calc(var(--f) * -0.18); }
.c-br { right: calc(var(--f) * -0.18); bottom: calc(var(--f) * -0.18); }

/* Rebord (auget à craie / à feutres) */
.ledge {
  position: absolute;
  left: calc(var(--f) * 0.5);
  right: calc(var(--f) * 0.5);
  top: calc(100% - 1px);
  height: calc(var(--ledge) + 1px);
  border-radius: 0 0 5px 5px;
  overflow: hidden;
}
.board.wood .ledge {
  background:
    linear-gradient(to bottom, rgba(255, 236, 210, 0.35) 0, rgba(255, 236, 210, 0) 38%, rgba(0, 0, 0, 0.18) 40%, rgba(0, 0, 0, 0.45) 100%),
    var(--grain-h),
    linear-gradient(var(--wood-a), var(--wood-b));
}
.board.wood .ledge .dust {
  position: absolute;
  inset: 0 0 55% 0;
  background:
    radial-gradient(30% 90% at 22% 30%, rgba(255, 255, 255, 0.28), transparent 70%),
    radial-gradient(18% 80% at 64% 40%, rgba(255, 255, 255, 0.18), transparent 70%),
    radial-gradient(12% 70% at 83% 30%, rgba(255, 240, 160, 0.16), transparent 70%);
}
.board.metal .ledge {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, rgba(0, 0, 0, 0.02) 1px 3px),
    linear-gradient(to bottom, #f4f6f7 0, #c9ced2 38%, #9aa1a7 40%, #c5cacd 100%);
}

/* Éditeur de texte */
#editor {
  position: absolute;
  z-index: 3;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 1.5px dashed rgba(255, 255, 255, 0.4);
  outline-offset: 5px;
  border-radius: 2px;
  background: transparent;
  resize: none;
  overflow: hidden;
  white-space: pre;
  font-family: var(--font);
  line-height: 1.3;
  caret-color: var(--accent);
  -webkit-user-select: text;
  user-select: text;
  touch-action: manipulation;
}
.theme-white #editor { outline-color: rgba(30, 70, 150, 0.35); caret-color: #1d4fc4; }

/* Barre de sélection */
#selbar {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -100%);
  display: flex;
  padding: 3px;
  background: rgba(22, 24, 23, 0.86);
  border: 1px solid var(--bar-line);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  animation: pop 0.14s ease-out;
}

/* ------------------------------------------------------------------ */
/* Popovers, menu, historique                                          */
/* ------------------------------------------------------------------ */

.popover {
  position: fixed;
  z-index: 30;
  min-width: 220px;
  max-width: calc(100vw - 16px);
  padding: 10px;
  background: rgba(30, 32, 31, 0.95);
  border: 1px solid var(--bar-line);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  animation: pop 0.14s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(0.98); } }
.pop-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.55; margin: 2px 6px 8px; }
.theme-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.theme-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 8px 4px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}
@media (hover: hover) { .theme-opt:hover { background: rgba(255, 255, 255, 0.06); } }
.theme-opt.active { background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1.5px var(--accent); }
.mini { position: relative; display: block; width: 70px; height: 46px; border-radius: 4px; border: 5px solid; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); overflow: hidden; }
.mini::after { content: ""; position: absolute; left: 8px; top: 9px; width: 30px; height: 14px; border-top: 2px solid; border-bottom: 2px solid; opacity: 0.85; }
.mini-green { background: #2d4b3c; border-color: #a26e3d; color: #f4f2e9; }
.mini-black { background: #232729; border-color: #5e3c24; color: #f2f1ec; }
.mini-white { background: #f7f8f6; border-color: #c6cbcf; color: #1d4fc4; }
.theme-chip { display: block; width: 24px; height: 17px; border-radius: 3px; border: 3px solid #a26e3d; background: #2d4b3c; }
.theme-chip.black { background: #232729; border-color: #5e3c24; }
.theme-chip.white { background: #f7f8f6; border-color: #c6cbcf; }

.seg { display: flex; gap: 4px; background: rgba(255, 255, 255, 0.06); padding: 3px; border-radius: 12px; }
.seg-opt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 13.5px;
  cursor: pointer;
  touch-action: manipulation;
}
.seg-opt.active { background: rgba(255, 255, 255, 0.15); }
.seg-opt .size-dot { --c: var(--text); }

.menu { padding: 6px; min-width: 240px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  font-size: 15px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}
@media (hover: hover) { .menu-item:hover { background: rgba(255, 255, 255, 0.08); } }

.drawer, .sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.38);
  animation: fade 0.2s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.drawer-panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(370px, 90vw);
  display: flex;
  flex-direction: column;
  background: #212422;
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) env(safe-area-inset-left);
  animation: slide 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes slide { from { transform: translateX(-100%); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 8px 20px; }
.drawer-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.day-list { overflow-y: auto; padding: 4px 10px 20px; display: flex; flex-direction: column; gap: 4px; -webkit-user-select: none; user-select: none; }
.day {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
@media (hover: hover) { .day:hover { background: rgba(255, 255, 255, 0.06); } }
.day.current { background: rgba(255, 255, 255, 0.1); }
.day .thumb {
  width: 96px;
  height: 64px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
}
.day .thumb img { max-width: 96px; max-height: 64px; border-radius: 3px; box-shadow: 0 0 0 3px var(--fc, #a26e3d), 0 3px 8px rgba(0, 0, 0, 0.4); }
.day .thumb.new { border: 1.5px dashed rgba(255, 255, 255, 0.3); background: transparent; color: var(--accent); }
.day-title { font-size: 15px; font-weight: 600; }
.day-meta { font-size: 12.5px; opacity: 0.6; margin-top: 3px; }

.sheet { display: flex; align-items: center; justify-content: center; padding: 16px; }
.sheet-panel {
  width: min(520px, 100%);
  max-height: 100%;
  overflow-y: auto;
  background: #212422;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: pop 0.18s ease-out;
  padding-bottom: 10px;
}
.tips { margin: 0; padding: 0 22px 12px 40px; line-height: 1.55; font-size: 15px; }
.tips li { margin: 8px 0; }
.tips b { color: var(--accent); font-weight: 600; }
kbd { font: 12px var(--ui); padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.15); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 16px;
  min-height: 46px;
  max-width: calc(100vw - 24px);
  background: rgba(24, 26, 25, 0.94);
  border: 1px solid var(--bar-line);
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
  animation: toastIn 0.22s ease-out;
}
.side .toast { bottom: calc(14px + env(safe-area-inset-bottom)); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }
.toast-action {
  border: 0;
  background: rgba(255, 224, 138, 0.15);
  color: var(--accent);
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
