:root {
  color-scheme: light;
  --bg: #f5e9e0; --panel: #fcf1e9; --ink: #2b201a; --muted: #765e50;
  --line: #e9d8cc; --accent: #7e553d; --soft: #eed9cb; --shadow: #5a342018;
  font: 15px/1.45 "Instrument Sans", system-ui, sans-serif;
}
:root.dark {
  color-scheme: dark;
  --bg: #251e1b; --panel: #342922; --ink: #f7e8da; --muted: #d0b7a5;
  --line: #514036; --accent: #9c6b4c; --soft: #49372d; --shadow: #0004;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: radial-gradient(ellipse at left top,var(--panel),var(--bg)); min-height: 100vh; }
button,input { font: inherit; }
button { color: inherit; border: 0; background: transparent; cursor: pointer; border-radius: 11px; }
button:hover,button[aria-current="page"],button[aria-pressed="true"] { background: var(--soft); }
:focus-visible { outline: 2px solid #a36c49; outline-offset: 3px; }
input { color: inherit; min-width: 0; }
input:not([type="range"],[type="checkbox"],[type="file"]) { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 9px 11px; width: 100%; }
input[type="checkbox"], input[type="range"] { accent-color: var(--accent); }
h2,p { margin: 0; }
h2 { font-size: 1.08rem; }
small { color: var(--muted); font-weight: 500; }
.top { display: flex; align-items: center; gap: 24px; min-height: 66px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.top nav,.header-actions { display: flex; align-items: center; gap: 8px; }
.top nav button { padding: 9px 15px; }
.header-actions { margin-left: auto; }
.header-actions button { font-size: 23px; padding: 3px 8px; }
.brand { font-weight: 780; font-size: 1.35rem; white-space: nowrap; }
.brand span { margin-right: 6px; }
.avatar { object-fit: cover; border-radius: 50%; border: 2px solid #fff7ee; box-shadow: 0 2px 5px #4d32252b; display: block; }
.header-actions .avatar { width: 43px; height: 43px; }
.layout { display: grid; grid-template-columns: 173px minmax(0,1fr) minmax(255px,21%); gap: 13px; padding: 12px; align-items: start; max-width: 1800px; margin: auto; }
.sidebar { display: grid; gap: 24px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav button { text-align: left; padding: 10px 14px; font-weight: 600; }
.sidebar nav span { margin-left: 9px; }
.identity { display: grid; justify-items: center; margin-top: 1px; padding: 6px; }
.identity .avatar { width: 84px; height: 84px; margin: 0 0 6px; }
.identity strong { font-size: 1.28rem; }
.identity strong span { color: #79834c; }
.identity small,.level { border-radius: 30px; background: var(--soft); padding: 1px 9px; }
.panel,dialog { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: 0 4px 14px var(--shadow); }
.cafe { padding: 8px; min-width: 0; }
.room-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 7px 5px 13px; }
.pill { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 30px; background: var(--panel); box-shadow: 0 2px 6px var(--shadow); }
#room-code { padding: 0 9px; border-inline: 1px solid var(--line); border-radius: 0; }
#viewport { overflow: hidden; position: relative; border-radius: 15px; background: #e6cdb9; isolation: isolate; }
#floor { position: relative; aspect-ratio: 1.32; min-height: 460px; transform: scale(var(--zoom,1)); transition: transform .24s; background: linear-gradient(90deg,#a2775520 1px,transparent 1px), linear-gradient(#a2775520 1px,transparent 1px), radial-gradient(ellipse at 15% 25%,#f9e8d6,#e3c1a9); background-size: 4% 5%,4% 5%,100%; box-shadow: inset 0 0 48px #91634655; }
.dark #floor { filter: brightness(.74) saturate(.84); }
.decor { position: absolute; pointer-events: none; background-size: 100% 100%; background-repeat: no-repeat; }
.counter { left: 36%; top: 1%; width: 49%; height: 19%; border-radius: 12px; }
.vines { inset: 0 auto auto 0; width: 22%; height: 19%; mask-image: linear-gradient(135deg,#000 52%,transparent 93%); z-index: 1; }
.shelf { right: 0; top: 23%; width: 5.2%; height: 27%; border-radius: 4px; }
.shelf.second { top: auto; bottom: 0; height: 20%; }
.plant { width: 9%; height: 12%; border-radius: 45%; mask-image: radial-gradient(ellipse,#000 57%,transparent 76%); }
.p1 { left: 13%; top: 16%; }.p2 { right: 6%; top: 18%; }.p3 { left: 3%; bottom: 14%; }.p4 { right: 1%; top: 56%; }
.runner { top: 21%; left: 44%; width: 21%; height: 5%; border: 3px dotted #986f4d75; border-radius: 6px; background: repeating-linear-gradient(90deg,#c29171a0 0 2px,#cda588aa 2px 4px); }
.window { left: 1%; top: 13%; width: 8%; height: 62%; border: 4px solid #967057; background: repeating-linear-gradient(160deg,#edddd2a0 0 37px,#ad8266 38px 42px); box-shadow: 4px 3px 0 #794e3650; }
.table { position: absolute; width: clamp(70px,13%,155px); aspect-ratio: 1; transform: translate(-50%,-50%); display: grid; place-items: center; }
.table:nth-child(1) { left: 29%; top: 36%; }.table:nth-child(2) { left: 79%; top: 36%; }.table:nth-child(3) { left: 53%; top: 58%; width: clamp(82px,16%,184px); }.table:nth-child(4) { left: 27%; top: 77%; }.table:nth-child(5) { left: 79%; top: 77%; }
.table::before { content: ""; position: absolute; inset: -40%; border-radius: 50%; background: repeating-radial-gradient(circle,#a6755723 0 2px,#b6876726 2px 4px); pointer-events: none; }
.table:nth-child(2n)::before { opacity: .35; }
.tabletop { position: absolute; inset: 0; z-index: 1; border-radius: 50%; border: 2px solid #8c6348; color: #3e271b; background: repeating-linear-gradient(46deg,transparent 0 12px,#956b5130 13px,transparent 14px 25px), radial-gradient(ellipse at 30% 20%,#d7ab87,#bd8e6c); box-shadow: 0 5px 0 #9e7458, 0 9px 12px #5536243b; font-weight: 700; }
.tabletop:hover,.tabletop[aria-pressed="true"] { background: repeating-linear-gradient(46deg,#dbb18d 0 12px,#c59a77 13px,#dbb18d 14px 25px); }
.table-icon { display: block; font-size: clamp(18px,2.6vw,36px); }
.seat { display: grid; place-items: center; position: absolute; width: 43%; height: 40%; border-radius: 42%; border: 2px solid #926a50; background: #ebcdb7; color: #69432c; box-shadow: 0 4px 0 #9e745846; }
.seat:disabled { cursor: default; opacity: 1; }
.seat:hover:not(:disabled),.table.selected .seat:not(.occupied) { background: #fff1da; }
.seat.s0 { top: -31%; }.seat.s1 { right: -32%; }.seat.s2 { bottom: -31%; }.seat.s3 { left: -32%; }
.seat.occupied { z-index: 2; width: 43%; height: 43%; padding: 0; border: 0; background: transparent; }
.seat .avatar { width: 100%; height: 100%; }
.seat.occupied::after { content: ""; position: absolute; right: 0; bottom: 3%; width: 16%; aspect-ratio: 1; background: #598333; border: 2px solid #fff; border-radius: 50%; }
.floor-controls { position: absolute; bottom: 10px; inset-inline: 10px; display: flex; justify-content: center; align-items: center; gap: 7px; flex-wrap: wrap; }
.seat-hint { position: absolute; bottom: 0; background: var(--panel); padding: 4px 10px; border-radius: 10px; }
.seat-hint:empty { display: none; }
.primary { color: #fff8f0; background: var(--accent); padding: 8px 13px; border-radius: 24px; }
.primary:hover { background: #986b4e; }
.tools { display: grid; gap: 10px; }
.widget { padding: 12px 15px; min-width: 0; }
.widget h2 { display: flex; gap: 8px; align-items: center; }
.widget h2 button { margin-left: auto; font-size: 20px; line-height: 1; }
.time-row,.segments { display: flex; align-items: center; gap: 9px; }
.time-row { justify-content: space-around; padding: 2px 0 9px; }
#time { font-size: clamp(28px,3vw,44px); font-weight: 740; font-variant-numeric: tabular-nums; }
.round { width: 41px; height: 41px; padding: 0; border-radius: 50%; flex: 0 0 41px; }
.round:not(.primary) { background: var(--soft); }
.segments { justify-content: space-around; border-top: 1px solid var(--line); padding-top: 5px; }
.segments button { font-size: .86rem; padding: 6px; }
#task-list { margin: 6px 0 0; padding: 0; list-style: none; }
#task-list label { display: flex; align-items: baseline; gap: 6px; padding: 2px 0; overflow-wrap: anywhere; }
form { display: flex; gap: 5px; }
#task-form { margin-top: 8px; }
#messages { max-height: 170px; min-height: 108px; overflow-y: auto; display: grid; align-content: start; gap: 10px; margin: 10px 0; }
.message { display: flex; gap: 8px; font-size: .83rem; overflow-wrap: anywhere; }
.message .avatar { width: 31px; height: 31px; }
.message small { margin-left: 6px; }
dialog { color: var(--ink); padding: 16px; width: min(465px,calc(100% - 28px)); max-height: 88vh; }
dialog::backdrop { background: #3923183b; }
dialog header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
dialog header button { font-size: 22px; }
#popup-body { display: grid; gap: 10px; }
.banner { width: 100%; height: 90px; object-fit: cover; border-radius: 12px; }
.profile-head { display: flex; align-items: center; gap: 12px; padding-left: 9px; }
.profile-head .avatar { width: 76px; height: 76px; margin-top: -31px; }
.profile-head strong { display: block; font-size: 1.18rem; }
.metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.metric,.activity,.room-item { border: 1px solid var(--line); padding: 9px; border-radius: 12px; background: var(--bg); }
.metric strong,.metric small { display: block; }
.bars { display: flex; justify-content: space-around; align-items: end; height: 83px; }
.bars span { display: grid; justify-items: center; }
.bars i { width: 13px; border-radius: 5px; background: #b18970; display: block; height: var(--height); }
.room-item { text-align: left; display: flex; justify-content: space-between; gap: 10px; }
#notice { position: fixed; z-index: 5; bottom: 12px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--panel); border-radius: 20px; padding: 7px 14px; }
#notice:empty { display: none; }
@media (max-width: 1120px) {
  .layout { grid-template-columns: 118px minmax(0,1fr) 240px; gap: 8px; }
  .sidebar nav button { padding-inline: 5px; font-size: .86rem; }
  .sidebar nav span { margin-left: 4px; }
  .widget { padding-inline: 10px; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 108px minmax(0,1fr); }
  .tools { grid-column: 2; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 610px) {
  .layout { display: block; padding: 7px; }
  .sidebar { display: none; }
  .top { padding: 4px 7px; gap: 4px; flex-wrap: wrap; }
  .top nav { order: 3; width: 100%; }
  .top nav button { padding: 5px 9px; }
  .tools { margin-top: 9px; }
  #floor { min-height: 400px; }
  .floor-controls { justify-content: flex-start; }
}
@media (max-width: 420px) { .tools { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.initials { display: grid; place-items: center; background: #9e6249; color: #fff9ee; font-weight: 750; font-size: .88rem; }
.identity .initials, .profile-head .initials { font-size: 1.6rem; }
.identity strong { overflow-wrap: anywhere; }
.initials.mia { background: #9b665f; }
.initials.tom { background: #596245; }
.banner { background: radial-gradient(circle at 76% 31%,#f8daaa 0 15px,transparent 16px), linear-gradient(163deg, transparent 57%,#bd8b79 58% 73%,#9b7067 74%),linear-gradient(#af8791,#f6bd93); }
.counter { display: flex; justify-content: space-around; align-items: center; padding: 5% 3% 4%; border: 2px solid #946346; border-bottom: 8px solid #a27254; background: repeating-linear-gradient(2deg,#d0a17b 0 8px,#c69470 9px,#d0a17b 11px 20px); box-shadow: 0 6px 9px #62422e45; }
.counter i { display: block; position: relative; height: 125%; min-height: 30px; border-radius: 5px; }
.machine { width: 30%; background: radial-gradient(circle at 23% 23%,#ffddae 0 5%,transparent 7%),radial-gradient(circle at 41% 23%,#cda984 0 5%,transparent 7%),linear-gradient(#7e695e 0 36%,#463b32 37% 77%,#685248 78%); border: 2px solid #5d4536; box-shadow: 0 3px 1px #6f4c38; }
.machine::after { content: ""; position: absolute; height: 24%; width: 22%; left: 43%; bottom: 16%; background: #f3d5b6; border-radius: 0 0 45% 45%; }
.cups { width: 20%; background: radial-gradient(circle,#fbebd5 0 35%,#a77753 37% 48%,transparent 50%) 0 0 / 50% 50%; }
.pastries { width: 30%; border: 3px solid #9b765e; background: radial-gradient(ellipse,#c7874c 0 26%,#e4b277 28% 39%,transparent 41%) 0 0 / 50% 50%,#f5d9bd; box-shadow: inset 0 0 0 2px #fff5; }
.shelf { border: 3px solid #85604a; background: repeating-linear-gradient(#683f2d55 0 21%,#8a5f47 21% 25%),repeating-linear-gradient(90deg,#c69a77 0 14%,#e7c5a2 15% 32%,#826b54 34% 48%,#d2ab92 50% 72%,#9a765d 74% 88%); box-shadow: -3px 4px 8px #62422e45; }
.plant { border-radius: 50%; mask-image: none; background: radial-gradient(ellipse at 29% 31%,#8b975d 0 15%,transparent 16%),radial-gradient(ellipse at 60% 24%,#647248 0 17%,transparent 18%),radial-gradient(ellipse at 76% 47%,#929a61 0 19%,transparent 20%),radial-gradient(ellipse at 38% 61%,#778459 0 18%,transparent 19%),radial-gradient(circle at 52% 53%,#755138 0 27%,#bf8c63 29% 43%,transparent 45%); filter: drop-shadow(2px 4px 2px #66452e44); }
.vines { background: radial-gradient(ellipse at 22% 34%,#708054 0 23%,transparent 25%) 0 0 / 27% 29%,radial-gradient(ellipse at 72% 62%,#8d9763 0 21%,transparent 24%) 0 0 / 23% 30%; }
.logout button { padding: 8px 14px; }
.login-page { display: grid; place-items: center; padding: 22px; }
.welcome { display: grid; grid-template-columns: 1fr 1fr; width: min(870px,100%); border: 1px solid var(--line); border-radius: 30px; background: var(--panel); box-shadow: 0 20px 65px #77513d25; overflow: hidden; }
.welcome-art { display: grid; align-content: center; justify-items: center; gap: 6px; padding: 38px 20px; background: repeating-linear-gradient(0deg,transparent 0 39px,#94684b16 40px 41px),linear-gradient(140deg,#f1d0b6,#d9a889); }
.welcome-title { font-size: clamp(26px,4vw,43px); font-weight: 760; letter-spacing: -.04em; }
.welcome-art p,.login-card > p { color: var(--muted); }
.saucer { display: grid; place-items: center; width: 155px; aspect-ratio: 1; margin-bottom: 20px; border-radius: 50%; background: radial-gradient(#c99676 0 62%,#f1dbc7 63% 67%,#e7c5ad 68%); box-shadow: 0 9px 26px #7a4d4660; }
.coffee { width: 110px; aspect-ratio: 1; position: relative; z-index: 0; border: 10px solid #fff6eb; border-radius: 50%; background: radial-gradient(#c98f60,#8a4e32 70%,#734126); display: grid; place-items: center; box-shadow: 0 4px 8px #633c37aa; }
.coffee::after { content: ""; position: absolute; left: calc(100% + 6px); width: 17px; height: 20px; border: 6px solid #fff6eb; border-left: 0; border-radius: 0 50% 50% 0; }
.coffee span { color: #ffdebb; font-size: 34px; }
.login-card { padding: clamp(21px,5vw,53px); }
.login-card h1 { margin: 0 0 5px; font-size: clamp(24px,3vw,32px); line-height: 1.12; letter-spacing: -.035em; }
.login-form { display: grid; gap: 13px; margin: 22px 0 13px; }
.login-form label { display: grid; gap: 5px; font-weight: 650; }
.login-form .primary { min-height: 43px; margin-top: 4px; }
.google-login { display: flex; justify-content: center; align-items: center; gap: 9px; min-height: 43px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); background: #fff8f1; border-radius: 23px; }
.google-login span { color: #3266be; font-weight: 800; }
.google-pending,.login-link { text-align: center; font-size: .88rem; }
.login-link { margin-top: 15px; }
.login-link a { color: var(--ink); }
.login-error { margin-top: 14px; border-radius: 10px; background: #f1d7d1; color: #672f29 !important; padding: 8px 11px; }
@media (max-width: 610px) {
  .welcome { grid-template-columns: 1fr; }
  .welcome-art { padding: 18px; }
  .saucer { display: none; }
}

[data-profile-image] { background-size: cover; background-position: center; }
[data-profile-image="avatar"] { background-image: var(--custom-avatar, none); }
html[style*="--custom-avatar"] [data-profile-image="avatar"] { color: transparent; }
[data-profile-image="banner"] { background-image: var(--custom-banner, radial-gradient(circle at 76% 31%,#f8daaa 0 15px,transparent 16px), linear-gradient(163deg, transparent 57%,#bd8b79 58% 73%,#9b7067 74%),linear-gradient(#af8791,#f6bd93)); }
.profile-editor { background: var(--bg); border-radius: 12px; padding: 8px 10px; }
.profile-editor summary { cursor: pointer; font-weight: 650; }
.profile-image-form { flex-wrap: wrap; align-items: end; border-bottom: 1px solid var(--line); padding: 8px 0; }
.profile-image-form label { display: grid; gap: 5px; flex: 1 1 186px; min-width: 0; }
.profile-image-form input[type="file"] { max-width: 100%; font-size: .85rem; }
.profile-image-form button { font-size: .85rem; }
.profile-editor-status:empty { display: none; }

.edit-profile-button { justify-self: start; border: 1px solid var(--line); padding: 7px 14px; font-weight: 650; }
.banner { height: auto; aspect-ratio: 25 / 7; }
.profile-edit { display: grid; gap: 13px; }
.profile-name { display: grid; gap: 5px; font-weight: 650; }
.profile-crops { display: grid; gap: 9px; }
.profile-crop { display: grid; gap: 7px; min-width: 0; padding: 11px; border: 1px solid var(--line); background: var(--bg); border-radius: 13px; }
.profile-crop h3 { font-size: .92rem; margin: 0; }
.crop-preview { position: relative; overflow: hidden; background-color: var(--soft); }
.profile-crop[data-kind=avatar] .crop-preview { width: 100px; aspect-ratio: 1; border-radius: 50%; }
.profile-crop[data-kind=banner] .crop-preview { width: 100%; aspect-ratio: 25 / 7; border-radius: 10px; }
.crop-preview:not(.saved-crop) { background-image: none; }
.crop-preview canvas { display: block; width: 100%; height: 100%; }
.crop-actions, .profile-edit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crop-picker { position: relative; display: inline-flex; cursor: pointer; padding: 6px 12px; background: var(--soft); border-radius: 20px; font-weight: 650; }
.crop-picker:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.crop-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.crop-remove { padding: 6px 9px; color: var(--muted); }
.profile-status:empty { display: none; }
.profile-edit-actions { justify-content: flex-end; position: sticky; bottom: -16px; padding: 8px 0 2px; background: var(--panel); }
.profile-cancel { padding: 8px 13px; }

#image-crop-dialog { width: min(560px, calc(100% - 24px)); }
.crop-stage { position: relative; display: grid; place-items: center; height: min(345px, 48vh); overflow: hidden; isolation: isolate; background: #32241d; border-radius: 12px; cursor: grab; touch-action: none; }
.crop-stage:active { cursor: grabbing; }
.crop-stage img { position: absolute; max-width: none; user-select: none; pointer-events: none; }
.crop-grid { position: relative; width: min(72%, 33vh); aspect-ratio: 1; pointer-events: none; outline: 1px solid #fff; box-shadow: 0 0 0 100vmax #160d0bc0; background: linear-gradient(to right,transparent calc(100% - 1px),#fff9 0) 0 0 / calc(100% / 3) 100%,linear-gradient(to bottom,transparent calc(100% - 1px),#fff9 0) 0 0 / 100% calc(100% / 3); }
.crop-stage[data-kind=banner] .crop-grid { width: 86%; aspect-ratio: 25 / 7; }
.crop-stage[data-kind=avatar] .crop-grid::after { content: ""; position: absolute; inset: 0; border: 1px dashed #fff; border-radius: 50%; }
.crop-help { margin: 9px 0; color: var(--muted); font-size: .9rem; }
.crop-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 7px; }
.crop-zoom { margin-right: auto; display: flex; gap: 3px; }
.crop-zoom button { min-width: 35px; padding: 4px; font-size: 1.23rem; background: var(--soft); }
.crop-zoom button:disabled { opacity: .45; }

.profile-identity { position: relative; min-width: 0; overflow-wrap: anywhere; }
.profile-handle:empty { display: none; }
.profile-identity:has(.edit-identity) { padding-right: 34px; }
.edit-icon { display: inline-grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--ink); box-shadow: 0 2px 6px var(--shadow); padding: 0; cursor: pointer; line-height: 1; }
.edit-identity { position: absolute; right: 0; top: 0; }
.profile-crop { display: block; position: relative; padding: 0; border: none; background: transparent; }
.profile-head .profile-crop { flex: 0 0 76px; height: 45px; align-self: start; }
.profile-crop .crop-actions { position: absolute; right: 7px; bottom: 7px; gap: 3px; z-index: 2; }
.profile-head .crop-actions { right: -7px; bottom: -2px; }
.profile-crop canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.profile-head .profile-crop canvas { top: -31px; width: 76px; height: 76px; border: 2px solid #fff7ee; border-radius: 50%; }
.profile-crop.image-removed .avatar { background-image: none; color: #fff9ee; }
.profile-crop.image-removed .banner { --custom-banner: initial; }
.profile-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.profile-fields label { display: grid; gap: 4px; font-size: .85rem; font-weight: 650; min-width: 0; }
.profile-edit-actions { position: static; padding: 0; }
.crop-dialog-actions { margin-top: 10px; }
@media (max-width: 360px) { .profile-fields { grid-template-columns: 1fr; } }

.crop-menu { position: absolute; right: 0; top: calc(100% + 5px); min-width: max-content; display: grid; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: 0 4px 14px var(--shadow); }
.profile-head .crop-menu { right: auto; left: 0; }
.crop-menu button { text-align: left; padding: 6px 10px; }

.profile-handle { display: block; font-size: .83rem; }
.profile-identity.name-editing { flex: 1; max-width: 260px; }
.profile-identity.name-editing > strong,
.profile-identity.name-editing > .profile-handle { display: none; }
.profile-fields { grid-template-columns: minmax(0,1fr); gap: 3px; }
.profile-fields input[name] { padding: 2px 5px; background: transparent; border: 1px solid var(--line); border-radius: 5px; font-weight: 700; }
.profile-fields .inline-handle { display: flex; align-items: center; gap: 2px; color: var(--muted); padding-left: 5px; }
.inline-handle input[name] { padding: 0 3px; font-weight: 500; color: var(--muted); }

/* Profile card */
#popup:has(.profile-head) {
  width: min(500px, calc(100% - 24px));
  padding: clamp(14px, 4vw, 22px);
  border-radius: 25px;
  box-shadow: 0 22px 70px #38241935, 0 4px 12px var(--shadow);
}
#popup:has(.profile-head) > header { margin-bottom: 14px; }
#popup:has(.profile-head) > header h2 { font-size: 1.2rem; letter-spacing: -.025em; }
#popup:has(.profile-head) > header button { width: 32px; height: 32px; padding: 0; border-radius: 50%; }
#popup:has(.profile-head) #popup-body { gap: 13px; }
#popup .banner { border-radius: 15px; }
#popup .profile-head { gap: 14px; padding-inline: 10px 3px; align-items: center; }
#popup .profile-head strong { font-size: 1.25rem; letter-spacing: -.025em; line-height: 1.2; }
#popup .profile-handle { margin-top: 3px; color: var(--muted); letter-spacing: .015em; }
#popup .profile-identity.name-editing { max-width: 265px; }
#popup .profile-fields { gap: 3px; }
#popup .profile-fields input[name] {
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  transition: background .15s, border-color .15s;
}
#popup .profile-fields input[name]:hover,
#popup .profile-fields input[name]:focus-visible { border-color: var(--line); background: var(--bg); }
#popup .profile-fields input[name]:focus-visible { outline-offset: 0; }
#popup .profile-fields input[name="name"] { font-size: 1.2rem; line-height: 1.25; letter-spacing: -.025em; }
#popup .profile-fields .inline-handle { font-size: .85rem; gap: 0; }
#popup .inline-handle input[name] { text-overflow: ellipsis; }
#popup .edit-icon { width: 29px; height: 29px; border-color: var(--line); }
#popup .edit-icon:hover, #popup .edit-icon[aria-expanded="true"] { background: var(--soft); }
#popup .edit-profile-button { border-radius: 20px; padding: 7px 13px; font-size: .875rem; }
#popup .profile-edit-actions { gap: 8px; padding-top: 7px; border-top: 1px solid var(--line); }
#popup .profile-edit-actions button { font-size: .86rem; }
#popup .profile-edit-actions .primary { font-weight: 650; padding: 9px 14px; }
#popup .metrics { gap: 8px; }
#popup .metric, #popup .activity { border-radius: 14px; padding: 11px; }
#popup .metric strong { font-size: 1.08rem; font-variant-numeric: tabular-nums; }
#popup .metric small, #popup .activity small { font-size: .76rem; }
#popup .bars { margin: 6px 0; border-bottom: 1px solid var(--line); padding-bottom: 5px; }

.room-leave { font-size: .85rem; }
.room-row { display: flex; gap: 6px; align-items: stretch; }
.room-row .room-item { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.room-delete { font-size: .84rem; color: var(--muted); padding: 4px 9px; }

/* Fixed café workspace */
.cafe-app { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; display: grid; grid-template-rows: auto minmax(0,1fr); }
html:has(.cafe-app) { overflow: hidden; overscroll-behavior: none; }
.cafe-app .layout { width: 100%; height: 100%; min-height: 0; align-items: stretch; }
.cafe-app .cafe { display: grid; grid-template-rows: auto minmax(0,1fr); min-height: 0; border-radius: 21px; }
.cafe-app .room-bar { padding-bottom: 9px; }
.cafe-app #floor { height: 100%; min-height: 0; aspect-ratio: auto; }
.cafe-app #viewport { container-type: size; }
.cafe-app .table { width: min(13cqw, 23cqh, 155px); }
.cafe-app .table:nth-child(3) { width: min(16cqw, 25cqh, 184px); }
.cafe-app .table-icon { font-size: clamp(.75rem, 5cqh, 2rem); }
.cafe-app .tabletop { font-size: clamp(.63rem, 2.8cqh, .95rem); padding: 0; }
.cafe-app .sidebar { align-content: start; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.cafe-app .tools { min-height: 0; overflow: auto; overscroll-behavior: contain; align-content: start; scrollbar-width: thin; }
.cafe-app .widget { border-radius: 17px; }
#task-list li + li { border-top: 1px solid var(--line); }
#task-list label { align-items: start; gap: 8px; padding: 5px 2px; cursor: pointer; }
#task-list input { margin-top: .32em; }
#task-list input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-thickness: .09em; }
.mobile-panes { display: none; }
@media (max-width: 900px), (max-height: 500px) {
  .cafe-app { grid-template-rows: auto minmax(0,1fr) auto; }
  .cafe-app .layout { display: grid; grid-template: minmax(0,1fr) / minmax(0,1fr); padding: 7px; }
  .cafe-app .sidebar { display: none; }
  .cafe-app .cafe, .cafe-app .tools { grid-area: 1 / 1; }
  .cafe-app[data-mobile-pane="floor"] .tools,
  .cafe-app:not([data-mobile-pane="floor"]) .cafe { display: none; }
  .cafe-app .tools { display: grid; grid-template-columns: minmax(0,1fr); padding: 2px; }
  .cafe-app .tools > .widget { display: none; }
  .cafe-app[data-mobile-pane="timer"] #timer-panel,
  .cafe-app[data-mobile-pane="task"] #task-panel,
  .cafe-app[data-mobile-pane="chat"] #chat-panel { display: block; }
  .mobile-panes { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 5px 7px max(5px,env(safe-area-inset-bottom)); gap: 3px; background: var(--panel); border-top: 1px solid var(--line); }
  .mobile-panes button { padding: 8px 2px; font-size: .77rem; font-weight: 650; }
  .cafe-app .table { width: min(17cqw, 22cqh, 155px); }
  .cafe-app .table:nth-child(3) { width: min(19cqw, 24cqh, 184px); }
  .cafe-app .seat { min-width: 15px; min-height: 15px; }
  .cafe-app .floor-controls { justify-content: center; pointer-events: none; }
}
@media (max-width: 610px) {
  .cafe-app .room-bar .pill { padding: 5px 8px; font-size: .75rem; gap: 4px; }
  .cafe-app .room-bar { padding: 2px 0 6px; }
}

/* Café surfaces and navigation */
.cafe-app {
  --bg: #f6f0e9;
  --panel: #fffaf4;
  --ink: #30251e;
  --muted: #736356;
  --line: #e8ded3;
  --accent: #744b35;
  --soft: #f0e4d8;
  background: var(--bg);
}
.dark .cafe-app {
  --bg: #261f1b;
  --panel: #302720;
  --ink: #f4e9df;
  --muted: #c5b1a0;
  --line: #493b31;
  --accent: #87583c;
  --soft: #46352b;
}
.cafe-app .top { min-height: 60px; background: var(--panel); }
.cafe-app .brand { font-size: 1.16rem; font-weight: 750; letter-spacing: -.03em; }
.cafe-app .top nav button, .cafe-app .sidebar nav button { font-size: .88rem; font-weight: 600; }
.cafe-app nav [aria-current="page"] { color: var(--ink); background: var(--soft); }
.cafe-app .identity { padding-block: 11px; }
.cafe-app .identity .avatar { width: 68px; height: 68px; }
.cafe-app .identity strong { font-size: 1.08rem; }
.cafe-app .identity small { padding: 0; background: transparent; }
.cafe-app .sidebar { gap: 16px; }
.cafe-app .panel { box-shadow: 0 2px 3px #35201408; }
.cafe-app .room-bar { gap: 6px; padding: 4px 0 9px; }
.cafe-app .room-bar .pill { box-shadow: none; background: transparent; }
.cafe-app #viewport { border-radius: 15px; }
.cafe-app .tools { gap: 9px; }
.cafe-app .widget h2 { font-size: .98rem; letter-spacing: -.015em; }
.cafe-app .widget h2 small { margin-left: 2px; font-size: .73rem; }
.cafe-app .widget .segments button { border-radius: 8px; }
.cafe-app #time { letter-spacing: -.045em; }
.cafe-app #chat-form button { width: 34px; flex: 0 0 34px; background: var(--soft); }
.cafe-app .mobile-panes button { border-radius: 9px; color: var(--muted); }
.cafe-app .mobile-panes button[aria-pressed="true"] { color: var(--ink); }
@media (max-width: 610px) {
  .cafe-app .top { min-height: 0; padding: 5px 8px; }
  .cafe-app .top nav { border-top: 1px solid var(--line); padding-top: 4px; }
}

.timer-settings { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 7px; }
.timer-settings summary { cursor: pointer; color: var(--muted); font-size: .83rem; font-weight: 650; }
#timer-settings-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: 8px; }
#timer-settings-form label { display: grid; gap: 4px; font-size: .78rem; }
#timer-settings-form input { padding: 6px 8px; }
#timer-settings-form button { justify-self: start; font-size: .8rem; }
#timer-settings-form small { grid-column: 1 / -1; font-size: .75rem; }

.desk-folder-label { display: block; max-width: 100%; margin-top: 4px; padding: 2px 3px; color: var(--muted); font-size: .83rem; overflow-wrap: anywhere; text-align: left; }
.folder-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.folder-tabs button { border: 1px solid var(--line); padding: 5px 9px; overflow-wrap: anywhere; }
.folder-heading { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding-top: 7px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.folder-place { background: var(--soft); padding: 5px 9px; font-size: .82rem; flex-shrink: 0; }
.folder-place:disabled { color: var(--muted); cursor: default; }
.folder-form { align-items: stretch; }
.folder-form button { flex-shrink: 0; }
.folder-task-list, .stats-breakdown ul { list-style: none; padding: 0; margin: 0; }
.folder-task-list li, .stats-breakdown li { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.folder-task-list label { display: flex; gap: 6px; min-width: 0; align-items: start; }
.folder-task-list input:checked + span { text-decoration: line-through; color: var(--muted); }
.folder-empty, .stats-breakdown p { color: var(--muted); font-size: .83rem; }
.stats-breakdown small { flex-shrink: 0; }
@media (max-width: 900px), (max-height: 500px) {
  .mobile-panes { grid-template-columns: repeat(5,minmax(0,1fr)); }
}

.room-section-title { margin: 0; font-size: .85rem; font-weight: 700; }
.room-item[aria-current="true"] { background: var(--soft); }
.room-code-details { font-size: .84rem; color: var(--muted); }
.room-code-details summary { cursor: pointer; }
.room-code-details form { margin-top: 6px; }

#popup:has(.folder-tabs) { width: min(490px,calc(100% - 24px)); padding: clamp(14px,4vw,21px); border-radius: 22px; }
#popup:has(.folder-tabs) #popup-body { gap: 11px; }
.folder-tabs button { border-radius: 999px; padding: 5px 11px; font-size: .86rem; }
.folder-tabs button[aria-pressed="true"] { border-color: transparent; font-weight: 700; }
.folder-form { gap: 6px; }
.folder-form input, .folder-form button { font-size: .87rem; }
.folder-heading { padding-top: 10px; }
.folder-place { border-radius: 999px; }
.folder-task-list li { min-height: 37px; }
.task-move { flex: 0 0 auto; }
.task-move summary { list-style: none; display: grid; place-items: center; width: 29px; height: 28px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 750; }
.task-move summary::-webkit-details-marker { display: none; }
.task-move summary:hover, .task-move[open] summary { background: var(--soft); }
.task-move-choices { display: grid; gap: 2px; max-width: 12em; padding: 6px; border-radius: 10px; background: var(--bg); }
.task-move-choices small { padding-inline: 5px; }
.task-move-choices button { text-align: start; padding: 4px 6px; overflow-wrap: anywhere; font-size: .84rem; }

.cafe-app .mobile-settings { display: none; }
.settings-panel { display: grid; gap: 6px; }
.settings-row, .settings-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 11px; border-radius: 11px; background: var(--bg); text-align: start; }
.settings-row select { min-width: 8rem; max-width: 62%; padding: 6px 8px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.settings-link::after { content: '›'; color: var(--muted); }
@media (max-width: 900px), (max-height: 500px) {
  .cafe-app .mobile-settings { display: block; }
}

.task-line { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
#task-list .task-line { min-height: 34px; padding-inline: 2px; }
.task-checkbox, #task-list .task-checkbox {
  appearance: none; flex: 0 0 18px; width: 18px; height: 18px; margin: 0; border: 1px solid #a8907d;
  border-radius: 6px; background: var(--panel); cursor: pointer; display: grid; place-items: center;
}
.task-checkbox:checked, #task-list .task-checkbox:checked { border-color: var(--accent); background: var(--accent); }
.task-checkbox:checked::after { content: ""; width: 8px; height: 4px; border-bottom: 2px solid #fff; border-left: 2px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.task-text { min-width: 0; padding: 3px 5px; border-radius: 6px; text-align: start; overflow-wrap: anywhere; }
.task-checkbox:checked + .task-text { color: var(--muted); text-decoration: line-through; }
.task-edit-form { flex: 1; min-width: 0; gap: 4px; }
.task-edit-form input:not([type]) { padding: 4px 6px; border-radius: 7px; }
.task-edit-form button { padding-inline: 7px; background: var(--soft); }
.learning-calendar { display: grid; gap: 8px; }
.calendar-header { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.calendar-header button { min-width: 32px; height: 30px; background: var(--soft); font-size: 1.15rem; }
.calendar-header button:disabled { opacity: .45; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; text-align: center; }
.calendar-day { min-height: 28px; border: 1px solid transparent; border-radius: 7px; padding: 2px; font-size: .78rem; font-variant-numeric: tabular-nums; }
.calendar-day.empty { background: var(--panel); }
.calendar-day.red,.calendar-legend .red::before { background: #f4ccc7; color: #472825; }
.calendar-day.yellow,.calendar-legend .yellow::before { background: #f4e4a8; color: #413618; }
.calendar-day.green,.calendar-legend .green::before { background: #cfe6c6; color: #2d4327; }
.calendar-day[aria-current="date"] { font-weight: 800; }
.calendar-day:hover, .calendar-day[aria-pressed="true"] { border-color: currentColor; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.calendar-legend small { display: inline-flex; align-items: center; gap: 4px; }
.calendar-legend small::before { content: ""; width: 9px; height: 9px; border-radius: 3px; }
.calendar-day-info { color: var(--muted); font-size: .85rem; }
.calendar-day-info:empty { display: none; }

#popup:has(.settings-panel) { width: min(410px,calc(100% - 24px)); padding: 20px; border-radius: 22px; }
.settings-panel { gap: 0; }
.settings-panel .settings-row, .settings-panel .settings-link { background: transparent; min-height: 46px; padding: 7px 2px; }
.settings-panel > * + * { border-top: 1px solid var(--line); border-radius: 0; }
.settings-panel .settings-link:hover { background: var(--soft); }
.theme-picker { display: flex; align-items: center; padding: 3px; gap: 2px; border-radius: 100px; background: var(--bg); border: 1px solid var(--line); }
.theme-picker button { width: 34px; height: 30px; border-radius: 100px; font-size: 1.05rem; line-height: 1; padding: 0; color: var(--muted); }
.theme-picker button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 4px var(--shadow); }
.gif-banner-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 15px; }

/* Café floor and furniture */
.cafe-app #viewport {
  border: 1px solid #c5ad96;
  border-radius: 19px;
  background: #e9d8c2;
}
.cafe-app #floor {
  background:
    linear-gradient(130deg, #fff9 0%, transparent 48%),
    repeating-linear-gradient(0deg, #96775624 0 1px, transparent 1px 100%),
    repeating-linear-gradient(90deg, #96775624 0 1px, transparent 1px 100%),
    linear-gradient(130deg, #f7eee1, #dfc7af);
  background-size: 100% 100%, 100% clamp(21px, 6cqh, 48px), clamp(21px, 6cqh, 48px) 100%, 100% 100%;
  box-shadow: inset 0 0 22px #7b5a3922;
}
.cafe-app .counter {
  border: 1px solid #9a775c;
  border-bottom: 5px solid #876047;
  border-radius: 14px;
  background: linear-gradient(165deg, #edcfaf, #bf9271);
  box-shadow: 0 5px 14px #60432e32;
}
.cafe-app .runner {
  border: 1px solid #aa8c73;
  border-radius: 10px;
  background: repeating-linear-gradient(90deg, #b9a78b 0 2px, #caba9c 2px 4px);
}
.cafe-app .window {
  border: 2px solid #a4856b;
  border-radius: 6px;
  background:
    repeating-linear-gradient(165deg, transparent 0 13%, #9d8168 13% 14%, transparent 14% 15%),
    linear-gradient(90deg, #e4d2bb, #fff9e9);
  box-shadow: 2px 3px 6px #5b412728;
}
.cafe-app .vines {
  width: 17%;
  height: 13%;
  opacity: .72;
  background:
    radial-gradient(ellipse at 30% 31%, #657550 0 22%, transparent 24%) 0 0 / 22% 36%,
    radial-gradient(ellipse at 65% 62%, #8e9b69 0 21%, transparent 23%) 0 0 / 24% 32%;
}
.cafe-app .table::before {
  inset: -35%;
  border: 1px solid #9f886948;
  background: repeating-radial-gradient(circle, #baa98b33 0 2px, #e5d4b94d 2px 4px);
}
.cafe-app .tabletop {
  border: 1px solid #926f53;
  color: #3c2a1e;
  background:
    repeating-linear-gradient(24deg, #78533409 0 1px, transparent 1px 10px),
    radial-gradient(ellipse at 25% 18%, #e4bc94, #c79670);
  box-shadow: inset 0 0 0 3px #fff2, 0 4px 0 #926b51, 0 7px 12px #60442f32;
}
.cafe-app .tabletop:hover, .cafe-app .tabletop[aria-pressed="true"] {
  background: radial-gradient(ellipse at 25% 18%, #f3cca1, #d5a77e);
  box-shadow: inset 0 0 0 3px #fff5, 0 4px 0 #926b51, 0 7px 12px #60442f32;
}
.cafe-app .table-icon { line-height: 1.04; margin-bottom: 3px; }
.cafe-app .seat:not(.occupied) {
  border: 1px solid #7f876c;
  background: linear-gradient(145deg, #d9ddc7, #a8b092);
  box-shadow: inset 0 0 0 2px #fff3, 0 3px 5px #51433230;
}
.cafe-app .table.selected .seat:not(.occupied) {
  background: #f6f1dc;
  color: #4c5d39;
  border-color: #899575;
}

/* Task editing and folder menu */
.task-edit-form { align-items: center; gap: 5px; }
.task-edit-form input:not([type]) {
  flex: 1;
  width: 0;
  min-height: 29px;
  background: var(--panel);
  border-color: var(--line);
  outline: 0;
  padding: 3px 7px;
  font-size: .87rem;
}
.task-edit-form input:not([type]):focus-visible {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.task-edit-form input::selection { background: var(--soft); color: var(--ink); }
.task-edit-form button {
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  padding: 0;
  border-radius: 7px;
  font-size: .92rem;
}
.task-edit-form button[type="button"] { background: transparent; color: var(--muted); }
.task-edit-form button:hover { background: var(--soft); }
.task-move { position: relative; }
.task-move summary { border: 1px solid transparent; }
.task-move[open] { z-index: 3; }
.task-move[open] summary { border-color: var(--line); }
.task-move-choices {
  position: absolute;
  right: 0;
  bottom: calc(100% + 5px);
  min-width: 132px;
  max-width: min(210px, 65vw);
  max-height: min(180px, 35vh);
  overflow: auto;
  padding: 5px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 7px 18px #32221926;
}
.task-move-choices small { padding: 4px 6px 2px; font-size: .72rem; }
.task-move-choices button { padding: 5px 6px; }

/* Language chooser */
.language-picker { min-width: min(130px, 52%); }
.language-picker > button { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); font-size: .87rem; font-weight: 600; }
.language-picker > button::after { content: '⌄'; color: var(--muted); }
.language-options { position: fixed; inset: auto; margin: 0; padding: 5px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--panel); box-shadow: 0 8px 22px #2a1b1933; overflow: auto; }
.language-options:popover-open { display: grid; gap: 2px; }
.language-options button { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px; border-radius: 6px; text-align: start; font-size: .85rem; }
.language-options button[aria-pressed="true"]::after { content: '✓'; color: var(--accent); }
.language-row { align-items: start; }
.language-row > span { padding-top: 7px; }

/* Login and registration */
.login-page {
  --bg: #f5eee5;
  --panel: #fffaf4;
  --ink: #32261e;
  --muted: #6f5c4e;
  --line: #eaded0;
  --accent: #714832;
  background: radial-gradient(ellipse at 18% 8%, #fffaf4, #f0e6d9 85%);
  min-height: 100dvh;
}
.login-page .welcome {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  width: min(790px, 100%);
  border-radius: 24px;
  box-shadow: 0 18px 48px #60442e17;
}
.login-page .welcome-art {
  background: radial-gradient(ellipse at 38% 26%, #f6e3ce, #d6ad8d);
  padding: 34px 20px;
}
.login-page .welcome-title { font-family: Georgia, serif; font-weight: 500; letter-spacing: -.055em; }
.login-page .saucer { width: 132px; margin-bottom: 17px; }
.login-page .coffee { width: 94px; }
.login-page .login-card { padding: clamp(22px, 5vw, 48px); }
.login-page .login-card h1 { font-size: clamp(1.65rem, 4vw, 2.05rem); }
.login-page .login-card > p { font-size: .9rem; }
.login-page .login-form { gap: 13px; margin: 20px 0 10px; }
.login-page .login-form label { font-size: .85rem; }
.login-page .login-form input { background: var(--panel); min-height: 42px; border-radius: 9px; }
.login-page .login-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.login-page .login-form .primary { border-radius: 10px; font-weight: 700; }
.login-page .google-login { border-radius: 10px; }
.login-page .login-link { margin-top: 16px; }
.login-page .login-link a { text-underline-offset: 3px; }
@media (max-width: 610px) {
  .login-page { padding: 12px; }
  .login-page .welcome { grid-template-columns: minmax(0,1fr); border-radius: 19px; }
  .login-page .welcome-art { padding: 17px 12px; }
}


.cafe-app .logout button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; font-size: .82rem; font-weight: 650; white-space: nowrap; }
.logout-door { position: relative; display: inline-block; width: 12px; height: 15px; border: 1.5px solid currentColor; border-radius: 2px 2px 0 0; }
.logout-door::after { content: ''; position: absolute; right: 2px; top: 6px; width: 2px; height: 2px; border-radius: 50%; background: currentColor; }
@media (max-width: 610px) {
  .cafe-app .top .header-actions { gap: 2px; }
  .cafe-app .header-actions button { padding-inline: 4px; }
  .cafe-app .header-actions .avatar { width: 34px; height: 34px; }
  .cafe-app .logout button { font-size: .74rem; padding-inline: 4px; }
}

.session-choices { display: grid; gap: 7px; }
.room-away { font-size: .83rem; }
.seat.occupied.away::after {
  content: '☾';
  display: grid;
  place-items: center;
  width: clamp(12px, 25%, 20px);
  background: #675582;
  color: #fff8ec;
  font-size: clamp(8px, 2cqh, 12px);
  line-height: 1;
}
.time-row button:disabled { opacity: .5; cursor: default; }

/* Account actions and full-width profile cover */
.cafe-app .logout button {
  min-height: 34px;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
}
.cafe-app .logout button:hover,
.cafe-app .logout button:focus-visible { background: var(--soft); color: var(--ink); }
.logout-door { width: 11px; height: 13px; border-radius: 3px 3px 1px 1px; }
.logout-door::after { top: 5px; }
.session-choices .room-item { align-items: center; border-radius: 10px; font-weight: 600; }
.session-choices .room-item:hover { background: var(--soft); }

#popup:has(.banner) {
  --profile-padding: clamp(14px, 4vw, 22px);
  padding: 0 var(--profile-padding) var(--profile-padding);
}
#popup:has(.banner) > header {
  position: absolute;
  z-index: 4;
  inset: 0 0 auto;
  margin: 0;
  padding: 10px var(--profile-padding) 16px;
  background: linear-gradient(#21170d8c, transparent);
  color: #fffaf3;
  pointer-events: none;
}
#popup:has(.banner) > header h2 { font-size: .96rem; text-shadow: 0 1px 4px #21170d; }
#popup:has(.banner) > header button {
  pointer-events: auto;
  background: #21170d70;
  color: #fffaf3;
}
#popup:has(.banner) > header button:hover { background: #21170dbf; }
#popup-body > .banner,
#popup-body > .profile-crop[data-kind="banner"] { margin-inline: calc(-1 * var(--profile-padding)); }
#popup #popup-body .banner,
#popup-body > .profile-crop[data-kind="banner"] > :is(canvas, .gif-banner-preview) {
  border-radius: 24px 24px 0 0;
}
#popup #popup-body .banner { min-height: 115px; }
#popup-body > .profile-crop[data-kind="banner"] > .crop-actions { right: var(--profile-padding); }
@media (max-width: 610px) {
  .cafe-app .logout button { padding-inline: 5px; min-height: 30px; }
}

.profile-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.profile-presence { padding: 7px 13px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); font-size: .875rem; font-weight: 650; }
.profile-presence.is-away { background: var(--soft); color: var(--ink); }

/* The cover stretches into both sides of the dialog padding. */
#popup #popup-body > .banner,
#popup-body > .profile-crop[data-kind="banner"] {
  width: auto;
  justify-self: stretch;
}
#popup #popup-body .banner,
#popup-body > .profile-crop[data-kind="banner"] > :is(canvas, .gif-banner-preview) {
  mask-image: linear-gradient(to bottom, #000 0%, #000 68%, transparent 100%);
}
#popup:has(.banner) > header button {
  position: relative;
  width: 30px;
  height: 30px;
  font-size: 0;
  border: 1px solid #fff7ec52;
  background: #21170d49;
  backdrop-filter: blur(8px);
}
#popup:has(.banner) > header button::before,
#popup:has(.banner) > header button::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 12px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}
#popup:has(.banner) > header button::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
#popup:has(.banner) > header button:hover { background: #21170d91; }

.cafe-app .logout button { border-color: transparent; gap: 8px; }
.logout-door { width: 13px; height: 15px; border-radius: 2px; border-right-width: 1px; }
.logout-door::before { content: ''; position: absolute; top: 0; bottom: 0; left: -1px; width: 8px; border: 1px solid currentColor; border-radius: 2px; background: var(--panel); transform: skewY(15deg); transform-origin: left center; }
.logout-door::after { left: 4px; right: auto; top: 6px; }
@media (max-width: 900px), (max-height: 500px) {
  .cafe-app .mobile-panes { gap: 2px; box-shadow: 0 -3px 14px #3925170d; }
  .cafe-app .mobile-panes button { display: grid; place-items: center; min-width: 0; min-height: 42px; gap: 2px; padding: 3px 1px; line-height: 1.12; font-size: clamp(.64rem, 2.85vw, .78rem); overflow-wrap: anywhere; }
  .pane-icon { font-size: 1.03rem; line-height: 1; }
  .cafe-app .tools > .widget { padding: 14px; }
  .cafe-app #chat-panel #messages { max-height: min(54dvh, 420px); }
}
@media (max-width: 610px) {
  .cafe-app .top { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 3px; padding: 5px 8px 4px; }
  .cafe-app .top .brand { justify-self: start; font-size: clamp(.88rem, 3.7vw, 1.05rem); padding-inline: 2px; }
  .cafe-app .brand span { margin-right: 2px; }
  .cafe-app .top nav { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px; margin-top: 1px; }
  .cafe-app .top nav button { font-size: .74rem; min-width: 0; padding: 5px 2px; }
  .cafe-app .top .header-actions { margin: 0; }
  .cafe-app .top .header-actions button { font-size: 18px; min-width: 27px; }
  .cafe-app .top .header-actions .avatar { width: 29px; height: 29px; }
  .cafe-app .logout button { padding-inline: 3px; gap: 4px; font-size: .7rem; }
  .cafe-app .room-bar { padding-top: 1px; }
  .cafe-app .room-bar .pill { max-width: 100%; overflow-wrap: anywhere; }
  .cafe-app #viewport { border-radius: 13px; }
}

.guest-profile { display: flex; align-items: center; gap: 12px; }
.guest-profile .avatar { width: 54px; height: 54px; }

#popup .guest-profile { padding-bottom: 5px; }
.guest-status { margin-inline-start: auto; flex-shrink: 0; border-radius: 20px; padding: 4px 8px; background: var(--soft); color: var(--ink); }
.guest-status.is-away { background: #e7dff1; color: #4a385c; }

#chat-room { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Minimal café floor */
.cafe-app #viewport { border: 0; border-radius: 15px; background: #eee4d6; }
.cafe-app #floor {
  background-color: #efe6d8;
  background-image: linear-gradient(#d3c1aa4a 1px, transparent 1px), linear-gradient(90deg, #d3c1aa4a 1px, transparent 1px);
  background-size: 44px 44px;
  box-shadow: none;
}
.cafe-app .table::before { background: #d7c9b141; border: 0; inset: -29%; }
.cafe-app .tabletop { background: #dcb692; border: 1px solid #a27c5b; box-shadow: 0 3px 0 #ab8262; }
.cafe-app .tabletop:hover,.cafe-app .tabletop[aria-pressed="true"] { background: #ebc7a5; box-shadow: 0 3px 0 #ab8262; }
.cafe-app .seat:not(.occupied) { background: #cbd0ba; border: 1px solid #92997e; box-shadow: none; }
.cafe-app .table.selected .seat:not(.occupied) { background: #eef0df; }
.cafe-app .counter { background: #d6af8c; border: 1px solid #a37d60; border-bottom: 3px solid #aa8262; box-shadow: none; }
.cafe-app .window { background: repeating-linear-gradient(0deg,#e8dac8 0 18%,#ae967f 18% 19%,#e8dac8 19% 20%); border: 1px solid #ae967f; box-shadow: none; }
.cafe-app .runner { background: #cfc0a8; border: 0; }
.cafe-app .plant { filter: none; }
.cafe-app .shelf { box-shadow: none; }
.cafe-app .vines { opacity: .45; }
.privacy-picker button { width: auto; padding-inline: 8px; font-size: .76rem; }
.guest-privacy { padding-inline: 10px; }
#popup-body > .guest-profile:first-child .avatar { margin-top: 0; }

.chat-avatar-link { flex: 0 0 auto; align-self: start; padding: 0; border-radius: 50%; }
.chat-author-link { padding: 0; border-radius: 3px; font-weight: 700; text-align: start; }
.chat-author-link:hover { background: transparent; text-decoration: underline; text-underline-offset: 2px; }

.portrait-with-image { position: relative; overflow: hidden; }
.portrait-with-image img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.chat-avatar-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#popup:has(.banner) > header button {
  width: 32px;
  height: 32px;
  border: 0;
  background: #21170da3;
  box-shadow: 0 1px 4px #21170d38;
}
#popup:has(.banner) > header button:hover { background: #21170dd0; }
#popup:has(.banner) > header button::before,
#popup:has(.banner) > header button::after { width: 11px; height: 1.5px; }
.mobile-desktop-note { display: none; }
@media (max-width: 610px) {
  .cafe-app { grid-template-rows: auto minmax(0,1fr) auto auto; }
  .cafe-app .top nav { padding-top: 3px; }
  .cafe-app .mobile-panes { border-bottom: 0; box-shadow: none; padding-bottom: 2px; }
  .cafe-app .mobile-panes button { min-height: 40px; }
  .mobile-desktop-note {
    display: block;
    margin: 0;
    padding: 3px 8px max(5px, env(safe-area-inset-bottom));
    background: var(--panel);
    color: var(--muted);
    font-size: .67rem;
    text-align: center;
  }
}

.settings-colors .color-row + .color-row { border-top: 1px solid var(--line); }
.color-controls { display: flex; align-items: center; gap: 6px; }
.color-controls input[type="color"] { width: 34px; height: 30px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); cursor: pointer; }
.color-controls input[type="text"] { width: 82px; padding: 5px 6px; background: var(--panel); font: .8rem ui-monospace, monospace; border-radius: 7px; }
.color-controls input[aria-invalid="true"] { border-color: #b64f46; }
.settings-color-reset { display: block; margin-left: auto; padding: 4px 6px 7px; font-size: .76rem; color: var(--muted); }

.cafe-app.custom-accent .task-checkbox:checked::after { border-color: var(--on-custom-accent); }

.color-swatch { display: grid; place-items: center; padding: 3px; width: 34px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.color-swatch::before { content: ''; display: block; width: 100%; height: 100%; border-radius: 5px; background: var(--swatch); box-shadow: inset 0 0 0 1px #0002; }
.color-swatch:hover { border-color: var(--muted); }
.color-palette { position: fixed; inset: auto; margin: 0; padding: 9px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--panel); box-shadow: 0 8px 22px #2a1b1933; overflow: auto; }
.color-palette:popover-open { display: grid; gap: 10px; }
.color-field { position: relative; height: 110px; border-radius: 7px; cursor: crosshair; touch-action: none; background: linear-gradient(transparent,#000),linear-gradient(90deg,#fff,hsl(var(--hue) 100% 50%)); }
.color-dot { position: absolute; width: 12px; height: 12px; border: 2px solid white; border-radius: 50%; transform: translate(-50%,-50%); box-shadow: 0 0 0 1px #0009; pointer-events: none; }
.color-palette input[type="range"] { appearance: none; width: 100%; margin: 0; height: 10px; border-radius: 10px; background: linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red); cursor: pointer; }
.color-palette input[type="range"]::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; border: 2px solid white; border-radius: 50%; background: transparent; box-shadow: 0 0 0 1px #0007; }
.color-palette input[type="range"]::-moz-range-thumb { width: 11px; height: 11px; border: 2px solid white; border-radius: 50%; background: transparent; box-shadow: 0 0 0 1px #0007; }

/* Quiet, fixed room palette */
.cafe-app #viewport {
  --accent: #744b35;
  --soft: #f0e4d8;
  --panel: #fffaf4;
  --ink: #30251e;
  border-radius: 14px;
}
.dark .cafe-app #viewport { --panel: #302720; --ink: #f4e9df; }
.cafe-app #floor {
  background-color: #efe8dc;
  background-image: linear-gradient(#ad968021 1px, transparent 1px), linear-gradient(90deg, #ad968021 1px, transparent 1px);
  background-size: 48px 48px;
}
.cafe-app .vines, .cafe-app .runner { display: none; }
.cafe-app .window { width: 5%; opacity: .54; }
.cafe-app .shelf { width: 3.6%; opacity: .8; }
.cafe-app .plant { width: 6.8%; height: 9%; opacity: .88; }
.cafe-app .counter {
  height: 16%;
  top: 3%;
  border: 1px solid #b69375;
  border-radius: 11px;
  background: #d8bb9f;
  padding: 1.2% 4%;
}
.cafe-app .counter i { height: 52%; min-height: 16px; box-shadow: none; }
.cafe-app .counter .cups { display: none; }
.cafe-app .table::before { inset: -27%; background: #d6c8b027; }
.cafe-app .tabletop {
  background: #dfc1a3;
  border: 1px solid #b49375;
  box-shadow: 0 2px 0 #b5957c;
  font-weight: 660;
  letter-spacing: -.015em;
}
.cafe-app .tabletop:hover,.cafe-app .tabletop[aria-pressed="true"] { background: #ecd2b8; box-shadow: 0 2px 0 #b5957c; }
.cafe-app .tabletop.own-table { border-color: #8c775d; }
.cafe-app .seat:not(.occupied) { background: #ccd0bf; border-color: #a0aa91; border-radius: 39%; }
.cafe-app .seat:not(.occupied):not(:disabled):hover { background: #f7f4e7; }
.cafe-app #viewport button:focus-visible { outline-color: #875e42; }

#popup:has(.settings-panel) { padding: clamp(14px, 5vw, 21px); border-radius: 18px; }
#popup:has(.settings-panel) > header { margin-bottom: 4px; }
#popup:has(.settings-panel) > header h2 { font-size: 1.12rem; letter-spacing: -.025em; }
.settings-panel .settings-row { font-size: .9rem; gap: 8px; }
.settings-panel .settings-colors { padding-top: 2px; }
.settings-panel .settings-colors .color-row { min-height: 39px; }
.color-controls { gap: 5px; }
.color-controls .color-swatch { width: 30px; height: 29px; }
.color-controls input[type="text"] { width: 80px; }


.color-controls { gap: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.color-controls .color-swatch { border: 0; background: transparent; margin-inline: 3px; }
.color-controls input[type="text"] { border: 0; border-inline-start: 1px solid var(--line); border-radius: 0 8px 8px 0; background: transparent; }
.color-controls:has(input[aria-invalid="true"]) { border-color: #b64f46; }

.study-cards, .study-form { display: grid; gap: 10px; }
.study-face { display: grid; place-items: center; min-height: 136px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--bg); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.05rem; }
.study-face[aria-pressed="true"] { background: var(--soft); }
.study-controls { display: flex; justify-content: center; align-items: center; gap: 10px; }
.study-controls button { width: 34px; height: 30px; background: var(--soft); font-size: 1.15rem; }
.study-controls button:disabled { opacity: .45; }
.study-form label { display: grid; gap: 4px; min-width: 0; font-size: .84rem; }
.study-form textarea { width: 100%; resize: vertical; color: inherit; font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.study-form input[type="file"] { width: 100%; }
.study-secondary { justify-self: start; border: 1px solid var(--line); padding: 5px 9px; font-size: .84rem; }
.study-cards a, .study-status { color: var(--muted); overflow-wrap: anywhere; font-size: .83rem; }
.study-status:empty { display: none; }
.study-video summary { cursor: pointer; }
.study-video a { display: inline-block; margin: 5px 0; }
.study-video iframe { display: block; width: 100%; min-height: 200px; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; }


.study-import { justify-self: start; }
.study-set-choice { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .84rem; }
.study-set-choice select { flex: 1; min-width: 0; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.study-form summary { color: var(--muted); cursor: pointer; font-size: .84rem; margin-bottom: 4px; }

.settings-design {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.settings-design h3 { margin: 0; font-size: .95rem; }
.settings-colors summary { cursor: pointer; padding-block: 6px; font-size: .82rem; }
:root {
  --bg: #fff;
  --panel: #fff;
  --ink: #22252a;
  --muted: #616770;
  --line: #e5e7eb;
  --accent: #282b30;
  --soft: #f3f4f6;
  --shadow: #17213109;
}
body { background: var(--bg); }
.cafe-app {
  --bg: #fff;
  --panel: #fff;
  --ink: #22252a;
  --muted: #616770;
  --line: #e5e7eb;
  --accent: #282b30;
  --soft: #f3f4f6;
  --shadow: #17213109;
}
.dark .cafe-app:not(.custom-surface) {
  --bg: #151619;
  --panel: #1e2024;
  --ink: #f4f5f7;
  --muted: #b7bbc4;
  --line: #383c44;
  --accent: #e9ebef;
  --soft: #2b2e35;
}
.cafe-app :is(.panel, .pill) { box-shadow: none; }
.cafe-app #viewport {
  --panel: #fff;
  --ink: #22252a;
  --accent: #282b30;
  --soft: #f3f4f6;
  background: #f6f7f8;
  border: 1px solid var(--line);
}
.cafe-app #floor {
  background: #f6f7f8;
  box-shadow: none;
  filter: none;
}
.cafe-app .table:nth-child(1) { left: 25%; top: 25%; }
.cafe-app .table:nth-child(2) { left: 75%; top: 25%; }
.cafe-app .table:nth-child(3) { left: 50%; top: 50%; }
.cafe-app .table:nth-child(4) { left: 25%; top: 75%; }
.cafe-app .table:nth-child(5) { left: 75%; top: 75%; }
.cafe-app .table::before { content: none; }
.cafe-app #floor .tabletop {
  color: #22252a;
  background: #fff;
  border: 1px solid #22252a2b;
  border-radius: 30%;
  box-shadow: 0 2px 4px #12182010;
}
.cafe-app #floor .tabletop:is(:hover, [aria-pressed="true"], .own-table) { border-color: #454b55; }
.cafe-app #floor .seat:not(.occupied) {
  color: #22252a;
  background: #e4e8f0;
  border: 1px solid #22252a2b;
  border-radius: 30%;
  box-shadow: none;
}
.cafe-app #floor .table.selected .seat:not(.occupied) { border-color: #454b55; }
.cafe-app #viewport button:focus-visible { outline-color: #535a67; }
.cafe-app:not(.custom-accent) .primary:hover { background: var(--accent); opacity: .88; }
.dark .cafe-app:not(.custom-accent) .primary { color: #22252a; }

/* Workspace layout */
.cafe-app {
  --line: #e7eaf0;
  --soft: #edf2fc;
  --accent: #254ca3;
}
.cafe-app .top { padding-inline: clamp(12px, 3vw, 44px); }
.cafe-app .brand { display: flex; align-items: center; gap: 9px; }
.brand .brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  aspect-ratio: 1;
  margin: 0;
  border-radius: 9px;
  background: var(--ink);
  color: var(--panel);
  font-size: .86rem;
  letter-spacing: -.06em;
}
.cafe-app .layout { gap: 0; padding: 0; }
.cafe-app .sidebar { border-inline-end: 1px solid var(--line); padding: 18px 10px; gap: 18px; }
.cafe-app .identity {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  text-align: start;
}
.cafe-app .identity .avatar { width: 30px; height: 30px; margin: 0; flex: none; }
.cafe-app .identity strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: .86rem; }
.cafe-app .cafe { border: 0; border-radius: 0; padding: clamp(12px, 2.4vw, 36px); }
.cafe-app .room-bar { padding: 0 0 14px; align-items: end; }
.room-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.room-heading h1 { flex-basis: 100%; margin: 0; font-size: clamp(1.45rem, 2.9vw, 2.65rem); letter-spacing: -.055em; line-height: 1.1; }
.room-heading #population { color: var(--muted); font-size: .82rem; }
.cafe-app .tools { padding: 14px; border-inline-start: 1px solid var(--line); background: var(--bg); }
.cafe-app .tools > .widget { border-width: 0 0 1px; border-radius: 0; padding: 13px 3px; }
.cafe-app #time { font-variant-numeric: tabular-nums; font-weight: 550; letter-spacing: -.065em; }
.cafe-app #viewport { border-radius: 14px; border-color: var(--line); }
.cafe-app #floor {
  background-color: #f8faff;
  background-image: radial-gradient(#c1cee4 1px, transparent 1px);
  background-size: 16px 16px;
}
.cafe-app #tables {
  position: absolute;
  inset: 8% 7% 11%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
}
.cafe-app #tables .table {
  position: relative;
  inset: auto;
  transform: none;
  grid-column: span 2;
  width: min(57%, 164px, 32cqh);
  aspect-ratio: 1.58;
}
.cafe-app #tables .table:nth-child(4) { grid-column: 2 / span 2; }
.cafe-app #tables .table:nth-child(5) { grid-column: 4 / span 2; }
.cafe-app #floor .tabletop { border-radius: 12px; border-color: #cfd8e8; box-shadow: 0 2px 0 #dfe6f2; }
.cafe-app #floor .tabletop:is(:hover, [aria-pressed="true"], .own-table) { border-color: #4767a4; }
.cafe-app #floor .seat:not(.occupied) { border-radius: 5px; border-color: #9faec8; background: #e8eef9; }
.cafe-app #floor .table.selected .seat:not(.occupied) { border-color: #4767a4; background: #dce8ff; }
.cafe-app #floor .seat:is(.s0, .s2):not(.occupied) { width: 33%; height: 32%; }
.cafe-app #floor .seat:is(.s1, .s3):not(.occupied) { width: 24%; height: 48%; }
.cafe-app #floor .seat.s1 { right: -21%; }
.cafe-app #floor .seat.s3 { left: -21%; }
.cafe-app #floor .seat.occupied { width: min(44%, 42px); height: auto; aspect-ratio: 1; }
#popup:has(.settings-panel) { border-radius: 14px; }
.settings-design { padding: 0 0 8px; margin: 0; border: 0; border-radius: 0; gap: 0; }

@media (max-width: 720px) {
  .cafe-app .cafe { padding: 12px; }
  .cafe-app .tools { padding: 10px 14px; border: 0; }
  .cafe-app #tables { inset: 6% 5% 10%; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); }
  .cafe-app #tables .table:nth-child(4) { grid-column: span 2; }
  .cafe-app #tables .table:nth-child(5) { grid-column: 2 / span 2; }
}

/* Studio workspace */
.cafe-app {
  --accent: #222823;
  --soft: #eff2eb;
  --line: #e3e6df;
  --studio-caramel: #f1c499;
}
.cafe-app .top { min-height: 68px; }
.cafe-app .brand .brand-mark { background: var(--studio-caramel); color: #222823; border-radius: 50%; }
.cafe-app .top nav button { border-radius: 7px; }
.cafe-app .sidebar nav button { border-radius: 7px; padding-inline: 9px; }
.cafe-app .room-bar { align-items: center; justify-content: flex-start; gap: 10px; }
.room-heading { margin-inline-end: auto; }
.room-heading h1 { font-size: clamp(1.5rem, 3.2vw, 3rem); }
.room-capacity { display: grid; gap: 4px; width: clamp(52px, 7vw, 100px); color: var(--muted); text-align: end; font-size: .72rem; font-variant-numeric: tabular-nums; }
.capacity-track { height: 4px; border-radius: 8px; overflow: hidden; background: var(--line); }
#capacity-fill { display: block; height: 100%; background: var(--accent); transition: width .3s ease; }
.cafe-app #viewport { border-radius: 22px; }
.cafe-app .tools { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.cafe-app .tools > .widget:not(#timer-panel) { padding-inline: 6px; }
.cafe-app .tools > #timer-panel {
  --ink: #fff;
  --muted: #e2c7b4;
  --line: #ffffff24;
  --soft: #ffffff16;
  --panel: #3a2921;
  --bg: #4d362b;
  --accent: #f1c499;
  padding: 16px;
  border-radius: 16px;
  color: var(--ink);
}
.cafe-app #timer-panel .primary { background: var(--accent); color: #222823; }
.cafe-app #timer-panel .primary:hover { background: var(--accent); opacity: .85; }
.cafe-app #timer-panel .time-row { flex-wrap: wrap; }
.cafe-app #timer-panel #time { font-size: clamp(2rem, 3vw, 3.3rem); }
.cafe-app #chat-panel { min-height: 0; }
@media (max-width: 720px) {
  .cafe-app .top { min-height: 0; }
  .cafe-app .tools { padding: 10px 14px; }
  .cafe-app #floor .tabletop { border-radius: 12px; gap: 4px; }
  .cafe-app #viewport { border-radius: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  #capacity-fill, .cafe-app #floor .tabletop { transition: none; }
}

/* Seat directory */
.cafe-app #viewport {
  --seat-panel: #fff;
  --seat-bg: #f3eae1;
  --seat-line: #dfcbb9;
  --seat-ink: #3a271d;
  --seat-muted: #725341;
  --seat-accent: #8b482b;
  --seat-selected: #f7e2cd;
  background: var(--seat-bg);
  border: 1px solid var(--seat-line);
}
.dark .cafe-app #viewport {
  --seat-panel: #34251f;
  --seat-bg: #271b16;
  --seat-line: #5d4437;
  --seat-ink: #fff1e5;
  --seat-muted: #d8b8a2;
  --seat-accent: #edb486;
  --seat-selected: #523727;
}
.cafe-app #floor {
  display: flex;
  background: var(--seat-bg);
  overflow: auto;
  padding: clamp(10px, 2cqw, 24px) clamp(10px, 3cqw, 34px) 36px;
}
.cafe-app #tables {
  position: static;
  margin: auto;
  width: 100%;
  display: grid;
  grid-template: none;
  gap: clamp(7px, 1.8cqh, 14px);
}
.cafe-app #tables .table:nth-child(n) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  place-items: stretch;
  grid-column: auto;
  width: 100%;
  aspect-ratio: auto;
  border: 1px solid var(--seat-line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--seat-panel) var(--seat-opacity, 100%), transparent);
  transition: border-color .18s, background-color .18s;
}
.cafe-app #tables .table.selected {
  border-color: var(--seat-accent);
  background: color-mix(in srgb, var(--seat-selected) var(--seat-opacity, 100%), transparent);
}
.cafe-app #floor .tabletop {
  position: relative;
  inset: auto;
  display: flex;
  align-items: center;
  text-align: start;
  gap: clamp(5px, 2cqw, 16px);
  min-width: 0;
  min-height: clamp(55px, 14cqh, 106px);
  padding: 6px clamp(5px, 2cqw, 16px);
  background: transparent;
  color: var(--seat-ink);
  border: 0;
  border-radius: 14px 0 0 14px;
  box-shadow: none;
}
.cafe-app #floor .tabletop:is(:hover, [aria-pressed="true"], .own-table) { color: var(--seat-accent); }
.table-number {
  display: grid;
  place-items: center;
  flex: none;
  width: clamp(23px, 7cqw, 48px);
  aspect-ratio: 1;
  border: 1px solid var(--seat-line);
  border-radius: 10px;
  color: var(--seat-accent);
  background: var(--seat-selected);
  font: 600 clamp(.64rem, 2cqw, 1rem)/1 ui-monospace, monospace;
}
.table-copy { display: grid; min-width: 0; gap: 2px; }
.table-copy small { color: var(--seat-muted); font-size: clamp(.62rem, 2cqw, .8rem); }
.seat-row { display: grid; grid-auto-flow: column; gap: clamp(3px, 1cqw, 9px); align-items: center; padding-inline-end: clamp(6px, 2cqw, 18px); }
.cafe-app #floor .seat-row .seat:is(.s0, .s1, .s2, .s3) {
  position: relative;
  inset: auto;
  width: clamp(20px, 8cqw, 48px);
  height: auto;
  aspect-ratio: 1;
  padding: 0;
}
.cafe-app #floor .seat-row .seat:not(.occupied) {
  border: 1px dashed var(--seat-line);
  border-radius: 50%;
  background: transparent;
  color: var(--seat-muted);
  font-size: .7rem;
}
.cafe-app #floor .table.selected .seat:not(.occupied) {
  background: var(--seat-accent);
  border-color: var(--seat-accent);
  color: var(--seat-bg);
  font-size: 1rem;
}
.cafe-app #floor .table.selected .seat:not(.occupied):hover { filter: brightness(1.15); }
.cafe-app #floor button:focus-visible { z-index: 3; outline-color: var(--seat-accent); outline-offset: 1px; }
.cafe-app .floor-controls { pointer-events: none; }
.cafe-app #seat-hint { background: var(--seat-panel); color: var(--seat-ink); border: 1px solid var(--seat-line); }
@media (prefers-reduced-motion: reduce) {
  .cafe-app #tables .table:nth-child(n) { transition: none; }
}

.cafe-app #floor.has-background {
  background-image: linear-gradient(#2e180d38, #2e180d38), var(--cafe-background);
  background-position: center;
  background-size: cover;
}
.cafe-app #capacity-fill { background: #9a5b3a; }
.cafe-background { padding-top: 10px; gap: 7px; }
.background-upload { display: grid; gap: 4px; font-size: .82rem; }
.background-upload input { width: 100%; font-size: .78rem; color: var(--muted); }
.background-upload input::file-selector-button {
  margin-inline-end: 8px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--panel);
  cursor: pointer;
}
.background-remove { justify-self: start; padding: 4px 7px; font-size: .78rem; }

.background-status:empty { display: none; }

/* Explicit personal colors override theme defaults in both modes. */
.cafe-app.custom-surface {
  --bg: var(--custom-surface);
  --panel: var(--custom-surface);
  --ink: var(--on-custom-surface);
  --muted: color-mix(in srgb, var(--ink) 73%, var(--panel));
  --line: color-mix(in srgb, var(--ink) 20%, var(--panel));
  --soft: color-mix(in srgb, var(--ink) 9%, var(--panel));
}
.cafe-app.custom-accent, .dark .cafe-app.custom-accent { --accent: var(--custom-accent); }
.cafe-app.custom-accent .primary,
.cafe-app.custom-accent #timer-panel .primary,
.cafe-app.custom-accent .brand .brand-mark {
  background: var(--custom-accent);
  color: var(--on-custom-accent);
}
.cafe-app.custom-accent .primary:hover,
.cafe-app.custom-accent #timer-panel .primary:hover { background: var(--custom-accent); filter: brightness(.92); }
.cafe-app.custom-accent #capacity-fill { background: var(--custom-accent); }
.cafe-app.custom-surface #viewport {
  --seat-panel: var(--custom-surface);
  --seat-bg: color-mix(in srgb, var(--custom-surface) 92%, var(--on-custom-surface));
  --seat-ink: var(--on-custom-surface);
  --seat-muted: color-mix(in srgb, var(--seat-ink) 74%, var(--seat-panel));
  --seat-line: color-mix(in srgb, var(--seat-ink) 23%, var(--seat-panel));
  --seat-selected: color-mix(in srgb, var(--seat-ink) 8%, var(--seat-panel));
  --panel: var(--seat-panel);
  --ink: var(--seat-ink);
}
.cafe-app.custom-accent #viewport { --seat-accent: var(--custom-accent); }
.cafe-app:is(.custom-surface, .custom-accent) #floor .tabletop { color: var(--seat-ink); }
.cafe-app.custom-accent #floor .table-number,
.cafe-app.custom-accent #floor .table.selected .seat:not(.occupied) {
  background: var(--custom-accent);
  color: var(--on-custom-accent);
}

.cafe-app.custom-surface .tools > #timer-panel {
  --panel: var(--custom-surface);
  --bg: color-mix(in srgb, var(--custom-surface) 92%, var(--on-custom-surface));
  --ink: var(--on-custom-surface);
  --muted: color-mix(in srgb, var(--ink) 74%, var(--panel));
  --line: color-mix(in srgb, var(--ink) 23%, var(--panel));
  --soft: var(--bg);
  border: 1px solid var(--line);
}

.cafe-editor .settings-colors { padding-block: 10px; }
.cafe-editor .settings-colors h3 { margin: 0 0 4px; font-size: .95rem; }
.background-preview {
  display: block;
  width: 100%;
  height: clamp(92px, 24dvh, 180px);
  object-fit: contain;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.color-swatch::before { opacity: var(--swatch-opacity, 1); }
.color-opacity { display: grid; grid-template-columns: 1fr auto; gap: 4px; font-size: .76rem; }
.color-palette .color-opacity input[type="range"] {
  grid-column: 1 / -1;
  appearance: none;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #fff, var(--opacity-color, #000));
  box-shadow: inset 0 0 0 1px #0002;
}
.color-opacity input[type="range"]::-webkit-slider-runnable-track { background: transparent; }
.color-opacity input[type="range"]::-moz-range-track,
.color-opacity input[type="range"]::-moz-range-progress { background: transparent; }
.color-swatch { background: #fff; }
.color-slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.color-slot { min-height: 28px; padding: 0; border: 1px solid var(--line); font-size: .72rem; }
.color-slots button.color-slot.is-filled {
  color: white;
  background: var(--slot-color);
  text-shadow: 0 1px 3px #000, 0 0 2px #000;
}
.color-slot-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.color-slot:disabled { opacity: .5; }
.color-slot-save { justify-self: start; padding: 4px 7px; font-size: .76rem; }
.seat-opacity { display: grid; grid-template-columns: 1fr auto; gap: 5px; padding-block: 10px; font-size: .85rem; }
.seat-opacity input { grid-column: 1 / -1; width: 100%; }

.profile-friendship { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.profile-friendship button, .friend-controls button {
  font-size: .78rem;
  padding: 5px 9px;
  border: 1px solid var(--line);
}
.friends-panel { display: grid; gap: 12px; }
.friends-panel section + section { border-top: 1px solid var(--line); padding-top: 12px; }
.friends-panel h3 { margin: 0 0 6px; font-size: .92rem; }
.friends-status:empty { display: none; }
.friend-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; }
.friend-row > div:first-child { display: grid; overflow-wrap: anywhere; }
.friend-controls { display: flex; flex-wrap: wrap; gap: 4px; }

.cafe-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-block: 8px; }
.cafe-presets button { padding: 6px 2px; border: 1px solid var(--line); font-size: .76rem; }
.cafe-presets button::before {
  content: '';
  display: block;
  height: 14px;
  margin: 0 4px 4px;
  border-radius: 5px;
  background: linear-gradient(105deg, var(--preset-accent) 50%, var(--preset-surface) 50%);
}
.dark .color-palette .color-opacity input[data-color-opacity="surface"] {
  background: linear-gradient(90deg, #16171b, color-mix(in srgb, #16171b 78%, var(--opacity-color)));
}

.cafe-app:not(.custom-surface) { --bg: #fbf3e8; --panel: #fff9ef; --ink: #392116; --muted: #745441; --line: #e2c8ae; --soft: #f2dfca; }
.dark .cafe-app:not(.custom-surface) { --bg: #211710; --panel: #302117; --ink: #fff0e1; --muted: #d7b69d; --line: #624432; --soft: #493223; }
.cafe-app:not(.custom-accent) { --accent: #8c4c2e; }
.dark .cafe-app:not(.custom-accent) { --accent: #edb785; }
.cafe-app #viewport { --seat-bg: #ead4be; --seat-panel: #fff6ea; --seat-line: #d5ae8d; }
.dark .cafe-app:not(.custom-surface) #viewport { --seat-bg: #261a13; --seat-panel: #38261a; --seat-line: #684a37; }
.brand-logo { display: block; width: 44px; height: 44px; object-fit: contain; }
.cafe-app .workspace-nav button { display: flex; align-items: center; gap: 8px; font-size: .89rem; }
.workspace-nav button span { margin: 0; }
.workspace-nav svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.logout-door { width: 16px; height: 19px; perspective: 50px; }
.logout-door::before, .logout-door::after { content: none; }
.logout-door i { position: absolute; inset: 0; background: var(--panel); border-radius: 1px; transform-origin: left; transition: transform .18s ease; }
.logout-door i::after { content: ''; position: absolute; right: 2px; top: 45%; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.logout button:is(:hover, :focus-visible) .logout-door i { transform: rotateY(-55deg); outline: 1px solid currentColor; }
.friend-row > .friend-identity { display: flex; align-items: center; gap: 8px; }
.friend-identity > div { display: grid; }
.friend-identity .avatar { width: 36px; height: 36px; flex: none; }
.desk-notes { display: grid; gap: 8px; }
.desk-note { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.desk-note :is(p, a) { overflow-wrap: anywhere; white-space: pre-wrap; }
.desk-note button { font-size: .78rem; }
#desk-note-form { display: grid; gap: 6px; }
#desk-note-form textarea { width: 100%; min-height: 72px; resize: vertical; padding: 8px; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
#desk-note-form button { justify-self: end; }
@media (max-width: 720px) { .brand-logo { width: 30px; height: 30px; } }
@media (prefers-reduced-motion: reduce) { .logout-door i { transition: none; } }

@media (min-width: 1600px) {
  .cafe-app .layout {
    max-width: none;
    grid-template-columns: clamp(190px, 11.7vw, 310px) minmax(0, 1fr) clamp(320px, 21vw, 560px);
  }
  .cafe-app .top { min-height: clamp(68px, 4.55vw, 106px); }
  .cafe-app .brand { font-size: clamp(1.16rem, 1.2vw, 1.65rem); }
  .cafe-app .brand-logo { width: clamp(44px, 2.8vw, 64px); height: auto; }
  .cafe-app .sidebar, .cafe-app .tools { padding: clamp(16px, 1.2vw, 30px); }
  .cafe-app .workspace-nav button, .cafe-app .top nav button {
    font-size: clamp(.92rem, .92vw, 1.2rem);
    min-height: 46px;
  }
  .cafe-app .room-heading h1 { font-size: clamp(3rem, 3.12vw, 5rem); }
  .cafe-app #floor .tabletop { font-size: clamp(1rem, .95vw, 1.45rem); }
  .cafe-app .table-copy small { font-size: clamp(.8rem, .77vw, 1.05rem); }
  .cafe-app #floor .seat-row .seat:is(.s0, .s1, .s2, .s3) { width: clamp(48px, 3.2vw, 78px); }
  .cafe-app #chat-panel #messages { max-height: clamp(170px, 27dvh, 380px); }
}

@media (min-width: 1600px) {
  #popup:has(.profile-head) {
    --profile-padding: clamp(26px, 1.45vw, 46px);
    width: min(clamp(620px, 31vw, 1000px), calc(100% - 48px));
    max-width: none;
    max-height: calc(100dvh - 48px);
    padding: var(--profile-padding);
  }
  #popup:has(.profile-head):has(.banner) { padding-top: 0; }
  #popup:has(.profile-head) > header h2 { font-size: clamp(1.15rem, .85vw, 1.65rem); }
  #popup:has(.profile-head) > header button { width: 40px; height: 40px; }
  #popup:has(.profile-head) #popup-body { gap: clamp(16px, .9vw, 26px); }
  #popup:has(.profile-head) #popup-body .banner { min-height: clamp(150px, 8vw, 260px); }
  #popup .profile-head { gap: clamp(16px, 1vw, 30px); }
  #popup .profile-head .avatar { width: clamp(86px, 4.5vw, 150px); height: auto; aspect-ratio: 1; }
  #popup .profile-head strong { font-size: clamp(1.45rem, 1.1vw, 2.25rem); }
  #popup:has(.profile-head) :is(.metric, .activity) { padding: clamp(14px, .85vw, 24px); }
  #popup:has(.profile-head) .metric strong { font-size: clamp(1.25rem, .95vw, 1.9rem); }
  #popup:has(.profile-head) :is(.metric, .activity) small { font-size: clamp(.85rem, .65vw, 1.15rem); }
}

.login-page { display: grid; place-items: center; padding: clamp(14px, 4vw, 40px); }
.auth-card {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 1fr;
  width: min(880px, 100%);
  min-height: 585px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 24px 64px #0000001a, 0 4px 18px #0000000d;
}
.auth-form-panel {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 50px);
  background: var(--panel);
}
.auth-form-panel[data-auth-panel="register"] { grid-column: 2; }
.auth-form-panel h1 { margin: 0 0 22px; font-size: clamp(1.7rem, 3.6vw, 2.3rem); letter-spacing: -.045em; }
.auth-form-panel h1:focus { outline: none; }
.auth-form { display: grid; gap: 11px; }
.auth-form label { display: grid; gap: 4px; color: var(--ink); font-size: .86rem; font-weight: 600; }
.auth-form input:not([type="hidden"]) {
  --auth-input-bg: #f3f3f3;
  --auth-input-shadow: inset 0 2px 5px #00000012;
  min-height: 43px;
  background: var(--auth-input-bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--auth-input-shadow);
}
.login-page :focus-visible { outline-color: var(--accent); }
.login-page ::selection { color: var(--ink); background: #ddd; }
.auth-form input:autofill { box-shadow: var(--auth-input-shadow), inset 0 0 0 1000px var(--auth-input-bg); }
.auth-form input:-webkit-autofill {
  -webkit-box-shadow: var(--auth-input-shadow), inset 0 0 0 1000px var(--auth-input-bg);
  -webkit-text-fill-color: var(--ink);
}
.auth-password-input { position: relative; margin-top: 4px; }
.auth-form .auth-password-input input { padding-inline-end: 46px; }
.auth-form .primary { margin-top: 3px; min-height: 44px; border-radius: 9px; font-weight: 700; }
.auth-eye {
  position: absolute;
  inset: 0 1px 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  border-radius: 0;
  color: #6b6865;
  background: transparent;
}
.auth-eye:hover { color: #35312d; background: transparent; }
.auth-eye:focus-visible { outline-offset: -4px; }
.auth-eye svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.eye-open, .eye-closed, .eye-pupil { transform-origin: 12px 12px; transition: transform .16s ease, opacity .14s ease; }
.eye-closed { opacity: 0; transform: scaleY(.25); }
.is-open-password .eye-open { opacity: 0; transform: scaleY(.08); }
.is-open-password .eye-closed { opacity: 1; transform: scaleY(1); }
.is-glancing .eye-pupil { transform: translateX(-2.1px); }
.auth-error { color: var(--ink); font-weight: 600; font-size: .84rem; }
.login-page .auth-form .primary { color: #fff; }
.login-page .auth-form .primary:hover { background: #303030; }
.auth-form-panel .google-login { margin-top: 10px; background: #fff; }
.auth-form-panel .google-login:hover { background: #eee; }
.auth-brand {
  position: absolute;
  inset: 0 0 0 50%;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 15px;
  text-align: center;
  padding: 22px;
  background: linear-gradient(90deg, #fff, #e6e6e6 40%, #e6e6e6 60%, #fff);
  transition: transform .48s cubic-bezier(.22, .75, .25, 1);
}
.auth-card[data-mode="register"] .auth-brand {
  transform: translateX(-100%);
}
.auth-brand::before, .auth-brand::after {
  content: "";
  position: absolute;
  z-index: -1;
  aspect-ratio: 1;
  border: 1px solid #fff9;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff9, #fff2 66%, #fff5);
  box-shadow: inset 0 0 32px #fff3;
  pointer-events: none;
}
.auth-brand::before, .auth-brand::after {
  --bubble-width: min(54%, 230px);
  width: var(--bubble-width);
  transition: left .9s cubic-bezier(.22, .75, .25, 1);
}
.auth-brand::before { top: 0; left: calc(94% - var(--bubble-width)); transform: translateY(-47%); }
.auth-brand::after { bottom: 0; left: 9%; transform: translateY(45%); }
.auth-card[data-mode="register"] .auth-brand::before { left: 6%; }
.auth-card[data-mode="register"] .auth-brand::after { left: calc(91% - var(--bubble-width)); }
.auth-brand img { display: block; width: clamp(104px, 16vw, 156px); height: auto; }
.auth-brand p { color: var(--muted); }
.auth-brand a { display: inline-block; margin-top: 8px; padding: 8px 15px; border: 1px solid #b78e72; border-radius: 9px; color: var(--accent); font-weight: 700; text-decoration: none; }
.auth-brand a:hover { background: var(--panel); }
@media (max-width: 640px) {
  .auth-card { display: flex; flex-direction: column; min-height: 0; }
  .auth-form-panel { align-self: stretch; }
  .auth-card .auth-brand, .auth-card[data-mode="register"] .auth-brand {
    position: relative;
    inset: auto;
    transform: none;
    gap: 6px;
  }
  .auth-brand img { width: 92px; }
  .auth-brand::before, .auth-brand::after { --bubble-width: min(37%, 120px); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-brand, .auth-brand::before, .auth-brand::after, .eye-open, .eye-closed, .eye-pupil { transition: none; }
}

.login-page {
  --accent: #555;
  --line: #e1e1e1;
  --ink: #252525;
  --muted: #646464;
  --panel: #fff;
  background: #f5f5f5;
  color: var(--ink);
}

.login-page { font-family: Garamond, "Apple Garamond", "EB Garamond", Georgia, serif; font-size: 17px; }
.login-page .auth-brand p { font-family: "Snell Roundhand", "URW Chancery L", "Apple Chancery", cursive; font-size: 1.45rem; }
.login-page .auth-form-panel h1 { font-family: Garamond, "Apple Garamond", "EB Garamond", Georgia, serif; }

.login-page { font-size: 16px; font-weight: 400; }
.login-page .auth-form-panel h1 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); font-weight: 400; }
.login-page .auth-form label, .login-page .auth-form .primary, .login-page .auth-brand a { font-weight: 400; }

.auth-brand .nooknook-mark {
  display: block;
  width: min(194px, 70%);
}
.auth-brand .nooknook-mark img {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 640px) {
  .auth-brand .nooknook-mark { width: 112px; }
}

.auth-logout { margin-top: 12px; }
.auth-logout button { font: inherit; text-decoration: underline; }

.auth-switch-link { align-self: start; margin-top: 14px; color: var(--ink); }
.google-login img { flex: none; display: block; }

.auth-brand-prompt p { margin: 0; }
.auth-brand .auth-brand-prompt a { color: var(--ink); border-color: #aaa; }


.login-page :is(button, .google-login, .google-account-row, .auth-switch-link a) { border-radius: 999px !important; }
.auth-switch-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
}
.auth-switch-link a {
  padding: 7px 13px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.auth-switch-link a:hover { background: #eee; }
.auth-form-panel button.google-login { width: 100%; }
