:root {
  font-family: "Trebuchet MS", "Avenir Next", system-ui, sans-serif;
  color-scheme: light;
  --ink: #33214f;
  --muted: #67567d;
  --accent: #6336a3;
  --edge: #c8b1e3;
  --wash: #f4edff;
  --desk-top: #f5edff;
  --desk-bottom: #ffedf7;
  --bar: linear-gradient(100deg, #573693, #8250bd);
  --action: #673ea4;
  --tile: #f1e7ff;
  --line: #eaddf2;
  --paper: #fffaff;
  --feed: #fcf8ff;
  --mine: #edddff;
  --yours: #ffe7ef;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  color: var(--ink);
  background: radial-gradient(circle, #8957ae27 1.2px, transparent 1.55px) 1px 4px / 21px 21px,
    radial-gradient(ellipse at 45% 20%, #ffffffad, transparent 67%),
    linear-gradient(150deg,var(--desk-top),var(--desk-bottom));
}
button, input, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: wait; opacity: .61; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, .feed:focus-visible {
  outline: 3px solid #465fde; outline-offset: 3px;
}
h1, h2, p { margin: 0; }
.desk { width: min(1056px, calc(100% - 52px)); margin: auto; padding: clamp(26px, 5.8vh, 59px) 0 20px; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 31px; }
.branding { display: flex; align-items: center; gap: 15px; min-width: 0; }
.branding > div { min-width: 0; }
.branding h1 { font-size: clamp(1.45rem, 4.8vw, 2.62rem); line-height: 1; letter-spacing: -.068em; font-weight: 900; overflow-wrap: anywhere; }
.branding h1 span { color: #bc599d; }
.branding p { margin-top: 6px; color: var(--muted); font-weight: bold; font-size: .91rem; }
.mast-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: end; }
.privacy, .secondary {
  font-size: .86rem; font-weight: 800; white-space: nowrap; padding: 8px 13px;
  border: 1px solid var(--edge); border-radius: 99px; background: #fffcffca;
}
.privacy { color: var(--accent); }
.privacy span { padding-right: 3px; }
.secondary:hover, .quiet:hover, .tool-pill:hover { background: var(--tile); }
.window { background: var(--paper); border: 1px solid var(--edge); border-radius: 16px; overflow: hidden; box-shadow: 0 5px 0 #8c62ad25, 0 14px 35px #6b38911a; }
.workspace { display: grid; grid-template-columns: 253px minmax(0,1fr); align-items: start; gap: 22px; }
.titlebar {
  background: var(--bar); border-bottom: 1px solid #4727788a; color: white;
  min-height: 43px; padding: 9px 15px; display: flex; justify-content: space-between; align-items: center;
  font-size: .9rem; font-weight: 800; letter-spacing: .02em;
}
.titlebar i { font-style: normal; color: #ffc8ee; display: inline-block; margin-right: 5px; }
.side-count { font-size: .78rem; font-weight: 600; opacity: .9; }
.sidebar { display: grid; gap: 17px; }
.buddy-tile {
  margin: 12px; width: calc(100% - 24px); display: flex; align-items: center; gap: 10px; text-align: start;
  border: 1px solid var(--line); background: var(--tile); border-radius: 12px; padding: 9px 10px;
}
.buddy-tile:hover { border-color: var(--accent); }
.buddy-info { min-width: 0; flex: 1; }
.buddy-info strong, .buddy-info small { display: block; }
.buddy-info strong { font-size: .9rem; line-height: 1.2; }
.buddy-info small { margin-top: 3px; color: var(--muted); font-size: .77rem; }
.buddy-icon { color: var(--accent); font-size: 1.25rem; }
.brand-mark { flex: none; width: 59px; height: 59px; object-fit: contain; border: 1px solid #ad71bf48; border-radius: 19px; background: #fbd6ee; box-shadow: 0 3px 0 #b979bf3c; transform: rotate(-7deg); }
.side-section-title { margin: 14px 14px 5px; display: flex; align-items: center; gap: 7px; }
.side-section-title span { color: var(--accent); }
.side-section-title h2 { font-size: 1rem; font-weight: 800; }
.swatch { width: 19px; height: 19px; border-radius: 6px; border: 1px solid #6d318a35; }
.swatch-lilac { background: #cfaff5; }.swatch-pink { background: #f2acca; }.swatch-blue { background: #a2c7f4; }.swatch-mint { background: #a6e7c6; }
.axolotl-preview { display: grid; place-items: center; min-height: 108px; margin: 7px 9px 3px; border-radius: 10px; background: radial-gradient(ellipse,white,var(--tile)); }
.axolotl-colors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 6px 9px 9px; gap: 4px; }
.axolotl-colors button { display: flex; align-items: center; gap: 5px; min-height: 36px; font-size: .82rem; font-weight: 700; text-align: left; padding: 5px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.axolotl-colors button:hover, .axolotl-colors button[aria-pressed="true"] { background: var(--tile); border-color: var(--accent); }
.axolotl-colors .swatch { flex: none; width: 13px; height: 13px; border-radius: 4px; }
.chat-title { padding: 6px 10px 6px 15px; }
.window-controls { display: flex; gap: 5px; }
.window-controls button { display: grid; place-items: center; width: 31px; height: 30px; padding: 0; background: #fff4; border: 1px solid #fffa; border-radius: 6px; color: white; font-size: 1.09rem; line-height: 1; font-weight: bold; }
.window-controls button:hover, .window-controls [aria-pressed="true"] { background: #fff6; }
.conversation-header { display: flex; min-height: 69px; padding: 12px 20px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.conversation-header h2 { font-size: 1.16rem; font-weight: 900; }
.conversation-header div > span { font-size: .88rem; color: var(--muted); }
.icon-action { padding: 5px 9px; min-height: 40px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--accent); font-weight: bold; }
.icon-action:hover, .icon-action[aria-pressed="true"] { background: var(--tile); }
.sound-button { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.sound-button span { font-size: 1.1rem; }
.sound-button small { font-size: .82rem; }
.feed { height: clamp(278px, 46vh, 455px); padding: 13px 20px 20px; overflow: auto; overscroll-behavior: contain; background: radial-gradient(circle at 80% 60%,var(--wash),transparent 64%),var(--feed); }
.feed-label { color: var(--muted); margin: 9px auto 20px; text-align: center; font-weight: bold; font-size: .76rem; letter-spacing: .11em; }
.messages { display: grid; gap: 15px; }
.message { display: flex; }
.message.mine { justify-content: end; }
.message-body { max-width: min(82%, 445px); }
.message-meta { font-size: .77rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; margin: 0 5px 4px; }
.mine .message-meta { justify-content: end; }
.bubble { background: var(--yours); padding: 10px 13px; border: 1px solid #8b548126; border-radius: 14px 14px 14px 4px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.mine .bubble { background: var(--mine); border-radius: 14px 14px 4px 14px; }
.sticker-image { display: block; width: 105px; aspect-ratio: 1; background-image: url('/mascots/colors.png'); background-repeat: no-repeat; background-size: 200% 200%; background-position: left top; }
.sticker-image.lilac { background-position: right top; }
.sticker-image.blue { background-position: left bottom; }
.sticker-image.mint { background-position: right bottom; }
.empty { height: calc(100% - 48px); display: grid; align-content: center; justify-items: center; text-align: center; gap: 5px; }
.empty img { width: min(185px, 60%); margin-top: -8px; }
.empty strong { font-size: 1.18rem; }
.empty p { color: var(--muted); }
.composer { padding: 13px 15px 12px; border-top: 1px solid var(--line); position: relative; }
#send-form { display: flex; align-items: center; gap: 9px; }
textarea { width: 100%; min-width: 0; min-height: 47px; resize: vertical; max-height: 125px; padding: 11px 12px; border: 1px solid var(--edge); border-radius: 10px; background: white; color: var(--ink); line-height: 1.45; }
textarea::placeholder { color: var(--muted); }
.primary { color: white; background: var(--action); box-shadow: 0 3px 0 #3f226846; border: 1px solid #4d24756c; border-radius: 11px; padding: 10px 15px; min-height: 42px; font-weight: 800; }
.primary:hover { filter: brightness(1.13); }
.send { min-height: 44px; display: flex; align-items: center; gap: 7px; }
.send span + span { font-size: 1.2rem; line-height: 1; }
.composer-tools { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; align-items: center; }
.tool-pill, .quiet { min-height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--accent); font-weight: bold; padding: 4px 10px; font-size: .9rem; }
.tool-pill[aria-expanded="true"], .tool-pill[aria-pressed="true"] { background: var(--tile); }
.notification-note { margin-top: 8px; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.preview-label { margin-left: auto; color: var(--muted); font-size: .8rem; }
.picker { position: absolute; z-index: 1; bottom: calc(100% - 6px); left: 14px; width: min(310px, calc(100% - 28px)); background: white; border: 1px solid var(--edge); border-radius: 14px; box-shadow: 0 6px 30px #51296540; padding: 8px; }
.picker-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 3px; }
.picker-grid.sticker-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.picker button { min-height: 38px; border: 1px solid transparent; border-radius: 8px; padding: 3px; background: var(--paper); font-size: 1.25rem; }
.picker button:hover { background: var(--tile); border-color: var(--edge); }
.picker button.sticker-pick { font-size: .84rem; display: grid; justify-items: center; font-weight: bold; }
.picker .sticker-image { width: 68px; }
.chat-window.compact { max-width: 465px; margin-left: auto; }
.chat-window.compact .feed { height: clamp(200px, 36vh, 360px); }
.restore { display: block; margin-left: auto; }
.older-wrap { text-align: center; }
.notice, .chat-notice { color: #812854; background: #fff0f7; border: 1px solid #ebbed2; border-radius: 8px; padding: 7px 11px; font-size: .9rem; }
.chat-notice { margin: 7px 14px; }
.login-window { max-width: 770px; margin: 0 auto; }
.login-layout { display: grid; grid-template-columns: 1fr 1fr; }
.login-art { display: grid; place-items: center; padding: 18px; background: radial-gradient(ellipse at 50% 45%, white, transparent 70%),linear-gradient(135deg,#f1dfff,#ffdfed); }
.login-art img { width: min(100%, 410px); }
.login-form { padding: 26px; }
.login-form h2 { font-size: clamp(1.3rem, 4vw, 1.7rem); font-weight: 900; letter-spacing: -.04em; }
.login-form p { margin: 7px 0 12px; color: var(--muted); line-height: 1.45; }
.field { display: grid; gap: 5px; font-size: .88rem; font-weight: bold; margin: 11px 0; }
.field input { min-width: 0; min-height: 43px; border: 1px solid var(--edge); border-radius: 9px; background: white; color: var(--ink); padding: 7px 9px; font-size: 1rem; }
.remember-choice { display: flex; align-items: center; gap: 8px; width: fit-content; min-height: 38px; font-size: .9rem; font-weight: bold; cursor: pointer; }
.remember-choice input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.login-submit { min-width: 100px; margin: 3px 4px 4px 0; }
footer { color: var(--muted); text-align: center; margin-top: 22px; font-weight: 800; font-size: .85rem; }
footer span { color: var(--accent); padding: 0 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }
@media (max-width: 780px) {
  .desk { width: calc(100% - 32px); }
  .workspace { grid-template-columns: 190px minmax(0,1fr); gap: 13px; }
  .buddy-tile { padding: 5px; gap: 6px; }
}
@media (max-width: 595px) {
  .desk { width: calc(100% - 22px); padding-top: 18px; }
  .masthead { gap: 5px; margin-bottom: 15px; }
  .branding { gap: 8px; }
  .branding p { font-size: .78rem; }
  .brand-mark { width: 41px; height: 41px; border-radius: 12px; }
  .mast-actions { gap: 3px; }
  .privacy, .secondary { font-size: .74rem; padding: 5px 7px; }
  .workspace { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .sidebar { grid-row: 2; gap: 10px; }
  .side-count { display: none; }
  .axolotl-window { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(155px, 2fr); align-items: center; }
  .axolotl-window .side-section-title { grid-column: 1 / -1; }
  .axolotl-preview { min-height: 80px; margin: 5px 4px 9px 9px; }
  .axolotl-preview .sticker-image { width: 78px; }
  .chat-window.compact { max-width: 89%; }
  .conversation-header { padding: 8px 11px; }
  .feed { height: clamp(255px, 49svh, 410px); padding: 8px 10px 13px; }
  .composer { padding: 9px; }
  .tool-pill { min-height: 37px; }
  .buddy-tile { margin: 8px; width: calc(100% - 16px); }
  .login-layout { grid-template-columns: minmax(0,1fr); }
  .login-art { padding: 4px 10px; }
  .login-art img { width: min(56%, 185px); }
  .login-form { padding: 18px; }
}
@media (max-width: 395px) {
  .branding h1 { font-size: clamp(1.02rem, 4.9vw, 1.21rem); }
}
