@font-face {
  font-family: "Basis Grotesque";
  src: url("/BasisGrotesque/basis-grotesque-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  font: 16px/1.45 "Basis Grotesque", Arial, sans-serif;
  color: #171717;
  background: #fff;
  color-scheme: light;
  --ink: #171717;
  --muted: #636363;
  --rule: #dedee3;
  --blue: #375bd2;
  --blue-deep: #213b92;
  --mint: #63ecc0;
  --toolbar-height: 58px;
}

* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; }
button, select, input { font: inherit; }
button, select, summary, a { -webkit-tap-highlight-color: transparent; }
button, select {
  min-height: 38px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  padding: 7px 12px;
  font-size: 14px;
}
button { cursor: pointer; touch-action: manipulation; }
button:hover:not(:disabled), select:hover:not(:disabled) { border-color: #a4afca; background: #f5f7ff; }
button:disabled, select:disabled, input:disabled { opacity: .45; cursor: default; }
button[aria-pressed="true"] { background: #edf1ff; border-color: var(--blue); color: var(--blue-deep); }
select {
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23636363' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}
a { color: var(--blue-deep); text-underline-offset: 4px; }
button:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
input[type="checkbox"] { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); cursor: pointer; }
[hidden] { display: none !important; }
.shell, #block-scene { position: absolute; inset: 0; }
#block-scene { outline: none; touch-action: none; cursor: grab; }
#block-scene:active { cursor: grabbing; }
#block-scene:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.panel { background: #fffffff7; border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 4px 24px #18233b12; }
.toolbar { position: absolute; top: max(12px, env(safe-area-inset-top)); left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); z-index: 3; display: flex; align-items: center; gap: 8px; max-width: max-content; padding: 8px; }
.identity { display: flex; align-items: center; gap: 10px; padding-right: 12px; border-right: 1px solid var(--rule); margin-right: 2px; }
.brand { display: grid; width: 38px; height: 38px; place-items: center; flex: 0 0 auto; }
.brand img { display: block; width: 36px; height: 36px; }
.title { font-size: 20px; font-weight: 400; letter-spacing: -.04em; line-height: 1; margin: 0; white-space: nowrap; }
.toolbar label { display: flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.place-control { max-width: 245px; min-width: 130px; }
.place-control select { width: 100%; text-overflow: ellipsis; }
#block-play { min-width: 70px; background: var(--blue); color: #fff; border-color: var(--blue); }
#block-play:hover:not(:disabled) { background: var(--blue-deep); border-color: var(--blue-deep); }
.core-select > span:not(.sr-only) { color: var(--muted); margin-left: 2px; }
.controls-menu > summary { display: flex; align-items: center; min-height: 38px; gap: 14px; padding: 7px 11px; border: 1px solid transparent; border-radius: 4px; font-size: 14px; cursor: pointer; list-style: none; }
.controls-menu > summary::-webkit-details-marker, .menu-section > summary::-webkit-details-marker { display: none; }
.controls-menu > summary::after, .menu-section > summary::after { content: ""; display: block; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.controls-menu[open] > summary { background: #edf1ff; color: var(--blue-deep); }
.controls-menu[open] > summary::after, .menu-section[open] > summary::after { transform: rotate(225deg) translate(-1px, -1px); }
.controls-body { position: absolute; top: calc(100% + 9px); right: 0; width: 350px; max-width: calc(100vw - 24px); max-height: calc(100dvh - var(--toolbar-height) - 42px); overflow: auto; padding: 18px; font-size: 14px; line-height: 1.5; }
.controls-body h2 { font-size: 16px; font-weight: 400; margin: 0 0 12px; letter-spacing: -.02em; }
.controls-body p { margin: 10px 0; }
.toolbar .setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; white-space: normal; }
.setting-row select { min-width: 70px; }
.button-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 3px; }
.button-row button { flex: 1 0 auto; }
.menu-section { border-top: 1px solid var(--rule); margin-top: 14px; }
.menu-section > summary { display: flex; align-items: center; justify-content: space-between; min-height: 46px; gap: 12px; cursor: pointer; list-style: none; }
.section-body { padding: 4px 0 8px; }
.section-body .cafe-status { padding-top: 12px; border-top: 1px solid var(--rule); }
.cafe-seats, .attribution { color: var(--muted); font-size: 13px; }
.activity-list { padding-left: 18px; margin: 0; }
.activity-list li { margin: 0 0 8px; }
.brand-credit { display: inline-block; margin-top: 6px; font-size: 14px; }
.status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; padding: 18px 24px; width: max-content; max-width: calc(100vw - 40px); text-align: center; line-height: 1.5; font-size: 16px; }
.status p { margin: 0 0 12px; max-width: 360px; }
#block-error { border-color: #a76554; }
.hint, .mode { position: absolute; bottom: max(12px, env(safe-area-inset-bottom)); padding: 5px 9px; background: #ffffffe8; color: #50545e; border-radius: 4px; font-size: 13px; pointer-events: none; }
.hint { left: max(12px, env(safe-area-inset-left)); }
.mode { right: max(12px, env(safe-area-inset-right)); }
.skip-link { position: fixed; top: -70px; left: 12px; z-index: 10; background: #fff; padding: 12px; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.character-conversation { position: absolute; z-index: 4; top: calc(var(--toolbar-height) + 34px); right: max(12px, env(safe-area-inset-right)); width: 330px; max-width: calc(100vw - 24px); max-height: calc(100dvh - var(--toolbar-height) - 60px); overflow: auto; padding: 18px; font-size: 14px; line-height: 1.5; }
.character-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.character-heading h2 { font-size: 22px; font-weight: 400; line-height: 1.15; letter-spacing: -.04em; margin: 4px 0 0; }
.character-heading .character-eyebrow { color: var(--muted); font-size: 13px; margin: 0; }
.character-conversation p { margin: 10px 0; }
.character-roster { display: block; width: 100%; margin: 5px 0 14px; }
.character-activity { color: var(--blue-deep); background: #edf1ff; padding: 9px 11px; border-radius: 4px; }
.character-routine { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--rule); }
.character-routine summary { cursor: pointer; }
.character-note { color: var(--muted); font-size: 13px; }

@media (max-width: 850px) {
  .toolbar { max-width: none; flex-wrap: wrap; gap: 7px; }
  .identity { margin-right: auto; }
  .place-control { flex: 1 1 150px; max-width: none; }
  .controls-menu { margin-left: auto; }
  .core-select > span:not(.sr-only) { display: none; }
  .controls-body { top: calc(100% + 8px); }
  .hint { display: none; }
}
@media (max-width: 540px) {
  .toolbar { top: max(7px, env(safe-area-inset-top)); left: max(7px, env(safe-area-inset-left)); right: max(7px, env(safe-area-inset-right)); padding: 6px; gap: 6px; }
  .identity { gap: 7px; padding-right: 9px; }
  .title { font-size: 19px; }
  .place-control { flex-basis: calc(100% - 126px); }
  .toolbar button, .toolbar select { min-height: 40px; padding-top: 7px; padding-bottom: 7px; }
  .controls-menu > summary { min-height: 40px; }
  .controls-body { max-width: calc(100vw - 14px); width: 350px; }
  .character-conversation { right: 7px; max-width: calc(100vw - 14px); }
  .mode { right: 7px; bottom: 7px; font-size: 12px; }
}
