@font-face {
  font-family: Inter;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Inter;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Manrope;
  src: url("/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Manrope;
  src: url("/fonts/manrope-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter;
  src: url("/fonts/inter-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  src: url("/fonts/manrope-cyrillic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Noto Sans Thai";
  src: url("/fonts/noto-sans-thai.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}

:root {
  --ink: #12252c;
  --muted: #71838a;
  --secondary: #47565c;
  --line: #dde7e8;
  --line-strong: #b3c5c8;
  --bg: #f4f7f7;
  --bg-soft: #e6eef0;
  --sunken: #eef3f3;
  --accent: #67b300;
  --accent-hover: #5a9c00;
  --accent-soft: #eaf6da;
  --menu: #0870b8;
  --menu-on: #ffffff;
  --ok: #2e7d32;
  --ok-soft: #e6f4e2;
  --warn: #a8650a;
  --warn-soft: #faedd8;
  --display: Manrope, "Noto Sans Thai", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: Inter, "Noto Sans Thai", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, .desk-title { font-family: var(--display); }
code { font-family: ui-monospace, Menlo, monospace; font-size: 0.92em; }

.app {
  --rail: 72px;
  --wide: 272px;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  transition: grid-template-columns .24s ease;
}
#app[hidden], #gate[hidden] { display: none !important; }
.app:is(:has(.side:hover), :has(.side:focus-within), .rail-locked) {
  grid-template-columns: var(--wide) minmax(0, 1fr);
}
.app.panel-open { grid-template-columns: var(--rail) minmax(320px, 1fr) minmax(400px, 460px); }
.app.panel-open:is(:has(.side:hover), :has(.side:focus-within), .rail-locked) {
  grid-template-columns: var(--wide) minmax(320px, 1fr) minmax(400px, 460px);
}

.side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: white;
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.brand { padding: 14px 8px 8px; }
.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  width: 100%;
  padding: 0 6px;
}
.mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: block;
  border-radius: 8px;
}
.word {
  min-width: 0;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity .16s ease, max-width .24s ease;
}
.app:is(:has(.side:hover), :has(.side:focus-within), .rail-locked) .word {
  opacity: 1;
  max-width: 168px;
}
.td-word { height: 18px; width: auto; display: block; }
.pin {
  margin-left: auto;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
}
.app:is(:has(.side:hover), :has(.side:focus-within), .rail-locked) .pin {
  opacity: 1;
  pointer-events: auto;
}
.pin.on { color: var(--menu); background: color-mix(in srgb, var(--menu) 12%, white); }
.pin svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.side-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 24px);
  margin: 16px 12px 8px;
  padding: 6px 6px;
  border: 0;
  background: transparent;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
}
.fold {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  margin-top: -4px;
}
#lens-wrap.is-shut .fold { transform: rotate(-45deg); margin-top: 2px; }
#lens-wrap.is-shut .lens { display: none; }
#lens-toggle { display: none; }
.side-foot:empty { display: none; }
.menu, .people, .lens { display: grid; gap: 4px; padding: 0 12px; }
.menu { margin-top: 8px; padding: 8px; }
.lens { padding-bottom: 8px; }
.lens button {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 8px 12px;
  text-align: left;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
}
.lens button:hover { background: color-mix(in srgb, var(--menu) 14%, white); }
.lens button.on { background: color-mix(in srgb, var(--menu) 18%, white); color: var(--ink); }
.menu button, .people button {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  color: var(--ink);
}
.menu button {
  height: 44px;
  gap: 12px;
  padding: 0 10px;
  overflow: hidden;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.menu button > span {
  min-width: 0;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity .16s ease, max-width .24s ease;
}
.menu svg {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 8px;
  border-radius: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu button:hover { background: color-mix(in srgb, var(--menu) 14%, white); }
.people button:hover { background: var(--sunken); }
.menu button.on { background: transparent; color: var(--ink); }
.menu button.on svg { background: color-mix(in srgb, var(--menu) 16%, white); }
.people button.on { background: var(--accent-soft); color: var(--ink); }
.app:is(:has(.side:hover), :has(.side:focus-within), .rail-locked) .menu button > span {
  opacity: 1;
  max-width: 168px;
}
.app:is(:has(.side:hover), :has(.side:focus-within), .rail-locked) .menu button.on {
  background: color-mix(in srgb, var(--menu) 18%, white);
}
.app:is(:has(.side:hover), :has(.side:focus-within), .rail-locked) .menu button.on svg {
  background: transparent;
}
.menu b:empty { display: none; }
.menu b {
  margin-left: auto;
  min-width: 0;
  max-width: 0;
  padding: 2px 0;
  overflow: hidden;
  border-radius: 999px;
  background: var(--sunken);
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--secondary);
  text-align: center;
  opacity: 0;
}
.app:is(:has(.side:hover), :has(.side:focus-within), .rail-locked) .menu b {
  opacity: 1;
  min-width: 22px;
  max-width: 48px;
  padding: 2px 6px;
}
.menu button.on b { background: var(--menu); color: var(--menu-on); }
.people button { align-items: flex-start; }
.people strong { display: block; font-family: var(--display); font-size: 14px; font-weight: 700; }
.people small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }

.topbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0;
  padding: 8px 20px;
  min-height: 64px;
  background: white;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.top-lead {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1 1 320px;
  min-width: 220px;
  max-width: 560px;
}
.company-slot { position: relative; flex: none; }
.company-btn {
  width: 40px;
  height: 40px;
  padding: 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  display: grid;
  place-items: center;
}
.company-btn img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.company-btn:hover, .company-btn.open { background: var(--sunken); }
.company-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  width: 260px;
  padding: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(18, 37, 44, 0.12);
}
.company-menu[hidden] { display: none; }
.company-menu p {
  margin: 2px 8px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.company-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 8px;
  text-align: left;
}
.company-menu button.on { background: color-mix(in srgb, var(--menu) 10%, white); }
.company-menu button.later { color: var(--muted); cursor: default; }
.company-menu img, .company-menu svg { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; }
.company-menu span { display: grid; min-width: 0; }
.company-menu strong { font-family: var(--display); font-size: 14px; }
.company-menu small { color: var(--muted); font-size: 11px; }
.desk-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--muted);
}
.desk-search svg {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.desk-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}
.top-start {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.topbar #update-now {
  width: auto;
  margin: 0;
  text-align: center;
  white-space: nowrap;
  align-self: center;
}
.topbar #update-now:hover { background: color-mix(in srgb, var(--menu) 14%, white); }
.topbar #update-now[hidden] { display: none; }
.topbar #update-now:disabled { opacity: 0.6; cursor: wait; }
.topbar #lens-wrap:not([hidden]) { display: flex; align-items: center; min-width: 0; }
.topbar .lens { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; }
.topbar .lens button { width: auto; white-space: nowrap; padding: 8px 12px; }
.top-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}
.top-tools .lang { display: block; }
.top-tools .lang select { width: auto; min-width: 8.5rem; padding: 8px 10px; }
.lang-row { display: flex; align-items: center; gap: 8px; }
.bell-wrap { position: relative; flex: none; }
.bell {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 0;
  color: inherit;
}
.bell svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bell b {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #c2410c;
  color: white;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}
