:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #20232b;
  font-synthesis: none;
  font-weight: 500;
  --purple: #9815ed;
  --blue: #087fff;
  --line: #e5e5ec;
  --muted: #747c90;
}
.verified-outcome {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 3px solid #117b61;
  border-radius: 0 8px 8px 0;
  background: #eef8f4;
  color: #244a40;
  font-size: 13px;
}
.verified-outcome p {
  margin: 5px 0 0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
  background: #102943;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: #f0f0f4;
  border-radius: 11px;
  padding: 10px 14px;
  color: inherit;
  transition:
    background 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
button:hover {
  background: #e7e5ef;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button.primary {
  background: var(--blue);
  color: #fff;
  font-weight: 650;
}
button.purple {
  background: var(--purple);
  color: #fff;
  font-weight: 700;
}
button.quiet {
  background: transparent;
  color: var(--muted);
}
header {
  height: 64px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 32px;
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--line);
}
a {
  color: inherit;
  text-decoration: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
}
.brand small {
  font-size: 9px;
  letter-spacing: 1px;
  color: #8b8b94;
  border: 1px solid #ddd;
  padding: 3px;
  border-radius: 4px;
}
.brand strong {
  letter-spacing: 1px;
  font-size: 21px;
}
nav {
  display: flex;
  gap: 14px;
  margin: auto;
}
nav button {
  background: transparent;
  color: #626577;
}
.connection {
  font-size: 12px;
  color: var(--muted);
  border-radius: 30px;
  background: #f4f4f6;
  padding: 8px 12px;
}
.connection.connected {
  color: #258360;
  background: #edf9f2;
}
main {
  position: relative;
  height: calc(100dvh - 64px);
}
canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
canvas:active {
  cursor: grabbing;
}
.top-left,
.date-pill,
.bottom-left,
.bottom-right {
  position: absolute;
  display: flex;
  gap: 8px;
  align-items: center;
}
.top-left {
  left: 8px;
  top: 8px;
}
.square {
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 25px;
  background: #f9f9fc;
}
.top-left #country {
  background: #f9f9fc;
  min-width: 190px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  height: 52px;
}
.flag {
  width: 32px;
  height: 22px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px #0001;
}
.date-pill {
  right: 8px;
  top: 8px;
  background: #f8f8fbef;
  padding: 12px 14px;
  border-radius: 18px;
  min-width: 300px;
  justify-content: space-between;
}
.date-pill button {
  background: #e9e9ed;
  padding: 5px 12px;
  font-size: 23px;
}
.date-pill #date {
  font-size: 15px;
  background: transparent;
  font-weight: 550;
  padding: 5px;
}
.bottom-left {
  bottom: 8px;
  left: 8px;
}
.bottom-right {
  bottom: 8px;
  right: 8px;
}
.bottom-right > button {
  background: #f9f9fc;
}
.dock {
  display: flex;
  background: #fafafaef;
  border-radius: 15px;
  padding: 8px;
  gap: 7px;
}
.dock button {
  padding: 0;
  width: 40px;
  height: 40px;
  font-size: 26px;
  background: #e9e9ee;
}
.dock button.active {
  background: var(--blue);
  color: #fff;
}
.panel {
  position: absolute;
  background: #fff;
  box-shadow: 0 15px 60px #08162a25;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: panel-in 0.25s cubic-bezier(0.2, 0, 0.1, 1);
  max-height: calc(100% - 150px);
  top: 85px;
  bottom: 80px;
  width: 448px;
}
.panel[hidden],
[hidden] {
  display: none !important;
}
.left {
  left: 8px;
}
.right {
  right: 8px;
  width: 432px;
}
.panel-head {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 16px 22px;
  flex-shrink: 0;
}
.panel-head h2 {
  font-size: 20px;
  margin: 0;
  flex: 1;
  font-weight: 720;
}
.panel-head button {
  background: transparent;
  padding: 3px 5px;
  font-size: 22px;
}
.panel-body {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 22px 24px;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #c4c7d2 transparent;
}
.panel-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
}
p {
  line-height: 1.5;
  margin: 0 0 14px;
}
h3 {
  font-size: 17px;
  margin: 20px 0 12px;
}
.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 36px 0;
}
.wide {
  width: 100%;
}
.row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.row > * {
  min-width: 0;
}
.row .grow {
  flex: 1;
}
textarea,
input,
select {
  background: #f5f5f8;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 12px;
  width: 100%;
  outline: none;
  color: inherit;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #b8a4e3;
  box-shadow: 0 0 0 3px #b995e91a;
}
textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.45;
}
label {
  display: block;
  margin: 14px 0 6px;
  color: #5f6579;
  font-size: 13px;
}
input[type="checkbox"] {
  width: auto;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  margin-bottom: 12px;
}
.card p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 8px 0 0;
  line-height: 1.48;
}
.message {
  border-left: 4px solid #765090;
  animation: panel-in 0.2s ease;
}
.message.mine {
  border-left-color: var(--blue);
}
.message .sender {
  font-size: 13px;
  font-weight: 650;
  color: #636d84;
}
.chat-card {
  display: flex;
  text-align: left;
  gap: 15px;
  align-items: center;
  width: 100%;
  border: 1px solid #dedee5;
  border-radius: 17px;
  background: white;
  padding: 17px;
  margin: 10px 0;
  box-shadow: 0 3px 18px #0000000a;
}
.chat-card .preview {
  font-size: 14px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 270px;
  margin-top: 6px;
}
.search-results {
  margin-top: 12px;
}
.search-results button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: transparent;
  border-bottom: 1px solid #f0f0f5;
  border-radius: 0;
}
.search-results button:hover {
  background: #f6f2fa;
}
.search-results small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.action {
  background: #f6f6f9;
  border: 0;
}
.action .actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
}
.action .actions button {
  font-size: 12px;
  padding: 4px 8px;
  background: transparent;
  color: var(--muted);
}
.suggestion {
  background: #efe3fa;
  color: #7333aa;
  font-size: 13px;
}
.timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  position: relative;
  padding: 28px 0;
}
.timeline:before {
  content: "";
  position: absolute;
  top: 65px;
  bottom: 10px;
  width: 3px;
  background: #c68df5;
}
.timeline button {
  position: relative;
  border: 2px solid #bc74fb;
  background: #f0e4ff;
  width: 145px;
  box-shadow: 0 5px 15px #26203b14;
  padding: 7px;
}
.timeline small {
  display: block;
}
.timeline .now {
  border-radius: 50%;
  width: 88px;
  height: 88px;
  background: white;
  color: var(--purple);
}
.event-date {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 9px;
}
.event h3 {
  margin: 0;
  font-size: 18px;
}
.event.selected {
  border-color: #b56be7;
  box-shadow: 0 0 0 2px #b56be71c;
}
#playback,
#generating {
  position: absolute;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  background: #fffffff5;
  border-radius: 15px;
  padding: 15px 20px;
  box-shadow: 0 5px 30px #0002;
  min-width: 400px;
}
#generating {
  max-width: 520px;
  z-index: 5;
}
#generating p {
  margin: 0 0 12px;
  line-height: 1.5;
  font-size: 14px;
}
#playback-status {
  margin-bottom: 12px;
  font-size: 14px;
}
#playback button {
  font-size: 13px;
  margin-right: 5px;
}
#notice {
  position: absolute;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 18px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 35px #0002;
  max-width: 550px;
  z-index: 8;
  font-size: 14px;
  line-height: 1.5;
}
#map-tip {
  position: absolute;
  pointer-events: none;
  background: #102639e8;
  color: white;
  font-size: 12px;
  border-radius: 7px;
  padding: 8px 11px;
  max-width: 300px;
  z-index: 1;
}
dialog {
  border: 0;
  border-radius: 20px;
  padding: 0;
  max-height: 85dvh;
  width: 570px;
  max-width: 94vw;
  color: inherit;
  box-shadow: 0 20px 80px #0004;
}
dialog::backdrop {
  background: #10192a5c;
  backdrop-filter: blur(3px);
}
.modal-head {
  display: flex;
  align-items: center;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  flex: 1;
  font-size: 21px;
  margin: 0;
}
.modal-head button {
  font-size: 21px;
  background: transparent;
  padding: 0;
}
.modal-body {
  padding: 22px 26px;
  overflow: auto;
}
.modal-foot {
  padding: 15px 26px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.country-picker {
  max-height: 330px;
  overflow: auto;
}
.country-picker button {
  font-size: 14px;
}
.country-picker button.selected {
  background: #eee3fb;
  color: #721da1;
}
#loading {
  position: absolute;
  inset: 0;
  background: #f8f8fb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  color: #606878;
  z-index: 9;
}
#loading span {
  font-size: 13px;
}
.spinner {
  border: 3px solid #e5deed;
  border-top-color: var(--purple);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 0.8s linear infinite;
}
pre {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.code {
  font-family: Consolas, monospace;
  font-size: 12px;
  min-height: 300px;
}
.badge {
  font-size: 11px;
  border-radius: 6px;
  background: #f1e8fc;
  color: #8153a5;
  padding: 3px 6px;
}
details summary {
  cursor: pointer;
  color: #737d91;
  font-size: 13px;
  margin-top: 12px;
}
.menu-btn {
  text-align: left;
  border: 1px solid var(--line);
  background: white;
}
.dimension {
  font-size: 13px;
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 1100px) {
  header {
    padding: 0 14px;
    gap: 12px;
  }
  .panel {
    width: min(410px, calc(100vw - 16px));
  }
  .right {
    z-index: 3;
  }
  nav {
    gap: 2px;
  }
  .brand small {
    display: none;
  }
}
@media (max-width: 700px) {
  header {
    gap: 8px;
  }
  .brand {
    font-size: 20px;
  }
  .brand strong {
    font-size: 17px;
  }
  nav {
    display: none;
  }
  .connection {
    margin-left: auto;
    font-size: 10px;
  }
  .panel {
    top: 78px;
    bottom: 78px;
    max-height: none;
  }
  .date-pill {
    min-width: 230px;
  }
  .top-left #country {
    display: none;
  }
  #playback {
    min-width: 0;
    width: calc(100% - 30px);
    bottom: 82px;
  }
  .bottom-right > button {
    font-size: 12px;
    padding: 12px 9px;
  }
  .modal-body {
    padding: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before {
    animation: none !important;
    transition: none !important;
  }
}
