:root {
  color-scheme: light;
  --paper: #f4f0e7;
  --paper-dot: rgba(43, 47, 51, 0.095);
  --ink: #202124;
  --muted: #777770;
  --line: rgba(35, 36, 38, 0.12);
  --blue: #305df4;
  --blue-dark: #2245c7;
  --yellow: #f5e667;
  --coral: #ff785f;
  --purple: #a786e8;
  --white: #fffefa;
  --shadow: 0 12px 30px rgba(70, 64, 48, 0.11), 0 2px 6px rgba(70, 64, 48, 0.08);
  --font: "SF Pro Rounded", "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --hand: "Marker Felt", "Kaiti SC", "KaiTi", "Comic Sans MS", cursive;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  color: inherit;
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-shell {
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: relative;
  z-index: 60;
  height: 68px;
  flex: 0 0 68px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(255, 254, 250, 0.88);
  border-bottom: 1px solid rgba(26, 27, 29, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  width: max-content;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  font-weight: 840;
  letter-spacing: -0.055em;
}

.brand-spark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--blue);
  color: white;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  transform: rotate(-7deg);
  box-shadow: 0 5px 12px rgba(48, 93, 244, 0.25);
}

.brand small {
  margin-left: 1px;
  padding: 3px 5px;
  border: 1px solid rgba(32, 33, 36, 0.18);
  border-radius: 4px;
  color: #777770;
  font-size: 7px;
  font-weight: 780;
  letter-spacing: 0.12em;
}

.room-switcher {
  position: relative;
  z-index: 70;
  justify-self: center;
}

.room-title {
  min-width: 178px;
  height: 48px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: auto 16px;
  grid-template-rows: 22px 15px;
  align-content: center;
  justify-content: center;
  column-gap: 6px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  cursor: pointer;
  transition: background 160ms ease;
}

.room-title:hover {
  background: rgba(32, 33, 36, 0.055);
}

.room-title span {
  font-size: 14px;
  font-weight: 760;
}

.room-title small {
  grid-column: 1;
  color: #85847d;
  font-size: 10px;
}

.room-title svg {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 15px;
  align-self: center;
  transition: transform 180ms ease;
}

.room-title[aria-expanded="true"] {
  background: rgba(32, 33, 36, 0.055);
}

.room-title[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.room-menu {
  position: absolute;
  top: 55px;
  left: 50%;
  width: 370px;
  padding: 15px;
  border: 1px solid rgba(32, 33, 36, 0.11);
  border-radius: 19px;
  background: rgba(255, 254, 250, 0.98);
  box-shadow: 0 22px 58px rgba(54, 50, 42, 0.18), 0 4px 12px rgba(54, 50, 42, 0.07);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -7px) scale(.97);
  transform-origin: top center;
  transition: opacity 170ms ease, transform 170ms ease;
  backdrop-filter: blur(18px);
}

.room-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.room-menu-heading {
  padding: 2px 3px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid rgba(32, 33, 36, 0.09);
}

.room-menu-heading > div {
  display: grid;
  gap: 3px;
}

.room-menu-heading strong {
  font-size: 13px;
  font-weight: 780;
}

.room-menu-heading span:not(.live-mini) {
  color: #8a8982;
  font-size: 9px;
}

.live-mini {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #777770;
  font-size: 8px;
  font-weight: 700;
}

.live-mini i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #42b86b;
  box-shadow: 0 0 0 3px rgba(66, 184, 107, .1);
}

.room-mode-options {
  padding: 8px 0;
  display: grid;
  gap: 3px;
}

.room-mode-option {
  width: 100%;
  min-height: 62px;
  padding: 8px;
  display: grid;
  grid-template-columns: 42px 1fr 22px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 150ms ease, transform 150ms ease;
}

.room-mode-option:hover {
  background: rgba(32, 33, 36, .045);
  transform: translateX(2px);
}

.room-mode-option.selected {
  background: rgba(48, 93, 244, .075);
}

.room-mode-option > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.room-mode-option strong {
  font-size: 11px;
  font-weight: 760;
}

.room-mode-option small {
  color: #85847d;
  font-size: 9px;
}

.room-mode-option > svg {
  width: 18px;
  color: var(--blue);
  opacity: 0;
  transform: scale(.7);
  transition: opacity 150ms ease, transform 150ms ease;
}

.room-mode-option.selected > svg {
  opacity: 1;
  transform: scale(1);
}