.bell b[hidden] { display: none; }
.bell-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  width: min(280px, 70vw);
  max-height: 320px;
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(18, 37, 44, 0.12);
  padding: 6px;
}
.bell-menu button {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 8px 10px;
}
.bell-menu button strong { font-size: 14px; }
.bell-menu button span { color: var(--muted); font-size: 12px; }
.bell-menu button:hover { background: color-mix(in srgb, var(--menu) 14%, white); }
.bell-empty { margin: 8px 10px; color: var(--muted); font-size: 13px; }
.team-chats { margin: 0 0 16px; }
.team-chats h2 {
  margin: 0 0 8px;
  font-family: Manrope, Inter, sans-serif;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.team-people { display: flex; flex-wrap: wrap; gap: 8px; }
.team-person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 600;
  min-height: 40px;
}
.team-person.on { border-color: var(--menu); background: color-mix(in srgb, var(--menu) 14%, white); }
.team-dot { width: 8px; height: 8px; border-radius: 50%; background: #c2410c; }
.team-person .team-dot[hidden] { display: none; }
#menu button.team-news b::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: #c2410c;
  vertical-align: middle;
}
.top-tools .ghost { width: auto; text-align: center; white-space: nowrap; }
.top-tools .profile { padding: 0 2px; min-width: 0; }
.top-tools .profile small { white-space: nowrap; }
.lang { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.lang select, .settings input, .assign select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: white;
}
.ghost, .primary, .quiet {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 10px 12px;
}
.ghost { width: 100%; font-weight: 600; text-align: left; }
.ghost:hover { border-color: var(--line-strong); }
.ghost:disabled { opacity: 0.6; cursor: wait; }
#settings-btn:hover { background: color-mix(in srgb, var(--menu) 14%, white); }
#settings-btn.on { background: color-mix(in srgb, var(--menu) 18%, white); border-color: transparent; }
.profile {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 4px 2px;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  flex: none;
}
.profile strong { display: block; font-family: var(--display); font-size: 14px; font-weight: 700; }
.profile small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.settings { overflow: auto; min-height: 0; padding: 4px 24px 28px; }
.settings-stack { display: grid; gap: 16px; align-content: start; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid white;
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--line-strong);
}
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.own-color {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
}
.own-color input[type="color"] {
  width: 42px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.settings-card {
  max-width: 480px;
  display: grid;
  gap: 14px;
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.settings-card h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.settings-card p { margin: 0; color: var(--secondary); font-size: 14px; line-height: 1.5; }
.team-group { display: grid; gap: 8px; }
.team-group h3 {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
}
.team-group ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.team-group li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--sunken);
  font-family: var(--display);
  font-weight: 700;
}
.whatsapp-qr {
  width: 220px;
  height: 220px;
  object-fit: contain;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.link-btn {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
}
.link-btn:hover { background: var(--accent-hover); }
.link-btn:disabled { opacity: 0.6; cursor: wait; }
.settings form { display: grid; gap: 10px; }
.settings label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.settings form button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
}
.settings form button:hover { background: var(--accent-hover); }
.settings form button:disabled { opacity: 0.6; cursor: wait; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.phone-logo { display: none; }
.desk-title {
  margin: 0;
  padding: 18px 28px 0;
  text-align: right;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0;
  color: var(--ink);
}
.desk-title img {
  display: block;
  margin-left: auto;
  height: 22px;
  width: auto;
}
@media (min-width: 801px) {
  .desk-title { display: none; }
}
.hello-block {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 4px 16px;
  width: fit-content;
  max-width: calc(100% - 48px);
  margin: 14px 24px 0;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--menu) 8%, white);
  border: 1px solid color-mix(in srgb, var(--menu) 22%, white);
  border-left: 4px solid var(--menu);
  border-radius: 18px;
}
.hello-block h2 {
  margin: 0;
  flex: none;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.hello-facts {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}
.bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  padding: 14px 24px 10px;
}
.bar h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.bar p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.verdict {
  margin: 0;
  max-width: 340px;
  padding: 10px 14px;
  border-radius: 14px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}
.verdict.ok { background: var(--ok-soft); color: var(--ok); }
.verdict.issue { background: var(--warn-soft); color: var(--warn); }
.note, .status { margin: 0 24px 10px; font-size: 14px; line-height: 1.45; color: var(--secondary); }
.status { display: none; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); }
.status.show { display: block; }
.status.good { background: var(--ok-soft); color: var(--ok); }

.stay-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 16px 12px;
}
.stay-filter[hidden] { display: none; }
.file-tools {
  display: grid;
  gap: 10px;
  margin: 0 16px 12px;
}
.file-tools[hidden] { display: none; }
.file-lead { margin: 0; color: var(--secondary); font-size: 14px; }
.lib-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.lib-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lib-btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
}
.lib-btn-strong { background: var(--accent); border-color: var(--accent); }
.lib-btn.danger { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.lib-btn:disabled { opacity: 0.55; }
#file-search, #file-sort, .file-add input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: white;
  font: inherit;
  color: var(--ink);
}
#file-search { width: min(220px, 46vw); }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.crumbs button, .crumb-sep {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--menu);
  font: inherit;
  font-weight: 700;
}
.crumbs button { cursor: pointer; }
.crumbs button.is-here { color: var(--ink); cursor: default; }
.file-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.file-add[hidden] { display: none; }
.file-add input { flex: 1 1 180px; min-width: 0; }
.lib-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--menu) 8%, white);
}
.lib-bulk[hidden] { display: none; }
.lib-shade {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(18, 37, 44, 0.35);
}
.lib-shade[hidden] { display: none; }
.lib-dialog {
  width: min(460px, 100%);
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 18px 50px rgba(18, 37, 44, 0.18);
}
.lib-dialog p { margin: 0; font-family: var(--display); font-size: 18px; font-weight: 700; }
.lib-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lib-preview { width: min(860px, 100%); }
.lib-preview-body { max-height: min(68vh, 640px); overflow: auto; }
.lib-preview-body img, .lib-preview-body video { display: block; max-width: 100%; height: auto; }
.lib-preview-body iframe { width: 100%; height: min(68vh, 640px); border: 0; }
.lib-preview-body pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 14px/1.45 ui-monospace, SFMono-Regular, monospace; }
.lib-card, .lib-tile, .lib-row { cursor: pointer; }
.lib-move-list { display: grid; gap: 6px; max-height: 280px; overflow: auto; }
.lib-move-list button {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 8px 10px;
  text-align: left;
  font: inherit;
  font-weight: 700;
}
.list.library {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: auto;
}
.lib-sheet {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  min-height: 100%;
  box-sizing: border-box;
  padding: 8px 10px 14px;
}
.lib-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 36px;
  margin: 2px 4px 12px;
  padding: 4px 10px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.lib-all:hover { background: var(--sunken); }