.room-mode-icon {
  position: relative;
  width: 42px;
  height: 42px;
  display: block;
  border-radius: 13px;
  background: #e6edff;
}

.group-icon i {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid white;
  border-radius: 50%;
  background: #8aa9ff;
}

.group-icon i:nth-child(1) { left: 5px; top: 12px; }
.group-icon i:nth-child(2) { right: 5px; top: 7px; background: #ffb49f; }
.group-icon i:nth-child(3) { right: 5px; bottom: 4px; background: #afd79d; }

.direct-icon {
  display: grid;
  place-items: center;
  background: #ffe1d4;
}

.direct-icon i {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffb997;
  color: #684130;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.rename-room {
  padding: 12px 3px 2px;
  border-top: 1px solid rgba(32, 33, 36, 0.09);
}

.rename-room label {
  display: block;
  margin-bottom: 7px;
  color: #777770;
  font-size: 9px;
  font-weight: 720;
}

.rename-room > div {
  display: flex;
  gap: 7px;
}

.rename-room input {
  min-width: 0;
  height: 37px;
  flex: 1;
  padding: 0 11px;
  border: 1px solid rgba(32, 33, 36, .12);
  border-radius: 10px;
  outline: none;
  background: white;
  font-size: 11px;
}

.rename-room input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(48, 93, 244, .09);
}

.rename-room button {
  height: 37px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-size: 10px;
  font-weight: 740;
}

.top-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
}

.avatars {
  position: relative;
  margin-right: 3px;
  display: flex;
}

.avatar {
  width: 30px;
  height: 30px;
  margin-left: -7px;
  display: grid;
  place-items: center;
  border: 2px solid var(--white);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}

.avatar-one { background: #bad4ff; }
.avatar-two { background: #ffd2b7; }
.avatar-three { background: #cce6bb; }

.presence-dot {
  position: absolute;
  right: -1px;
  bottom: 1px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: #42b86b;
}

.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(32, 33, 36, 0.11);
  border-radius: 12px;
  background: rgba(255, 254, 250, 0.76);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.icon-button:hover {
  transform: translateY(-2px);
  border-color: rgba(32, 33, 36, 0.21);
  background: white;
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.share-button {
  height: 38px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  box-shadow: 0 6px 14px rgba(48, 93, 244, 0.22);
  transition: transform 160ms ease, background 160ms ease;
}

.share-button:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

.share-button svg {
  width: 17px;
}

.workspace,
.canvas {
  position: relative;
  min-height: 0;
  flex: 1;
}

.workspace {
  display: flex;
}

.canvas {
  width: 100%;
  overflow: hidden;
  outline: none;
  background-color: var(--paper);
  background-image: radial-gradient(circle, var(--paper-dot) 1px, transparent 1px);
  background-position: 0 0;
  background-size: 26px 26px;
  transition: background-color 500ms ease;
  isolation: isolate;
}

.canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 255, 255, 0.72), transparent 27%),
    radial-gradient(circle at 82% 75%, rgba(241, 220, 169, 0.2), transparent 32%);
}

.canvas.paper-pink { --paper: #f5ebec; --paper-dot: rgba(70, 37, 52, 0.095); }
.canvas.paper-blue { --paper: #eaf1ee; --paper-dot: rgba(27, 62, 55, 0.095); }

.canvas-date {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(32, 33, 36, 0.38);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.1em;
  transform: translateX(-50%);
}

.canvas-date span {
  width: 24px;
  height: 1px;
  background: rgba(32, 33, 36, 0.16);
}

.printed-doodles {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.printed-doodles path {
  fill: none;
  stroke-width: 4;
}

.scribble-blue { stroke: rgba(48, 93, 244, 0.78); }
.scribble-coral { stroke: rgba(255, 120, 95, 0.7); }
.scribble-dark { stroke: rgba(32, 33, 36, 0.34); }

.draw-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  width: 100%;
  height: 100%;
  pointer-events: none;
  touch-action: none;
}

.canvas.is-drawing .draw-layer {
  pointer-events: auto;
  cursor: crosshair;
}

.board-items {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.board-item {
  position: absolute;
  z-index: 1;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transform: rotate(var(--rotation, 0deg));
  transform-origin: center;
  animation: item-in 560ms cubic-bezier(.18, .86, .26, 1.12) var(--delay, 0ms) both;
  transition: filter 180ms ease, box-shadow 180ms ease, opacity 220ms ease, visibility 220ms ease, transform 220ms ease;
}

body[data-room-mode="direct"] .group-only,
body[data-room-mode="direct"] .group-created,
body[data-room-mode="group"] .direct-only {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(.92) rotate(var(--rotation, 0deg));
}

.board-item:hover {
  filter: brightness(1.015);
}

.board-item.selected {
  outline: 2px dashed rgba(48, 93, 244, 0.68);
  outline-offset: 7px;
}

.board-item.dragging {
  cursor: grabbing;
  filter: drop-shadow(0 15px 12px rgba(53, 50, 43, 0.17));
  transition: none;
}

.editable:focus {
  outline: 1px dashed rgba(48, 93, 244, 0.55);
  outline-offset: 4px;
  user-select: text;
}

.author-tag {
  margin: 0 0 8px 4px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #6f6e68;
  font-size: 10px;
  font-weight: 720;
}

.mini-avatar {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #24304b;
  font-size: 8px;
}

.mini-avatar.blue { background: #bad4ff; }
.mini-avatar.coral { background: #ffd0c7; }

.intro-copy {
  width: 270px;
}

.intro-copy p,
.tiny-message p {
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 12px 16px;
  border-radius: 7px 18px 18px 18px;
  background: var(--blue);
  color: white;
  box-shadow: 0 7px 16px rgba(48, 93, 244, 0.18);
  font-size: 16px;
  font-weight: 690;
  line-height: 1.4;
}

.sticky-note {
  width: 224px;
  min-height: 150px;
  padding: 31px 24px 21px;
  background: var(--yellow);
  box-shadow: var(--shadow);
}

.sticky-note.pink { background: #ffc8d3; }
.sticky-note.blue { background: #bcd5ff; }

.sticky-note .tape {
  position: absolute;
  top: -9px;
  left: 50%;
  width: 76px;
  height: 21px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 0 0 1px rgba(90, 75, 50, 0.05);
  transform: translateX(-50%) rotate(-3deg);
}

.note-owner {
  margin-bottom: 12px;
  color: rgba(44, 43, 36, 0.52);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.sticky-note p {
  margin: 0 0 14px;
  font-family: var(--hand);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.reaction {
  height: 27px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
  transition: transform 160ms ease, background 160ms ease;
}

.reaction:hover,
.reaction.liked {
  background: white;
  transform: scale(1.08) rotate(-2deg);
}

.reaction span {
  color: #ee5e6c;
  font-size: 12px;
}

.polaroid {
  width: 296px;
  padding: 11px 11px 15px;
  background: #fffefa;
  box-shadow: 0 14px 34px rgba(67, 60, 44, 0.15), 0 2px 5px rgba(67, 60, 44, 0.1);
}

.photo-art {
  position: relative;
  height: 172px;
  overflow: hidden;
  background: #b2c7c3;
}

.photo-art svg,
.photo-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-tag {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 4px 6px;
  border-radius: 5px;
  background: rgba(26, 28, 29, 0.68);
  color: white;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
  backdrop-filter: blur(6px);
}

.polaroid p {
  margin: 11px 7px 2px;
  font-family: var(--hand);
  font-size: 17px;
  font-weight: 700;
}

.polaroid small {
  margin-left: 7px;
  color: #929088;
  font-size: 8px;
}

.giant-word p {
  margin: 0;
  color: var(--coral);
  font-family: var(--hand);
  font-size: clamp(50px, 5vw, 82px);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: .88;
  text-shadow: 3px 3px 0 rgba(255, 255, 255, 0.7);
}

.giant-word svg {
  width: 116px;
  margin: 4px 0 0 32px;
  color: var(--coral);
  stroke-width: 4;
}

.voice-note {
  width: 300px;
  min-height: 74px;
  padding: 12px 14px 11px 12px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 19px;
  background: rgba(255, 254, 250, 0.96);
  box-shadow: var(--shadow);
}

.voice-play {
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  cursor: pointer;
}

.voice-play svg {
  width: 20px;
  height: 20px;
}

.voice-play .pause-symbol,
.voice-note.playing .play-symbol {
  display: none;
}

.voice-note.playing .pause-symbol {
  display: block;
}

.voice-content {
  min-width: 0;
  flex: 1;
}

.waveform {
  height: 27px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.waveform span {
  width: 3px;
  height: var(--h, 35%);
  min-height: 4px;
  border-radius: 3px;
  background: #a9a9a2;
}

.waveform span:nth-child(3n + 1) { --h: 82%; }
.waveform span:nth-child(4n + 2) { --h: 55%; }
.waveform span:nth-child(5n) { --h: 94%; }

.voice-note.playing .waveform span {
  animation: wave-play 600ms ease-in-out calc(var(--n, 0) * 30ms) infinite alternate;
  background: var(--blue);
}

.voice-meta {
  margin-top: 2px;
  display: flex;
  justify-content: space-between;
  color: #85847e;
  font-size: 8px;
  font-weight: 680;
}

.gif-card {
  width: 214px;
}

.gif-scene {
  position: relative;
  height: 155px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 7px solid #fffefa;
  border-radius: 22px;
  background: #b59bea;
  box-shadow: var(--shadow);
}

.gif-scene::before,
.gif-scene::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border: 2px solid rgba(255, 255, 255, 0.27);
  border-radius: 50%;
}

.gif-scene::before { left: -46px; top: -50px; }
.gif-scene::after { right: -55px; bottom: -60px; }

.gif-label {
  position: absolute;
  top: 9px;
  left: 10px;
  z-index: 3;
  padding: 3px 5px;
  border-radius: 4px;
  background: rgba(28, 21, 44, 0.24);
  color: white;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .12em;
}

.sun-character {
  position: relative;
  z-index: 2;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffe776;
  animation: happy-bop 1.2s ease-in-out infinite;
}

.sun-character::before {
  content: "";
  position: absolute;
  inset: -16px;
  z-index: -1;
  background: repeating-conic-gradient(from 0deg, #ffe776 0 8deg, transparent 8deg 22.5deg);
  border-radius: 50%;
  animation: slow-spin 8s linear infinite;
}

.sun-character b {
  font-family: var(--font);
  font-size: 20px;
  transform: translateY(-1px);
}

.gif-scene p {
  position: absolute;
  bottom: 8px;
  z-index: 3;
  margin: 0;
  color: #282033;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
}

.float-heart {
  position: absolute;
  z-index: 4;
  color: white;
  animation: heart-float 1.7s ease-in-out infinite;
}

.h1 { top: 24px; right: 28px; font-size: 17px; }
.h2 { top: 67px; left: 24px; font-size: 11px; animation-delay: -500ms; }
.h3 { top: 28px; left: 45px; font-size: 8px; animation-delay: -900ms; }

.gif-card > .reaction {
  position: absolute;
  right: 8px;
  bottom: -15px;
  box-shadow: 0 5px 12px rgba(50, 43, 65, 0.13);
}

.tiny-message {
  width: 290px;
}

.tiny-message p {
  background: #fffefa;
  color: var(--ink);
  border: 1px solid rgba(32, 33, 36, 0.08);
  box-shadow: var(--shadow);
  font-size: 15px;
  font-weight: 650;
}

.tool-rail {
  position: absolute;
  top: 50%;
  left: 17px;
  z-index: 40;
  width: 48px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 16px;
  background: rgba(255, 254, 250, 0.9);
  box-shadow: 0 12px 30px rgba(58, 54, 46, 0.11);
  transform: translateY(-50%);
  backdrop-filter: blur(16px);
  animation: rail-in 500ms 500ms both;
}

.tool-button {
  width: 35px;
  height: 35px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  color: #62625d;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.tool-button:hover {
  color: var(--ink);
  background: rgba(32, 33, 36, 0.06);
  transform: scale(1.06);
}

.tool-button.active {
  background: var(--blue);
  color: white;
}

.tool-button svg {
  width: 19px;
  height: 19px;
}

.type-tool {
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 700;
}

.tool-divider {
  width: 24px;
  height: 1px;
  margin: 4px auto;
  background: rgba(32, 33, 36, 0.11);
}

.draw-color {
  position: relative;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.draw-color input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.draw-color span {
  width: 17px;
  height: 17px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--draw-color, #305df4);
  box-shadow: 0 0 0 1px rgba(32, 33, 36, 0.22);
}

.draw-undo-tool {
  display: none;
}

.canvas.is-drawing .draw-undo-tool {
  display: grid;
}

.draw-undo-tool:not(:disabled) {
  background: rgba(48, 93, 244, .1);
  color: var(--blue);
}

.draw-undo-tool:disabled {
  opacity: .3;
  cursor: not-allowed;
}

.history-controls {
  position: absolute;
  right: 17px;
  bottom: 92px;
  z-index: 40;
  display: flex;
  gap: 7px;
}

.history-controls .icon-button {
  background: rgba(255, 254, 250, 0.88);
  box-shadow: 0 8px 18px rgba(58, 54, 46, 0.08);
  backdrop-filter: blur(12px);
}

.history-controls .icon-button:disabled {
  opacity: .32;
  cursor: not-allowed;
  transform: none;
}

.history-controls .icon-button.undo-ready {
  border-color: rgba(48, 93, 244, .22);
  background: rgba(255, 254, 250, .98);
  color: var(--blue);
}

.composer {
  position: absolute;
  left: 50%;
  bottom: 19px;
  z-index: 45;
  width: min(650px, calc(100% - 150px));
  height: 58px;
  padding: 7px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(32, 33, 36, 0.12);
  border-radius: 19px;
  background: rgba(255, 254, 250, 0.93);
  box-shadow: 0 14px 38px rgba(63, 58, 48, 0.14), 0 2px 8px rgba(63, 58, 48, 0.07);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
  animation: composer-in 600ms 420ms cubic-bezier(.18, .85, .28, 1.12) both;
}

.composer-plus,
.quick-draw,
.send-button {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
}

.composer-plus,
.quick-draw {
  background: transparent;
  color: #666660;
}

.composer-plus:hover,
.quick-draw:hover {
  background: rgba(32, 33, 36, 0.06);
}

.composer-plus svg,
.quick-draw svg,
.send-button svg {
  width: 20px;
  height: 20px;
}

.composer-plus svg {
  transition: transform 180ms ease;
}

.composer-plus.open svg {
  transform: rotate(45deg);
}

.composer input {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.composer input::placeholder {
  color: #aaa89f;
}

.quick-gif {
  height: 31px;
  padding: 0 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #777770;
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
}

.quick-gif:hover { background: rgba(32, 33, 36, 0.06); }

.send-button {
  background: var(--blue);
  color: white;
  transition: transform 150ms ease, background 150ms ease;
}

.send-button:hover {
  background: var(--blue-dark);
  transform: scale(1.05) rotate(-2deg);
}

.add-menu {
  position: absolute;
  left: 0;
  bottom: 69px;
  width: 162px;
  padding: 7px;
  display: grid;
  gap: 2px;
  border: 1px solid rgba(32, 33, 36, 0.11);
  border-radius: 16px;
  background: rgba(255, 254, 250, 0.97);
  box-shadow: 0 15px 35px rgba(58, 54, 46, 0.15);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(.96);
  transform-origin: bottom left;
  transition: opacity 150ms ease, transform 150ms ease;
}

.add-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.add-menu button {
  height: 40px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 690;
  text-align: left;
}

.add-menu button:hover { background: rgba(32, 33, 36, 0.055); }

.menu-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 7px;
  font-weight: 900;
}

.menu-icon svg { width: 15px; }
.menu-icon.pink { background: #ffd4dc; }
.menu-icon.yellow { background: #f5e667; }
.menu-icon.blue { background: #c4d8ff; }
.menu-icon.purple { background: #d8c8f8; }

.draw-hint {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 46;
  padding: 9px 12px;
  border-radius: 10px;
  background: #202124;
  color: white;
  font-size: 10px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.canvas.is-drawing .draw-hint {
  opacity: 1;
  transform: translate(-50%, 0);
}

kbd {
  margin-left: 7px;
  padding: 2px 5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  font: inherit;
  font-size: 8px;
}

.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  z-index: 100;
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  border-radius: 11px;
  background: #202124;
  color: white;
  box-shadow: 0 10px 28px rgba(32, 33, 36, 0.2);
  font-size: 11px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.first-tip {
  position: fixed;
  top: 102px;
  left: 82px;
  z-index: 90;
  width: 246px;
  padding: 19px;
  border: 1px solid rgba(32, 33, 36, 0.12);
  border-radius: 16px;
  background: rgba(255, 254, 250, 0.97);
  box-shadow: 0 17px 48px rgba(57, 52, 43, 0.18);
  animation: tip-in 600ms 950ms cubic-bezier(.18, .86, .26, 1.12) both;
  transition: opacity 180ms ease, transform 180ms ease;
}

.first-tip.hidden {
  animation: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(.98);
}

.tip-arrow {
  position: absolute;
  top: -34px;
  left: -31px;
  color: var(--blue);
  font-family: var(--hand);
  font-size: 42px;
  transform: rotate(-12deg);
}

.first-tip strong {
  display: block;
  font-size: 14px;
}

.first-tip p {
  margin: 7px 0 15px;
  color: #777770;
  font-size: 11px;
  line-height: 1.6;
}

.first-tip button {
  width: 100%;
  height: 35px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-size: 10px;
  font-weight: 760;
}

.item-controls {
  position: absolute;
  top: -36px;
  right: -16px;
  z-index: 10;
  display: none;
  padding: 3px;
  gap: 2px;
  border: 1px solid rgba(32, 33, 36, .1);
  border-radius: 10px;
  background: rgba(255, 254, 250, .98);
  box-shadow: 0 8px 22px rgba(32, 33, 36, .14);
}

.edit-chip,
.delete-chip {
  width: 27px;
  height: 27px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  color: #5f5f5a;
  transition: background 140ms ease, color 140ms ease;
}

.edit-chip:hover {
  background: rgba(48, 93, 244, .1);
  color: var(--blue);
}

.delete-chip:hover {
  background: rgba(226, 74, 74, .09);
  color: #d94a4a;
}

.edit-chip svg,
.delete-chip svg {
  width: 15px;
  height: 15px;
}

.board-item.selected > .item-controls {
  display: flex;
  animation: control-in 150ms ease both;
}

@keyframes control-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes item-in {
  from { opacity: 0; transform: translateY(22px) scale(.92) rotate(var(--rotation, 0deg)); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(var(--rotation, 0deg)); }
}

@keyframes composer-in {
  from { opacity: 0; transform: translate(-50%, 18px) scale(.97); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes rail-in {
  from { opacity: 0; transform: translate(-12px, -50%); }
  to { opacity: 1; transform: translate(0, -50%); }
}

@keyframes tip-in {
  from { opacity: 0; transform: translateY(-8px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes happy-bop {
  0%, 100% { transform: translateY(1px) rotate(-4deg); }
  50% { transform: translateY(-6px) rotate(5deg); }
}

@keyframes slow-spin { to { transform: rotate(360deg); } }

@keyframes heart-float {
  0%, 100% { transform: translateY(2px) scale(.8); opacity: .65; }
  50% { transform: translateY(-9px) scale(1.15) rotate(8deg); opacity: 1; }
}

@keyframes wave-play {
  from { height: 24%; }
  to { height: 95%; }
}

@media (max-width: 900px) {
  .polaroid { width: 250px; }
  .photo-art { height: 142px; }
  .voice-note { width: 260px; }
  .gif-card { width: 184px; }
  .gif-scene { height: 136px; }
  .sticky-note { width: 198px; min-height: 138px; }
  .intro-copy { width: 235px; }
  .intro-copy p { font-size: 14px; }
}

@media (max-width: 700px) {
  .app-shell { min-height: 560px; }
  .topbar { padding: 0 10px; grid-template-columns: 1fr auto 1fr; }
  .brand { font-size: 19px; }
  .brand-spark { width: 28px; height: 28px; }
  .brand small,
  .avatars,
  #themeButton { display: none; }
  .room-title { min-width: 138px; }
  .room-title span { font-size: 12px; }
  .room-menu { width: min(350px, calc(100vw - 20px)); }
  .room-menu-heading span:not(.live-mini) { max-width: 190px; }
  .share-button { width: 38px; padding: 0; justify-content: center; font-size: 0; }
  .canvas-date { display: none; }
  .tool-rail { top: auto; bottom: 88px; left: 10px; transform: none; }
  .history-controls { right: 10px; bottom: 91px; }
  .composer { bottom: 12px; width: calc(100% - 20px); }
  .quick-draw { display: none; }
  .first-tip { top: 88px; left: 68px; width: 220px; }
  .intro-copy { left: 4% !important; top: 8% !important; }
  .sticky-note { left: 43% !important; top: 11% !important; width: 175px; padding: 27px 18px 17px; }
  .sticky-note p { font-size: 17px; }
  .polaroid { left: 10% !important; top: 40% !important; width: 220px; }
  .giant-word { left: 51% !important; top: 42% !important; }
  .giant-word p { font-size: 50px; }
  .voice-note { left: 12% !important; top: 68% !important; width: 236px; }
  .gif-card { left: 61% !important; top: 65% !important; width: 155px; }
  .gif-scene { height: 118px; }
  .tiny-message { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