.lib-all input { width: 16px; height: 16px; margin: 0; accent-color: var(--menu); }
.lib-section {
  margin: 4px 8px 8px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.lib-folders, .lib-tiles { display: grid; gap: 8px; margin: 0 4px 16px; }
.lib-folders { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.lib-tiles { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.lib-card, .lib-tile {
  position: relative;
  display: grid;
  align-items: center;
  border: 1px solid var(--line);
  background: white;
  text-align: left;
}
.lib-card {
  grid-template-columns: 22px 36px minmax(0, 1fr) 32px;
  column-gap: 10px;
  min-height: 56px;
  padding: 8px 8px 8px 12px;
  border-radius: 14px;
  background: var(--sunken);
  border-color: transparent;
}
.lib-tile {
  grid-template-columns: 1fr 32px;
  grid-template-rows: auto auto auto;
  column-gap: 8px;
  min-height: 132px;
  padding: 10px 10px 12px;
  border-radius: 16px;
}
.lib-card .lib-tick { grid-column: 1; grid-row: 1; }
.lib-card .lib-ico { grid-column: 2; grid-row: 1; width: 36px; height: 30px; margin: 0; }
.lib-card .lib-open { grid-column: 3; grid-row: 1; display: grid; align-content: center; gap: 1px; min-width: 0; }
.lib-card .lib-more { grid-column: 4; grid-row: 1; }
.lib-card .lib-menu { grid-column: 1 / -1; grid-row: 2; }
.lib-tile .lib-tick { grid-column: 1; grid-row: 1; align-self: center; }
.lib-tile .lib-ico { grid-column: 1 / -1; grid-row: 2; width: 56px; height: 46px; margin: 4px 0 8px; }
.lib-tile .lib-open { grid-column: 1 / -1; grid-row: 3; display: grid; align-content: start; gap: 2px; }
.lib-tile .lib-more { grid-column: 2; grid-row: 1; align-self: center; justify-self: end; }
.lib-card strong, .lib-tile strong, .lib-name {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lib-card small, .lib-tile small, .lib-where { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-ico { display: block; }
.lib-ico svg { display: block; width: 100%; height: 100%; }
.lib-tick { grid-row: 1 / span 2; display: flex; align-items: center; }
.lib-tick input { width: 16px; height: 16px; accent-color: var(--menu); }
.lib-more, .lib-open {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
}
.lib-open { min-width: 0; padding: 0; cursor: pointer; }
.lib-more {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 20px;
  line-height: 1;
}
.lib-more:hover, .lib-tile:hover, .lib-row:hover { background: var(--sunken); }
.lib-card:hover { background: var(--bg-soft); }
.lib-card.is-on, .lib-tile.is-on, .lib-row.is-on {
  background: color-mix(in srgb, var(--menu) 10%, white);
  border-color: color-mix(in srgb, var(--menu) 28%, var(--line));
}
.lib-menu {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.lib-menu button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}
.lib-menu button.danger { color: var(--warn); }
.lib-row .lib-tick { grid-row: auto; }
.lib-table { background: transparent; border: 0; border-radius: 0; overflow: visible; margin: 0 4px; }
.lib-head, .lib-row {
  display: grid;
  grid-template-columns: 28px 36px minmax(0, 1fr) 132px 78px 40px;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
}
.lib-head {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.lib-drop-hint {
  margin: auto 8px 4px;
  padding: 18px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: color-mix(in srgb, var(--sunken) 70%, white);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.list.library .empty-state { margin: auto; }
.lib-row { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: white; }
.lib-row:last-child { border-bottom: 0; }
.lib-row .lib-ico { width: 32px; height: 32px; }
.lib-line { display: grid; min-width: 0; }
.lib-drop { outline: 2px solid var(--menu); outline-offset: -2px; }
.list.library.grid .lib-tiles { margin: 0; }
.list.library.grid .lib-card {
  grid-template-columns: 1fr 32px;
  grid-template-rows: auto auto auto;
  column-gap: 8px;
  min-height: 132px;
  padding: 10px 10px 12px;
  border-radius: 16px;
  background: white;
  border-color: var(--line);
}
.list.library.grid .lib-card .lib-tick { grid-column: 1; grid-row: 1; }
.list.library.grid .lib-card .lib-ico { grid-column: 1 / -1; grid-row: 2; width: 56px; height: 46px; margin: 4px 0 8px; }
.list.library.grid .lib-card .lib-open { grid-column: 1 / -1; grid-row: 3; align-content: start; }
.list.library.grid .lib-card .lib-more { grid-column: 2; grid-row: 1; justify-self: end; }
.list.library.grid .lib-card .lib-menu { grid-column: 1 / -1; grid-row: 4; }
.stay-filter button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
}
.stay-filter button b {
  min-width: 1.4em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.stay-filter button.on {
  background: var(--accent-soft);
  border-color: transparent;
}
.stay-filter button.on b { background: white; color: var(--ink); }

.cal-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 16px 12px;
}
.cal-tools[hidden] { display: none !important; }
.cal-views, .cal-nav, .cal-zoom, .cal-pop { display: flex; align-items: center; gap: 6px; }
.cal-tools button, .cal-tools select, .cal-tools input {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 8px 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
}
.cal-tools button.on { background: color-mix(in srgb, var(--menu) 18%, white); border-color: transparent; }
.cal-nav button { min-width: 36px; }
.cal-nav strong { font-size: 14px; }
.cal-tools input { min-width: 180px; border-radius: 12px; }
.cal-tools select { max-width: 240px; border-radius: 12px; }
.cal-pop { position: relative; z-index: 12; }
.cal-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(18, 37, 44, 0.12);
}
.cal-menu[hidden] { display: none !important; }
.cal-menu button { text-align: left; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.cal-legend[hidden] { display: none !important; }
.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
}
.cal-legend i { width: 18px; height: 10px; border-radius: 4px; display: block; }
#avail-open, #checkins-open { border-color: var(--menu); color: var(--menu); }
#checkins-open.on { border-color: transparent; color: var(--ink); }
.checkins {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.checkins-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.checkins-bar h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.checkins-bar p {
  margin: 2px 0 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
}
.checkins-bar label {
  display: grid;
  gap: 4px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.checkins-bar select {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 8px 12px;
  background: white;
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
}
.checkins-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 12px;
}
.checkins-day h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.checkins-day h3 b {
  color: var(--ink);
  font-size: 15px;
  letter-spacing: -0.02em;
  text-transform: none;
}
.checkins-day.is-today h3 b { color: var(--menu); }
.checkins-row {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  color: inherit;
  text-align: left;
  font: inherit;
}
.checkins-row:last-child { margin-bottom: 0; }
.checkins-row i {
  width: 6px;
  align-self: stretch;
  min-height: 32px;
  border-radius: 99px;
  background: var(--menu);
}
.checkins-copy { min-width: 0; }
.checkins-copy strong {
  display: block;
  overflow-wrap: anywhere;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.checkins-copy .meta {
  display: block;
  margin-top: 2px;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.35;
}
.checkins-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.checkins-tags .chip { margin: 0; }
.chip.owner { background: #e7f3f4; color: #1f6f78; }
.chip.clean { background: #eef6df; color: #3d6b00; }
.chip.check { background: #f8efe3; color: #a8650a; }
.list.clean-host {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: var(--bg);
}
.clean {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.clean-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px 8px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.clean-bar p {
  margin: 0;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.clean-controls { display: flex; flex-wrap: wrap; gap: 10px; }
.clean-controls label {
  display: grid;
  gap: 4px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.clean-controls select {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 8px 12px;
  background: white;
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
}
.clean-lead {
  margin: 0;
  padding: 10px 16px 0;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.4;
  background: white;
}
.clean-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px 12px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.clean-filters button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
}
.clean-filters button b {
  min-width: 1.4em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.clean-filters button.on { background: var(--accent-soft); border-color: transparent; }
.clean-filters button.on b { background: white; color: var(--ink); }
.clean-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 12px;
}
.clean-day h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.clean-day h3 b {
  color: var(--ink);
  font-size: 15px;
  letter-spacing: -0.02em;
  text-transform: none;
}
.clean-day.is-today h3 b { color: var(--menu); }
.clean-row {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}
.clean-row:last-child { margin-bottom: 0; }
.clean-row i {
  width: 6px;
  align-self: stretch;
  min-height: 32px;
  border-radius: 99px;
}
.clean-copy {
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  padding: 0;
}
.clean-copy strong {
  display: block;
  overflow-wrap: anywhere;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.clean-copy .meta {
  display: block;
  margin-top: 2px;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.35;
}
.clean-side {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}
.clean-side .chip { margin: 0; }
.clean-msg { margin-top: 0; }
.avail {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(18, 37, 44, 0.28);
}
.avail[hidden] { display: none !important; }
.avail-card {
  width: min(380px, 100%);
  display: grid;
  gap: 10px;
  padding: 16px;
  background: white;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(18, 37, 44, 0.18);
}
.avail-card h3 { margin: 0; font-family: var(--display); font-size: 18px; }
.avail-x {
  justify-self: end;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--display);
  font-weight: 700;
  cursor: pointer;
}
.avail-card label { display: grid; gap: 4px; }
.avail-card label span {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.avail-card select,
.avail-card input,
.avail-card textarea {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: var(--display);
  font-weight: 650;
  font-size: 15px;
  color: var(--ink);
  background: white;
}
.avail-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.avail-card .primary { justify-self: start; }
.avail-card textarea { min-height: 96px; resize: vertical; }
.nudge-note { margin: 0; color: var(--secondary); font-size: 13px; line-height: 1.45; }
.ticket .nudge, .panel-action .nudge { border-color: var(--menu); color: var(--menu); }
.ticket .nudge { margin-right: 8px; }
#avail-msg {
  justify-self: start;
  margin-top: 0;
  border-color: var(--menu);
  color: var(--menu);
}
#avail-msg[hidden] { display: none !important; }
#avail-send-body { min-height: 140px; }
.avail-result { margin: 0; min-height: 1.3em; font-weight: 700; }
.avail-result.free { color: #3d6b00; }
.avail-bookings {
  display: grid;
  gap: 8px;
  max-height: min(42vh, 280px);
  overflow: auto;
}
.avail-bookings:empty { display: none; }
.avail-booking {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--sunken);
}
.avail-booking strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avail-booking b {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
}
.avail-booking b:empty { display: none; }
.avail-when {
  grid-column: 1 / -1;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.35;
}
.list.cal-host {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.cal-board { flex: 1; min-height: 0; display: flex; overflow: hidden; background: white; }
.cal-gutter {
  flex: none;
  width: 190px;
  display: flex;
  flex-direction: column;
  background: white;
  border-right: 1px solid var(--line);
}
.cal-gutter-rows { flex: 1; min-height: 0; overflow: hidden; }
.cal-gutter .cal-name {
  position: static;
  width: auto;
  box-shadow: none;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}
.cal-gutter .cal-corner { flex: none; height: 52px; }
.cal-board .cal-head { height: 52px; box-sizing: border-box; }
.cal-board .cal-row { box-sizing: border-box; }
.cal-board .cal-scroll { flex: 1; min-width: 0; }
.cal-scroll { flex: 1; overflow: auto; min-height: 0; }
.cal-sheet { min-width: max-content; }
.cal-head, .cal-row { display: flex; }
.cal-head {
  position: sticky;
  top: 0;
  z-index: 6;
  background: white;
  border-bottom: 1px solid var(--line);
}
.cal-name {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 190px;
  flex: none;
  background: white;
  border-right: 1px solid var(--line);
  box-shadow: 1px 0 0 white;
  padding: 8px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
}
.cal-corner { z-index: 2; }
.cal-days { display: flex; }
.cal-day {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.cal-day b { color: var(--ink); font-size: 13px; }
.cal-day.weekend { background: var(--bg); }
.cal-day.today b { color: var(--menu); }
.cal-row { border-bottom: 1px solid var(--line); }
.cal-track { position: relative; z-index: 1; isolation: isolate; overflow: hidden; background: white; }
.cal-shade {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--bg);
  pointer-events: none;
}
.cal-now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--menu);
  pointer-events: none;
  z-index: 1;
}
.cal-bar {
  position: absolute;
  z-index: 1;
  border: 0;
  border-radius: 8px;
  background: var(--menu);
  color: white;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
}
.cal-bar.cut { border-top-left-radius: 2px; border-bottom-left-radius: 2px; }
.cal-bar.owner { background: #1f6f78; }
.cal-bar.inquiry { background: var(--warn-soft); color: var(--warn); }
.cal-bar.blocked {
  background: repeating-linear-gradient(-45deg, #9a3412, #9a3412 6px, #ea580c 6px, #ea580c 12px);
  color: white;
}
.cal-bar.clash { box-shadow: inset 0 0 0 2px var(--warn); }
.cal-mark {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 99px;
  background: var(--warn);
  vertical-align: middle;
}
.cal-month, .cal-year { padding: 8px; }
.cal-dow, .cal-cells { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow span, .cal-cell {
  padding: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.cal-cell { color: var(--ink); min-height: 36px; }
.cal-cell.out { color: var(--line-strong); }
.cal-cell.today b { color: var(--menu); }
.cal-week { position: relative; border-top: 1px solid var(--line); }
.cal-year { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cal-ymonth {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
}
.cal-ymonth h3 { margin: 0 0 8px; font-size: 14px; }
.cal-ydays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-yday {
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 4px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.cal-yday.blank { visibility: hidden; }
.cal-yday.stay { background: color-mix(in srgb, var(--menu) 78%, white); color: white; }
.cal-yday.owner { background: #1f6f78; color: white; }
.cal-yday.inquiry { background: var(--warn-soft); color: var(--warn); }
.cal-yday.blocked {
  background: repeating-linear-gradient(-45deg, #9a3412, #9a3412 3px, #ea580c 3px, #ea580c 6px);
  color: white;
}
.cal-legend i.is-blocked {
  background: repeating-linear-gradient(-45deg, #9a3412, #9a3412 3px, #ea580c 3px, #ea580c 6px);
}
.cal-yday.today { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-yday.open { box-shadow: inset 0 -3px 0 var(--warn); }

@media (max-width: 800px) {
  .cal-tools { margin: 0 12px 8px; }
  .cal-tools input, .cal-tools select { font-size: 16px; min-height: 44px; }
  #checkins-open,
  .checkins-bar select,
  .checkins-row { min-height: 44px; }
  .checkins-bar select { font-size: 16px; }
  .avail-card select,
  .avail-card input,
  .avail-card textarea,
  .avail-card .primary,
  #avail-msg,
  .avail-x { font-size: 16px; min-height: 44px; }
  .cal-name { width: 124px; font-size: 12px; }
  .cal-gutter { width: 124px; }
  .cal-year { grid-template-columns: 1fr 1fr; }
  .list.cal-host {
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
  }
}

.list {
  overflow: auto;
  min-height: 0;
  margin: 0 16px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.row {
  width: 100%;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  text-align: left;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--sunken); }
.row.on { background: var(--accent-soft); }
.dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 99px; background: var(--warn); }
.dot.ok { background: var(--ok); }
.group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  padding: 14px 18px 8px;
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.group-head span:last-child { letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.object-row { cursor: default; }
.object-row:hover { background: white; }
.dot.idle { background: var(--line-strong); }
.row h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.chat-guest { font-weight: 650; color: var(--secondary); }
.row .chip.request { margin: 0 0 0 8px; vertical-align: 1px; }
.request-left { margin-left: 6px; color: var(--warn); font-size: 12px; font-weight: 700; }
.chat-guest::before { content: "·"; margin: 0 0.4em; color: var(--muted); font-weight: 600; }
.panel-bar h2 .chat-guest { font-size: 20px; }
.row .meta { margin: 4px 0 0; color: var(--secondary); font-size: 13px; }
.row .side-meta { color: var(--muted); font-size: 13px; white-space: nowrap; }
.object-row .side-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  white-space: normal;
  text-align: right;
}
.prop-detail {
  border: 1px solid var(--menu);
  background: white;
  color: var(--menu);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.prop-sheet { display: grid; gap: 10px; }
.prop-line { display: grid; gap: 2px; margin: 0; }
.prop-line b {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.prop-line span { overflow-wrap: anywhere; white-space: pre-wrap; }
.prop-missing { margin: 0; color: var(--secondary); }
.prop-map { justify-self: start; color: var(--menu); font-weight: 700; }
.avail-card.prop-card { width: min(440px, 100%); }
.object-tools { margin: 0 16px 12px; }
.object-tools[hidden] { display: none; }
#object-search {
  width: min(320px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 14px;
  background: white;
  font-family: var(--display);
  font-weight: 650;
}
.list.prop-host {
  background: transparent;
  border: 0;
}
.info-board {
  display: grid;
  gap: 12px;
  padding: 4px 12px 8px;
}
.info-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.info-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.info-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.info-head span {
  flex: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.info-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.info-block {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.info-block.owner { background: color-mix(in srgb, var(--accent) 9%, white); border-top: 3px solid var(--accent); }
.info-block.access { background: color-mix(in srgb, var(--menu) 8%, white); border-top: 3px solid var(--menu); }
.info-block.stay { background: color-mix(in srgb, var(--ink) 4%, white); border-top: 3px solid var(--ink); }
.info-block.house { background: var(--sunken); border-top: 3px solid var(--line-strong); }
.info-block h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.info-block.owner h3 { color: #3d6b00; }
.info-block.access h3 { color: var(--menu); }
.info-block.stay h3 { color: var(--ink); }
.info-block.house h3 { color: var(--secondary); }
.info-block .prop-line b {
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
  font-weight: 650;
}
.info-block .prop-line span {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.info-block .prop-line.is-mark span {
  color: #3d6b00;
  font-size: 18px;
  font-weight: 800;
}
.info-notice {
  margin: 0 12px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.info-notice summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 18px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.info-notice summary::-webkit-details-marker { display: none; }
.info-notice summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 2px solid var(--secondary);
  border-bottom: 2px solid var(--secondary);
  transform: rotate(45deg) translateY(-2px);
}
.info-notice[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}
.info-notice summary:focus-visible {
  outline: 2px solid var(--menu);
  outline-offset: -4px;
  border-radius: 14px;
}
.info-notice ul { margin: 0; padding: 0 18px 14px 36px; }
.info-notice li { margin: 0 0 6px; color: var(--secondary); line-height: 1.45; }
.info-notice.rules { border-top: 3px solid var(--menu); }
.info-notice.clarify { border-top: 3px solid var(--warn); }
.info-gap {
  margin: 0 18px 16px;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.45;
}
.empty-state { padding: 56px 28px; color: var(--secondary); }
.list.library .empty-state p { margin: 8px 0 0; }
.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ok);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.empty-state.issue strong { color: var(--warn); }

.panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  margin: 16px 16px 16px 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.panel[hidden] { display: none !important; }
.panel-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  position: relative;
  z-index: 2;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.panel-tools { display: flex; align-items: flex-start; gap: 8px; flex: none; }
.translate-wrap { position: relative; }
.translate-btn {
  margin: 0;
  border: 1px solid var(--line-strong);
  color: var(--menu);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
}
.translate-btn:disabled { opacity: 0.6; cursor: wait; }
.translate-menu {
  position: absolute;
  z-index: 6;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  gap: 2px;
  min-width: 168px;
  padding: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(18, 37, 44, 0.12);
}
.translate-menu[hidden] { display: none !important; }
.translate-menu button {
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
}
.translate-menu button:hover, .translate-menu button.on { background: var(--sunken); }
.translate-note {
  margin: 4px 0 0;
  max-width: 180px;
  color: var(--warn);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}
.translate-note:empty { display: none; }
.kicker {
  margin: 0;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.panel-title-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.panel-title-row h2 { min-width: 0; }
.panel-bar h2 { margin: 6px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; overflow-wrap: anywhere; }
#panel-channel { display: inline-flex; flex: none; margin-top: 6px; }
#panel-channel[hidden] { display: none !important; }
.channel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-weight: 650;
  vertical-align: middle;
}
.channel svg { width: 18px; height: 18px; flex: none; display: block; }
.panel-title-row .channel svg { width: 22px; height: 22px; }
.icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  font-size: 22px;
  line-height: 1;
}
.panel-body { overflow: auto; padding: 18px 18px 28px; }
.panel-action { display: none; }
.back-mark { display: none; }
.tabbar { display: none; }
.who-line { margin: 0 0 14px; color: var(--secondary); font-size: 14px; overflow-wrap: anywhere; }
.ticket {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  background: white;
}
.ticket.focus { border-color: #c5e39a; background: #fbfff6; }
.ticket h3 { margin: 8px 0; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.ticket-edit { display: grid; gap: 8px; margin: 8px 0 4px; }
.ticket-edit input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}
.ticket-edit-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ticket-edit .primary, .ticket-edit .quiet { margin-top: 0; }
.chip {
  display: inline-block;
  margin-right: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.quote { margin: 0 0 8px; color: var(--secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
.step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 42px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.step input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); }
.step small { display: block; color: var(--muted); }
.step.done span { color: var(--muted); }
.primary {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
  border-radius: 999px;
  margin-top: 12px;
  font-family: var(--display);
  font-weight: 700;
}
.primary:hover { background: var(--accent-hover); }
.quiet {
  color: var(--ink);
  border-color: var(--line-strong);
  background: white;
  border-radius: 999px;
  margin-top: 8px;
  font-weight: 600;
}
.quiet.translate-btn { margin: 0; }
.done-note { color: var(--ok); font-size: 13px; font-weight: 600; }
.ha-tabs { display: flex; gap: 8px; margin: 0 0 14px; }
.ha-tabs button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
}
.ha-tabs button.on { background: var(--ink); color: white; border-color: var(--ink); }
.ha-sheet { display: flex; flex-direction: column; gap: 12px; }
.ha-status {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--ink);
}
.ha-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px 4px;
  background: white;
}
.ha-card h3 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ha-row {
  display: grid;
  grid-template-columns: minmax(108px, 0.9fr) minmax(0, 1.2fr);
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.ha-row span { color: var(--muted); }
.ha-row strong { font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
.ha-muted { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.ha-photo, .ha-shot { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.ha-shots { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.ha-review textarea, .ha-review { display: grid; gap: 8px; margin: 8px 0; }
.thread { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.thread h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.msg { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 0; border: 0; }
.msg.guest { align-items: flex-start; }
.msg .by {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  width: min(100%, 420px);
  font-size: 12px;
  color: var(--muted);
}
.msg.guest .by { justify-content: flex-start; }
.msg p {
  margin: 0;
  max-width: min(100%, 420px);
  padding: 10px 12px;
  border-radius: 16px 16px 4px 16px;
  background: color-mix(in srgb, var(--menu) 14%, white);
  white-space: pre-wrap;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.msg.guest p {
  border-radius: 16px 16px 16px 4px;
  background: var(--bg-soft);
}
.msg .quiet { margin-top: 0; }
.composer {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}
.composer select,
.composer textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: white;
}
.composer textarea { min-height: 76px; resize: vertical; }
.composer .primary { margin-top: 0; justify-self: start; }
.composer-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.composer-error { margin: 0; color: var(--warn); font-size: 13px; font-weight: 600; }
.composer-error:empty { display: none; }
.team-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.team-tools .quiet { margin: 0; }
.team-file-line { display: flex; gap: 8px; align-items: center; margin: 0; min-width: 0; }
.team-file-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emoji-box { display: flex; flex-wrap: wrap; gap: 4px; }
.emoji-box button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--bg-soft);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.assign { display: grid; gap: 6px; margin: 0 0 16px; font-size: 13px; color: var(--secondary); }

@media (max-width: 800px) {
  html, body { overflow: hidden; }
  .app, .app.panel-open {
    display: block;
    height: 100dvh;
    overflow: hidden;
  }
  .side { display: none; }
  .app.more-open .side {
    display: flex;
    position: fixed;
    z-index: 25;
    inset: 0 0 calc(82px + env(safe-area-inset-bottom)) 0;
    border: 0;
    background: var(--bg);
  }
  .app.more-open .menu [data-view="open"],
  .app.more-open .menu [data-view="all"] { display: none; }
  .app.more-open .menu button,
  .app.more-open .lens button,
  .app.more-open .side-label { min-height: 48px; }
  .prop-detail { min-height: 44px; }
  .main {
    height: 100dvh;
    overflow: hidden;
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }
  .settings { flex: 1; }
  .phone-logo { display: none; }
  .desk-title { padding: calc(10px + env(safe-area-inset-top)) 16px 0; font-size: 16px; }
  .desk-title img { height: 20px; }
  .topbar {
    display: flex;
    margin: 8px 12px 0;
    padding: 0 8px;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 16px;
  }
  .topbar .top-start { display: none; }
  .top-lead { flex: 1 1 auto; max-width: none; min-width: 0; gap: 12px; }
  .desk-search { max-width: none; }
  .desk-search input { font-size: 16px; }
  .company-menu { width: min(260px, calc(100vw - 32px)); }
  .word, .menu button > span, .menu b { opacity: 1; max-width: 180px; }
  .menu b { min-width: 22px; padding: 2px 6px; }
  .pin { display: none; }
  .menu button.on { background: color-mix(in srgb, var(--menu) 18%, white); }
  .menu button.on svg { background: transparent; }
  .app.more-open .side { overflow: auto; }
  #lens-toggle { display: flex; }
  .side #lens-wrap::after {
    content: "";
    display: block;
    width: 32px;
    height: 3px;
    margin: 6px auto 12px;
    border-radius: 999px;
    background: var(--line-strong);
  }
  .side-foot {
    margin-top: auto;
    padding: 14px;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 8px;
  }
  .side .top-tools {
    display: grid;
    margin: 0;
    gap: 8px;
    justify-content: stretch;
  }
  .side .lang-row { width: 100%; }
  .side .lang-row .lang { flex: 1; min-width: 0; }
  .side .bell { width: 44px; height: 44px; }
  .side .bell-menu { top: auto; bottom: calc(100% + 6px); }
  .side .top-tools .lang { display: grid; }
  .side .top-tools .lang select,
  .side .top-tools .ghost {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: 16px;
    text-align: left;
  }
  .side .top-tools .profile { padding: 8px 4px 2px; }
  .side .top-tools .profile small { white-space: normal; }
  #update-now.primary {
    align-self: flex-start;
    width: auto;
    margin: 10px 12px 0;
    min-height: 44px;
    text-align: center;
  }
  .hello-block { display: none; }
  .cal-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 12px 8px;
  }
  .cal-views, .cal-nav, #cal-listing, .cal-legend { grid-column: 1 / -1; }
  .cal-views {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .cal-views button, #avail-open, #checkins-open, #cal-show, .cal-zoom button {
    width: 100%;
    min-height: 40px;
    padding: 8px 8px;
    text-align: center;
  }
  #avail-open, #checkins-open { min-height: 44px; line-height: 1.15; }
  .cal-nav { flex-wrap: nowrap; min-width: 0; }
  .cal-nav strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
  }
  #cal-search { display: none; }
  #cal-listing { width: 100%; max-width: none; }
  .cal-pop, .cal-zoom { width: 100%; min-width: 0; }
  .cal-zoom { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .cal-legend { gap: 6px 12px; }
  .file-tools { margin: 0 12px 10px; }
  .file-add input, #file-search, #file-sort { font-size: 16px; min-height: 44px; }
  .lib-btn { min-height: 44px; }
  .ticket-edit input, .ticket-edit .primary, .ticket-edit .quiet, .ticket .nudge, .composer .quiet { min-height: 44px; font-size: 16px; }
  .settings input { min-height: 44px; font-size: 16px; }
  .lib-actions, .lib-bar { align-items: stretch; }
  #file-search { width: 100%; }
  .lib-date, .lib-size, .lib-head { display: none; }
  .lib-head, .lib-row { grid-template-columns: 28px 36px minmax(0, 1fr) 40px; }
  .lib-folders, .lib-tiles { grid-template-columns: 1fr; }
  .list.library.grid .lib-card,
  .lib-card, .lib-tile {
    grid-template-columns: 22px 44px minmax(0, 1fr) 36px;
    grid-template-rows: auto;
    min-height: 72px;
    padding: 8px 10px;
  }
  .list.library.grid .lib-card .lib-tick,
  .lib-card .lib-tick, .lib-tile .lib-tick { grid-column: 1; grid-row: 1; }
  .list.library.grid .lib-card .lib-ico,
  .lib-card .lib-ico, .lib-tile .lib-ico { grid-column: 2; grid-row: 1; width: 40px; height: 34px; margin: 0; }
  .list.library.grid .lib-card .lib-open,
  .lib-card .lib-open, .lib-tile .lib-open { grid-column: 3; grid-row: 1; }
  .list.library.grid .lib-card .lib-more,
  .lib-card .lib-more, .lib-tile .lib-more { grid-column: 4; grid-row: 1; justify-self: end; }
  .list.library.grid .lib-card .lib-menu,
  .lib-card .lib-menu, .lib-tile .lib-menu { grid-column: 1 / -1; grid-row: 2; }
  .hello-facts { margin: 0; font-size: 15px; }
  .bar { padding: 10px 16px 8px; align-items: flex-start; }
  .bar h1 { font-size: 20px; }
  .bar p { font-size: 13px; }
  .verdict { text-align: left; max-width: none; }
  .note { display: none; }
  .stay-filter { margin: 0 12px 10px; }
  .object-tools { margin: 0 12px 10px; }
  #object-tabs button, #object-search { min-height: 44px; font-size: 16px; }
  .info-notice summary { min-height: 44px; font-size: 16px; }
  .info-cols { grid-template-columns: 1fr; }
  .list {
    flex: 1;
    margin: 0 12px 12px;
    background: transparent;
    border: 0;
    border-radius: 0;
  }
  .list.library {
    display: flex;
    flex-direction: column;
    overflow: auto;
    min-height: 0;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .list.clean-host {
    min-height: 0;
    border: 0;
    background: var(--bg);
  }
  .clean-scroll {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .clean-controls select,
  .clean-filters button,
  .clean-row,
  .clean-msg { min-height: 44px; }
  .clean-controls select { font-size: 16px; }
  .lib-all { min-height: 44px; font-size: 16px; }
  .list.library .lib-open { pointer-events: none; }
  .row {
    margin-bottom: 8px;
    border: 0;
    border-radius: 16px;
    min-height: 76px;
    align-items: center;
  }
  .row:last-child { margin-bottom: 0; }
  .row:active { background: var(--accent-soft); }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: fixed;
    z-index: 26;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    gap: 4px;
    padding: 6px;
    background: white;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    box-shadow: 0 8px 22px rgba(18, 37, 44, 0.14);
  }
  .tabbar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--muted);
    font-family: var(--display);
    font-weight: 700;
    font-size: 12px;
  }
  .tabbar button.on { background: var(--menu); color: var(--menu-on); }
  .tabbar b {
    min-width: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--sunken);
    color: var(--secondary);
    font-size: 11px;
    line-height: 16px;
  }
  .tabbar b:empty { display: none; }
  .tabbar button.on b {
    background: color-mix(in srgb, var(--menu-on) 22%, transparent);
    color: var(--menu-on);
  }
  .app.panel-open .tabbar,
  .app.panel-open .main { display: none; }
  .panel {
    position: fixed;
    inset: 0;
    width: auto;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    z-index: 30;
  }
  .panel-body { flex: 1; min-height: 0; }
  .panel-bar { padding-top: calc(12px + env(safe-area-inset-top)); background: white; }
  .translate-btn, .translate-menu button { min-height: 44px; font-size: 16px; }
  .close-mark { display: none; }
  .back-mark { display: inline; font-size: 34px; line-height: 0.8; }
  .icon {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
  }
  .panel-action {
    display: block;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: white;
  }
  .panel-action[hidden] { display: none !important; }
  .panel-action .primary,
  .panel-action .quiet {
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 14px 16px;
    font-size: 17px;
  }
  .gate { padding: 0; }
  .gate-card {
    border: 0;
    border-radius: 0;
    min-height: 100dvh;
    align-content: center;
    padding: 28px 22px calc(28px + env(safe-area-inset-bottom));
  }
  .gate-card input,
  .gate-submit {
    min-height: 52px;
    font-size: 16px;
    border-radius: 14px;
  }
}

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}
.gate-card {
  width: min(420px, 100%);
  display: grid;
  gap: 12px;
  padding: 28px 24px 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.gate-card img { width: 220px; height: auto; display: block; margin: 0 auto; }
.gate-kicker {
  margin: 0;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--secondary);
}
.gate-card h1 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -0.03em;
}
.gate-card label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--secondary); }
.gate-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: white;
}
.gate-error {
  min-height: 1.2em;
  margin: 0;
  color: var(--warn);
  font-size: 13px;
  font-weight: 600;
}
.gate-submit {
  border: 0;
  background: var(--accent);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--display);
  font-weight: 700;
}
.gate-submit:hover { background: var(--accent-hover); }
.gate-submit:disabled { opacity: 0.6; cursor: wait; }
.gate-app {
  border: 1px solid var(--line-strong);
  background: white;
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--display);
  font-weight: 700;
}

.install {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(18, 37, 44, 0.45);
}
.install[hidden] { display: none !important; }
.install-card {
  width: min(440px, 100%);
  max-height: min(860px, 100%);
  overflow: auto;
  background: white;
  border-radius: 20px;
  padding: 16px 16px 22px;
}
.install-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.install-bar h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.install-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.install-tabs button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  font-family: var(--display);
  font-weight: 700;
}
.install-tabs button.on { background: var(--accent-soft); border-color: transparent; }
.install-note { margin: 0 0 14px; color: var(--secondary); font-size: 14px; line-height: 1.45; }
.shot { margin: 0 0 18px; }
.shot figcaption { margin: 8px 0 0; color: var(--ink); font-size: 14px; line-height: 1.45; }
.phone {
  width: min(280px, 100%);
  margin: 0 auto;
  padding: 10px;
  background: #1c1c1e;
  border-radius: 28px;
}
.phone-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 230px;
  overflow: hidden;
  background: #f2f2f7;
  border-radius: 20px;
}
.safari-page { flex: 1; padding: 28px 16px 8px; color: var(--muted); font-family: var(--display); font-weight: 700; }
.safari-bar, .chrome-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px;
  padding: 8px 10px;
  background: white;
  border-radius: 12px;
}
.chrome-bar { margin: 0; border-radius: 20px 20px 0 0; }
.aa { font-size: 12px; font-weight: 700; color: #007aff; }
.url { flex: 1; min-width: 0; overflow: hidden; color: var(--ink); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.dots {
  display: flex;
  gap: 2px;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
}
.dots i { width: 3px; height: 3px; border-radius: 99px; background: #12252c; }
.hit { outline: 3px solid #67b300; outline-offset: 1px; background: #f3fbe6; }
.pop {
  position: absolute;
  right: 14px;
  bottom: 58px;
  min-width: 132px;
  padding: 6px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(18, 37, 44, 0.16);
}
.pop-row { padding: 8px 10px; border-radius: 10px; font-size: 13px; font-weight: 700; }
.sheet { margin-top: auto; padding: 8px 8px 12px; background: white; border-radius: 16px 16px 0 0; }
.grab { display: block; width: 36px; height: 4px; margin: 4px auto 8px; border-radius: 99px; background: #d5d8dc; }
.sheet-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}
.sheet-row.dim { color: var(--muted); font-weight: 600; }
.sheet-row:has(> span[data-k]:empty) { display: none; }
.chrome-menu { margin: 8px; padding: 6px; background: white; border-radius: 14px; }
.add-screen { justify-content: center; padding: 16px 12px; }
.add-top { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.add-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: white;
  border-radius: 16px;
  text-align: center;
}
.add-card img { width: 52px; height: 52px; border-radius: 12px; }
.add-card strong { font-size: 15px; }
.add-go {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  color: #12252c;
  font-size: 13px;
  font-weight: 700;
}
.add-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; font-size: 12px; font-weight: 700; text-align: left; }
.switch { width: 40px; height: 24px; border-radius: 99px; background: #d5d8dc; position: relative; flex: none; }
.switch.on { background: #34c759; }
.switch.on::after { content: ""; position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 99px; background: white; }
.list.map-host {
  position: relative;
  flex: 1;
  display: flex;
  min-height: 460px;
  padding: 0;
  overflow: hidden;
}
.map-canvas { position: absolute; inset: 0; }
.map-styles, .map-legend, .map-fit, .map-card, .map-note { position: absolute; z-index: 2; }
.map-styles {
  top: 14px;
  left: 14px;
  display: flex;
  gap: 2px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(18, 37, 44, 0.16);
  backdrop-filter: blur(16px);
}
.map-styles button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--secondary);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 750;
}
.map-styles button.on { background: var(--ink); color: white; }
.map-legend {
  top: 14px;
  right: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  max-width: min(420px, 46%);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(18, 37, 44, 0.14);
  backdrop-filter: blur(16px);
}
.map-legend[hidden] { display: none !important; }
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 750;
}
.map-legend i { width: 10px; height: 10px; border-radius: 99px; display: block; }
.map-fit {
  right: 10px;
  bottom: 92px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(18, 37, 44, 0.16);
}
.map-fit svg, .map-fit::before { display: none; }
.map-fit::after {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  margin: 0 auto;
  background:
    linear-gradient(var(--ink), var(--ink)) left top / 6px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left top / 2px 6px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right top / 6px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right top / 2px 6px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left bottom / 6px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left bottom / 2px 6px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right bottom / 6px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right bottom / 2px 6px no-repeat;
}
.map-card {
  left: 14px;
  right: 64px;
  bottom: 14px;
  max-width: 440px;
  max-height: 42%;
  overflow: auto;
  padding: 8px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(18, 37, 44, 0.2);
  backdrop-filter: blur(18px);
}
.map-card[hidden] { display: none !important; }
.map-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 6px; }
.map-card header strong { font-family: var(--display); font-size: 13px; }
.map-card header button {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 99px;
  background: var(--bg);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}
.map-card [data-map-pin] {
  width: 100%;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 4px;
  padding: 8px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
}
.map-card [data-map-pin]:hover, .map-card [data-map-pin]:focus-visible { background: var(--bg); }
.map-card [data-map-pin] i { width: 10px; height: 10px; border-radius: 99px; }
.map-card [data-map-pin] span { display: grid; min-width: 0; }
.map-card [data-map-pin] strong, .map-card [data-map-pin] small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-card [data-map-pin] strong { font-family: var(--display); font-size: 14px; }
.map-card [data-map-pin] small { color: var(--muted); font-size: 12px; }
.map-note {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(18, 37, 44, 0.16);
  font-family: var(--display);
  font-weight: 750;
}
.map-note[hidden] { display: none !important; }
.map-pin, .map-spot {
  border: 0;
  padding: 0;
  cursor: pointer;
}
.map-pin {
  width: 34px;
  height: 44px;
  background: transparent;
  filter: drop-shadow(0 3px 4px rgba(18, 37, 44, 0.38));
}
.map-pin svg { display: block; width: 34px; height: 44px; }
.map-pin path { fill: currentColor; }
.map-pin circle { fill: white; }
.map-pin.on svg { transform: translateY(-2px) scale(1.12); transform-origin: 50% 92%; }
.map-pin.has-open { position: relative; }
.map-pin.has-open::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 0;
  width: 9px;
  height: 9px;
  border: 2px solid white;
  border-radius: 99px;
  background: var(--warn);
}
.map-spot {
  position: relative;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 2px solid white;
  border-radius: 999px;
  color: white;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(18, 37, 44, 0.28);
}
.map-spot b { position: relative; z-index: 1; }
.map-spot.mixed { color: var(--ink); }
.map-spot span {
  position: absolute;
  left: 50%;
  bottom: -7px;
  display: flex;
  gap: 2px;
  transform: translateX(-50%);
}
.map-spot span i { width: 7px; height: 7px; border: 1px solid white; border-radius: 99px; }
.map-host .maplibregl-ctrl-group {
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(18, 37, 44, 0.16);
}
.map-host .maplibregl-ctrl-group button {
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.96);
}
.map-host .maplibregl-ctrl-attrib {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
}
.map-host.map-card-on .maplibregl-ctrl-bottom-right { transform: translateY(-150px); }
.map-host.map-card-on .map-fit { bottom: 242px; }
@media (max-width: 800px) {
  .list.map-host {
    min-height: 0;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
  }
  .map-styles { left: 10px; top: 10px; }
  .map-styles button { padding: 8px 10px; }
  .map-legend {
    top: 58px;
    left: 10px;
    right: auto;
    max-width: calc(100% - 20px);
  }
  .map-card { left: 10px; right: 10px; max-width: none; }
  .map-host.map-card-on .maplibregl-ctrl-bottom-right { transform: translateY(-120px); }
  .map-host.map-card-on .map-fit { bottom: 212px; }
}
@media (max-width: 800px) {
  .gate { padding: 0; }
  .gate-card {
    border: 0;
    border-radius: 0;
    min-height: 100dvh;
    align-content: start;
    padding: calc(20px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom));
  }
  .gate-card input,
  .gate-submit,
  .gate-app {
    min-height: 52px;
    font-size: 16px;
    border-radius: 14px;
  }
  .install { padding: 0; place-items: stretch; }
  .install-card { width: auto; max-height: none; height: 100dvh; border-radius: 0; }
}
