﻿@font-face {
  font-family: "LINE Seed Sans KR";
  src: url("./fonts/line-seed-sans-kr/LINESeedKR-Rg.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f8fc;
  --ink: #071739;
  --muted: #6b7890;
  --line: #e3edf7;
  --panel: #ffffff;
  --primary: #0b6edc;
  --primary-dark: #0a1d45;
  --primary-ink: #071739;
  --cyan: #7fc6f4;
  --gold: #efd78a;
  --accent: #b63a46;
  --warning: #b98500;
  --good: #1f8a70;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-soft: rgba(247, 250, 255, 0.9);
  --surface-quiet: #f6f9fd;
  --line-soft: #e6edf5;
  --line-strong: #c5d9ee;
  --shadow: 0 18px 42px rgba(16, 46, 84, 0.12);
  --shadow-soft: 0 10px 24px rgba(28, 58, 96, 0.055);
  --shadow-card: 0 14px 32px rgba(28, 58, 96, 0.075);
  --shadow-strong: 0 24px 60px rgba(5, 22, 54, 0.24);
  --app-vvh: 100dvh;
  --chat-bottom-safe: max(54px, calc(env(safe-area-inset-bottom) + 42px));
  --composer-bottom-safe: max(72px, calc(env(safe-area-inset-bottom) + 58px));
  /* Font UX rule:
     --font-display is for Korean-first emphasis: page titles, modal titles, and main menu labels.
     --font-sans is for chat, forms, DB values, descriptions, long text, and multilingual content.
     Language mode should prefer --font-sans unless the label is a short UI title. */
  --font-sans: "LINE Seed Sans KR", "Pretendard", "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
  --font-display-kr: "LINE Seed Sans KR", "Pretendard", "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
  --font-display-latin: "LINE Seed Sans KR", "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  --font-display: var(--font-display-kr);
  font-family: var(--font-sans);
}

:root[data-language="EN"] {
  --font-display: var(--font-display-latin);
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: var(--app-vvh);
  overflow-y: scroll;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1.45;
}

html.is-keyboard-open,
html.is-keyboard-open body {
  height: var(--app-vvh);
  min-height: var(--app-vvh);
  overflow: hidden;
}

html.is-keyboard-open .app-shell {
  height: var(--app-vvh);
  min-height: 0;
  overflow: hidden;
}

html.is-keyboard-open .screen {
  height: var(--app-vvh);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

html.is-keyboard-open .modal-backdrop {
  align-items: start;
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  min-height: var(--app-vvh);
  display: flex;
  justify-content: center;
  transition: transform 160ms ease;
  background:
    radial-gradient(circle at 82% 12%, rgba(90, 164, 226, 0.16), transparent 24%),
    radial-gradient(circle at 4% 0%, rgba(255, 255, 255, 0.98), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 253, 0.94) 48%, rgba(250, 253, 255, 1));
}

html.is-edge-swiping-back .app-shell {
  transform: translateX(calc(var(--edge-swipe-x, 0px) * 0.32));
  transition: none;
}

.app-shell::before,
.app-shell::after {
  content: "";
  position: fixed;
  pointer-events: none;
  border: 1px solid rgba(59, 116, 178, 0.12);
  border-radius: 50%;
}

.app-shell::before {
  width: 620px;
  height: 620px;
  left: -360px;
  top: -110px;
}

.app-shell::after {
  width: 740px;
  height: 740px;
  right: -520px;
  bottom: -250px;
}

.screen {
  width: min(100%, 520px);
  min-height: 100vh;
  min-height: 100dvh;
  min-height: var(--app-vvh);
  margin: 0 auto;
  padding: 42px 18px 54px;
  position: relative;
  z-index: 1;
}

.chat-screen {
  height: 100vh;
  height: 100dvh;
  height: var(--app-vvh);
  min-height: 0;
  padding-top: 14px;
  padding-bottom: var(--chat-bottom-safe);
  display: grid;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  min-height: 64px;
  margin-bottom: 22px;
}

.topbar.has-icon-back {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
}

.topbar.has-icon-back .brand {
  padding-right: 0;
}

.topbar-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.topbar-action-row {
  display: flex;
  gap: 8px;
  justify-content: end;
}

.topbar-actions.is-icon-back {
  gap: 6px;
  min-width: 54px;
  justify-items: end;
}

.topbar-actions.is-icon-back .topbar-action-row {
  justify-content: end;
}

.topbar-back {
  margin: 0;
}

.topbar-actions.is-icon-back .role-pill {
  justify-self: end;
}

.language-toggle-button {
  min-width: 46px;
  padding-inline: 12px;
}

.brand {
  min-width: 0;
  display: grid;
  gap: 5px;
  align-content: start;
}

.brand-logo {
  width: 230px;
  max-width: 60vw;
  height: auto;
  object-fit: contain;
  display: block;
}

.brand-logo-small {
  width: 164px;
  max-width: 42vw;
}

.brand-logo-compact {
  width: 150px;
  max-width: 34vw;
}

.brand strong {
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 22px;
  line-height: 1.08;
  letter-spacing: 0;
}

.brand strong::before {
  content: none;
}

.brand span,
.small {
  color: var(--muted);
  font-size: 14px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  padding: 20px;
}

.db-screen {
  width: min(100%, 1180px);
}

.db-admin-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-height: calc(100dvh - 140px);
}

.db-admin-menu {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
  min-width: 0;
}

.db-admin-menu button {
  min-width: 0;
  min-height: 64px;
  border: 1px solid var(--line-soft);
  border-bottom-color: var(--line-strong);
  border-radius: 8px 8px 0 0;
  background: var(--surface-quiet);
  color: var(--ink);
  padding: 10px 12px;
  text-align: center;
  box-shadow: none;
  overflow: hidden;
}

.db-admin-menu button.is-active {
  border-color: var(--primary);
  border-bottom-color: #fff;
  background: #fff;
  box-shadow: 0 -6px 18px rgba(19, 62, 121, 0.08);
  transform: translateY(1px);
}

.db-admin-menu button.is-locked {
  color: var(--muted);
  background: #eef4fb;
}

.db-admin-menu button.is-locked strong::after {
  content: " LOCK";
  margin-left: 4px;
  color: #7a8da6;
  font-size: 10px;
  font-weight: 900;
}

.db-admin-menu strong,
.db-section-head strong {
  display: block;
  color: var(--primary-dark);
  font-size: 20px;
  line-height: 1.15;
}

.db-admin-menu strong {
  font-family: var(--font-display);
  letter-spacing: 0;
}

.db-admin-menu span,
.db-section-head span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.db-section-panel {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 0 0 8px 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.db-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.db-section-head em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #edf4fb;
  color: var(--primary);
  padding: 8px 10px;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.db-document-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.db-search-box {
  display: grid;
  gap: 6px;
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 800;
}

.db-search-box input {
  width: 100%;
  min-height: 52px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  outline: none;
}

.db-search-box input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(27, 117, 216, 0.12);
}

.db-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: end;
}

.db-edit-actions .btn {
  min-height: 44px;
  border-color: #9fc9f5;
  background: #eaf4ff;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 15px;
  box-shadow: 0 8px 18px rgba(17, 109, 214, 0.1);
}

.db-edit-actions .btn[data-action="db-sheet-edit"],
.db-edit-actions .btn[data-action="db-sheet-save"] {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 24px rgba(17, 109, 214, 0.22);
}

.db-edit-actions .btn[data-action="db-sheet-cancel"] {
  border-color: #d5e3f2;
  background: #f6f9fd;
  color: #667891;
  box-shadow: none;
}

.db-suggestion-list {
  min-height: 0;
}

.db-cell-input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #b9d7f7;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  outline: none;
}

.db-cell-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 117, 216, 0.12);
}

.db-record-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.db-record-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(19, 62, 121, 0.055);
  padding: 14px;
}

.db-record-card.is-locked {
  background: #f6f8fb;
}

.db-record-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.db-record-head > div {
  min-width: 0;
}

.db-record-head strong {
  display: block;
  color: var(--primary-dark);
  font-size: 19px;
  line-height: 1.16;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.db-record-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.db-record-head em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #edf4fb;
  color: var(--primary);
  padding: 7px 9px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.db-record-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.db-record-field {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 42px;
  border: 1px solid #e1edf9;
  border-radius: 8px;
  background: #f8fbff;
  padding: 8px 10px;
}

.db-record-field.is-readonly {
  background: #f2f6fb;
}

.db-record-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.db-record-field > strong {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.28;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.db-record-field.is-readonly > strong {
  color: #52657f;
}

.db-as-inline-action {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.db-as-inline-action span {
  color: var(--ink);
  font-weight: 900;
}

.db-as-inline-action .btn {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.db-as-record-card {
  gap: 10px;
  border-color: #cfe1f5;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.94)),
    #fff;
  box-shadow: var(--shadow-soft);
}

.db-as-record-card .db-record-head {
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #e7f0fa;
}

.db-as-record-card .db-record-head strong {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.16;
}

.db-as-record-card .db-record-head span {
  color: #718198;
  font-size: 11px;
  font-weight: 800;
}

.db-as-record-card .db-record-head em {
  background: #e8f2ff;
  color: var(--primary);
  padding: 7px 10px;
}

.db-as-record-card .db-record-fields {
  grid-template-columns: 1fr;
  gap: 6px;
}

.db-as-record-card .db-record-field {
  grid-template-columns: minmax(76px, 28%) minmax(0, 1fr);
  min-height: 38px;
  border-color: #d9e8f8;
  background: #fbfdff;
  padding: 7px 9px;
}

.db-as-record-card .db-record-field.is-readonly {
  border-color: transparent;
  background: #f4f8fd;
}

.db-as-record-card .db-record-field > span {
  color: #6c7b92;
  font-size: 11px;
  font-weight: 800;
}

.db-as-record-card .db-record-field > strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.db-as-record-card .db-cell-input {
  min-height: 38px;
  border-color: #c9def5;
  background: #fff;
  font-size: 14px;
}

.db-as-record-card .db-as-inline-action {
  justify-content: space-between;
  gap: 8px;
}

.db-as-record-card .db-as-inline-action span {
  min-width: 0;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.db-as-record-card .db-as-inline-action .btn {
  min-height: 32px;
  border-radius: 999px;
  background: #eaf4ff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

.db-code-parts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.db-code-parts span,
.db-code-parts em {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  font-style: normal;
  line-height: 1;
}

.db-code-parts span {
  border: 1px solid #b9d7f7;
  background: #fff;
  color: var(--primary-dark);
  padding: 0 9px;
}

.db-code-parts em {
  color: #6d7d93;
  font-weight: 900;
}

.db-code-parts.is-editing {
  gap: 4px;
}

.db-code-input {
  min-width: 0;
  height: 34px;
  border: 1px solid #b9d7f7;
  border-radius: 8px;
  background: #fff;
  color: var(--primary-dark);
  padding: 0 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  outline: none;
  text-transform: uppercase;
}

.db-code-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 117, 216, 0.12);
}

.db-code-input.is-brand {
  width: 48px;
}

.db-code-input.is-short {
  width: 48px;
}

.db-code-input.is-mid {
  width: 64px;
}

.db-code-input.is-serial {
  width: 90px;
}

.db-compound-field {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.db-compound-field span,
.db-compound-field label {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.db-compound-field small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
}

.db-compound-field span {
  overflow-wrap: anywhere;
}

.db-record-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed #c8d9ec;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
}

.db-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.db-stat-card {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 1px solid #d7e6f8;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.db-stat-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.db-stat-card strong {
  color: var(--primary-dark);
  font-size: 25px;
  line-height: 1;
}

.db-company-select-button {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #b9d7f7;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
  padding: 11px 13px;
  text-align: left;
}

.db-company-select-button span,
.db-company-select-button em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.db-company-select-button strong {
  min-width: 0;
  color: var(--primary-dark);
  font-size: 19px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.db-company-picker-backdrop {
  align-items: start;
  padding-top: 33vh;
}

.db-company-picker {
  width: min(100%, 560px);
  max-height: min(58vh, 520px);
  overflow: hidden;
}

.db-company-picker-list {
  display: grid;
  gap: 8px;
  overflow-y: auto;
  padding-right: 3px;
}

.db-company-picker-list button {
  min-width: 0;
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid #c8ddf2;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
  padding: 10px;
  text-align: left;
}

.db-company-picker-list button.is-active {
  border-color: var(--primary);
  background: #edf4fb;
  box-shadow: inset 0 0 0 2px rgba(27, 117, 216, 0.12);
}

.db-company-picker-list strong {
  color: var(--primary-dark);
  font-size: 17px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.db-company-picker-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.product-issue-panel {
  display: grid;
  gap: 12px;
  border: 2px solid #8dbff0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(17, 109, 214, 0.1), rgba(255, 255, 255, 0.94) 54%),
    #f8fbff;
  padding: 14px;
  box-shadow: 0 10px 22px rgba(17, 109, 214, 0.1);
}

.product-summary-panel {
  display: grid;
  gap: 8px;
}

.product-summary-card {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #cfe2f6;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 12px;
}

.product-summary-card strong {
  min-width: 0;
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-summary-card span,
.product-summary-card em {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
}

.product-summary-card span {
  background: #edf4fb;
  color: var(--primary);
}

.product-summary-card em {
  background: #f5f8fc;
  color: var(--muted);
}

.product-issue-head {
  display: block;
}

.product-issue-head strong {
  display: block;
  color: var(--primary-dark);
  font-size: 22px;
  line-height: 1.1;
}

.product-issue-head span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.product-issue-head em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #edf4fb;
  color: var(--primary);
  padding: 8px 10px;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.product-issue-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.product-choice-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid #b9d7f7;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
  text-align: left;
}

.product-choice-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.product-choice-row strong {
  min-width: 0;
  color: var(--primary-dark);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.product-choice-row em {
  color: var(--primary);
  font-size: 24px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.product-choice-row:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 117, 216, 0.12);
}

.product-choice-row:disabled,
.product-picker-option:disabled,
.product-issue-form > .btn:disabled,
.product-confirm-modal .btn:disabled,
.product-confirm-modal .modal-close:disabled {
  cursor: wait;
  opacity: 0.58;
  pointer-events: none;
}

.product-issue-form > .btn.is-busy,
.product-confirm-modal .btn.is-busy {
  background: linear-gradient(180deg, #2f94ef 0%, #1374d8 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 10px 18px rgba(20, 116, 216, 0.18);
}

.product-issue-busy {
  margin-top: 12px;
  border-radius: 8px;
  background: #eef7ff;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  padding: 10px 12px;
  text-align: center;
}

.product-issue-form > .btn {
  min-height: 58px;
  grid-column: 1 / -1;
}

.product-issue-preview,
.product-issue-notice {
  display: grid;
  gap: 5px;
  border: 1px solid #d7e6f8;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.product-issue-preview span,
.product-issue-notice {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.product-issue-preview strong {
  color: var(--primary-dark);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.product-issue-notice {
  border-color: #9dd8bf;
  background: #f0fbf6;
  color: #1f8a70;
  animation: product-notice-fade 20s ease-in forwards;
}

@keyframes product-notice-fade {
  0%,
  70% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.product-confirm-backdrop {
  align-items: center;
}

.product-confirm-modal {
  width: min(100%, 420px);
  align-self: center;
}

.product-confirm-copy {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  align-items: start;
  justify-items: center;
  background: rgba(7, 26, 55, 0.36);
  padding: max(10px, env(safe-area-inset-top)) 18px 18px;
  overflow: hidden;
}

.product-picker-sheet {
  width: min(100%, 520px);
  max-height: calc(100dvh - max(20px, env(safe-area-inset-top)) - 24px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid #b9d7f7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 42px rgba(7, 26, 55, 0.22);
  overflow: hidden;
}

.product-picker-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #d7e6f8;
  padding: 0 14px;
}

.product-picker-head strong {
  color: var(--primary-dark);
  font-size: 22px;
}

.product-picker-body {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 12px;
}

.product-picker-option {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #d7e6f8;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
}

.product-picker-option.is-selected {
  border-color: var(--primary);
  background: #edf4fb;
}

.product-picker-option strong {
  color: var(--primary-dark);
  font-size: 18px;
}

.product-picker-option span {
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  padding: 6px 9px;
  font-size: 13px;
  font-weight: 900;
}

.product-count-picker {
  display: grid;
  gap: 12px;
}

.product-count-stepper {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 62px;
  gap: 8px;
  align-items: center;
}

.product-count-stepper button,
.product-count-options button {
  min-height: 52px;
  border: 1px solid #b9d7f7;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--primary);
  font-size: 18px;
  font-weight: 900;
}

.product-count-stepper strong {
  min-height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid #d7e6f8;
  border-radius: 8px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 24px;
}

.product-count-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.product-count-options button.is-selected {
  border-color: var(--primary);
  background: #edf4fb;
  color: var(--primary-dark);
}

.db-subgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.db-subgrid article {
  min-height: 74px;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.db-subgrid article.is-locked {
  background: #f3f6fa;
  color: var(--muted);
}

.db-subgrid b {
  display: block;
  color: var(--primary-dark);
  font-size: 15px;
}

.db-subgrid span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.db-table-wrap {
  min-width: 0;
  overflow: visible;
  border: 1px solid #d7e6f8;
  border-radius: 8px;
  background: #fff;
}

.db-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.db-table th,
.db-table td {
  border-bottom: 1px solid #e5effa;
  padding: 11px 12px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
  line-height: 1.38;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.db-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f2f7fd;
  color: var(--muted);
  font-weight: 900;
}

.db-table td {
  color: var(--ink);
}

.db-table td strong {
  display: block;
  color: var(--primary-dark);
  font-size: 14px;
}

.db-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.db-empty-cell {
  color: var(--muted);
  text-align: center;
}

.db-click-row {
  cursor: pointer;
}

.db-click-row:hover td {
  background: #fafcff;
}

.db-locked-note {
  border: 1px dashed #aac8ec;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
  padding: 13px;
  font-size: 13px;
  font-weight: 800;
}

.stack {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label,
.check span {
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 900;
}

.field input,
.field select {
  width: 100%;
  min-height: 58px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 15px;
  font-size: 19px;
  box-shadow: inset 0 2px 4px rgba(22, 34, 48, 0.05);
}

.field input:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(17, 109, 214, 0.14);
  outline: none;
}

.check {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
}

.check input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.quick-login {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.btn {
  min-height: 64px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgba(17, 109, 214, 0.16);
}

.btn:hover {
  background: var(--primary-dark);
}

.btn.secondary {
  color: var(--muted);
  background: #fff;
  border-color: var(--line-soft);
  box-shadow: none;
}

.btn.secondary:hover {
  background: #fafcff;
}

.btn.ghost {
  min-height: 38px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--line-strong);
  font-size: 14px;
  padding: 0 12px;
  box-shadow: none;
}

.btn.quick {
  min-height: 52px;
  background: #edf6ff;
  border-color: var(--line-strong);
  font-size: 16px;
  box-shadow: none;
}

.btn.quick.as-detail-room-button {
  min-height: 38px;
  font-size: 13px;
}

.message {
  border-radius: 8px;
  padding: 12px;
  color: #513d00;
  background: #fff8e6;
  border: 1px solid var(--gold);
  font-size: 16px;
  line-height: 1.45;
}

.message.good {
  color: #ffffff;
  background: var(--good);
  border-color: var(--good);
}

.login-screen {
  display: grid;
  align-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 28px;
  padding-bottom: 36px;
}

.login-screen::before {
  content: "";
  position: fixed;
  top: 44px;
  right: -42px;
  width: 180px;
  height: 180px;
  background: url("/monitor/assets/notification-icon.jpg") center / cover no-repeat;
  opacity: 0.06;
  pointer-events: none;
}

.login-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  margin: 0 auto;
}

.login-brand-mark {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0 0 20px;
  text-align: center;
}

.login-brand-mark .brand-logo {
  width: 240px;
  max-width: 66vw;
}

.login-brand-mark span {
  color: #5f7189;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.login-panel {
  gap: 16px;
  padding: 24px 22px 20px;
  border-color: rgba(187, 205, 224, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(250, 253, 255, 0.95)),
    var(--surface);
  box-shadow: 0 22px 46px rgba(18, 53, 92, 0.09);
}

.login-copy {
  display: grid;
  gap: 5px;
  padding: 4px 2px 2px;
}

.login-copy strong {
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 26px;
  line-height: 1.05;
}

.login-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.login-panel .field {
  gap: 6px;
}

.login-panel .field label {
  color: #53647c;
  font-size: 13px;
  font-weight: 800;
}

.login-panel .field input {
  min-height: 54px;
  border-width: 1px;
  border-color: #d7e6f5;
  border-radius: 8px;
  background: #fbfdff;
  font-size: 17px;
  box-shadow: none;
}

.login-panel .field input::placeholder {
  color: #97a4b7;
}

.login-panel .actions {
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 4px;
}

.login-panel .actions .btn {
  min-height: 56px;
  font-size: 17px;
}

.login-support-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-top: 2px;
}

.login-create-link,
.login-profile-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: #687484;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.login-create-link {
  color: #2874c7;
}

.login-profile-link::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 11px;
  margin-right: 14px;
  background: rgba(135, 148, 167, 0.46);
  vertical-align: -1px;
}

.login-panel .quick-login {
  grid-template-columns: 1fr;
  margin-top: -2px;
}

.browser-block-panel {
  gap: 14px;
}

.browser-block-panel strong {
  color: var(--primary-dark);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
}

.browser-block-panel p {
  margin: 0;
  color: #617084;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
}

.browser-block-panel .login-create-link {
  align-self: center;
  min-height: 40px;
}

.login-panel .btn.quick {
  min-height: 44px;
  color: #617089;
  background: #f2f7fd;
  border-color: #dbe8f5;
  font-size: 13px;
}

.login-hint {
  text-align: center;
  font-size: 12px;
  color: #8794a7;
}

.account-screen {
  padding-top: 28px;
  padding-bottom: 42px;
}

.account-wrap {
  width: min(100%, 390px);
  margin: 0 auto;
}

.account-screen .topbar {
  margin-bottom: 16px;
}

.account-screen .brand strong {
  font-size: 28px;
}

.account-screen .brand strong::before {
  font-size: 30px;
}

.account-panel {
  gap: 13px;
  padding: 20px;
  border-color: rgba(184, 209, 235, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 255, 0.94)),
    var(--surface);
  box-shadow: 0 22px 46px rgba(18, 53, 92, 0.105);
}

.account-copy {
  display: grid;
  gap: 4px;
  padding: 2px 2px 0;
}

.account-copy strong {
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 24px;
  line-height: 1.05;
}

.account-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.account-panel .field {
  gap: 5px;
}

.account-panel .field label,
.account-panel .check span {
  color: #53647c;
  font-size: 13px;
  font-weight: 800;
}

.account-panel .field input,
.account-panel .field select {
  min-height: 52px;
  border-width: 1px;
  border-color: #d7e6f5;
  border-radius: 8px;
  background: #fbfdff;
  font-size: 16px;
  box-shadow: none;
}

.account-panel .field input::placeholder {
  color: #97a4b7;
}

.account-company-button {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #d7e6f5;
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink);
  padding: 0 14px;
  text-align: left;
  box-shadow: none;
}

.account-company-button span {
  color: #53647c;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.account-company-button strong {
  min-width: 0;
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-company-button em {
  color: var(--primary);
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.account-form-company-backdrop {
  padding-top: 18vh;
}

.account-form-company-picker {
  width: min(100%, 390px);
  max-height: min(64vh, 520px);
}

.account-panel .actions {
  margin-top: 0;
}

.account-panel .actions .btn {
  min-height: 56px;
  font-size: 17px;
}

.account-check {
  grid-template-columns: 20px 1fr;
  padding: 10px 12px;
  border: 1px solid #dce8f5;
  border-radius: 8px;
  background: #f7fbff;
}

.account-terms-summary {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dce8f5;
  border-radius: 8px;
  background: #ffffff;
}

.account-terms-summary strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.account-terms-summary p {
  margin: 0;
  color: #66758b;
  font-size: 12px;
  line-height: 1.45;
}

.account-terms-summary .btn {
  justify-self: start;
}

.account-terms-modal {
  align-self: start;
  margin-top: max(12px, calc(100dvh * 0.05));
  max-height: calc(100dvh - 32px);
  max-height: calc(var(--app-vvh) - 32px);
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.account-terms-body {
  display: grid;
  gap: 8px;
  min-height: 0;
  max-height: min(58vh, calc(var(--app-vvh) - 210px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}

.account-terms-body h3 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.account-terms-body p,
.account-terms-body li {
  color: #53647c;
  font-size: 13px;
  line-height: 1.5;
}

.account-terms-body p,
.account-terms-body ul {
  margin: 0;
}

.account-terms-body ul {
  padding-left: 18px;
}

.account-hint {
  color: #8794a7;
  font-size: 12px;
}

.verify-screen {
  padding-top: 28px;
  padding-bottom: 42px;
}

.verify-backdrop {
  width: min(100%, 390px);
  margin: 22px auto 0;
}

.verify-card {
  gap: 14px;
  padding: 22px;
  border-color: rgba(184, 209, 235, 0.86);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 252, 255, 0.96)),
    var(--surface);
  box-shadow: 0 24px 54px rgba(18, 53, 92, 0.14);
}

.verify-copy {
  display: grid;
  gap: 5px;
}

.verify-copy strong {
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 26px;
  line-height: 1.05;
}

.verify-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.verify-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #dce8f5;
  border-radius: 8px;
  background: #f4f9ff;
}

.verify-meta span {
  color: #68788f;
  font-size: 13px;
  font-weight: 800;
}

.verify-meta strong {
  color: var(--primary);
  font-size: 18px;
  font-weight: 900;
}

.verify-card .field label {
  color: #53647c;
  font-size: 13px;
  font-weight: 800;
}

.verify-card .field input {
  min-height: 56px;
  border-width: 1px;
  border-color: #d7e6f5;
  border-radius: 8px;
  background: #fbfdff;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.12em;
  box-shadow: none;
}

.verify-dev-code {
  color: #8794a7;
  font-size: 12px;
  text-align: center;
}

.verify-actions {
  gap: 8px;
  margin-top: 0;
}

.verify-actions .btn {
  min-height: 54px;
  font-size: 17px;
}

.menu-grid {
  display: grid;
  gap: 16px;
  width: min(100%, 390px);
  margin: 18px auto 0;
}

.menu-button {
  position: relative;
  width: 100%;
  min-height: 264px;
  display: grid;
  align-content: end;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 248, 255, 0.94)),
    var(--surface);
  color: var(--ink);
  padding: 0;
  text-align: left;
  box-shadow: 0 18px 40px rgba(18, 53, 92, 0.1);
  overflow: hidden;
}

.menu-card-art {
  position: relative;
  z-index: 0;
  min-height: 220px;
  pointer-events: none;
}

.menu-card-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.02);
}

.menu-button::after {
  content: none;
}

.menu-card-copy {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 10px;
  min-height: 76px;
  padding: 12px 18px 16px;
  background: rgba(247, 251, 255, 0.96);
  border-top: 1px solid rgba(189, 208, 229, 0.72);
}

/* Home card abbreviations are short main menu labels, so they intentionally use --font-display. */
.menu-button strong {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  color: var(--primary-dark);
  font-size: 38px;
  line-height: 1;
  letter-spacing: 0;
}

.menu-card-copy > span {
  position: relative;
  z-index: 2;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.25;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.toolbar .btn {
  min-height: 46px;
  padding: 0 12px;
}

.cards {
  display: grid;
  gap: 12px;
}

.chat-screen {
  width: min(100%, 620px);
}

.room-list {
  display: grid;
  gap: 10px;
}

.as-entry-screen {
  grid-template-rows: auto minmax(0, 1fr);
}

.as-entry-screen .room-list {
  align-content: start;
  min-height: 0;
  max-height: calc(100dvh - 150px);
  overflow-y: auto;
  padding: 4px 4px 18px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.room-item {
  width: 100%;
  min-height: 86px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 14px 14px;
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.room-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.room-copy strong {
  color: var(--primary-dark);
  font-size: 23px;
  line-height: 1.1;
}

.room-copy small {
  color: var(--muted);
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-badge {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.room-side {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.room-side time {
  color: var(--muted);
  font-size: 14px;
}

.room-side em {
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}.chat-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 86% 4%, rgba(126, 181, 226, 0.13), transparent 23%),
    rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.chat-room-head {
  min-height: 78px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.chat-room-head strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-size: 23px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-head > strong,
.product-picker-head > strong,
.db-company-picker .modal-head > strong,
.completion-modal .modal-head > strong,
.blackbox-chart-modal .modal-head > strong {
  font-family: var(--font-display);
  letter-spacing: 0;
}

.chat-room-head span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-title-block {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.chat-title-row {
  min-width: 0;
  display: block;
  max-width: 100%;
  overflow: hidden;
}

.chat-meta-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.chat-back,
.chat-head-button,
.composer-icon,
.send-button {
  border: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
}

.chat-back {
  width: 34px;
  height: 34px;
  background: transparent;
  color: var(--primary);
  font-size: 34px;
  line-height: 1;
}

.map-room-head {
  overflow: visible;
  border: 0;
  background: transparent;
  padding: 0;
  margin-bottom: 18px;
  box-shadow: none;
}

.db-page-head {
  overflow: visible;
  border: 0;
  background: transparent;
  padding: 0;
  margin-bottom: 18px;
  box-shadow: none;
}

.db-page-head strong {
  font-family: var(--font-display);
  letter-spacing: 0.038em;
}

.db-page-head strong::before {
  content: "NEWK ";
  color: var(--primary);
  font-style: italic;
}

.as-detail-screen {
  width: min(100%, 430px);
  padding: 34px 18px 48px;
}

.as-detail-head {
  grid-template-columns: 34px minmax(0, 1fr) 82px;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.as-detail-head .chat-title-block {
  gap: 4px;
}

.as-detail-head .chat-meta-row {
  display: block;
}

.as-detail-head .chat-room-head strong,
.as-detail-head strong {
  font-family: var(--font-display);
}

.as-detail-room-button {
  width: 82px;
  min-width: 82px;
  min-height: 42px;
  padding: 0 10px;
  white-space: nowrap;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
  justify-self: end;
}

.as-detail-screen > .panel {
  padding: 14px;
  gap: 12px;
}

.as-detail-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.as-detail-tabs button {
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  font-size: 15px;
}

.as-detail-tabs button.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(17, 109, 214, 0.18);
}

.as-detail-page {
  min-height: 0;
  align-content: start;
}

.as-field-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(19, 62, 121, 0.045);
}

.as-field-card > strong {
  font-family: var(--font-display);
  color: var(--primary-dark);
  font-size: 23px;
  line-height: 1.15;
}

.chat-head-actions {
  display: flex;
  gap: 4px;
  justify-content: end;
  align-items: center;
}

.chat-head-button {
  min-width: 34px;
  min-height: 32px;
  display: inline-grid;
  grid-auto-flow: column;
  gap: 3px;
  align-items: center;
  justify-items: center;
  padding: 0 6px;
  border-radius: 8px;
  background: #eef5fc;
  color: var(--primary);
  font-size: 11px;
  line-height: 1.1;
  word-break: keep-all;
  box-shadow: inset 0 0 0 1px rgba(17, 109, 214, 0.12);
}

.chat-head-button span:last-child {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.head-icon {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(17, 109, 214, 0.13);
  color: currentColor;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
}

.svg-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.more-icon svg {
  stroke-width: 5;
}

.chat-head-button.is-exit {
  background: #eef4fb;
  color: #334563;
}

.chat-head-button.is-exit .head-icon {
  background: rgba(51, 69, 99, 0.12);
}

.chat-head-button.notify-always {
  background: linear-gradient(135deg, #eef5fc, #e7f1fb);
  color: var(--primary);
  border: 3px solid rgba(17, 109, 214, 0.62);
  box-shadow: 0 7px 16px rgba(17, 109, 214, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.chat-head-button.notify-always .head-icon {
  background: var(--primary);
  color: #fff;
}

.chat-head-button.notify-schedule {
  background: linear-gradient(135deg, #eef5fc, #e7f1fb);
  color: var(--primary);
  border: 3px solid rgba(17, 109, 214, 0.62);
  box-shadow: 0 7px 16px rgba(17, 109, 214, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.chat-head-button.notify-schedule .head-icon {
  background: var(--primary);
  color: #fff;
}

.chat-head-button.notify-off {
  background: #eef1f5;
  color: #6b7890;
  border: 1px solid #d8e0ea;
}

.more-toggle.is-active {
  background: #e7f1fb;
  color: var(--primary);
  box-shadow: inset 0 0 0 2px rgba(17, 109, 214, 0.22);
}

.more-toggle em {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: #ffffff;
  color: var(--primary);
  font-style: normal;
  font-size: 16px;
  line-height: 1;
}

.chat-more-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
  padding: 6px;
  border: 1px solid rgba(184, 218, 249, 0.9);
  border-radius: 8px;
  background: rgba(247, 251, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.assignment-backdrop {
  align-items: start;
  padding: 18px 14px;
}

.assignment-modal {
  width: min(100%, 680px);
  max-height: calc(100dvh - 44px);
  align-self: start;
  grid-template-rows: auto minmax(0, 1fr) auto;
  margin-top: max(18px, calc(100dvh * 0.08));
  overflow: hidden;
}

.assignment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
  max-height: min(calc(100dvh - 190px), 620px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.assignment-person-card {
  min-height: 122px;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid #c8dced;
  border-radius: 8px;
  background: #fafcff;
  color: var(--primary-dark);
  padding: 16px;
  text-align: left;
  box-shadow: 0 8px 18px rgba(17, 109, 214, 0.08);
  touch-action: none;
}

.assignment-person-card strong {
  min-width: 0;
  font-size: 28px;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-person-card span,
.assignment-person-card em {
  min-width: 0;
  color: var(--muted);
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-person-card.is-dragging {
  border-color: var(--primary);
  outline: 5px solid rgba(17, 109, 214, 0.24);
  background: #eef5fc;
}

.assignment-person-card.is-selected {
  border-width: 3px;
  border-color: var(--primary);
  background: #eaf4ff;
  box-shadow: 0 10px 24px rgba(17, 109, 214, 0.18);
}

.assignment-person-card.is-selected em {
  color: var(--primary);
}

.assignment-drag-banner {
  margin: 0 12px;
  border: 2px solid var(--primary);
  border-radius: 8px;
  background: #eef5fc;
  color: var(--primary-dark);
  padding: 12px 14px;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(17, 109, 214, 0.18);
}

.chat-more-button {
  min-height: 42px;
  border: 1px solid #d3e6f8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary);
  display: inline-grid;
  grid-auto-flow: column;
  place-content: center;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 900;
}

.chat-more-button.is-icon-only {
  grid-auto-flow: row;
  min-width: 0;
  padding: 0;
}

.chat-more-button.is-icon-only span:last-child {
  display: none;
}

.chat-more-button.is-icon-only .head-icon {
  min-width: 28px;
  height: 28px;
}

.chat-more-button.is-icon-only .svg-icon svg {
  width: 24px;
  height: 24px;
}

.chat-more-button .language-icon {
  display: grid;
  place-items: center;
}

@media (max-width: 430px) {
  .assignment-backdrop {
    padding: 18px 14px;
  }

  .assignment-modal {
    width: min(100%, 560px);
    max-height: calc(100dvh - 36px);
    margin-top: max(12px, calc(100dvh * 0.06));
    padding: 14px;
    gap: 12px;
  }

  .assignment-modal .modal-head {
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 10px;
  }

.assignment-modal .modal-head strong {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.1;
}

  .assignment-modal .modal-close {
    width: 48px;
    height: 48px;
    font-size: 32px;
  }

  .assignment-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: min(calc(100dvh - 132px), 560px);
    padding-right: 3px;
  }

  .assignment-person-card {
    min-height: 68px;
    align-content: center;
    gap: 4px;
    padding: 11px 12px;
    box-shadow: none;
  }

  .assignment-person-card strong {
    font-family: var(--font-display);
    font-size: 19px;
    line-height: 1.08;
  }

  .assignment-person-card em {
    font-size: 12px;
    line-height: 1.25;
    font-weight: 800;
  }

  .chat-head-button {
    min-width: 32px;
    padding: 0 5px;
  }

  .chat-head-button span:last-child {
    display: none;
  }

  .chat-more-panel {
    gap: 8px;
    padding: 8px;
  }

  .chat-more-button {
    min-height: 48px;
  }

  .composer-card-pager {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 7px;
  }

  .tray-arrow {
    min-height: 72px;
    font-size: 42px;
    line-height: 1;
    padding-bottom: 4px;
  }

  .composer-card-window {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .composer-as-button {
    height: 72px;
    grid-template-columns: 1fr;
    grid-template-rows: 42px 20px;
    justify-items: center;
    align-content: center;
    gap: 4px;
    padding: 6px 4px;
    text-align: center;
  }

  .composer-as-button > * {
    grid-column: 1;
  }

  .composer-as-button .site-initial {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    width: 38px;
    height: 38px;
    font-size: 24px;
  }

  .composer-as-button .as-card-title {
    grid-row: 2;
    width: 100%;
    display: grid;
    place-items: center;
  }

  .composer-as-button .as-card-copy,
  .composer-as-button .assignment-label {
    display: none;
  }

  .composer-as-button .as-card-title b {
    min-height: 18px;
    padding: 1px 5px;
    font-size: 10px;
  }
}

@media (max-width: 430px) {
  .chat-head-actions {
    display: grid;
    grid-template-columns: repeat(4, 44px);
    gap: 6px;
    justify-content: end;
  }

  .chat-head-button,
  .chat-more-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 0;
    border-radius: 8px;
  }

  .chat-more-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
  }

  .chat-more-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
  }

  .chat-head-button .head-icon,
  .chat-more-button .head-icon {
    min-width: 27px;
    height: 27px;
  }

  .chat-head-button .svg-icon svg,
  .chat-more-button .svg-icon svg {
    width: 23px;
    height: 23px;
  }

  .more-toggle em {
    min-width: 24px;
    height: 24px;
    font-size: 16px;
  }

  .chat-more-panel {
    grid-template-columns: repeat(5, 40px);
    justify-content: center;
    gap: 5px;
    padding: 7px;
  }
}

@media (max-width: 430px) {
  .chat-more-panel {
    grid-template-columns: repeat(5, 40px);
    gap: 5px;
    justify-content: center;
  }

  .chat-more-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
  }
}

.real-map-canvas.db-map-canvas {
  height: clamp(330px, 48vh, 440px);
  min-height: 0;
  border-radius: 12px;
}

.real-map-canvas.db-map-canvas .map-image-board {
  height: calc(100% - 12px);
  max-width: calc(100% - 12px);
}

.db-selected-site-card {
  margin-top: 6px;
  max-height: clamp(104px, 16vh, 150px);
  border-width: 1px;
  padding: 9px 10px;
  box-shadow: none;
}

.db-selected-site-card .selected-site-head {
  gap: 6px;
}

.db-selected-site-card .selected-site-head strong {
  font-size: 16px;
  line-height: 1.12;
}

.db-selected-site-card .site-status-pill {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11px;
}

.db-selected-site-card .meta-grid {
  gap: 4px;
  margin-top: 6px !important;
}

.db-selected-site-card .meta-grid div {
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  font-size: 12px;
  line-height: 1.18;
}

.db-selected-site-card .meta-grid span {
  flex: 0 0 auto;
  min-width: 54px;
  font-size: 10px;
  line-height: 1.1;
}

.db-selected-site-card .btn {
  min-height: 30px;
  margin-top: 6px;
  padding: 0 12px;
  font-size: 12px;
}

.as-map-select-row {
  display: grid;
}

.as-map-select-row .map-country-selector {
  width: 100%;
}

.as-map-select-row .map-country-toggle {
  min-height: 48px;
  width: 100%;
  border-radius: 8px;
}

@media (max-width: 640px) {
  .db-map-section {
    gap: 8px;
    padding: 10px;
  }

  .db-map-section .db-document-tools {
    gap: 6px;
  }

  .db-map-section .db-search-box {
    gap: 4px;
    font-size: 14px;
  }

  .db-map-section .db-search-box input {
    min-height: 44px;
    font-size: 14px;
  }

  .db-map-section .site-search-submit {
    min-height: 44px;
    width: 48px;
  }

  .db-map-section .db-stats-grid {
    gap: 6px;
  }

  .db-map-section .db-stat-card {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
  }

  .db-map-section .db-stat-card span {
    font-size: 11px;
  }

  .db-map-section .db-stat-card strong {
    font-size: 20px;
  }

  .real-map-canvas.db-map-canvas {
    height: min(46dvh, 390px);
    min-height: 320px;
  }

  .db-selected-site-card {
    max-height: clamp(96px, 15vh, 136px);
    padding: 8px;
  }

  .db-selected-site-card .selected-site-head strong {
    font-size: 15px;
  }

  .db-selected-site-card .meta-grid div {
    padding: 3px 6px;
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .chat-screen .message-bubble {
    gap: 4px;
    padding: 12px 14px;
  }

  .chat-screen .message-bubble.is-system {
    width: min(88%, 340px);
  }

  .chat-screen .bubble-name {
    font-size: 13px;
  }

  .chat-screen .message-bubble p {
    font-size: 18px;
    line-height: 1.42;
  }

  .chat-screen .message-bubble time {
    font-size: 12px;
  }

  .chat-screen .composer-row textarea {
    min-height: 58px;
    padding: 14px;
    font-size: 18px;
    line-height: 1.35;
  }
}

@media (max-width: 430px) {
  .chat-head-actions {
    display: grid;
    grid-template-columns: repeat(4, 44px);
    gap: 6px;
    justify-content: end;
  }

  .chat-head-button,
  .chat-more-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 0;
    border-radius: 8px;
  }

  .chat-head-button .head-icon,
  .chat-more-button .head-icon {
    min-width: 27px;
    height: 27px;
  }

  .chat-head-button .svg-icon svg,
  .chat-more-button .svg-icon svg {
    width: 23px;
    height: 23px;
  }

  .chat-more-panel {
    grid-template-columns: repeat(5, 40px);
    justify-content: center;
    gap: 5px;
    padding: 7px;
  }
}

@media (max-width: 430px) {
  .chat-more-panel {
    grid-template-columns: repeat(5, 40px);
    gap: 5px;
    justify-content: center;
  }

  .chat-more-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
  }
}

@media (max-width: 430px) {
  .chat-head-actions {
    display: grid;
    grid-template-columns: repeat(4, 44px);
    gap: 6px;
    justify-content: end;
  }

  .chat-head-button,
  .chat-more-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 8px;
  }

  .chat-more-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
  }

  .chat-head-button span:last-child,
  .chat-more-button span:last-child {
    display: none;
  }

  .chat-head-button .head-icon,
  .chat-more-button .head-icon {
    min-width: 27px;
    height: 27px;
  }

  .chat-head-button .svg-icon svg,
  .chat-more-button .svg-icon svg {
    width: 23px;
    height: 23px;
  }.chat-more-panel {
    grid-template-columns: repeat(5, 40px);
    justify-content: center;
    gap: 5px;
    padding: 7px;
  }
}

.room-notice {
  margin: 0 12px;
  border: 1px solid #efd78a;
  border-radius: 8px;
  background: #fff8e6;
  color: #b98500;
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 900;
}

.rejoin-box {
  gap: 12px;
}

.rejoin-box strong {
  color: var(--primary-dark);
  font-size: 20px;
}

.chat-feed {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px 14px 24px;
  border: 2px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.chat-feed.is-drop-target {
  border-color: rgba(17, 109, 214, 0.9);
  background: rgba(231, 241, 255, 0.96);
  box-shadow: inset 0 0 0 3px rgba(17, 109, 214, 0.18);
}

.chat-feed.is-chat-drop-zone {
  border-color: var(--primary);
  background: #eef5fc;
  box-shadow:
    inset 0 0 0 4px rgba(17, 109, 214, 0.2),
    0 12px 28px rgba(17, 109, 214, 0.14);
}

.chat-feed.is-chat-drop-zone::after {
  content: "대화창에 놓기";
  position: sticky;
  bottom: 10px;
  justify-self: center;
  z-index: 2;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(17, 109, 214, 0.24);
}

.chat-panel.is-card-dragging .chat-room-head,
.chat-panel.is-card-dragging .chat-composer,
.chat-panel.is-card-dragging .room-notice,
.chat-panel.is-card-dragging .assignment-drag-banner {
  opacity: 0.28;
  filter: grayscale(0.3);
}

.date-divider {
  justify-self: center;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(17, 109, 214, 0.1);
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
}

.message-bubble {
  width: min(88%, 430px);
  display: grid;
  gap: 6px;
  justify-self: start;
  border: 1px solid #d2dfec;
  border-radius: 8px;
  background: #ffffff;
  padding: 15px 16px;
  box-shadow: 0 10px 22px rgba(19, 62, 121, 0.08);
}

.message-bubble.is-mine {
  justify-self: end;
  background: linear-gradient(135deg, #eef5fc, #ecf6fd);
  border-color: #c8dced;
}

.message-bubble.is-system {
  justify-self: center;
  width: min(92%, 360px);
  background: #edf6ff;
  border-color: #d2dfec;
}

.bubble-name {
  color: var(--primary);
  font-size: 15px;
  font-weight: 900;
}

.message-bubble p {
  margin: 0;
  color: var(--primary-dark);
  font-size: 22px;
  line-height: 1.38;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message-bubble time {
  color: var(--muted);
  font-size: 13px;
  justify-self: end;
}

.as-message-card {
  width: 100%;
  justify-self: stretch;
  display: grid;
  gap: 9px;
  border: 1px solid #c8dced;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 13px 14px;
  text-align: left;
  box-shadow: 0 8px 18px rgba(17, 109, 214, 0.08);
  overflow: hidden;
}

.as-message-card::before {
  content: none;
}

.as-message-card > * {
  min-width: 0;
}

.as-message-head {
  display: grid;
  gap: 4px;
}

.as-card-title,
.as-message-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}

.as-card-title strong,
.as-message-head strong {
  color: var(--primary-dark);
  font-size: 21px;
  line-height: 1.18;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.as-card-title b,
.as-message-head b {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  border-radius: 999px;
  background: #eef5fc;
  color: var(--primary);
  padding: 0 8px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.as-message-card span {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
}

.as-message-meta {
  display: grid;
  gap: 6px;
}

.as-message-meta span {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.32;
}

.as-message-meta span em {
  min-height: 0;
  display: block;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
}

.as-message-meta span strong {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.as-message-card .bot-card-meta {
  color: #334563;
  font-size: 14px;
}

.as-message-card .as-message-detail {
  min-height: 26px;
  display: inline-grid;
  place-items: center;
  justify-self: start;
  margin-top: 1px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef5fc;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.as-message-card em {
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  justify-self: start;
  margin-top: 4px;
  padding: 0 14px;
  border-radius: 999px;
  background: #eef5fc;
  color: var(--primary);
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
}

.as-message-card.is-warning {
  border-color: #72b4f0;
  background: #ffffff;
  box-shadow: 0 9px 20px rgba(17, 109, 214, 0.1);
}

.address-review-card {
  cursor: pointer;
}

.address-review-card .as-message-detail {
  background: #eef5fc;
  color: var(--primary-dark);
}

.composer-as-button.is-address-review {
  border-color: #72b4f0;
  background: #ffffff;
  box-shadow: 0 9px 20px rgba(17, 109, 214, 0.1);
}

.composer-as-button.is-address-review .assignment-label {
  background: #eef5fc;
  color: var(--primary-dark);
}

.as-message-card.is-danger {
  border-color: #0b6edc;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(17, 109, 214, 0.14);
}

.as-message-card.is-rework,
.composer-as-button.is-rework {
  border-color: #d8b84e;
  background: #fff8df;
}

.as-survey-link {
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  justify-self: start;
  margin-top: 4px;
  padding: 0 14px;
  border: 1px solid #d8b84e;
  border-radius: 999px;
  background: #fff1bd;
  color: #7a5500;
  font-size: 15px;
  font-weight: 900;
}

.as-message-card.is-warning::before {
  width: 16px;
  height: 38px;
  background:
    linear-gradient(90deg, #1e83df 0 7px, transparent 7px 9px, #72b4f0 9px 16px);
}

.as-message-card.is-danger::before {
  width: 25px;
  height: 42px;
  background:
    linear-gradient(90deg, #004da8 0 7px, transparent 7px 9px, #0b6edc 9px 16px, transparent 16px 18px, #72b4f0 18px 25px);
}

.as-message-card.is-warning strong,
.as-message-card.is-warning span {
  color: var(--primary-dark);
}

.as-message-card.is-danger strong,
.as-message-card.is-danger span {
  color: #063f85;
}

.chat-composer {
  position: relative;
  z-index: 5;
  display: grid;
  gap: 10px;
  padding: 14px 12px var(--composer-bottom-safe);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.composer-card-tray {
  display: none;
}

.composer-tray-head {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.tray-summary {
  min-width: 0;
  min-height: 42px;
  border: 1px solid #d3e6f8;
  border-radius: 8px;
  background: rgba(247, 251, 255, 0.84);
  color: var(--primary-dark);
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 2px;
  padding: 7px 10px;
}

.tray-summary span {
  font-family: var(--font-display);
  color: var(--primary);
  font-size: 15px;
  line-height: 1.1;
}

.tray-summary small {
  max-width: 100%;
  font-family: var(--font-display);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tray-toggle {
  width: 46px;
  min-width: 46px;
  min-height: 42px;
  border: 1px solid #9bc8f3;
  border-radius: 8px;
  background: linear-gradient(135deg, #eef5fc, #e7f1fb);
  color: var(--primary);
  display: inline-grid;
  grid-auto-flow: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.tray-toggle em {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: #ffffff;
  color: var(--primary);
  font-style: normal;
  font-size: 16px;
  line-height: 1;
}

.tray-toggle span {
  display: none;
}

.composer-as-button {
  width: 100%;
  height: 92px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 24px;
  column-gap: 8px;
  row-gap: 4px;
  align-content: start;
  border: 1px solid #cfe4f8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary-dark);
  padding: 6px 10px 6px 8px;
  text-align: left;
  touch-action: none;
  user-select: none;
  overflow: hidden;
}

.composer-as-button::before {
  content: none;
}

.composer-as-button > * {
  grid-column: 2;
}

.composer-as-button .site-initial {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: start;
  justify-self: center;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #b9d8f7;
  border-radius: 50%;
  background: #edf6ff;
  color: var(--primary-dark);
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
}

.composer-as-button .as-card-title {
  min-width: 0;
  min-height: 0;
}

.composer-as-button.is-dragging {
  position: relative;
  opacity: 1;
  z-index: 20;
  border-color: var(--primary);
  outline: 5px solid rgba(17, 109, 214, 0.34);
  background: #eef5fc;
  box-shadow: 0 14px 30px rgba(17, 109, 214, 0.34);
  transform: translateY(-3px) scale(1.03);
}

.composer-as-button.is-assign-hover {
  border-color: var(--primary);
  outline: 5px solid rgba(17, 109, 214, 0.3);
  background: #eef5fc;
}

.chat-screen.is-assigning .chat-room-head,
.chat-screen.is-assigning .chat-feed,
.chat-screen.is-assigning .composer-row,
.chat-screen.is-assigning .room-notice {
  opacity: 0.28;
  filter: grayscale(0.35);
}

.chat-screen.is-assigning .assignment-drag-banner,
.chat-screen.is-assigning .composer-tray-head,
.chat-screen.is-assigning .composer-card-pager {
  opacity: 1;
  filter: none;
}

.chat-screen.is-assigning .composer-card-pager {
  position: relative;
  padding: 8px;
  border: 2px solid var(--primary);
  border-radius: 8px;
  background: #eef5fc;
  box-shadow:
    inset 0 0 0 3px rgba(17, 109, 214, 0.12),
    0 12px 28px rgba(17, 109, 214, 0.12);
}

.chat-screen.is-assigning .composer-card-pager::before {
  content: "배정할 AS 카드에 놓기";
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  z-index: 2;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.chat-screen.is-assigning .composer-as-button {
  opacity: 1;
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(17, 109, 214, 0.16);
}

.composer-as-button.is-assigned {
  background: linear-gradient(135deg, #ffffff 0%, #f5fbff 58%, #eaf4ff 100%);
  border-color: #a7cff4;
  opacity: 0.82;
}

.composer-as-button .assignment-label {
  width: fit-content;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef5fc;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-as-button.is-dragging::after {
  content: "대화창에 놓기";
  position: absolute;
  right: 8px;
  top: -18px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.composer-card-pager {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 62px;
  gap: 8px;
  align-items: stretch;
}

.tray-arrow {
  min-height: 78px;
  display: grid;
  place-items: center;
  border: 1px solid #c8dced;
  border-radius: 8px;
  background: #eef5fc;
  color: var(--primary);
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  padding: 0 0 5px;
}

.composer-card-window {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.composer-empty-tray {
  grid-column: 1 / -1;
  min-height: 78px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(247, 251, 255, 0.56);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
}

.chat-screen.is-assigning .composer-empty-tray {
  border-color: #8abdf0;
  border-style: dashed;
  background: rgba(238, 245, 252, 0.9);
}

.composer-as-button.is-fresh {
  border-color: #d5e7f7;
  background: #ffffff;
  box-shadow: 0 7px 14px rgba(17, 109, 214, 0.06);
}

.composer-as-button.is-warning {
  border-color: #afd2f4;
  background: #ffffff;
  box-shadow: 0 8px 16px rgba(17, 109, 214, 0.1);
}

.composer-as-button.is-danger {
  border-color: #8ebfee;
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(17, 109, 214, 0.14);
}

.composer-as-button.is-warning::before {
  content: none;
}

.composer-as-button.is-danger::before {
  content: none;
}

.composer-as-button.is-danger strong,
.composer-as-button.is-danger span {
  color: #063f85;
}

.composer-as-button.is-warning strong,
.composer-as-button.is-warning span {
  color: var(--primary-dark);
}

.composer-as-button .as-card-title strong {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.1;
}

.composer-as-button .as-card-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: start;
  overflow: hidden;
}

.composer-as-button .as-card-date {
  color: var(--primary);
  font-size: 11px;
  line-height: 1.15;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-as-button .as-card-title b {
  min-height: 20px;
  padding: 0 6px;
  font-size: 10px;
}

.composer-as-button span {
  color: var(--primary);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 900;
}

.composer-as-button .assignment-label {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  margin-top: 2px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef5fc;
  color: var(--primary-dark);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-as-button .assignment-label.is-empty {
  visibility: hidden;
}

.assignment-detail-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d3e6f8;
  border-radius: 8px;
  background: #fafcff;
}

.assignment-detail-form label {
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 900;
}

.assignment-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.assignment-detail-row select {
  min-width: 0;
  min-height: 52px;
  border: 1px solid #c8dced;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary-dark);
  padding: 0 12px;
  font-size: 20px;
  font-weight: 900;
}

.assignment-roster {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d3e6f8;
  border-radius: 8px;
  background: #ffffff;
}

.assignment-roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--primary-dark);
  font-weight: 900;
}

.assignment-roster-head > div {
  display: grid;
  gap: 4px;
}

.assignment-roster-head strong {
  font-size: 20px;
}

.assignment-roster-head span {
  color: var(--primary);
  font-size: 15px;
}

.assignment-roster-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 432px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.assignment-roster-card {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid #c8dced;
  border-radius: 8px;
  background: #fafcff;
  padding: 10px 12px;
  color: var(--primary-dark);
  overflow: hidden;
  text-align: left;
}

.assignment-roster-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.assignment-roster-card strong,
.assignment-roster-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-roster-card strong {
  font-size: 20px;
  line-height: 1.1;
}

.assignment-roster-card span {
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
}

.assignment-cancel-button {
  min-width: 48px;
  min-height: 38px;
  border: 1px solid #c8dced;
  border-radius: 8px;
  background: #eef5fc;
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
}

.assignment-cancel-button:active {
  border-color: var(--primary);
  background: #d7eaff;
}

.assignment-roster-empty {
  min-height: 72px;
  display: grid;
  place-items: center;
  border: 1px dashed #bed2eb;
  border-radius: 8px;
  background: #fafcff;
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
}

.assignment-add-button {
  min-height: 34px;
  border: 1px solid #c8dced;
  border-radius: 8px;
  background: #f3f8fd;
  color: var(--primary);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 900;
}

.assignment-add-button:active {
  border-color: var(--primary);
  background: #d7eaff;
}

.assignment-confirm {
  min-height: 52px;
}

.as-workflow {
  display: grid;
  gap: 0;
}

.as-workflow-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.as-workflow-rail {
  display: grid;
  grid-template-rows: 32px minmax(16px, 1fr);
  justify-items: center;
}

.as-workflow-dot {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid #c9ddf2;
  border-radius: 50%;
  background: #f7faff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.as-workflow-rail i {
  width: 3px;
  min-height: 22px;
  border-radius: 999px;
  background: #d6e7f8;
}

.as-workflow-card {
  min-width: 0;
  display: grid;
  gap: 7px;
  margin: 0 0 12px;
  border: 1px solid #d7e7f7;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.as-workflow-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.as-workflow-head strong {
  min-width: 0;
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.1;
}

.as-workflow-head em {
  flex: 0 0 auto;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef4fb;
  color: var(--muted);
  padding: 0 9px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.as-workflow-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.btn.quick.as-workflow-action {
  justify-self: stretch;
  min-height: 46px;
  margin-top: 3px;
  border-color: #0759bd;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(17, 109, 214, 0.2);
}

.btn.quick.as-workflow-action:active {
  background: var(--primary-dark);
  transform: translateY(1px);
}

.as-workflow-step.done .as-workflow-dot,
.as-workflow-step.done .as-workflow-rail i {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.as-workflow-step.current .as-workflow-dot {
  border-color: var(--primary);
  background: #eef5fc;
  color: var(--primary);
  box-shadow: 0 0 0 5px rgba(17, 109, 214, 0.1);
}

.as-workflow-step.current .as-workflow-card {
  border-color: #9cc9f6;
  background: #f8fbff;
}

.as-workflow-step.current .as-workflow-head em {
  background: #eef5fc;
  color: var(--primary);
}

.as-workflow-step.danger .as-workflow-dot {
  border-color: #b63a46;
  background: #ffe3e6;
  color: #b63a46;
}

.as-workflow-step.danger .as-workflow-card {
  border-color: rgba(176, 42, 55, 0.45);
}

.as-workflow-step.danger .as-workflow-head em {
  background: #ffe3e6;
  color: #b63a46;
}

.as-workflow-step.locked {
  opacity: 0.72;
}

.as-completion-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, auto);
  gap: 16px;
  align-items: center;
  border: 2px solid #8dbff0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(17, 109, 214, 0.12), rgba(255, 255, 255, 0.92) 52%),
    #fafcff;
  padding: 16px;
  box-shadow: 0 12px 24px rgba(17, 109, 214, 0.12);
}

.as-completion-panel strong {
  display: block;
  color: var(--primary-dark);
  font-size: 28px;
  line-height: 1.15;
}

.as-completion-panel span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
}

.as-completion-panel b {
  justify-self: end;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #e7f7ee;
  color: #1f8a70;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 900;
}

.as-completion-panel .btn[disabled] {
  opacity: 0.58;
  cursor: not-allowed;
}

.as-completion-main-button {
  min-height: 72px;
  padding: 0 24px;
  border-color: #0759bd;
  background: var(--primary);
  font-size: 22px;
  box-shadow: 0 12px 22px rgba(17, 109, 214, 0.2);
}

.as-history-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #d4e4f5;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.as-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.as-history-head strong {
  color: var(--primary-dark);
  font-size: 22px;
}

.as-history-head span {
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
}

.as-history-list {
  display: grid;
  gap: 8px;
}

.as-history-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 1px solid #e0edf9;
  border-radius: 8px;
  background: #fafcff;
  padding: 9px 10px;
}

.as-history-item b {
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #eef5fc;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.as-history-item div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.as-history-item strong {
  color: var(--primary-dark);
  font-size: 17px;
}

.as-history-item span,
.as-history-item em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.3;
}

.as-history-item.is-completion b {
  background: #e7f7ee;
  color: #1f8a70;
}

.as-history-survey-button {
  min-height: 38px;
  border: 1px solid #c8dced;
  border-radius: 8px;
  background: #eef5fc;
  color: var(--primary);
  padding: 0 12px;
  font-size: 14px;
  font-weight: 900;
}

.as-history-empty {
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px dashed #bed2eb;
  border-radius: 8px;
  background: #fafcff;
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
}

.blackbox-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.blackbox-head {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.blackbox-head strong {
  font-family: var(--font-display);
  color: var(--primary-dark);
  font-size: 24px;
  line-height: 1.1;
}

.blackbox-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0.82;
}

.blackbox-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.blackbox-mode-entry {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border: 1px solid #cfe0f4;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--mode-band), #ffffff 64%);
  color: var(--ink);
  padding: 10px 11px;
  text-align: left;
  cursor: pointer;
  min-height: 72px;
  height: 72px;
  aspect-ratio: auto;
}

.blackbox-mode-entry > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.blackbox-mode-entry strong {
  font-family: var(--font-display);
  color: var(--primary-dark);
  font-size: 20px;
  line-height: 1.05;
}

.blackbox-mode-entry em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.blackbox-mode-entry.is-latest {
  border-color: rgba(176, 42, 55, 0.8);
  box-shadow: inset 0 0 0 2px rgba(176, 42, 55, 0.18), 0 8px 18px rgba(176, 42, 55, 0.08);
}

.blackbox-mode-entry.is-latest strong {
  color: #8f1724;
}

.blackbox-mode-entry.is-latest b {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ffe3e6;
  color: #b63a46;
  padding: 0 7px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.blackbox-chart-backdrop {
  align-items: start;
  padding: max(56px, 10vh) 12px 12px;
}

.blackbox-chart-modal {
  width: min(100%, 640px);
  max-height: calc(100dvh - 64px);
  overflow-y: auto;
  gap: 8px;
}

.blackbox-chart-date {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.blackbox-chart-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.blackbox-chart-options button {
  min-height: 42px;
  border: 1px solid rgba(170, 205, 230, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.blackbox-chart-options button.is-active {
  border: 2px solid #4aa3df;
  background: linear-gradient(180deg, #eef7ff 0%, #e4f1ff 100%);
  box-shadow:
    0 2px 6px rgba(40, 130, 200, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.blackbox-chart-card {
  position: relative;
  display: grid;
  gap: 0;
  border: 1px solid rgba(190, 215, 235, 0.85);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  padding: 5px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 3px rgba(255, 255, 255, 0.9),
    inset 0 -2px 8px rgba(20, 80, 140, 0.06);
}

.blackbox-chart-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 10px;
  background-image: url("/monitor/assets/subtle-monitoring-bg.png");
  background-size: cover;
  background-position: center 58%;
  background-repeat: no-repeat;
  opacity: 1;
  filter: saturate(1.85) contrast(1.42);
  pointer-events: none;
  z-index: 0;
}

.blackbox-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.blackbox-chart-head strong {
  color: var(--primary-dark);
  font-size: 22px;
}

.blackbox-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.blackbox-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
}

.blackbox-legend i {
  width: 24px;
  height: 6px;
  border-radius: 999px;
}

.blackbox-chart {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 760 / 500;
  min-height: 0;
  height: auto;
  border-radius: 10px;
  background-color: transparent;
  background-image:
    linear-gradient(to right, rgba(60, 100, 140, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(60, 100, 140, 0.04) 1px, transparent 1px),
    url("/monitor/assets/subtle-monitoring-bg.png");
  background-size: 33% 100%, 100% 33%, cover;
  background-position: 0 0, 0 0, center 58%;
  background-repeat: repeat, repeat, no-repeat;
}

.blackbox-line {
  fill: none;
  stroke-width: 13;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 4px rgba(20, 120, 220, 0.24));
}

.blackbox-axis,
.blackbox-boundary {
  stroke: rgba(7, 27, 73, 0.16);
  stroke-width: 4;
}

.blackbox-grid-line {
  stroke: rgba(7, 27, 73, 0.12);
  stroke-width: 4;
  stroke-dasharray: 14 12;
}

.blackbox-boundary {
  stroke-dasharray: 5 5;
}

.blackbox-mode-label,
.blackbox-tick {
  fill: var(--primary-dark);
  font-size: 36px;
  font-weight: 900;
  text-anchor: middle;
}

.blackbox-tick {
  fill: var(--muted);
  font-size: 34px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.blackbox-value-tick {
  fill: var(--primary-dark);
  font-size: 34px;
  font-weight: 900;
  text-anchor: start;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 9px;
}

.blackbox-empty {
  min-height: 70px;
  display: grid;
  place-items: center;
  border: 1px dashed #cfe0f4;
  border-radius: 8px;
  background: #fafcff;
  color: var(--muted);
  font-weight: 900;
}

@media (max-width: 640px) {
  .as-detail-screen {
    width: min(100%, 390px);
    padding: 28px 14px 42px;
  }

  .as-detail-head {
    grid-template-columns: 32px minmax(0, 1fr) 78px;
    gap: 8px;
    min-height: 56px;
    margin-bottom: 12px;
  }

  .as-detail-head .chat-back {
    width: 32px;
    height: 32px;
    font-size: 32px;
  }

  .as-detail-head strong {
    font-size: 24px;
    line-height: 1.05;
  }

  .as-detail-head span {
    max-width: 100%;
    font-size: 13px;
  }

  .as-detail-room-button {
    width: 78px;
    min-width: 78px;
    min-height: 38px;
    padding: 0 8px;
    font-size: 13px;
  }

  .as-detail-screen > .panel {
    padding: 14px;
    gap: 12px;
  }

  .as-detail-tabs {
    margin-bottom: 10px;
  }

  .as-detail-tabs button {
    min-height: 42px;
    font-size: 14px;
  }

  .as-detail-page {
    min-height: 0;
    align-content: start;
  }

  .as-workflow-step {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
  }

  .as-workflow-dot {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .as-workflow-card {
    margin-bottom: 10px;
    padding: 11px;
  }

  .as-workflow-head strong {
    font-size: 20px;
  }

  .as-workflow-card p {
    font-size: 12px;
  }

  .as-field-card {
    padding: 13px;
  }

  .as-field-card > strong {
    font-size: 23px;
  }

  .as-detail-screen .meta-row {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 9px;
    font-size: 14px;
    line-height: 1.34;
  }

  .as-detail-screen .as-completion-panel {
    gap: 12px;
    padding: 14px;
  }

  .as-detail-screen .as-completion-panel strong {
    font-size: 24px;
  }

  .as-detail-screen .as-completion-panel span {
    margin-top: 5px;
    font-size: 14px;
    line-height: 1.35;
  }

  .as-detail-screen .as-completion-main-button {
    min-height: 62px;
    width: 100%;
    font-size: 20px;
  }

  .as-detail-screen .as-history-panel,
  .as-detail-screen .assignment-roster-panel,
  .as-detail-screen .blackbox-panel {
    padding: 13px;
  }

  .as-detail-screen .as-history-head strong,
  .as-detail-screen .assignment-roster-head strong,
  .as-detail-screen .blackbox-head strong {
    font-size: 23px;
  }

  .blackbox-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blackbox-mode-entry {
    min-height: 70px;
    height: 70px;
    aspect-ratio: auto;
    padding: 9px 10px;
  }

  .blackbox-mode-entry strong {
    font-size: 19px;
  }

  .blackbox-mode-entry em {
    font-size: 10px;
  }

  .blackbox-chart-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .as-completion-panel {
    grid-template-columns: 1fr;
  }

  .as-completion-panel b {
    justify-self: start;
  }

  .as-history-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .as-history-item b,
  .as-history-survey-button {
    justify-self: start;
  }.completion-option-grid,
  .completion-option-grid.two,
  .completion-part-input,
  .completion-nav {
    grid-template-columns: 1fr;
  }
}

.composer-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 56px;
  gap: 8px;
  align-items: center;
}

.composer-plus-button {
  width: 50px;
  height: 50px;
  border: 2px solid #c8dced;
  border-radius: 8px;
  background: #eef5fc;
  color: var(--primary);
  font-size: 29px;
  font-weight: 900;
  line-height: 1;
}

.composer-plus-button:active {
  border-color: var(--primary);
  background: #d7eaff;
}

.composer-row textarea {
  min-width: 0;
  min-height: 56px;
  max-height: min(calc(30 * 1.35em + 28px), 42dvh);
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--ink);
  background: #fff;
  font-size: 18px;
  line-height: 1.35;
  outline: none;
  resize: none;
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}.send-button {
  width: 56px;
  height: 56px;
  background: var(--primary);
  color: #fff;
  font-size: 25px;
  line-height: 1;
  transform: none;
  padding-left: 2px;
}.as-drawer {
  border-top: 1px solid var(--line);
  background: rgba(247, 251, 255, 0.82);
}

.as-drawer summary {
  min-height: 54px;
  display: grid;
  align-items: center;
  padding: 0 16px;
  color: var(--primary);
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
}

.as-drawer-list {
  display: grid;
  gap: 10px;
  padding: 0 12px 14px;
}

.chat-card {
  width: min(92%, 420px);
  display: grid;
  gap: 8px;
  justify-self: start;
  border: 1px solid #d2dfec;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 15px;
  text-align: left;
  box-shadow: 0 10px 22px rgba(19, 62, 121, 0.08);
}

.chat-card:nth-child(even) {
  justify-self: end;
  background: #eef5fc;
}

.chat-time {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.chat-card strong {
  color: var(--primary-dark);
  font-size: 22px;
}

.chat-card span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.chat-card .chat-contact {
  color: #334563;
  font-size: 14px;
}

.as-card {
  display: grid;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: inherit;
  padding: 16px;
  text-align: left;
  box-shadow: 0 12px 28px rgba(19, 62, 121, 0.08);
}

.as-card strong {
  color: var(--primary-dark);
  font-size: 23px;
}

.meta-grid {
  display: grid;
  gap: 8px;
}

.meta-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  font-size: 16px;
  line-height: 1.45;
}

.meta-row span:first-child {
  color: var(--muted);
  font-weight: 700;
}

.as-detail-screen .meta-grid {
  gap: 7px;
}

.as-detail-screen .meta-row {
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 9px;
  font-size: 14px;
  line-height: 1.34;
}

.as-detail-screen .meta-row span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.empty-box {
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px dashed #bed2eb;
  border-radius: 8px;
  background: #fafcff;
  color: var(--muted);
  font-size: 20px;
  font-weight: 900;
}

.map-shell {
  width: min(100%, 1040px);
  display: grid;
  gap: 16px;
  margin: 0 auto;
}

.map-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  border: 2px solid rgba(139, 180, 226, 0.7);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
  padding: 14px 16px;
}

.map-toolbar > div {
  display: grid;
  gap: 4px;
}

.map-toolbar strong {
  color: var(--primary-dark);
  font-size: 28px;
  line-height: 1.05;
}

.map-toolbar span {
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
}

.map-toolbar-actions {
  display: grid;
  grid-template-columns: auto auto;
  align-items: stretch;
  justify-content: end;
  gap: 8px;
  min-width: 0;
}

.map-country-selector {
  grid-column: 1 / -1;
  display: grid;
  justify-self: end;
  width: min(100%, 280px);
  gap: 6px;
}

.map-country-toggle {
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 42px;
  align-items: center;
  gap: 4px;
  border: 1px solid #c5d9ee;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--primary);
  padding: 0 4px 0 13px;
  font-size: 14px;
  font-weight: 900;
}

.map-country-toggle span {
  color: #52657f;
  font-weight: 800;
}

.map-country-toggle strong {
  min-width: 0;
  color: var(--primary);
  font-size: 14px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-country-toggle b {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #9bc8f3;
  border-radius: 8px;
  background: linear-gradient(135deg, #eef5fc, #e7f1fb);
  color: var(--primary);
  font-size: 16px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.map-country-selector.is-open .map-country-toggle {
  border-color: var(--primary);
  background: #ffffff;
}

.map-country-menu {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(139, 180, 226, 0.75);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
  padding: 8px;
  box-shadow: 0 16px 30px rgba(19, 62, 121, 0.14);
}

.map-country-button {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(90, 148, 216, 0.72);
  border-radius: 7px;
  background: #f3f9ff;
  color: var(--primary);
  padding: 0 12px;
  font-size: 15px;
  font-weight: 900;
  text-align: left;
}

.map-country-button em {
  color: var(--primary);
  font-size: 13px;
  font-style: normal;
  opacity: 0.82;
}

.map-toolbar-actions > .chat-head-button {
  justify-self: stretch;
}

.map-toolbar-actions > .btn {
  justify-self: stretch;
  min-width: 190px;
}

.map-country-button.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 16px rgba(16, 91, 174, 0.18);
}

.map-country-button.is-active em {
  color: #fff;
}

.map-screen .chat-head-button,
.site-screen .chat-head-button {
  min-height: 44px;
  min-width: 48px;
  border-width: 2px;
  font-size: 14px;
}

.map-screen .head-icon,
.site-screen .head-icon {
  min-width: 30px;
  height: 30px;
  font-size: 15px;
}

.map-screen .svg-icon svg,
.site-screen .svg-icon svg {
  width: 25px;
  height: 25px;
}

.readonly-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fafcff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.map-canvas {
  width: 100%;
  min-height: 420px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.real-map-canvas {
  position: relative;
  width: 100%;
  height: clamp(560px, 74vh, 820px);
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 16px;
}

.map-panel {
  position: relative;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.9), transparent 22%),
    radial-gradient(circle at 78% 16%, rgba(109, 202, 255, 0.2), transparent 24%),
    linear-gradient(180deg, #fafcff, #edf7ff);
  background-size: 28px 28px;
}

.pin {
  position: absolute;
  z-index: 2;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(176, 42, 55, 0.28);
  transform: translate(-50%, -50%);
}

.map-image-board {
  position: absolute;
  left: 50%;
  top: 50%;
  height: calc(100% - 28px);
  max-width: calc(100% - 28px);
  aspect-ratio: 1197 / 1314;
  transform: translate(-50%, -50%);
}

.map-image-board::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  border: 1px solid rgba(35, 82, 130, 0.08);
}

.map-image-board img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  opacity: 1;
  filter: none;
}

.sdk-map-host {
  background: #eef3f8;
}

.sdk-map-stage {
  width: 100%;
  height: 100%;
  min-height: inherit;
  pointer-events: none;
  touch-action: pan-y;
}

.real-map-marker {
  position: absolute;
  z-index: 2;
  width: 45px;
  height: 45px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%);
}

.real-map-marker::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(226, 61, 79, 0.18), 0 5px 10px rgba(176, 42, 55, 0.26);
  transform: translate(-50%, -50%);
}

.real-map-marker.is-fault::before {
  box-shadow: 0 0 0 3px rgba(226, 61, 79, 0.2), 0 5px 10px rgba(176, 42, 55, 0.26);
}

.real-map-marker.is-normal::before {
  background: #8d99a8;
  box-shadow: 0 0 0 2px rgba(111, 123, 138, 0.16), 0 4px 8px rgba(64, 75, 90, 0.18);
}

.real-map-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}

@keyframes faultMarkerPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(226, 61, 79, 0.34);
    opacity: 0.92;
  }
  70% {
    box-shadow: 0 0 0 90px rgba(226, 61, 79, 0);
    opacity: 0.18;
  }
  100% {
    box-shadow: 0 0 0 90px rgba(226, 61, 79, 0);
    opacity: 0;
  }
}

.real-map-marker.is-fault::after {
  animation: faultMarkerPulse 1.8s ease-out infinite;
}

.map-country-placeholder {
  display: grid;
  place-items: center;
  background: rgba(244, 249, 255, 0.72);
}

.map-country-empty {
  display: grid;
  gap: 8px;
  place-items: center;
  min-width: min(100%, 320px);
  padding: 28px;
  border: 1px dashed rgba(139, 180, 226, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  text-align: center;
}

.map-country-empty strong {
  color: var(--primary-dark);
  font-size: 28px;
  line-height: 1.1;
}

.map-country-empty span {
  font-size: 18px;
  font-weight: 900;
}

.map-coordinate-note,
.map-coordinate-summary {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
}

.map-coordinate-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-coordinate-summary span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(139, 180, 226, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0 12px;
}

.map-coordinate-summary strong {
  color: var(--primary);
  font-size: 20px;
}

.map-coordinate-note {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 1;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(139, 180, 226, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.pin-card {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  backdrop-filter: blur(8px);
}

.selected-site-card .btn {
  margin-top: 12px;
}

.selected-site-card {
  position: static;
  margin-top: 12px;
  max-height: clamp(220px, 30vh, 340px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border-width: 2px;
  padding: 20px;
}

.selected-site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.selected-site-head strong {
  font-size: 28px;
  line-height: 1.15;
}

.selected-site-card .meta-grid {
  gap: 12px;
}

.selected-site-card .meta-grid div {
  font-size: 20px;
}

.selected-site-card .btn {
  min-height: 48px;
  padding: 0 16px;
  font-size: 18px;
}

.site-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 16px;
  font-weight: 900;
}

.db-selected-site-card {
  max-height: clamp(104px, 16vh, 150px);
  border-width: 1px;
  padding: 9px 10px;
  box-shadow: none;
}

.db-selected-site-card .selected-site-head {
  gap: 6px;
}

.db-selected-site-card .selected-site-head strong {
  font-size: 16px;
  line-height: 1.12;
}

.db-selected-site-card .site-status-pill {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11px;
}

.db-selected-site-card .meta-grid {
  gap: 4px;
  margin-top: 6px !important;
}

.db-selected-site-card .meta-grid div {
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  font-size: 12px;
  line-height: 1.18;
}

.db-selected-site-card .meta-grid span {
  flex: 0 0 auto;
  min-width: 54px;
  font-size: 10px;
  line-height: 1.1;
}

.db-selected-site-card .btn {
  min-height: 30px;
  margin-top: 6px;
  padding: 0 12px;
  font-size: 12px;
}

.site-status-pill.is-fault {
  background: #fff0f2;
  color: #b63a46;
}

.site-status-pill.is-normal {
  background: #eef1f5;
  color: #566272;
}.map-status-note {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.site-search-shell {
  display: grid;
  gap: 12px;
}

.site-detail-panel {
  width: min(100%, 1040px);
  margin: 0 auto;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(23, 72, 128, 0.08);
}

.site-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: linear-gradient(135deg, #f9fcff, #eef6ff);
}

.site-detail-hero strong {
  display: block;
  min-width: 0;
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.08;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-detail-hero span {
  display: block;
  margin-top: 4px;
  color: #687991;
  font-size: 13px;
  font-weight: 800;
}

.site-detail-room-button {
  min-width: 82px;
  min-height: 44px;
  border: 1px solid #b8d8f6;
  border-radius: 8px;
  background: #eef7ff;
  color: var(--primary);
  font: inherit;
  font-family: var(--font-display);
  font-size: 14px;
  cursor: pointer;
}

.site-detail-room-button.is-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.site-readonly-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  min-height: 40px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f3f7fb;
  color: #6b7d96;
  font-size: 13px;
  font-weight: 900;
}

.site-geocode-notice {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #c8dced;
  border-radius: 8px;
  background: #ffffff;
}

.site-geocode-notice strong {
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.2;
}

.site-geocode-notice span {
  color: #60758d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.site-geocode-notice.is-warning {
  border-color: #e3c462;
  background: #fff9e8;
}

.site-geocode-notice.is-warning strong {
  color: #7a5500;
}

.site-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.site-tabs button {
  min-height: 48px;
  border: 1px solid #d2dfec;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary-dark);
  font: inherit;
  font-size: 16px;
  font-weight: 900;
}

.site-tabs button.is-active {
  border-color: var(--primary);
  background: #eef5fc;
  color: var(--primary);
  box-shadow: inset 0 0 0 2px rgba(17, 109, 214, 0.12);
}

.site-search-box {
  display: grid;
  gap: 6px;
  color: var(--primary-dark);
  font-size: 17px;
  font-weight: 800;
}

.site-search-box > span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.site-search-box input {
  min-height: 52px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 14px;
  font-size: 16px;
  font-weight: 600;
}

.site-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 8px;
  align-items: stretch;
}

.site-search-row .btn {
  min-height: 52px;
  padding: 0;
  border-radius: 8px;
}

.site-search-submit {
  display: grid;
  place-items: center;
  background: #eef6ff;
  color: rgba(17, 109, 214, 0.58);
  border-color: #cfe2f6;
}

.site-search-icon {
  width: 22px;
  height: 22px;
  position: relative;
  display: inline-block;
  opacity: 0.72;
}

.site-suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 0;
}

.site-suggestion-chip {
  max-width: 100%;
  display: inline-grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(185, 215, 247, 0.78);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  padding: 7px 10px;
  box-shadow: none;
}

.site-suggestion-chip strong {
  min-width: 0;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-suggestion-chip span {
  min-width: 0;
  color: rgba(95, 109, 134, 0.72);
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-search-icon::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 2px;
  top: 2px;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.site-search-icon::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 3px;
  right: 1px;
  bottom: 3px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: center;
}

.site-result-summary {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.site-add-guide {
  position: relative;
  margin-bottom: 12px;
  min-height: 50px;
  display: grid;
  gap: 2px;
  align-items: center;
  border: 1px solid rgba(217, 154, 0, 0.36);
  border-radius: 10px;
  background: rgba(255, 247, 201, 0.58);
  color: var(--primary-dark);
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(121, 79, 0, 0.05);
}

.site-add-guide::before {
  content: "";
  position: absolute;
  left: 38px;
  bottom: -10px;
  width: 18px;
  height: 18px;
  border-right: 1px solid rgba(217, 154, 0, 0.36);
  border-bottom: 1px solid rgba(217, 154, 0, 0.36);
  background: rgba(255, 247, 201, 0.58);
  transform: rotate(45deg);
}

.site-add-guide strong,
.site-add-guide span {
  position: relative;
  z-index: 1;
}

.site-add-guide strong {
  color: var(--primary-dark);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
}

.site-add-guide span {
  color: rgba(107, 74, 0, 0.62);
  font-size: 12px;
  font-weight: 600;
}

.site-add-guide.is-warning {
  border-color: #b63a46;
  background: #ffe3e8;
  color: #b63a46;
}

.site-add-guide.is-warning::before {
  border-color: #b63a46;
  background: #ffe3e8;
}

.site-add-guide.is-warning strong,
.site-add-guide.is-warning span {
  color: #b63a46;
}

.site-result-list {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 360px;
}

.site-empty-search {
  min-height: 120px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed rgba(143, 178, 219, 0.6);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
  color: rgba(95, 109, 134, 0.58);
}

.site-empty-search .site-search-icon {
  width: 30px;
  height: 30px;
  opacity: 0.42;
}

.site-empty-search .site-search-icon::before {
  width: 17px;
  height: 17px;
}

.site-empty-search .site-search-icon::after {
  width: 13px;
  bottom: 4px;
}

.site-empty-search strong {
  color: rgba(95, 109, 134, 0.72);
  font-size: 14px;
  font-weight: 700;
}

.site-result-card {
  display: grid;
  gap: 5px;
  border: 1px solid #d7e6f8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: inherit;
  padding: 13px 14px;
  text-align: left;
  box-shadow: 0 6px 14px rgba(19, 62, 121, 0.04);
}

.site-result-card.is-add-mode {
  touch-action: pan-y;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  border-color: #c7dff7;
  background: rgba(255, 255, 255, 0.95);
}

.site-result-card.is-add-mode.is-pressing {
  border-color: var(--primary);
  background: #eaf5ff;
  box-shadow: inset 0 0 0 2px rgba(17, 109, 214, 0.14);
  transform: scale(0.992);
}

.site-result-card strong {
  color: var(--primary-dark);
  font-size: 19px;
  line-height: 1.22;
  letter-spacing: 0;
}

.site-result-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.site-detail-form {
  display: grid;
  gap: 8px;
}

.site-product-chip {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #f7fbff;
}

.site-product-chip span {
  color: #6b7d96;
  font-size: 12px;
  font-weight: 800;
}

.site-product-chip strong {
  color: var(--primary-dark);
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.site-edit-field {
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfdff;
}

.site-edit-field label {
  color: #667891;
  font-size: 12px;
  font-weight: 900;
}

.site-edit-field input {
  min-height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  box-shadow: none;
}

.site-edit-field input:focus {
  box-shadow: none;
}

.site-edit-field:focus-within {
  border-color: #8fc4ff;
  background: #f5fbff;
  box-shadow: 0 0 0 3px rgba(17, 109, 214, 0.1);
}

.site-edit-field input[readonly] {
  color: #5f7088;
}

.site-business-field {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfdff;
}

.site-business-field > span {
  color: #667891;
  font-size: 12px;
  font-weight: 900;
}

.site-business-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.site-business-choice-grid button {
  min-height: 42px;
  border: 1px solid #cfe1f5;
  border-radius: 10px;
  background: #f8fbff;
  color: var(--primary-dark);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
}

.site-business-choice-grid button.is-selected {
  border-color: var(--primary);
  background: #e6f2ff;
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(17, 109, 214, 0.14);
}

.site-business-other-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c8ddf2;
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.db-business-choice-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.db-business-choice-field .site-business-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.db-business-choice-field .site-business-choice-grid button {
  min-height: 38px;
  font-size: 13px;
}

.db-business-choice-field .site-business-other-input {
  min-height: 40px;
  font-size: 14px;
}

.site-save-button {
  min-height: 52px;
  margin-top: 4px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 18px;
}

.site-readonly-grid,
.site-linked-as {
  display: grid;
  gap: 8px;
}

.site-linked-as > strong {
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-size: 18px;
}

.site-linked-as-card {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfdff;
  color: var(--primary-dark);
  padding: 10px 12px;
  font: inherit;
  font-weight: 900;
  text-align: left;
}

.site-linked-as-card em {
  color: var(--primary);
  font-size: 13px;
  font-style: normal;
}

.empty-box.compact {
  min-height: 90px;
  font-size: 16px;
}.role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef5fc;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  height: var(--app-vvh);
  z-index: 50;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 16px;
  background: rgba(4, 14, 38, 0.45);
}

.modal-backdrop.blackbox-chart-backdrop {
  align-items: start;
  padding: max(44px, 7vh) 12px 12px;
  background: rgba(35, 55, 80, 0.36);
  backdrop-filter: blur(8px);
}

.db-company-picker-backdrop {
  align-items: start;
  padding: 33vh 16px 16px;
}

.notification-modal {
  width: min(100%, 520px);
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-strong);
}

.notification-backdrop .notification-modal {
  align-self: start;
  margin-top: max(12px, calc(100dvh * 0.06));
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notification-modal > .modal-head {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.notification-modal > .modal-head strong {
  min-width: 0;
  font-family: var(--font-display);
  color: var(--primary-dark);
  font-size: 28px;
  line-height: 1.08;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-modal.blackbox-chart-modal {
  width: min(100%, 640px);
  max-height: calc(100dvh - 64px);
  overflow-y: auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(190, 210, 230, 0.75);
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  box-shadow:
    0 24px 60px rgba(15, 35, 70, 0.22),
    0 4px 12px rgba(15, 35, 70, 0.12);
}

.blackbox-chart-modal .modal-head {
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 10px;
}

.blackbox-chart-modal .modal-close {
  width: 52px;
  height: 52px;
  border: 1px solid #c9def2;
  border-radius: 14px;
  background: linear-gradient(180deg, #eef7ff 0%, #e3f0fb 100%);
  color: var(--primary-dark);
  font-size: 30px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 2px 6px rgba(30, 80, 130, 0.08);
}

.member-modal {
  width: min(100%, 560px);
  max-height: calc(100dvh - 36px);
  align-self: start;
  grid-template-rows: auto minmax(0, auto);
  overflow: hidden;
  gap: 12px;
  margin-top: max(12px, calc(100dvh * 0.06));
}

.language-modal {
  width: min(100%, 560px);
  min-height: min(420px, calc(100dvh - 36px));
  max-height: min(620px, calc(100dvh - 36px));
}

.member-backdrop {
  align-items: start;
  padding: 18px 14px;
}

.member-list {
  display: grid;
  gap: 8px;
  align-content: start;
  grid-auto-rows: min-content;
  min-height: 0;
  max-height: min(calc(100dvh - 132px), 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.member-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
}

.member-row > span {
  min-width: 0;
}

.member-row strong {
  display: block;
  font-family: var(--font-display);
  color: var(--primary-dark);
  font-size: 17px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-row em {
  display: block;
  margin-top: 2px;
  color: #6e7f98;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: end;
}

.member-actions .btn.quick {
  width: auto;
  min-width: 62px;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 11px;
  background: #f7faff;
  color: var(--primary);
  font-size: 12px;
  box-shadow: none;
}

.language-country-row {
  width: 100%;
  text-align: left;
  cursor: pointer;
  grid-template-columns: minmax(0, 1fr);
  min-height: 58px;
}

.language-country-row strong {
  font-family: var(--font-display);
  font-size: 18px;
}

.language-country-row.is-active {
  border-color: #7bbcff;
  background: #eaf4ff;
  box-shadow: inset 0 0 0 1px rgba(17, 109, 214, 0.16);
}

.language-country-row em {
  color: #6d7f98;
  font-size: 12px;
}

.member-modal-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.member-modal-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-modal-title span {
  color: #6e7f98;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.member-modal .modal-head .member-modal-title strong {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.08;
}

.member-modal .modal-close {
  width: 48px;
  height: 48px;
  font-size: 32px;
}

.member-action-modal {
  width: min(100%, 460px);
  gap: 14px;
  align-self: start;
  margin-top: max(96px, calc(100dvh * 0.18));
}

.member-action-backdrop {
  align-items: start;
  padding: 18px 14px;
  z-index: 60;
}

.member-action-copy {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.45;
}

.leave-confirm-backdrop {
  align-items: start;
  padding: 18px 14px;
}

.leave-confirm-modal {
  width: min(100%, 360px);
  gap: 12px;
  align-self: start;
  margin-top: max(22px, calc(100dvh * 0.08));
  border-radius: 12px;
}

.leave-confirm-modal > .modal-head {
  min-height: 48px;
  grid-template-columns: minmax(0, 1fr) 48px;
  padding-bottom: 6px;
}

.leave-confirm-modal .modal-head .member-modal-title strong {
  font-size: 21px;
}

.leave-confirm-modal .modal-close {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  font-size: 30px;
}

.leave-confirm-copy {
  color: #5f7088;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.leave-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.leave-confirm-actions .btn {
  min-height: 48px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 16px;
}

.leave-confirm-primary {
  background: var(--primary);
  color: #fff;
}

.member-action-form {
  display: grid;
  gap: 12px;
}

.member-action-form input,
.member-action-form textarea {
  min-width: 0;
  min-height: 52px;
  border: 1px solid #c8ddf2;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary-dark);
  padding: 0 12px;
  font-size: 22px;
  font-weight: 900;
}

.member-action-form textarea {
  min-height: 116px;
  padding-top: 14px;
  line-height: 1.35;
  resize: vertical;
}

.member-role-actions {
  display: grid;
  gap: 10px;
}

.member-role-actions .btn {
  min-height: 62px;
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 10px 14px;
  text-align: left;
}

.member-role-actions .btn strong {
  color: var(--primary-dark);
  font-size: 18px;
  line-height: 1.1;
}

.member-role-actions .btn span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.member-actions .danger {
  color: #6e7f98;
  border-color: #d2deeb;
  background: #f7faff;
}

.completion-backdrop {
  align-items: flex-start;
  padding-top: max(14px, env(safe-area-inset-top));
}

.completion-modal {
  width: min(100%, 560px);
  align-self: flex-start;
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 38px rgba(10, 63, 118, 0.13);
}

.completion-progress {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: #eef6ff;
  padding: 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.completion-progress b {
  color: var(--primary);
}

.completion-question {
  display: grid;
  gap: 4px;
}

.completion-question strong {
  color: var(--primary-dark);
  font-size: 22px;
  line-height: 1.18;
}

.completion-question span {
  color: #6e7f98;
  font-size: 14px;
  font-weight: 700;
}

.completion-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.completion-option-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.completion-option-grid.is-multi button,
.completion-survey-choice-grid button[data-field="fault_causes"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.completion-option-grid.is-multi button::before,
.completion-survey-choice-grid button[data-field="fault_causes"]::before {
  content: "\2713";
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #b8d4ef;
  border-radius: 6px;
  color: transparent;
  background: #fff;
  margin-right: 6px;
  font-size: 12px;
  line-height: 1;
}

.completion-option-grid.is-multi button.is-selected::before,
.completion-survey-choice-grid button[data-field="fault_causes"].is-selected::before {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.completion-option-grid button {
  min-height: 50px;
  border: 1px solid #cfe1f5;
  border-radius: 999px;
  background: #f8fbff;
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 900;
  box-shadow: none;
}

.completion-option-grid button.is-selected {
  border-color: #84b8ee;
  background: #e4f1ff;
  color: var(--primary);
  box-shadow: inset 0 0 0 2px rgba(17, 109, 214, 0.12);
}

.completion-part-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px 70px;
  gap: 8px;
}

.completion-part-input input,
.completion-memo {
  min-width: 0;
  min-height: 50px;
  border: 1px solid #c8ddf2;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary-dark);
  padding: 0 12px;
  font-size: 16px;
  font-weight: 900;
}

.completion-memo {
  min-height: 120px;
  padding-top: 14px;
  line-height: 1.35;
  resize: vertical;
}

.completion-empty {
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px dashed #bed2eb;
  border-radius: 8px;
  background: #fbfdff;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.completion-parts-list {
  display: grid;
  gap: 8px;
}

.completion-part-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 8px;
  align-items: center;
  border: 1px solid #d4e4f5;
  border-radius: 8px;
  background: #fafcff;
  padding: 7px 9px;
}

.completion-part-row span {
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 900;
}

.completion-part-row button {
  min-height: 34px;
  border: 1px solid #c8dced;
  border-radius: 8px;
  background: #eef5fc;
  color: var(--primary);
  font-weight: 900;
}

.completion-summary {
  display: grid;
  gap: 8px;
}

.completion-edit-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.completion-edit-form label,
.completion-survey-field,
.completion-edit-parts {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.completion-edit-form label > span,
.completion-survey-field > span,
.completion-edit-subhead strong {
  color: #6e7f98;
  font-size: 13px;
  font-weight: 800;
}

.completion-survey-field {
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfdff;
}

.completion-survey-choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.completion-survey-choice-grid button {
  min-height: 38px;
  border: 1px solid #cfe1f5;
  border-radius: 999px;
  background: #f8fbff;
  color: var(--primary-dark);
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.completion-survey-choice-grid button.is-selected {
  border-color: var(--primary);
  background: #e6f2ff;
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(17, 109, 214, 0.14);
}

.completion-edit-form select,
.completion-edit-form textarea,
.completion-part-edit-row input,
.completion-other-input input {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  border: 1px solid #c8ddf2;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary-dark);
  padding: 0 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  box-shadow: none;
}

.completion-edit-form textarea {
  min-height: 112px;
  padding-top: 12px;
  line-height: 1.35;
  resize: vertical;
  background: #ffffff;
}

.completion-edit-parts,
.completion-edit-memo,
.completion-other-input {
  grid-column: 1 / -1;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfdff;
}

.completion-edit-subhead {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.completion-edit-subhead .btn,
.completion-part-input .btn,
.completion-nav .btn {
  min-height: 48px;
  border: 1px solid #c5d9ee;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
}

.completion-edit-subhead .btn:not([disabled]),
.completion-part-input .btn:not([disabled]) {
  background: #f2f8ff;
  color: var(--primary);
  box-shadow: none;
}

.completion-edit-subhead .btn[disabled],
.completion-part-input .btn[disabled] {
  background: #edf4fc;
  border-color: #c8d8ea;
  color: #7f91a8;
  opacity: 1;
  box-shadow: none;
}

.completion-nav .btn:not(.ghost):not([disabled]) {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(25, 113, 207, 0.18);
}

.completion-nav .btn.ghost:not([disabled]) {
  border-color: transparent;
  background: transparent;
  color: #6e7f98;
}

.completion-part-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px 64px;
  gap: 7px;
  align-items: center;
}

.completion-part-edit-row button {
  min-height: 38px;
  border: 1px solid #cfe1f5;
  border-radius: 8px;
  background: #f3f8fd;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.completion-edit-parts.is-disabled {
  opacity: 1;
}

.completion-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.completion-nav .btn[disabled] {
  background: #edf4fc;
  border-color: #c8d8ea;
  color: #7f91a8;
  opacity: 1;
  box-shadow: none;
  cursor: not-allowed;
}

.modal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 12px;
  align-items: center;
}

.modal-head strong {
  color: var(--primary-dark);
  font-size: 26px;
}

.modal-close {
  width: 58px;
  height: 58px;
  border: 2px solid #c5d9ee;
  border-radius: 8px;
  background: #e3f0ff;
  color: var(--primary-dark);
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
}

.notify-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.notify-mode {
  min-height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.notify-mode input {
  position: absolute;
  opacity: 0;
}

.notify-mode.is-selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #eef6ff, #ffffff);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(11, 110, 220, 0.12), var(--shadow-soft);
  transform: translateY(-1px);
}

.time-grid {
  display: grid;
  gap: 10px;
}

.time-grid.is-disabled {
  opacity: 0.46;
  filter: grayscale(0.9);
}

.time-grid.is-disabled .time-field {
  background: #f1f4f8;
  border-color: #d8e0ea;
}

.time-grid.is-disabled input,
.time-grid.is-disabled select {
  background: #edf1f6;
  color: #9aa5b5;
}

.time-field {
  margin: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 12px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px 10px 10px;
}

.time-field legend {
  padding: 0 6px;
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
}

.time-field select,
.time-field input {
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.time-field span {
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 640px) {
  body:has(.chat-screen) {
    overflow: hidden;
  }

  .chat-screen {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    padding: max(8px, env(safe-area-inset-top)) 10px max(8px, env(safe-area-inset-bottom));
  }

  .chat-panel {
    height: 100%;
    min-height: 0;
  }

  .chat-composer {
    padding: 10px 10px max(10px, env(safe-area-inset-bottom));
  }

  .map-toolbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }

  .map-toolbar > div {
    min-width: 0;
  }

  .map-toolbar strong {
    white-space: normal;
    overflow-wrap: keep-all;
    word-break: keep-all;
    font-size: 24px;
  }

  .map-toolbar span {
    white-space: normal;
    overflow-wrap: keep-all;
    word-break: keep-all;
    font-size: 16px;
  }

  .map-toolbar .btn,
  .readonly-pill {
    justify-content: center;
    width: 100%;
  }

  .map-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    width: 100%;
  }

  .map-country-selector {
    justify-self: stretch;
    width: 100%;
  }

  .map-country-toggle,
  .map-country-button,
  .map-toolbar-actions > .btn,
  .map-toolbar-actions > .chat-head-button {
    justify-content: center;
    width: 100%;
  }

  .map-toolbar-actions > .btn {
    min-width: 0;
  }

  .map-canvas,
  .real-map-canvas {
    min-height: min(72dvh, 640px);
    height: min(72dvh, 640px);
    aspect-ratio: auto;
  }

  .pin-card {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-height: 42%;
    overflow: auto;
  }

  .selected-site-card {
    position: static;
    max-height: none;
    max-height: clamp(220px, 32vh, 340px);
    overflow-y: auto;
  }}

@media (min-width: 760px) {
  .screen {
    width: min(100%, 860px);
    padding-top: 34px;
  }

  .chat-screen {
    padding-top: 14px;
    padding-bottom: 34px;
  }

  .chat-composer {
    padding-bottom: 34px;
  }

  .content-narrow {
    width: min(100%, 520px);
    margin: 0 auto;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-canvas,
  .real-map-canvas {
    min-height: 600px;
  }
}

@media (max-width: 759px) {
  .db-screen {
    width: min(100%, 520px);
  }

  .db-admin-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .db-admin-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
  }

  .db-admin-menu button {
    min-height: 58px;
    padding: 9px 8px;
  }

  .db-admin-menu strong {
    font-size: 17px;
  }

  .db-admin-menu span {
    display: none;
  }

  .db-section-panel {
    border-radius: 0 0 8px 8px;
    padding: 12px;
  }

  .db-document-tools {
    grid-template-columns: 1fr;
  }

  .db-edit-actions {
    justify-content: stretch;
  }

  .db-edit-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  .db-record-card {
    padding: 12px;
  }

  .db-record-head {
    display: grid;
  }

  .db-record-head em {
    justify-self: start;
  }

  .db-record-fields {
    grid-template-columns: 1fr;
  }

  .db-record-field {
    grid-template-columns: minmax(86px, 32%) minmax(0, 1fr);
    min-height: 44px;
    padding: 8px;
  }

  .db-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .db-company-picker-backdrop {
    padding-top: max(8px, env(safe-area-inset-top));
  }

  .db-company-picker {
    max-height: calc(100dvh - 24px);
  }

  .completion-edit-form {
    grid-template-columns: 1fr;
  }

  .completion-part-edit-row {
    grid-template-columns: minmax(0, 1fr) 74px;
  }

  .completion-part-edit-row button {
    grid-column: 1 / -1;
  }

  .product-issue-panel {
    padding: 12px;
  }

  .product-summary-card {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px;
    padding: 9px 10px;
  }

  .product-summary-card strong {
    font-size: 16px;
  }

  .product-summary-card span,
  .product-summary-card em {
    min-height: 30px;
    padding: 0 8px;
    font-size: 13px;
  }

  .product-issue-head {
    display: grid;
  }

  .product-issue-head em {
    justify-self: start;
  }

  .product-issue-form {
    grid-template-columns: 1fr;
  }

  .product-issue-form .btn {
    min-height: 48px;
  }

  .sheet-backdrop {
    align-items: start;
    padding: max(8px, env(safe-area-inset-top)) 8px 12px;
  }

  .product-picker-sheet {
    width: 100%;
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - 18px);
  }

  .product-picker-body {
    max-height: calc(100dvh - 92px - max(16px, env(safe-area-inset-top)));
  }

  .db-subgrid {
    grid-template-columns: 1fr;
  }

  .db-section-head {
    display: grid;
  }

  .db-table {
    min-width: 0;
  }

  .db-table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .db-table,
  .db-table thead,
  .db-table tbody,
  .db-table tr,
  .db-table td {
    display: block;
    width: 100%;
  }

  .db-table thead {
    display: none;
  }

  .db-table tr {
    display: grid;
    gap: 9px;
    border: 1px solid #d7e6f8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(19, 62, 121, 0.06);
    padding: 12px;
    margin-bottom: 10px;
  }

  .db-table td {
    display: grid;
    grid-template-columns: minmax(82px, 32%) minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    border-bottom: 0;
    padding: 0;
    font-size: 13px;
  }

  .db-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 900;
  }

  .db-table td[colspan] {
    display: block;
  }

  .db-table td[colspan]::before {
    content: "";
    display: none;
  }

  .db-table .btn.quick {
    width: 100%;
    min-height: 42px;
  }
}

@media (max-width: 430px) {
  .chat-more-panel {
    gap: 8px;
    padding: 8px;
  }

  .chat-more-button {
    min-height: 48px;
  }

  .chat-more-button span:last-child {
    display: none;
  }

  .chat-more-button .head-icon {
    min-width: 28px;
    height: 28px;
  }

  .chat-more-button .svg-icon svg {
    width: 24px;
    height: 24px;
  }

  .composer-tray-head {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .tray-toggle {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
  }

  .tray-toggle em {
    min-width: 24px;
    height: 24px;
  }

  .composer-card-pager {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 7px;
  }

  .tray-arrow {
    min-height: 72px;
    font-size: 42px;
  }

  .composer-card-window {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .composer-as-button {
    height: 72px;
    grid-template-columns: 1fr;
    grid-template-rows: 42px 20px;
    justify-items: center;
    align-content: center;
    gap: 4px;
    border-color: #cfe4f8;
    padding: 6px 4px;
    text-align: center;
  }

  .composer-as-button > * {
    grid-column: 1;
  }

  .composer-as-button .site-initial {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    width: 38px;
    height: 38px;
    border-color: #b9d8f7;
    border-radius: 50%;
    background: #edf6ff;
    font-size: 24px;
  }

  .composer-as-button .as-card-title {
    grid-row: 2;
    width: 100%;
    display: grid;
    place-items: center;
  }

  .composer-as-button .as-card-copy,
  .composer-as-button .assignment-label {
    display: none;
  }

  .composer-as-button .as-card-title b {
    min-height: 18px;
    padding: 1px 5px;
    font-size: 10px;
  }
}

@media (max-width: 430px) {
  .chat-head-actions {
    display: grid;
    grid-template-columns: repeat(4, 44px);
    gap: 6px;
    justify-content: end;
  }

  .chat-head-button,
  .chat-more-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 0;
    border-radius: 8px;
  }

  .chat-head-button .head-icon,
  .chat-more-button .head-icon {
    min-width: 27px;
    height: 27px;
  }

  .chat-head-button .svg-icon svg,
  .chat-more-button .svg-icon svg {
    width: 23px;
    height: 23px;
  }

  .chat-more-panel {
    grid-template-columns: repeat(4, 44px);
    justify-content: center;
    gap: 6px;
    padding: 7px;
  }
}

@media (max-width: 430px) {
  .chat-more-panel {
    grid-template-columns: repeat(5, 40px);
    gap: 5px;
    justify-content: center;
  }

  .chat-more-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
  }
}

/* chat-head-actions-order-final */
@media (max-width: 430px) {
  .chat-head-actions {
    grid-template-columns: repeat(3, 44px);
    justify-content: end;
  }
}

/* typography-reset-2026-06-29
   Product-management typography is the baseline.
   Display font: short titles and primary menu labels only.
   System font: chat, forms, DB values, descriptions, addresses, and all long content. */
:root {
  --type-page-title: 24px;
  --type-section-title: 20px;
  --type-card-title: 18px;
  --type-body: 14px;
  --type-control: 14px;
  --type-small: 12px;
  --type-micro: 11px;
  --line-body: 1.38;
  --line-tight: 1.16;
}

body,
.screen {
  font-size: var(--type-body);
  line-height: var(--line-body);
}

button,
input,
select,
textarea,
.btn,
.quick {
  font-family: var(--font-sans);
  font-size: var(--type-control);
  line-height: 1.25;
  letter-spacing: 0;
}

.brand strong,
.chat-title-row strong,
.db-page-head .chat-title-row strong,
.site-screen .chat-title-row strong,
.as-detail-head strong,
.notification-modal > strong,
.notification-modal header strong,
.member-modal > strong,
.member-action-modal > strong,
.assignment-modal > strong,
.completion-modal > strong,
.blackbox-chart-modal > strong,
.product-confirm-modal > strong {
  font-family: var(--font-display);
  font-size: var(--type-page-title);
  line-height: var(--line-tight);
  letter-spacing: 0;
}

.brand strong::before {
  font-size: var(--type-page-title);
  letter-spacing: 0;
}

.home-menu-card strong,
.db-tabs button,
.site-tabs button,
.as-detail-tabs button,
.chat-more-button,
.chat-head-button,
.composer-as-button strong,
.as-card-title strong,
.map-country-toggle,
.product-choice-row strong,
.product-picker-head strong,
.product-picker-option strong {
  font-family: var(--font-display);
  letter-spacing: 0;
}

.panel > strong,
.map-toolbar strong,
.as-field-card > strong,
.as-completion-panel strong,
.as-history-head strong,
.assignment-roster-head strong,
.blackbox-head strong,
.db-section-head strong,
.db-record-card > strong,
.db-product-code-preview strong,
.site-detail-card > strong,
.product-issue-card > strong,
.chat-card strong,
.as-card strong {
  font-size: var(--type-section-title);
  line-height: var(--line-tight);
  letter-spacing: 0;
}

.db-record-card strong,
.db-product-record strong,
.db-as-record-card strong,
.site-result-card strong,
.site-suggestion-chip strong,
.member-row strong,
.assignment-candidate strong,
.blackbox-mode-entry strong,
.as-history-item strong,
.product-choice-row strong,
.product-picker-option strong {
  font-size: var(--type-card-title);
  line-height: 1.2;
  letter-spacing: 0;
}

.brand span,
.small,
.chat-meta-row,
.chat-meta-row span,
.map-toolbar span,
.panel span,
.site-search-box span,
.site-result-card small,
.site-suggestion-chip span,
.member-row span,
.assignment-candidate span,
.notification-modal span,
.notify-mode span,
.db-record-card span,
.db-record-card small,
.db-field-row span,
.db-product-value span,
.as-history-item span,
.as-history-item em,
.blackbox-head span,
.blackbox-mode-entry em,
.product-choice-row span,
.product-picker-option span,
.product-issue-notice,
.site-add-guide span,
.chat-card span,
.chat-card .chat-contact,
.as-card small,
.composer-as-button small {
  font-family: var(--font-sans);
  font-size: var(--type-small);
  line-height: 1.34;
  letter-spacing: 0;
}

.chat-card,
.chat-card span,
.chat-message,
.chat-text,
.composer-row textarea,
.meta-row,
.meta-row span,
.field-value,
.db-edit-input,
.db-code-input,
.site-detail-form input,
.site-detail-form textarea,
.completion-modal input,
.completion-modal textarea,
.completion-modal select,
.notification-modal input,
.notification-modal select,
.notification-modal textarea {
  font-family: var(--font-sans);
  font-size: var(--type-body);
  line-height: var(--line-body);
  letter-spacing: 0;
}

.chat-time,
.badge,
.role-pill,
.map-coordinate-summary,
.site-result-summary,
.as-history-head span,
.blackbox-chart-date,
.db-lock-note,
.product-count-options button,
.product-count-stepper strong {
  font-size: var(--type-small);
  line-height: 1.2;
  letter-spacing: 0;
}

.modal-close,
.chat-back,
.topbar-back {
  font-family: var(--font-sans);
  letter-spacing: 0;
}

.home-menu-card strong {
  font-size: 34px;
  line-height: 1;
}

.home-menu-card span {
  font-size: var(--type-body);
}

.chat-card strong {
  font-size: 16px;
}

.chat-card span {
  font-size: var(--type-body);
}

.composer-row textarea {
  font-size: 15px;
}

.chat-screen .message-bubble p,
.chat-screen .composer-row textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.38;
  letter-spacing: 0;
}

.chat-screen .bubble-name {
  font-size: var(--type-small);
}

.as-detail-screen .as-history-head strong,
.as-detail-screen .assignment-roster-head strong,
.as-detail-screen .blackbox-head strong,
.as-detail-screen .as-field-card > strong,
.as-detail-screen .as-completion-panel strong {
  font-size: var(--type-section-title);
  line-height: var(--line-tight);
  letter-spacing: 0;
}

/* chat-telegram-compact-2026-06-29
   Keep AS card tray usable; compress messenger chrome, bubbles, and composer
   toward Telegram-like mobile density. */
.chat-screen {
  padding-top: 8px;
  padding-bottom: max(38px, calc(env(safe-area-inset-bottom) + 28px));
}

.chat-panel {
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(16, 46, 84, 0.08);
  overflow: hidden;
}

.chat-room-head {
  min-height: 62px;
  padding: 8px 10px;
  gap: 8px;
  border-bottom: 1px solid rgba(201, 220, 239, 0.78);
  background: rgba(248, 252, 255, 0.92);
}

.chat-room-head .chat-back {
  width: 30px;
  height: 30px;
  font-size: 30px;
}

.chat-title-block {
  gap: 2px;
}

.chat-title-row strong {
  font-size: 21px;
  line-height: 1.05;
}

.chat-meta-row,
.chat-meta-row span {
  font-size: 11px;
  line-height: 1.2;
}

.chat-head-actions {
  gap: 5px;
}

.chat-head-button,
.chat-more-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  border-radius: 8px;
}

.chat-head-button .head-icon,
.chat-more-button .head-icon {
  min-width: 24px;
  height: 24px;
}

.chat-head-button .svg-icon svg,
.chat-more-button .svg-icon svg {
  width: 20px;
  height: 20px;
}

.chat-more-panel {
  min-height: 46px;
  grid-template-columns: repeat(5, 38px);
  gap: 5px;
  padding: 6px;
  border-top: 1px solid rgba(201, 220, 239, 0.7);
  background: rgba(248, 252, 255, 0.88);
}

.chat-feed {
  gap: 6px;
  padding: 8px 10px;
}

.message-bubble,
.chat-screen .message-bubble {
  width: fit-content;
  max-width: min(88%, 350px);
  gap: 2px;
  border-radius: 9px;
  padding: 7px 10px 6px;
  box-shadow: none;
}

.message-bubble.is-system,
.chat-screen .message-bubble.is-system {
  width: fit-content;
  max-width: min(90%, 360px);
}

.bubble-name,
.chat-screen .bubble-name {
  font-size: 11px;
  line-height: 1.15;
}

.message-bubble p,
.chat-screen .message-bubble p {
  margin: 0;
  font-size: 13px;
  line-height: 1.34;
}

.message-bubble time,
.chat-screen .message-bubble time {
  margin-top: 0;
  font-size: 10px;
  line-height: 1.1;
  opacity: 0.72;
}

.chat-composer {
  gap: 6px;
  padding: 7px 9px max(9px, env(safe-area-inset-bottom));
  background: rgba(248, 252, 255, 0.95);
}

.composer-tray-head {
  min-height: 36px;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 6px;
}

.tray-summary {
  min-height: 36px;
  padding: 5px 9px;
}

.tray-summary span {
  font-size: 14px;
}

.tray-summary small {
  font-size: 10px;
}

.tray-toggle {
  width: 38px;
  min-width: 38px;
  min-height: 36px;
}

.tray-toggle em {
  min-width: 21px;
  height: 21px;
  font-size: 14px;
}

.composer-card-pager {
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 6px;
}

.tray-arrow {
  min-height: 64px;
  font-size: 22px;
}

.composer-card-window {
  min-height: 64px;
}

.composer-as-button {
  height: 76px;
  grid-template-columns: 31px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 19px;
  gap: 3px 6px;
  padding: 5px 8px 5px 6px;
}

.composer-as-button .site-initial {
  width: 28px;
  height: 28px;
  font-size: 18px;
}

.composer-as-button .as-card-title strong {
  font-size: 14px;
  line-height: 1.08;
}

.composer-as-button .as-card-title b {
  min-height: 16px;
  padding: 0 5px;
  font-size: 9px;
}

.composer-as-button .assignment-label,
.composer-as-button small {
  font-size: 10px;
}

.composer-row {
  grid-template-columns: 42px minmax(0, 1fr) 46px;
  gap: 6px;
}

.composer-plus-button {
  width: 42px;
  height: 42px;
  font-size: 24px;
}

.composer-row textarea,
.chat-screen .composer-row textarea {
  min-height: 42px;
  max-height: min(calc(8 * 1.34em + 18px), 28dvh);
  padding: 9px 11px;
  border-width: 1px;
  font-size: 14px;
  line-height: 1.34;
}

.send-button {
  width: 46px;
  height: 46px;
  font-size: 22px;
}

@media (max-width: 430px) {
  .chat-head-actions {
    grid-template-columns: repeat(3, 38px);
    gap: 5px;
  }

  .chat-head-button,
  .chat-more-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
  }

  .chat-more-panel {
    grid-template-columns: repeat(5, 38px);
    gap: 5px;
  }
}

.empty-box {
  font-size: var(--type-card-title);
}

@media (max-width: 430px) {
  :root {
    --type-page-title: 23px;
    --type-section-title: 19px;
    --type-card-title: 17px;
    --type-body: 14px;
    --type-control: 14px;
    --type-small: 12px;
    --type-micro: 11px;
  }

  .home-menu-card strong {
    font-size: 32px;
  }

  .as-detail-head strong,
  .chat-title-row strong,
  .brand strong,
  .brand strong::before {
    font-size: var(--type-page-title);
  }

  .as-detail-screen .meta-row,
  .meta-row {
    font-size: var(--type-body);
    line-height: var(--line-body);
  }

  .as-detail-screen .as-completion-main-button {
    font-size: 17px;
  }
}

/* chat-compact-final-priority
   This must stay after the global typography mobile rules. */
.chat-screen .chat-room-head {
  min-height: 56px;
  padding: 7px 9px;
}

.chat-screen .chat-title-row strong {
  font-size: 20px;
  line-height: 1.04;
}

.chat-screen .chat-meta-row,
.chat-screen .chat-meta-row span {
  font-size: 11px;
  line-height: 1.16;
}

.chat-screen .message-bubble {
  max-width: min(86%, 340px);
}

.chat-screen .message-bubble:not(.has-as-card) {
  padding: 6px 9px 5px;
}

.chat-screen .message-bubble p {
  font-size: 13px;
  line-height: 1.32;
}

.chat-screen .message-bubble time {
  font-size: 10px;
}

.chat-screen .message-bubble.is-compact-system {
  width: fit-content;
  max-width: min(82%, 300px);
  grid-template-columns: minmax(0, auto) auto;
  align-items: end;
  column-gap: 8px;
  row-gap: 1px;
  padding: 6px 8px 5px;
}

.chat-screen .message-bubble.is-compact-system .bubble-name {
  grid-column: 1 / -1;
  font-size: 11px;
  line-height: 1.1;
}

.chat-screen .message-bubble.is-compact-system p {
  min-width: 0;
  font-size: 12px;
  line-height: 1.25;
}

.chat-screen .message-bubble.is-compact-system time {
  align-self: end;
  justify-self: end;
  margin: 0 0 1px;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1;
}

.chat-screen .chat-composer {
  padding: 6px 8px max(8px, env(safe-area-inset-bottom));
}

.chat-screen .composer-row {
  grid-template-columns: 38px minmax(0, 1fr) 42px;
  gap: 6px;
  align-items: center;
}

.chat-screen .composer-plus-button {
  width: 38px;
  height: 38px;
  border-width: 1px;
  font-size: 21px;
}

.chat-screen .composer-row textarea {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 14px;
}

.chat-screen .send-button {
  width: 42px;
  height: 42px;
  font-size: 20px;
  padding-left: 1px;
}

@media (max-width: 430px) {
  .chat-screen .chat-room-head {
    min-height: 54px;
  }

  .chat-screen .chat-title-row strong {
    font-size: 19px;
  }
}

/* composer-card-density-final
   Match the AS card tray density to the compressed chat composer. */
.chat-screen .composer-card-pager {
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 5px;
  align-items: stretch;
}

.chat-screen .tray-arrow {
  min-height: 58px;
  border-radius: 8px;
  font-size: 20px;
  padding: 0;
}

.chat-screen .composer-card-window {
  min-height: 58px;
  gap: 5px;
  grid-template-columns: minmax(0, 1fr);
}

.chat-screen .composer-as-button {
  width: 100%;
  height: 58px;
  min-height: 58px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 5px;
  row-gap: 3px;
  align-content: center;
  padding: 5px 6px;
  border-radius: 8px;
}

.chat-screen .composer-as-button .site-initial {
  display: none;
}

.chat-screen .composer-as-button > * {
  grid-column: 1;
}

.chat-screen .composer-as-button .as-card-title {
  grid-row: 1;
  min-width: 0;
  width: 100%;
  justify-self: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: stretch;
  place-items: center stretch;
  gap: 3px;
  padding-top: 0;
}

.chat-screen .composer-as-button .as-card-copy {
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 1px;
  align-content: center;
}

.chat-screen .composer-as-button .as-card-title strong {
  display: block;
  width: 100%;
  min-width: 0;
  font-size: 13px;
  line-height: 1.04;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-screen .composer-as-button .as-card-date {
  font-size: 9px;
  line-height: 1.1;
}

.chat-screen .composer-as-button .as-card-title b {
  align-self: end;
  min-height: 13px;
  padding: 0 4px;
  font-size: 8px;
  white-space: nowrap;
}

.chat-screen .composer-as-button .assignment-label,
.chat-screen .composer-as-button small,
.chat-screen .composer-as-button span {
  font-size: 9px;
  line-height: 1.1;
}

.chat-screen .composer-as-button .assignment-label {
  grid-row: 2;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  align-self: center;
  justify-self: center;
}

.chat-screen .composer-empty-tray {
  min-height: 58px;
  font-size: 13px;
}

.chat-screen .assignment-drag-banner {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #b9d8f7;
  border-radius: 8px;
  background: rgba(238, 245, 252, 0.94);
  color: var(--primary-dark);
  padding: 8px 11px;
  box-shadow: 0 8px 18px rgba(17, 109, 214, 0.08);
}

.chat-screen .assignment-drag-banner strong {
  min-width: 0;
  max-width: 54%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.08;
}

.chat-screen .assignment-drag-banner span {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
}

.chat-panel.is-card-dragging .chat-room-head,
.chat-panel.is-card-dragging .chat-feed,
.chat-panel.is-card-dragging .room-notice {
  opacity: 0.24;
  filter: grayscale(0.25);
}

.chat-panel.is-card-dragging .chat-composer,
.chat-panel.is-card-dragging .assignment-drag-banner {
  opacity: 1;
  filter: none;
}

.chat-screen.is-assigning .composer-card-pager {
  border: 1px solid #8abdf0;
  background: rgba(238, 245, 252, 0.9);
  box-shadow: inset 0 0 0 2px rgba(17, 109, 214, 0.08);
}

.chat-screen.is-assigning .composer-card-pager::before,
.composer-as-button.is-dragging::after {
  content: none;
}

.chat-screen .composer-as-button.is-dragging,
.chat-screen .composer-as-button.is-assign-hover {
  border-color: #0b6edc;
  outline: 2px solid rgba(11, 110, 220, 0.22);
  background: #eef5fc;
  box-shadow: 0 8px 18px rgba(17, 109, 214, 0.16);
  transform: translateY(-1px);
}

@media (max-width: 430px) {
  .chat-screen .composer-card-pager {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
  }

  .chat-screen .tray-arrow,
  .chat-screen .composer-card-window,
  .chat-screen .composer-as-button,
  .chat-screen .composer-empty-tray {
    min-height: 56px;
  }

  .chat-screen .composer-as-button {
    height: 56px;
  }
}

/* quiet-utility-ux-2026-06-29
   Keep display font for true screen titles only. Utility controls, badges,
   card effects, and transient action states stay compact and quiet. */
.chat-screen .tray-arrow {
  min-height: 50px;
  border-color: #d6e5f3;
  background: rgba(244, 249, 254, 0.9);
  color: #2c6fb6;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 800;
  box-shadow: none;
}

.chat-screen .composer-card-pager {
  gap: 5px;
}

.chat-screen .composer-as-button {
  border-color: #d6e5f3;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}

.chat-screen .composer-as-button .as-card-title strong {
  color: var(--primary-dark);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
}

.chat-screen .composer-as-button .as-card-date,
.chat-screen .composer-as-button .as-card-title b,
.chat-screen .composer-as-button .assignment-label {
  color: #3570a9;
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 700;
}

.chat-screen .composer-plus-button {
  border-color: #d6e5f3;
  background: rgba(244, 249, 254, 0.95);
  color: #2f72b8;
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 800;
  box-shadow: none;
}

.chat-screen .send-button {
  border: 1px solid #0b6edc;
  background: #1976d2;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 800;
  box-shadow: none;
}

.chat-screen .assignment-drag-banner {
  min-height: 38px;
  border-color: #c7ddf2;
  background: rgba(244, 249, 254, 0.96);
  box-shadow: none;
}

.chat-screen .assignment-drag-banner strong,
.chat-screen .assignment-drag-banner span {
  font-family: var(--font-sans);
  font-weight: 800;
}

.chat-screen .assignment-drag-banner strong {
  font-size: 14px;
}

.chat-screen .composer-as-button.is-dragging,
.chat-screen .composer-as-button.is-assign-hover,
.chat-screen.is-assigning .composer-card-pager {
  border-color: #7fb4e7;
  outline: 2px solid rgba(11, 110, 220, 0.14);
  background: #f4f9fe;
  box-shadow: none;
  transform: none;
}

.room-item {
  min-height: 78px;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 10px;
  padding: 12px 13px;
  box-shadow: 0 8px 18px rgba(19, 62, 121, 0.055);
}

.room-copy strong {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.08;
}

.room-copy small {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.25;
}

.room-side {
  gap: 5px;
}

.room-side time {
  font-size: 12px;
}

.room-badge,
.room-side em {
  width: 22px;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1976d2;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  box-shadow: none;
}

.badge,
.role-pill,
.site-readonly-badge,
.map-coordinate-summary,
.site-result-summary {
  font-family: var(--font-sans);
  font-weight: 700;
  box-shadow: none;
}

.notify-mode,
.time-field legend,
.product-count-options button,
.product-count-stepper strong {
  font-family: var(--font-sans);
  font-weight: 800;
}

.notify-mode,
.notify-mode.is-selected {
  box-shadow: none;
  transform: none;
}

/* db-quiet-typography-2026-06-29
   DB is an office-style editing surface. Keep display font only for page/section
   titles, and make tabs, form rows, badges, and action buttons quiet. */
.db-admin-menu button,
.db-admin-menu strong,
.db-tabs button,
.product-choice-row,
.product-choice-row span,
.product-choice-row strong,
.product-choice-row em,
.product-issue-form > .btn,
.db-edit-actions .btn,
.db-search-box input,
.site-search-submit,
.product-summary-card strong,
.product-summary-card span,
.product-summary-card em,
.product-picker-option strong,
.product-picker-option span,
.product-count-stepper strong,
.product-count-options button {
  font-family: var(--font-sans);
  letter-spacing: 0;
}

.db-admin-menu button {
  min-height: 56px;
  border-color: #d4e3f2;
  background: rgba(247, 250, 254, 0.92);
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 750;
  box-shadow: none;
}

.db-admin-menu button.is-active {
  border-color: #8bbdec;
  background: #ffffff;
  color: #0b4f9c;
  box-shadow: inset 0 0 0 1px rgba(17, 109, 214, 0.08);
}

.db-section-head strong,
.product-issue-head strong {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.12;
}

.product-issue-panel {
  gap: 10px;
  border-width: 1px;
  border-color: #b9d8f7;
  background: rgba(248, 251, 255, 0.88);
  padding: 12px;
  box-shadow: none;
}

.product-summary-card {
  min-height: 48px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px;
  padding: 8px 10px;
}

.product-summary-card strong {
  font-size: 15px;
  font-weight: 800;
}

.product-summary-card span,
.product-summary-card em {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
}

.product-issue-form {
  gap: 7px;
}

.product-choice-row {
  min-height: 50px;
  grid-template-columns: 62px minmax(0, 1fr) 16px;
  gap: 7px;
  border-color: #cfe0f2;
  padding: 8px 10px;
}

.product-choice-row span {
  color: #65748a;
  font-size: 12px;
  font-weight: 700;
}

.product-choice-row strong {
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.22;
}

.product-choice-row em {
  color: #1b75d8;
  font-size: 18px;
  font-weight: 800;
}

.product-issue-form > .btn,
.db-edit-actions .btn {
  min-height: 46px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: none;
}

.db-search-box input {
  min-height: 46px;
  font-size: 14px;
  font-weight: 600;
}

.db-admin-menu button,
.db-admin-menu strong,
.db-search-box > span,
.db-edit-actions .btn,
.site-search-submit,
.product-summary-card strong,
.product-issue-form > .btn {
  font-family: var(--font-display);
  letter-spacing: 0;
}

.db-admin-menu button {
  font-weight: 800;
}

.db-search-box > span {
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 800;
}

.db-edit-actions .btn,
.product-issue-form > .btn {
  font-weight: 800;
}

.product-summary-card strong {
  font-size: 16px;
  font-weight: 800;
}

.product-choice-row span {
  font-family: var(--font-display);
  font-weight: 800;
}

.product-choice-row strong {
  font-family: var(--font-sans);
  font-weight: 800;
}

.product-issue-notice {
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

@media (max-width: 430px) {
  .db-admin-menu button {
    min-height: 54px;
    font-size: 14px;
  }

  .product-issue-panel {
    padding: 10px;
  }

  .product-choice-row {
    min-height: 48px;
  }
}

/* chat-full-bleed-mobile-2026-06-30
   Keep the room from looking like a floating card on mobile browsers. */
@media (max-width: 640px) {
  body:has(.chat-screen) {
    background: #f7fbff;
  }

  .chat-screen {
    width: 100%;
    height: var(--app-vvh);
    min-height: 0;
    padding: 0;
    background: #f7fbff;
  }

  .chat-panel {
    width: 100%;
    height: var(--app-vvh);
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background:
      radial-gradient(circle at 88% 8%, rgba(126, 181, 226, 0.12), transparent 22%),
      #fbfdff;
  }

  .chat-room-head {
    padding-top: max(10px, env(safe-area-inset-top));
    border-radius: 0;
  }

  .chat-feed {
    background: transparent;
  }

  .chat-composer {
    border-top: 1px solid rgba(201, 220, 239, 0.82);
    padding: 9px 12px max(12px, env(safe-area-inset-bottom));
    background: #f8fcff;
    box-shadow: 0 -10px 28px rgba(17, 48, 89, 0.06);
  }
}

/* theme-contrast-polish-2026-06-30
   Global surface contrast pass: keep NEWK colors, make windows readable. */
body {
  background:
    linear-gradient(180deg, #dfe9f3 0%, #edf4fa 52%, #f6f9fd 100%);
}

.app-shell {
  background:
    linear-gradient(135deg, rgba(225, 237, 248, 0.98), rgba(238, 246, 252, 0.96) 48%, rgba(248, 251, 254, 1));
}

.screen:not(.chat-screen) {
  background:
    linear-gradient(180deg, rgba(247, 251, 255, 0.58), rgba(231, 241, 250, 0.4));
}

.panel,
.menu-button,
.account-panel,
.login-panel,
.verify-card,
.db-section-panel,
.db-record-card,
.product-summary-card,
.product-issue-panel,
.site-result-card,
.site-detail-card,
.selected-site-card,
.notification-modal,
.member-modal,
.assignment-modal,
.completion-modal,
.product-confirm-modal,
.db-company-picker,
.composer-tray-head,
.composer-card-window,
.tray-summary {
  border-color: #cbd9e8;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 12px 30px rgba(20, 55, 92, 0.08);
}

.panel,
.menu-button,
.account-panel,
.login-panel,
.verify-card,
.db-section-panel,
.notification-modal {
  border-width: 1px;
}

.field input,
.field select,
.field textarea,
.account-panel .field input,
.account-panel .field select,
.login-panel input,
.verify-card input,
.db-search-box input,
.db-cell-input,
.db-code-input,
.site-detail-form input,
.site-detail-form textarea,
.site-business-other-input,
.completion-modal input,
.completion-modal textarea,
.member-action-form input,
.member-action-form textarea,
.notification-modal input,
.notification-modal select,
.notification-modal textarea,
.composer-row textarea {
  border-color: #c7d8e9;
  background:
    linear-gradient(180deg, #ffffff, #f6faff);
  box-shadow:
    inset 0 1px 2px rgba(20, 55, 92, 0.045),
    inset 0 -1px 0 rgba(255, 255, 255, 0.92);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.db-search-box input:focus,
.db-cell-input:focus,
.db-code-input:focus,
.composer-row textarea:focus {
  border-color: rgba(11, 110, 220, 0.58);
  outline: 2px solid rgba(11, 110, 220, 0.13);
  outline-offset: 0;
  background: #ffffff;
}

.btn.secondary,
.btn.ghost,
.chat-head-button,
.chat-more-button,
.tray-toggle,
.tray-arrow,
.composer-plus-button {
  border-color: #c7d8e9;
  background:
    linear-gradient(180deg, #ffffff, #eef6fd);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 6px 14px rgba(22, 58, 98, 0.06);
}

.modal-backdrop {
  background: rgba(13, 32, 62, 0.54);
  backdrop-filter: blur(2px);
}

.chat-screen {
  background: #dfeaf4;
}

.chat-panel {
  background:
    linear-gradient(180deg, rgba(232, 242, 250, 0.96), rgba(221, 235, 247, 0.94));
}

.chat-feed {
  background:
    linear-gradient(rgba(226, 238, 248, 0.9), rgba(226, 238, 248, 0.9)),
    linear-gradient(90deg, rgba(57, 107, 155, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(57, 107, 155, 0.04) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
}

.message-bubble:not(.is-mine),
.chat-screen .message-bubble:not(.is-mine) {
  border: 1px solid #c8d8e8;
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.message-bubble.is-mine,
.chat-screen .message-bubble.is-mine {
  border: 1px solid #b7d7f4;
  background:
    linear-gradient(180deg, #e6f4ff, #d9ecff);
}

.message-bubble.is-system,
.date-divider,
.chat-date-divider {
  border: 1px solid rgba(185, 205, 225, 0.82);
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(5px);
}

.chat-composer {
  border-top-color: #c5d6e8;
  background:
    linear-gradient(180deg, rgba(248, 252, 255, 0.96), rgba(237, 246, 253, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 -10px 28px rgba(17, 48, 89, 0.08);
}

.db-admin-menu button,
.map-country-toggle,
.account-company-button,
.db-company-select-button,
.product-choice-row,
.site-suggestion-chip {
  border-color: #c6d8ea;
  background:
    linear-gradient(180deg, #ffffff, #f2f8fe);
}

@media (max-width: 640px) {
  .chat-panel {
    background:
      linear-gradient(180deg, #e7f1f9 0%, #dfeaf4 100%);
  }

  .chat-composer {
    background:
      linear-gradient(180deg, rgba(249, 252, 255, 0.98), rgba(239, 247, 253, 1));
  }
}

/* chat-floating-composer-2026-06-30
   Put the input UX over the message canvas, like a messenger dock. */
@media (max-width: 640px) {
  .chat-panel {
    position: relative;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .chat-feed {
    min-height: 0;
    padding-bottom: clamp(176px, 24vh, 220px);
  }

  .chat-composer {
    position: absolute;
    z-index: 8;
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    border: 1px solid #c2d5e8;
    border-radius: 14px;
    background:
      linear-gradient(180deg, #fbfdff, #eef7fe);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.94),
      0 14px 34px rgba(20, 55, 92, 0.16);
    padding: 8px;
  }

  .composer-tray-head {
    border-radius: 11px;
  }

  .composer-card-pager {
    border-radius: 12px;
  }

  .composer-row textarea,
  .chat-screen .composer-row textarea {
    font-size: 15px;
  }

  .composer-plus-button,
  .send-button {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    font-size: 22px;
  }

  .send-button .svg-icon svg,
  .chat-head-button .svg-icon svg,
  .chat-more-button .svg-icon svg {
    width: 22px;
    height: 22px;
  }

  .tray-summary span {
    font-size: 15px;
  }

  .tray-summary small {
    font-size: 11px;
  }
}

/* chat-kakao-scale-2026-06-30
   Raise chat text and icon size to a messenger-readable scale. */
@media (max-width: 640px) {
  .chat-room-head {
    min-height: 76px;
    padding: max(12px, env(safe-area-inset-top)) 14px 11px;
  }

  .chat-back {
    width: 42px;
    height: 42px;
    font-size: 40px;
  }

  .chat-title-row strong {
    font-size: 24px;
    line-height: 1.08;
  }

  .chat-meta-row,
  .chat-meta-row span {
    font-size: 13px;
    line-height: 1.25;
  }

  .chat-head-button,
  .chat-more-button {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    max-height: 46px;
  }

  .chat-head-button .head-icon,
  .chat-more-button .head-icon {
    min-width: 30px;
    height: 30px;
  }

  .chat-head-button .svg-icon svg,
  .chat-more-button .svg-icon svg {
    width: 26px;
    height: 26px;
  }

  .chat-feed {
    gap: 9px;
    padding: 12px 13px clamp(194px, 26vh, 240px);
  }

  .message-bubble,
  .chat-screen .message-bubble {
    max-width: min(86%, 360px);
    border-radius: 13px;
    padding: 10px 13px 8px;
  }

  .message-bubble.is-system,
  .chat-screen .message-bubble.is-system {
    padding: 8px 12px;
  }

  .bubble-name,
  .chat-screen .bubble-name {
    font-size: 13px;
    line-height: 1.2;
  }

  .message-bubble p,
  .chat-screen .message-bubble p {
    font-size: 16px;
    line-height: 1.38;
  }

  .message-bubble time,
  .chat-screen .message-bubble time {
    font-size: 12px;
    line-height: 1.15;
  }

  .chat-composer {
    left: 9px;
    right: 9px;
    bottom: max(9px, env(safe-area-inset-bottom));
    border-radius: 18px;
    padding: 10px;
  }

  .composer-tray-head {
    min-height: 44px;
    grid-template-columns: minmax(0, 1fr) 46px;
    border-radius: 14px;
  }

  .tray-summary {
    min-height: 44px;
    padding: 7px 11px;
  }

  .tray-summary span {
    font-size: 16px;
    line-height: 1.12;
  }

  .tray-summary small {
    font-size: 12px;
    line-height: 1.2;
  }

  .tray-toggle {
    width: 46px;
    min-width: 46px;
    min-height: 44px;
  }

  .composer-card-pager {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 8px;
  }

  .tray-arrow {
    min-height: 72px;
    font-size: 26px;
  }

  .composer-card-window,
  .composer-empty-tray {
    min-height: 72px;
    font-size: 15px;
  }

  .composer-row {
    grid-template-columns: 50px minmax(0, 1fr) 54px;
    gap: 8px;
  }

  .composer-plus-button,
  .send-button {
    width: 50px;
    min-width: 50px;
    height: 50px;
    min-height: 50px;
    font-size: 26px;
  }

  .send-button .svg-icon svg {
    width: 28px;
    height: 28px;
  }

  .composer-row textarea,
  .chat-screen .composer-row textarea {
    min-height: 50px;
    padding: 13px 14px;
    font-size: 17px;
    line-height: 1.35;
  }
}

/* chat-full-width-controls-final-2026-06-30
   Final override: full-width header controls and high-contrast arrows. */
@media (max-width: 640px) {
  .chat-screen .chat-room-head {
    align-items: start;
    row-gap: 8px;
    padding: max(12px, env(safe-area-inset-top)) 14px 12px;
  }

  .chat-screen .chat-title-block {
    display: grid;
    gap: 7px;
  }

  .chat-screen .chat-meta-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .chat-screen .chat-head-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(58px, 1fr));
    gap: 14px;
    padding: 0;
  }

  .chat-screen .chat-head-button,
  .chat-screen .chat-more-button {
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    height: 50px;
    min-height: 50px;
    max-height: none;
    border-radius: 14px;
  }

  .chat-screen .more-toggle em,
  .chat-screen .tray-toggle em {
    min-width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    font-size: 20px;
    box-shadow: 0 8px 16px rgba(11, 110, 220, 0.24);
  }

  .chat-screen .chat-more-panel {
    width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .chat-screen .chat-more-button {
    height: 54px;
    min-height: 54px;
  }

  .chat-screen .composer-tray-head {
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 10px;
  }

  .chat-screen .tray-toggle {
    width: 56px;
    min-width: 56px;
    min-height: 52px;
    border-radius: 14px;
  }

  .chat-screen .tray-arrow {
    min-height: 74px;
    border-color: #9bc8f3;
    background: linear-gradient(180deg, #ffffff, #e7f1fb);
    color: var(--primary);
    font-size: 32px;
    font-weight: 900;
  }
}

/* chat-full-width-controls-2026-06-30
   Use the full chat header width for controls and make collapse arrows obvious. */
@media (max-width: 640px) {
  .chat-screen .chat-room-head {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
    row-gap: 8px;
    padding: max(12px, env(safe-area-inset-top)) 14px 12px;
  }

  .chat-screen .chat-title-block {
    grid-column: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .chat-screen .chat-title-row {
    min-width: 0;
  }

  .chat-screen .chat-meta-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .chat-screen .chat-head-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(58px, 1fr));
    gap: 14px;
    padding: 0;
  }

  .chat-screen .chat-head-button,
  .chat-screen .chat-more-button {
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    height: 50px;
    min-height: 50px;
    border-radius: 14px;
  }

  .chat-screen .more-toggle em,
  .chat-screen .tray-toggle em {
    min-width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    font-size: 20px;
    box-shadow: 0 8px 16px rgba(11, 110, 220, 0.24);
  }

  .chat-screen .chat-more-panel {
    width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
    margin-top: 2px;
  }

  .chat-screen .chat-more-button {
    height: 54px;
    min-height: 54px;
  }

  .chat-screen .composer-tray-head {
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 10px;
  }

  .chat-screen .tray-toggle {
    width: 56px;
    min-width: 56px;
    min-height: 52px;
    border-radius: 14px;
    border-color: #83bdf0;
    background: linear-gradient(180deg, #ffffff, #e8f3ff);
  }

  .chat-screen .tray-arrow {
    min-height: 74px;
    border-color: #9bc8f3;
    background: linear-gradient(180deg, #ffffff, #e7f1fb);
    color: var(--primary);
    font-size: 32px;
    font-weight: 900;
  }
}

/* chat-header-icon-spacing-2026-06-30
   Keep the larger messenger-scale header buttons from crowding together. */
@media (max-width: 640px) {
  .chat-screen .chat-room-head {
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 10px;
  }

  .chat-screen .chat-meta-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .chat-screen .chat-head-actions {
    width: max-content;
    grid-template-columns: repeat(3, 46px);
    gap: 10px;
    padding-left: 4px;
  }

  .chat-screen .chat-head-button,
  .chat-screen .chat-more-button {
    border-radius: 11px;
  }

  .chat-screen .chat-head-button .head-icon,
  .chat-screen .chat-more-button .head-icon {
    min-width: 28px;
    height: 28px;
  }
}

/* chat-kakao-scale-priority-2026-06-30
   Keep final chat readability above earlier compact mobile rules. */
@media (max-width: 640px) {
  .chat-screen .chat-room-head {
    min-height: 76px;
    padding: max(12px, env(safe-area-inset-top)) 14px 11px;
  }

  .chat-screen .chat-room-head .chat-back,
  .chat-screen .chat-back {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    font-size: 40px;
    line-height: 1;
  }

  .chat-screen .chat-title-row strong {
    font-size: 24px;
    line-height: 1.08;
  }

  .chat-screen .chat-meta-row,
  .chat-screen .chat-meta-row span {
    font-size: 13px;
    line-height: 1.25;
  }

  .chat-screen .chat-head-button,
  .chat-screen .chat-more-button {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    max-height: 46px;
  }

  .chat-screen .chat-head-button .head-icon,
  .chat-screen .chat-more-button .head-icon {
    min-width: 30px;
    height: 30px;
  }

  .chat-screen .chat-head-button .svg-icon svg,
  .chat-screen .chat-more-button .svg-icon svg {
    width: 26px;
    height: 26px;
  }

  .chat-screen .message-bubble,
  .chat-screen .message-bubble:not(.has-as-card) {
    max-width: min(86%, 360px);
    border-radius: 13px;
    padding: 10px 13px 8px;
  }

  .chat-screen .message-bubble p,
  .chat-screen .message-bubble.is-compact-system p {
    font-size: 16px;
    line-height: 1.38;
  }

  .chat-screen .message-bubble time,
  .chat-screen .message-bubble.is-compact-system time {
    font-size: 12px;
    line-height: 1.15;
  }

  .chat-screen .message-bubble .bubble-name,
  .chat-screen .message-bubble.is-compact-system .bubble-name {
    font-size: 13px;
    line-height: 1.2;
  }

  .chat-screen .composer-row {
    grid-template-columns: 50px minmax(0, 1fr) 54px;
    gap: 8px;
  }

  .chat-screen .composer-plus-button,
  .chat-screen .send-button {
    width: 50px;
    min-width: 50px;
    height: 50px;
    min-height: 50px;
    font-size: 26px;
  }

  .chat-screen .send-button .svg-icon svg {
    width: 28px;
    height: 28px;
  }

  .chat-screen .composer-row textarea {
    min-height: 50px;
    padding: 13px 14px;
    font-size: 17px;
    line-height: 1.35;
  }
}

/* chat-full-width-controls-final-after-scale-2026-06-30
   Final override after scale rules: full-width controls and visible arrows. */
@media (max-width: 640px) {
  .chat-screen .chat-room-head {
    align-items: start;
    row-gap: 8px;
    padding: max(12px, env(safe-area-inset-top)) 14px 12px;
  }

  .chat-screen .chat-title-block {
    display: grid;
    gap: 7px;
  }

  .chat-screen .chat-meta-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .chat-screen .chat-head-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(58px, 1fr));
    gap: 14px;
    padding: 0;
  }

  .chat-screen .chat-head-button,
  .chat-screen .chat-more-button {
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    height: 50px;
    min-height: 50px;
    max-height: none;
    border-radius: 14px;
  }

  .chat-screen .more-toggle em,
  .chat-screen .tray-toggle em {
    min-width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    font-size: 20px;
    box-shadow: 0 8px 16px rgba(11, 110, 220, 0.24);
  }

  .chat-screen .chat-more-panel {
    width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .chat-screen .chat-more-button {
    height: 54px;
    min-height: 54px;
  }

  .chat-screen .composer-tray-head {
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 10px;
  }

  .chat-screen .tray-toggle {
    width: 56px;
    min-width: 56px;
    min-height: 52px;
    border-radius: 14px;
  }

  .chat-screen .tray-arrow {
    min-height: 74px;
    border-color: #9bc8f3;
    background: linear-gradient(180deg, #ffffff, #e7f1fb);
    color: var(--primary);
    font-size: 32px;
    font-weight: 900;
  }
}

/* chat-header-balance-final-2026-06-30
   Let header controls use the whole header width; only the title text avoids the back button. */
@media (max-width: 640px) {
  .chat-screen .chat-title-block {
    grid-column: 1 / -1;
    width: 100%;
  }

  .chat-screen .chat-title-row,
  .chat-screen .chat-meta-row > span {
    padding-left: 52px;
  }

  .chat-screen .chat-head-actions,
  .chat-screen .chat-more-panel {
    width: 100%;
  }

  .chat-screen .chat-head-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chat-screen .chat-more-panel {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* chat-header-button-shape-final-2026-06-30
   Match top control buttons to the bottom dock button scale instead of stretching them. */
@media (max-width: 640px) {
  .chat-screen .chat-head-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    width: 100%;
  }

  .chat-screen .chat-head-button,
  .chat-screen .chat-head-actions .chat-head-button,
  .chat-screen .chat-head-actions .more-toggle {
    flex: 0 0 56px;
    width: 56px;
    min-width: 56px;
    max-width: 56px;
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    border-radius: 14px;
    padding: 0;
  }

  .chat-screen .chat-head-button .head-icon,
  .chat-screen .chat-head-actions .chat-head-button .head-icon {
    min-width: 32px;
    width: 32px;
    height: 32px;
  }

  .chat-screen .chat-head-button .svg-icon svg,
  .chat-screen .chat-head-actions .chat-head-button .svg-icon svg {
    width: 27px;
    height: 27px;
  }
}

/* chat-header-structured-final-2026-06-30
   Closed header: title/meta row + control row. Expanded header adds one menu row. */
@media (max-width: 640px) {
  .chat-screen .chat-room-head {
    min-height: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
    column-gap: 10px;
    row-gap: 0;
    padding: max(12px, env(safe-area-inset-top)) 14px 12px;
  }

  .chat-screen .chat-back {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: start;
    margin-top: 0;
    z-index: 2;
  }

  .chat-screen .chat-title-block {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-areas:
      "back-space title"
      "back-space meta"
      "actions actions"
      "more more";
    column-gap: 10px;
    row-gap: 5px;
  }

  .chat-screen .chat-title-row {
    grid-area: title;
    padding-left: 0;
  }

  .chat-screen .chat-title-row strong {
    font-size: 24px;
    line-height: 1.05;
  }

  .chat-screen .chat-meta-row {
    display: contents;
  }

  .chat-screen .chat-meta-row > span {
    grid-area: meta;
    padding-left: 0;
    margin-top: 0;
    font-size: 13px;
    line-height: 1.25;
  }

  .chat-screen .chat-head-actions {
    grid-area: actions;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    padding: 7px 0 0;
  }

  .chat-screen .chat-head-actions .chat-head-button,
  .chat-screen .chat-head-actions .more-toggle {
    flex: 0 0 56px;
    width: 56px;
    min-width: 56px;
    max-width: 56px;
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    border-radius: 14px;
  }

  .chat-screen .chat-more-panel {
    grid-area: more;
    width: 100%;
    margin-top: 4px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }
}

/* chat-header-semantic-final-2026-06-30
   Room actions belong beside participant metadata, not as a separate toolbar. */
@media (max-width: 640px) {
  .chat-screen .chat-room-head {
    min-height: 0;
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 0;
    align-items: start;
    padding: max(12px, env(safe-area-inset-top)) 14px 12px;
  }

  .chat-screen .chat-back {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: start;
  }

  .chat-screen .chat-title-block {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: none;
    gap: 5px;
  }

  .chat-screen .chat-title-row {
    grid-area: auto;
    grid-column: 1;
    padding-left: 0;
  }

  .chat-screen .chat-title-row strong {
    font-size: 24px;
    line-height: 1.05;
  }

  .chat-screen .chat-meta-row {
    grid-area: auto;
    grid-column: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }

  .chat-screen .chat-meta-row > span {
    grid-area: auto;
    padding-left: 0;
    margin-top: 0;
    font-size: 13px;
    line-height: 1.25;
  }

  .chat-screen .chat-head-actions {
    grid-area: auto;
    width: auto;
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 8px;
    padding: 0;
  }

  .chat-screen .chat-head-actions .chat-head-button,
  .chat-screen .chat-head-actions .more-toggle {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    border-radius: 12px;
    padding: 0;
  }

  .chat-screen .chat-head-button .head-icon,
  .chat-screen .chat-head-actions .chat-head-button .head-icon {
    min-width: 28px;
    width: 28px;
    height: 28px;
  }

  .chat-screen .chat-head-button .svg-icon svg,
  .chat-screen .chat-head-actions .chat-head-button .svg-icon svg {
    width: 24px;
    height: 24px;
  }

  .chat-screen .more-toggle em {
    min-width: 28px;
    height: 28px;
    font-size: 18px;
  }

  .chat-screen .chat-more-panel {
    grid-area: auto;
    grid-column: 1;
    width: 100%;
    margin-top: 5px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }

  .chat-screen .chat-more-button {
    height: 48px;
    min-height: 48px;
    border-radius: 12px;
  }
}

/* chat-overlay-panels-final-2026-06-30
   Match the room header to the floating composer layer and let non-essential
   panel chrome stay translucent over the chat canvas. */
@media (max-width: 640px) {
  .chat-screen .chat-panel {
    position: relative;
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
    background:
      linear-gradient(180deg, rgba(231, 241, 249, 0.82), rgba(223, 234, 244, 0.74));
  }

  .chat-screen .chat-room-head {
    position: absolute;
    z-index: 9;
    top: max(8px, env(safe-area-inset-top));
    left: 9px;
    right: 9px;
    border: 1px solid rgba(194, 213, 232, 0.54);
    border-radius: 18px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(232, 244, 254, 0.38));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      inset 0 -1px 0 rgba(91, 129, 170, 0.1),
      0 18px 42px rgba(20, 55, 92, 0.2),
      0 5px 12px rgba(255, 255, 255, 0.36);
    backdrop-filter: blur(18px) saturate(1.24);
    -webkit-backdrop-filter: blur(18px) saturate(1.24);
    padding: 10px;
  }

  .chat-screen .chat-feed {
    padding-top: clamp(156px, 23vh, 214px);
    padding-bottom: clamp(194px, 26vh, 240px);
  }

  .chat-screen .chat-title-row strong,
  .chat-screen .chat-meta-row > span {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.84);
  }

  .chat-screen .chat-back,
  .chat-screen .chat-head-button,
  .chat-screen .chat-head-actions .chat-head-button,
  .chat-screen .chat-head-actions .more-toggle,
  .chat-screen .chat-more-button,
  .chat-screen .tray-toggle,
  .chat-screen .tray-arrow,
  .chat-screen .composer-plus-button,
  .chat-screen .send-button,
  .chat-screen .composer-row textarea {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 243, 255, 0.94));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      0 8px 18px rgba(20, 55, 92, 0.13);
  }

  .chat-screen .chat-head-button.notify-always,
  .chat-screen .send-button,
  .chat-screen .more-toggle em,
  .chat-screen .tray-toggle em {
    background: var(--primary);
  }

  .chat-screen .chat-more-panel,
  .chat-screen .chat-composer,
  .chat-screen .composer-tray-head,
  .chat-screen .composer-card-pager {
    border-color: rgba(194, 213, 232, 0.54);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(232, 244, 254, 0.38));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      inset 0 -1px 0 rgba(91, 129, 170, 0.1),
      0 18px 42px rgba(20, 55, 92, 0.2);
    backdrop-filter: blur(18px) saturate(1.24);
    -webkit-backdrop-filter: blur(18px) saturate(1.24);
  }

  .chat-screen .composer-card-window,
  .chat-screen .composer-empty-tray,
  .chat-screen .tray-summary {
    border-color: rgba(208, 224, 240, 0.56);
    background: rgba(255, 255, 255, 0.46);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.76),
      0 8px 18px rgba(20, 55, 92, 0.08);
  }
}

/* dimensional-ui-unification-2026-06-30
   Give the whole monitor UI the same raised, tactile treatment as the chat
   overlays while keeping dense operational screens readable. */
.panel,
.db-section-panel,
.db-record-card,
.db-stat-card,
.product-issue-panel,
.product-summary-card,
.room-item,
.chat-card,
.message-bubble,
.as-message-card,
.site-card,
.site-detail-panel,
.completion-card,
.notification-card,
.modal,
.account-panel,
.login-panel,
.verify-card {
  border-color: rgba(190, 210, 232, 0.76);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 250, 255, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -1px 0 rgba(94, 126, 164, 0.07),
    0 12px 28px rgba(18, 48, 84, 0.1);
}

.btn,
.menu-button,
.room-item,
.chat-head-button,
.chat-more-button,
.composer-plus-button,
.send-button,
.tray-toggle,
.tray-arrow,
.db-admin-menu button,
.db-edit-actions .btn,
.site-detail-room-button,
.site-suggestion-chip,
.product-choice-row,
.account-company-button,
.db-company-select-button,
.map-country-toggle,
.completion-choice,
.completion-part-input .btn,
.notification-action,
.member-action-button {
  border-color: rgba(160, 195, 230, 0.86);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(231, 243, 255, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(63, 102, 148, 0.08),
    0 9px 18px rgba(17, 62, 112, 0.12);
}

.btn.primary,
.send-button,
.chat-head-button.notify-always,
.db-edit-actions .btn[data-action="db-sheet-save"],
.db-edit-actions .btn[data-action="db-sheet-edit"],
.site-detail-room-button.is-primary,
.completion-choice.is-selected {
  background:
    linear-gradient(180deg, #1684f0, var(--primary));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(0, 38, 92, 0.22),
    0 12px 24px rgba(11, 110, 220, 0.24);
}

.btn:active,
.menu-button:active,
.room-item:active,
.chat-head-button:active,
.chat-more-button:active,
.composer-plus-button:active,
.send-button:active,
.tray-toggle:active,
.tray-arrow:active,
.db-admin-menu button:active,
.site-detail-room-button:active,
.product-choice-row:active,
.account-company-button:active,
.db-company-select-button:active,
.map-country-toggle:active,
.completion-choice:active,
.member-action-button:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 5px rgba(30, 65, 105, 0.14),
    0 4px 10px rgba(17, 62, 112, 0.1);
}

input,
select,
textarea,
.db-cell-input,
.db-code-input,
.composer-row textarea,
.site-edit-field input,
.completion-modal input,
.notification-modal input {
  border-color: rgba(176, 204, 234, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 253, 255, 0.94));
  box-shadow:
    inset 0 2px 5px rgba(18, 48, 84, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.8);
}

input:focus,
select:focus,
textarea:focus,
.db-cell-input:focus,
.db-code-input:focus,
.composer-row textarea:focus,
.site-edit-field input:focus {
  border-color: rgba(11, 110, 220, 0.82);
  box-shadow:
    inset 0 2px 5px rgba(18, 48, 84, 0.06),
    0 0 0 3px rgba(11, 110, 220, 0.14),
    0 8px 18px rgba(17, 62, 112, 0.1);
}

.message-bubble.is-mine,
.chat-screen .message-bubble.is-mine {
  background:
    linear-gradient(180deg, rgba(226, 242, 255, 0.98), rgba(203, 231, 255, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 10px 20px rgba(11, 110, 220, 0.13);
}

.message-bubble.is-system,
.chat-screen .message-bubble.is-system {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(239, 246, 253, 0.76));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 7px 16px rgba(18, 48, 84, 0.08);
}

/* icon-button-cleanup-2026-06-30
   Keep strong blue icon buttons dimensional without drawing visible white arcs
   over the glyph area. */
.chat-screen .chat-head-button.notify-always,
.chat-screen .send-button,
.chat-screen .more-toggle em,
.chat-screen .tray-toggle em {
  background:
    linear-gradient(180deg, #1684f0 0%, #0b6edc 72%, #0a62c5 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -2px 0 rgba(0, 45, 105, 0.16),
    0 10px 20px rgba(11, 110, 220, 0.24);
}

.chat-screen .chat-head-button.notify-always .head-icon,
.chat-screen .send-button .svg-icon,
.chat-screen .more-toggle em,
.chat-screen .tray-toggle em {
  background: transparent;
  box-shadow: none;
}

.notification-toast-host {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  z-index: 80;
  display: grid;
  width: min(92vw, 390px);
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.notification-toast {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 9px 12px;
  border: 1px solid rgba(174, 205, 235, 0.78);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(232, 244, 255, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 32px rgba(17, 62, 112, 0.18),
    0 3px 8px rgba(17, 62, 112, 0.1);
  color: var(--ink);
  text-align: left;
  pointer-events: auto;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.notification-toast img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 16px rgba(11, 110, 220, 0.16);
}

.notification-toast strong,
.notification-toast em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-toast strong {
  font-size: 14px;
  font-weight: 900;
}

.notification-toast em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

/* chat-action-blue-restore-2026-06-30
   The dimensional UI pass gives generic buttons a pale surface; chat primary
   actions must keep the strong blue fill so the room controls read correctly. */
.chat-screen .chat-head-button.notify-active,
.chat-screen .send-button {
  border-color: rgba(70, 155, 232, 0.92);
  background:
    linear-gradient(180deg, #1988f4 0%, #0b6edc 72%, #0a62c5 100%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -2px 0 rgba(0, 45, 105, 0.18),
    0 12px 24px rgba(11, 110, 220, 0.24);
}

.chat-screen .chat-head-button.notify-active .head-icon {
  background: transparent;
  color: #ffffff;
  box-shadow: none;
}

.chat-screen .chat-head-button.notify-active .svg-icon svg {
  stroke: #ffffff;
}

.chat-screen .chat-head-button.is-busy {
  pointer-events: none;
  opacity: 0.82;
  filter: saturate(0.9);
}

.chat-screen .chat-head-button.is-busy .head-icon {
  animation: notifyBusyPulse 0.78s ease-in-out infinite alternate;
}

@keyframes notifyBusyPulse {
  from {
    transform: scale(0.96);
  }
  to {
    transform: scale(1.04);
  }
}

.chat-screen .chat-head-button.notify-schedule {
  border-color: rgba(42, 139, 224, 0.9);
  background:
    linear-gradient(180deg, #2b98f4 0%, #1579dc 72%, #1169bf 100%);
}

.chat-screen .chat-head-button.notify-off {
  border-color: rgba(182, 199, 218, 0.86);
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(229, 236, 245, 0.92));
  color: #748196;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 8px 18px rgba(34, 55, 82, 0.08);
}

.chat-screen .chat-head-button.notify-off .head-icon {
  background: rgba(116, 129, 150, 0.12);
  color: #748196;
  box-shadow: none;
}

.chat-screen .chat-head-button.notify-off .svg-icon svg {
  stroke: #748196;
}

.chat-screen .chat-head-button.notify-off,
.chat-screen .chat-head-button.notify-off.notify-active {
  border-color: rgba(182, 199, 218, 0.88) !important;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(226, 234, 244, 0.94)) !important;
  color: #748196 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(82, 103, 130, 0.08),
    0 8px 18px rgba(34, 55, 82, 0.08) !important;
}

.chat-screen .chat-head-button.notify-off .head-icon,
.chat-screen .chat-head-button.notify-off.notify-active .head-icon {
  background: rgba(116, 129, 150, 0.14) !important;
  color: #748196 !important;
  box-shadow: none !important;
}

.chat-screen .chat-head-button.notify-off .svg-icon svg,
.chat-screen .chat-head-button.notify-off.notify-active .svg-icon svg {
  stroke: #748196 !important;
}

/* room-language-top-exit-menu-2026-07-01
   Keep the original globe language control in the header and move room leave
   into the expanded tool menu. */
.chat-screen .chat-head-button.is-language {
  border-color: rgba(134, 190, 238, 0.84);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(231, 243, 255, 0.94));
  color: #0a62c5;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 8px 18px rgba(11, 110, 220, 0.12);
}

.chat-screen .chat-head-button.is-language .head-icon {
  background: rgba(11, 110, 220, 0.1);
  color: #0a62c5;
  box-shadow: none;
}

.chat-screen .chat-head-button.is-language .language-icon svg {
  stroke-width: 2.65;
}

.chat-screen .chat-more-button.is-exit {
  border-color: rgba(188, 199, 213, 0.86);
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.96), rgba(235, 240, 247, 0.94));
  color: #5f6d80;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 7px 15px rgba(35, 54, 78, 0.08);
}

.chat-screen .chat-more-button.is-exit .head-icon {
  min-width: 24px;
  height: 24px;
  background: rgba(95, 109, 128, 0.1);
  box-shadow: none;
}

.chat-screen .chat-more-button.is-exit .svg-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 3.2;
}

@media (max-width: 640px) {
  .chat-screen .chat-more-button.is-exit .head-icon {
    min-width: 26px;
    height: 26px;
  }

  .chat-screen .chat-more-button.is-exit .svg-icon svg {
    width: 23px;
    height: 23px;
  }

  .chat-screen .chat-head-button.is-language .language-icon svg {
    width: 25px;
    height: 25px;
  }
}

.chat-screen .chat-back {
  background: transparent;
  box-shadow: none;
  color: var(--primary);
}

.chat-screen .chat-head-actions .more-toggle,
.chat-screen .tray-toggle {
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  max-height: 52px;
  border-color: rgba(160, 195, 230, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(228, 242, 255, 0.94));
  color: var(--primary);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -1px 0 rgba(63, 102, 148, 0.08),
    0 10px 20px rgba(17, 62, 112, 0.14);
}

.chat-screen .chat-head-actions .more-toggle em,
.chat-screen .tray-toggle em {
  min-width: 32px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: transparent;
  color: var(--primary);
  box-shadow: none;
}

.chat-screen .chat-head-actions {
  grid-template-columns: repeat(3, 52px);
}

.notification-backdrop .notification-modal {
  color: var(--ink);
}

.notification-backdrop .modal-head strong {
  color: var(--primary-dark);
  opacity: 1;
}

.notification-backdrop .notify-mode {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.94));
  color: #52657d;
  opacity: 1;
}

.notification-backdrop .notify-mode.is-selected {
  border-color: rgba(11, 110, 220, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(229, 242, 255, 0.94));
  color: var(--primary);
}

.notification-backdrop .time-grid.is-disabled {
  opacity: 0.72;
  filter: none;
}

.notification-backdrop .time-grid.is-disabled .time-field {
  background: rgba(247, 250, 254, 0.88);
  border-color: rgba(210, 224, 239, 0.86);
}

.notification-backdrop .time-grid.is-disabled input,
.notification-backdrop .time-grid.is-disabled select {
  background: rgba(241, 246, 252, 0.92);
  color: #7b899c;
}

.push-status-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 2px 0 4px;
}

.push-status-panel > div {
  padding: 12px 14px;
  border: 1px solid rgba(186, 210, 232, 0.78);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.push-status-panel span {
  display: block;
  margin-bottom: 5px;
  color: #6d7b8e;
  font-size: 12px;
  font-weight: 800;
}

.push-status-panel strong {
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 900;
}

.push-status-message {
  margin: -2px 0 2px;
  color: #0b6edc;
  font-size: 13px;
  font-weight: 800;
}

.notification-backdrop .actions .btn {
  border-color: rgba(70, 155, 232, 0.92);
  background:
    linear-gradient(180deg, #1988f4 0%, #0b6edc 72%, #0a62c5 100%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 12px 24px rgba(11, 110, 220, 0.24);
}

.notification-backdrop .actions .btn.ghost {
  border-color: rgba(181, 207, 231, 0.95);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(235, 245, 255, 0.92));
  color: var(--primary);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 8px 18px rgba(92, 137, 179, 0.12);
}

.push-permission-modal {
  gap: 14px;
}

.push-permission-body {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(190, 210, 232, 0.82);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(235, 246, 255, 0.88));
}

.push-permission-body img {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(11, 110, 220, 0.14);
}

.push-permission-body strong {
  display: block;
  color: var(--primary-dark);
  font-size: 16px;
  line-height: 1.32;
}

.push-permission-body p,
.push-permission-warning {
  margin: 6px 0 0;
  color: #52657d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.push-permission-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 12px 12px 32px;
  border: 1px solid rgba(210, 224, 239, 0.86);
  border-radius: 10px;
  background: rgba(247, 250, 254, 0.92);
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.4;
}

.push-permission-warning {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 199, 116, 0.72);
  border-radius: 10px;
  background: rgba(255, 248, 232, 0.94);
  color: #8a5b0a;
}

.push-permission-actions {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.push-permission-actions.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.push-permission-actions .btn {
  min-height: 56px;
  border-color: rgba(160, 195, 230, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(231, 243, 255, 0.94));
  color: var(--primary-dark);
  font-weight: 950;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 9px 18px rgba(17, 62, 112, 0.12);
}

.push-permission-actions .btn.primary {
  border-color: rgba(70, 155, 232, 0.92);
  background:
    linear-gradient(180deg, #1988f4 0%, #0b6edc 72%, #0a62c5 100%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 12px 24px rgba(11, 110, 220, 0.24);
}

.push-permission-actions .btn[disabled] {
  border-color: rgba(182, 199, 218, 0.86);
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(229, 236, 245, 0.92));
  color: #748196;
  box-shadow: none;
}

.login-panel .login-submit {
  border-color: rgba(70, 155, 232, 0.92);
  background:
    linear-gradient(180deg, #1988f4 0%, #0b6edc 72%, #0a62c5 100%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -2px 0 rgba(0, 45, 105, 0.18),
    0 12px 24px rgba(11, 110, 220, 0.24);
}

.login-panel .login-submit:hover {
  background:
    linear-gradient(180deg, #177ee2 0%, #0a62c5 100%);
}

.login-wrap .install-app-section {
  width: 100%;
  margin-top: 14px;
  padding: 0 2px;
  display: grid;
  gap: 9px;
}

.login-wrap .install-app-section > strong {
  color: #6b7b90;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.login-wrap .install-app-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.login-wrap .install-app-pill {
  min-height: 54px;
  display: grid;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(141, 154, 170, 0.34);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(242, 247, 252, 0.88));
  color: #687484;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 7px 14px rgba(70, 83, 102, 0.06);
}

.login-wrap .install-app-pill.is-primary {
  border-color: rgba(70, 155, 232, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(230, 243, 255, 0.94));
  color: var(--primary-dark);
}

.login-wrap .install-app-pill em {
  color: #0b6edc;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.login-wrap .install-helper-button {
  min-height: 40px;
  border: 1px solid rgba(181, 207, 231, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #6b7b90;
  font-size: 12px;
  font-weight: 900;
}

.install-tutorial-backdrop {
  align-items: center;
  padding: 16px;
}

.install-tutorial-modal {
  width: min(100%, 520px);
  max-height: calc(100dvh - 32px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 10px;
  border: 1px solid rgba(184, 211, 237, 0.92);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 255, 0.96));
  padding: 16px;
  box-shadow: 0 24px 54px rgba(5, 29, 61, 0.28);
}

.install-tutorial-modal .modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.install-tutorial-modal .modal-head strong {
  color: var(--primary-dark);
  font-size: 20px;
  line-height: 1.18;
  font-weight: 900;
}

.install-tutorial-modal p {
  margin: 0;
  color: #5e6e82;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.38;
}

.install-tutorial-image {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(199, 219, 238, 0.8);
  border-radius: 14px;
  background: #ffffff;
}

.install-tutorial-image.has-arrow {
  position: relative;
}

.install-tutorial-arrow {
  position: absolute;
  right: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  background: rgba(8, 102, 205, 0.94);
  color: #ffffff;
  padding: 10px 13px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 12px 24px rgba(4, 36, 82, 0.25);
}

.install-tutorial-arrow::before {
  content: "?ш린";
  display: inline-grid;
  place-items: center;
}

.install-tutorial-arrow::after {
  content: "\2198";
  font-size: 20px;
  line-height: 1;
}

.install-tutorial-image img {
  display: block;
  width: 100%;
  max-height: min(52dvh, 470px);
  object-fit: contain;
}

.install-tutorial-copy {
  min-height: 48px;
  border: 1px solid rgba(70, 155, 232, 0.92);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #1988f4 0%, #0b6edc 72%, #0a62c5 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(11, 110, 220, 0.2);
}

.install-tutorial-copy-result {
  display: block;
  margin-top: -3px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.install-tutorial-card {
  min-height: min(42dvh, 360px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px solid rgba(199, 219, 238, 0.8);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #ffffff, #f1f8ff);
  text-align: center;
}

.install-tutorial-card b {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background:
    linear-gradient(180deg, #1788f4, #0b6edc);
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 16px 28px rgba(11, 110, 220, 0.22);
}

.install-tutorial-card span {
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 900;
}

.install-tutorial-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.install-tutorial-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(97, 123, 153, 0.28);
}

.install-tutorial-dots span.is-active {
  width: 20px;
  background: var(--primary);
}

.install-tutorial-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 8px;
}

.install-tutorial-actions .btn {
  min-height: 46px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 900;
}

.install-tutorial-actions .btn:not(.secondary) {
  border-color: rgba(70, 155, 232, 0.92) !important;
  background:
    linear-gradient(180deg, #1988f4 0%, #0b6edc 72%, #0a62c5 100%) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 12px 24px rgba(11, 110, 220, 0.24) !important;
}

.install-tutorial-actions .btn.secondary {
  border-color: rgba(181, 207, 231, 0.95) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(235, 245, 255, 0.92)) !important;
  color: #617084 !important;
}

.login-wrap button.install-app-pill {
  font: inherit;
  cursor: pointer;
}

.login-wrap .install-app-pill span:last-child {
  min-width: 0;
}

@media (max-width: 360px) {
  .login-wrap .install-app-list {
    grid-template-columns: 1fr;
  }

  .login-wrap .install-app-pill {
    justify-content: flex-start;
    padding-inline: 14px;
  }
}

.menu-grid .menu-button {
  min-height: 264px;
  align-content: end;
  padding: 0;
  text-align: left;
  background: #f6fbff;
}

.menu-grid .menu-card-art {
  position: relative;
  inset: auto;
}

.menu-grid .menu-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar .brand-logo {
  width: 230px;
  max-width: min(60vw, 230px);
}

.topbar.has-icon-back .brand-logo,
.topbar .brand-logo-small {
  width: 164px;
  max-width: min(42vw, 164px);
}

.topbar.has-icon-back .brand-logo-compact,
.topbar .brand-logo-compact {
  width: 150px;
  max-width: min(34vw, 150px);
}

.topbar .brand strong {
  font-size: 20px;
  line-height: 1.08;
}

.topbar .brand strong::before {
  content: none;
}

.topbar-actions {
  align-self: start;
}

/* Keep the empty AS tray quiet until a drag assignment needs a visible target. */
.chat-screen .composer-empty-tray {
  border-color: transparent;
  border-style: solid;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: none;
}

.chat-screen.is-assigning .composer-empty-tray {
  border-color: #8abdf0;
  border-style: dashed;
  background: rgba(238, 245, 252, 0.9);
  box-shadow: inset 0 0 0 2px rgba(17, 109, 214, 0.08);
}

/* db-quiet-borders-2026-06-30
   DB pages were reading as stacked boxes. Keep borders for inputs and commands,
   but let sections, tabs, and product cards separate through spacing and tone. */
.db-page-head {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  padding: 4px 0 10px;
}

.db-page-head .chat-title-block {
  gap: 5px;
}

.db-page-head .brand-logo {
  margin-bottom: 4px;
}

.db-admin-shell {
  gap: 10px;
}

.db-admin-menu {
  gap: 6px;
}

.db-admin-menu button {
  border-color: transparent;
  border-bottom-color: transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: none;
}

.db-admin-menu button.is-active {
  border-color: transparent;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(20, 55, 92, 0.08);
  transform: none;
}

.db-section-panel,
.product-issue-panel {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: 0 14px 34px rgba(20, 55, 92, 0.08);
}

.product-summary-card {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 7px 16px rgba(20, 55, 92, 0.06);
}

.product-choice-row {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(190, 211, 231, 0.34);
}

.db-search-box input {
  border-width: 1px;
  border-color: rgba(170, 199, 226, 0.7);
}

/* server-polish-2026-06-30
   Make the AS room header brand feel intentional, and remove visible blue
   outlines from the chat composer surfaces so they float off the background. */
.topbar.has-icon-back .brand-logo,
.topbar.has-icon-back .brand-logo-compact,
.chat-room-head.map-room-head .brand-logo,
.chat-room-head.map-room-head .brand-logo-compact,
.db-page-head .brand-logo,
.db-page-head .brand-logo-compact {
  width: 214px;
  max-width: min(54vw, 214px);
}

.topbar.has-icon-back .brand {
  gap: 7px;
}

.topbar.has-icon-back .brand strong {
  font-size: 24px;
}

@media (max-width: 380px) {
  .topbar.has-icon-back .brand-logo,
  .topbar.has-icon-back .brand-logo-compact,
  .chat-room-head.map-room-head .brand-logo,
  .chat-room-head.map-room-head .brand-logo-compact,
  .db-page-head .brand-logo,
  .db-page-head .brand-logo-compact {
    width: 190px;
    max-width: min(55vw, 190px);
  }

  .topbar.has-icon-back .brand strong {
    font-size: 22px;
  }
}

.chat-screen .chat-panel {
  border-color: transparent !important;
  box-shadow:
    0 20px 48px rgba(20, 55, 92, 0.14),
    0 4px 14px rgba(255, 255, 255, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.66) !important;
}

.chat-screen .chat-composer,
.chat-screen .composer-card-pager,
.chat-screen .composer-card-window {
  border-color: transparent !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(234, 245, 255, 0.42)) !important;
  box-shadow:
    0 16px 34px rgba(19, 56, 94, 0.15),
    0 2px 8px rgba(255, 255, 255, 0.66),
    inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
}

.chat-screen .tray-arrow,
.chat-screen .tray-toggle,
.chat-screen .composer-plus-button {
  border-color: transparent !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(234, 245, 255, 0.66)) !important;
  box-shadow:
    0 12px 26px rgba(20, 55, 92, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

.chat-screen .composer-row textarea,
.chat-screen .composer-row textarea:focus {
  border-color: rgba(10, 74, 138, 0.26) !important;
  box-shadow:
    0 12px 26px rgba(20, 55, 92, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 0 0 1px rgba(255, 255, 255, 0.42) !important;
}

.db-page-head strong::before {
  content: none !important;
}

/* card-tray-2026-06-30
   The chat AS tray should read as one tactile gray-blue surface, with the
   active card filling the swipe window and drop affordance appearing on drag. */
.chat-screen .composer-card-pager {
  grid-template-columns: 42px minmax(0, 1fr) 42px !important;
  gap: 8px !important;
  align-items: stretch !important;
  min-height: 96px !important;
  padding: 6px !important;
  border-radius: 19px !important;
  background:
    linear-gradient(180deg, rgba(231, 242, 251, 0.86), rgba(213, 230, 244, 0.74)) !important;
  box-shadow:
    0 18px 36px rgba(19, 56, 94, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(130, 168, 202, 0.12) !important;
}

.chat-screen .composer-card-window {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch !important;
  min-height: 84px !important;
  height: 100% !important;
  padding: 6px !important;
  border-radius: 15px !important;
  background:
    linear-gradient(180deg, rgba(226, 239, 249, 0.9), rgba(207, 226, 242, 0.78)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -1px 0 rgba(124, 162, 197, 0.14),
    0 8px 18px rgba(20, 55, 92, 0.08) !important;
}

.chat-screen .composer-as-button {
  width: 100% !important;
  height: 100% !important;
  min-height: 72px !important;
  align-self: stretch !important;
  padding: 11px 13px !important;
  border-color: transparent !important;
  border-radius: 12px !important;
  background:
    linear-gradient(180deg, rgba(239, 247, 253, 0.94), rgba(218, 234, 247, 0.88)) !important;
  box-shadow:
    0 10px 22px rgba(17, 63, 108, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(116, 158, 195, 0.14) !important;
}

.chat-screen .tray-arrow {
  min-height: 96px !important;
  border-radius: 14px !important;
  background:
    linear-gradient(180deg, rgba(235, 245, 253, 0.94), rgba(211, 229, 244, 0.84)) !important;
  box-shadow:
    0 12px 24px rgba(20, 55, 92, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -1px 0 rgba(124, 162, 197, 0.16) !important;
}

.chat-panel.is-card-dragging .chat-feed {
  opacity: 1 !important;
  filter: none !important;
  border-color: rgba(17, 109, 214, 0.22) !important;
  border-style: dashed !important;
  background:
    linear-gradient(180deg, rgba(230, 241, 250, 0.72), rgba(214, 231, 245, 0.64)) !important;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.44),
    0 0 0 2px rgba(17, 109, 214, 0.08) !important;
}

.chat-screen .chat-feed.is-chat-drop-zone {
  border-color: rgba(17, 109, 214, 0.22) !important;
}

.chat-screen .chat-feed.is-drop-target {
  border-color: rgba(17, 109, 214, 0.92) !important;
  background:
    linear-gradient(180deg, rgba(221, 239, 255, 0.92), rgba(199, 224, 247, 0.86)) !important;
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.66),
    0 0 0 4px rgba(17, 109, 214, 0.18),
    0 18px 34px rgba(17, 109, 214, 0.16) !important;
}

@media (max-width: 380px) {
  .chat-screen .composer-card-pager {
    grid-template-columns: 38px minmax(0, 1fr) 38px !important;
    gap: 6px !important;
    min-height: 90px !important;
    padding: 5px !important;
  }

  .chat-screen .tray-arrow {
    min-height: 90px !important;
  }

  .chat-screen .composer-card-window {
    min-height: 80px !important;
    padding: 5px !important;
  }

  .chat-screen .composer-as-button {
    min-height: 70px !important;
    padding: 9px 11px !important;
  }
}

/* card-info-2026-06-30 */
.chat-screen .composer-as-button .as-card-title strong {
  font-size: 17px !important;
  line-height: 1.12 !important;
}

.chat-screen .composer-as-button .as-card-date {
  font-size: 12px !important;
  line-height: 1.2 !important;
}

.chat-screen .composer-as-button .as-card-title b {
  min-height: 22px !important;
  font-size: 11px !important;
  padding: 0 7px !important;
}

.chat-screen .composer-as-button .assignment-label,
.chat-screen .composer-as-button small,
.chat-screen .composer-as-button span {
  font-size: 12px !important;
  line-height: 1.25 !important;
}

.as-message-meta {
  gap: 7px;
}

.as-message-meta span {
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
}

.as-message-meta span em {
  color: #61748e;
  font-size: 14px;
}

.as-message-meta .as-info-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(238, 247, 254, 0.96), rgba(214, 232, 247, 0.86));
  color: var(--primary);
  box-shadow:
    0 4px 9px rgba(17, 63, 108, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.as-message-meta .as-info-icon svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.as-message-meta span strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.32;
}

/* drag-cue-2026-06-30 */
.chat-screen.is-assigning .composer-card-pager::before,
.chat-screen.is-assigning .composer-card-pager::after,
.composer-as-button.is-dragging::after {
  content: none !important;
  display: none !important;
}

.assignment-person-card {
  position: relative;
  padding-right: 42px;
}

.assignment-person-card::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 4px;
  height: 22px;
  transform: translateY(-50%);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(11, 110, 220, 0.72) 0 2px, transparent 2.4px) 0 0 / 4px 7px repeat-y;
  opacity: 0.72;
}

.assignment-person-card.is-dragging {
  border-color: #0b6edc !important;
  outline: 4px solid rgba(11, 110, 220, 0.26) !important;
  background:
    linear-gradient(180deg, rgba(238, 247, 254, 0.98), rgba(215, 234, 249, 0.92)) !important;
  box-shadow:
    0 16px 32px rgba(17, 63, 108, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
  transform: translateY(-2px) scale(1.015);
}

.chat-screen.is-assigning .composer-card-pager {
  border: 2px solid rgba(11, 110, 220, 0.78) !important;
  background:
    linear-gradient(180deg, rgba(225, 240, 253, 0.96), rgba(203, 225, 245, 0.9)) !important;
  box-shadow:
    0 0 0 4px rgba(11, 110, 220, 0.13),
    0 18px 36px rgba(17, 63, 108, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
  transform: translateY(-2px);
}

.chat-screen.is-assigning .composer-as-button {
  border-color: rgba(11, 110, 220, 0.62) !important;
  outline: 2px solid rgba(11, 110, 220, 0.12) !important;
  box-shadow:
    0 12px 24px rgba(17, 63, 108, 0.17),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72) !important;
}

.chat-screen .composer-as-button.is-assign-hover {
  border-color: #075fbe !important;
  outline: 5px solid rgba(11, 110, 220, 0.3) !important;
  background:
    linear-gradient(180deg, rgba(235, 247, 255, 1), rgba(199, 226, 249, 0.96)) !important;
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.62),
    0 20px 38px rgba(11, 110, 220, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  transform: translateY(-3px) scale(1.025) !important;
}

.chat-screen .composer-as-button .as-card-title::after {
  content: "";
  justify-self: end;
  width: 18px;
  height: 4px;
  margin-top: 3px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(11, 110, 220, 0.7) 0 2px, transparent 2.3px) 0 0 / 7px 4px repeat-x;
  opacity: 0.54;
}

/* chat-logo-2026-06-30 */
.chat-screen .chat-brand-mark {
  min-width: 0;
  display: flex;
  align-items: center;
  height: 22px;
  margin-bottom: 1px;
  overflow: hidden;
}

.chat-screen .chat-brand-mark .brand-logo,
.chat-screen .chat-brand-mark .brand-logo-compact {
  width: 122px !important;
  max-width: min(38vw, 122px) !important;
  height: auto;
  display: block;
  object-fit: contain;
}

.chat-screen .chat-room-head {
  padding-top: max(13px, env(safe-area-inset-top)) !important;
}

.chat-screen .chat-title-block {
  gap: 4px !important;
}

.chat-screen .chat-title-row strong {
  line-height: 1.02 !important;
}

@media (max-width: 380px) {
  .chat-screen .chat-brand-mark {
    height: 20px;
  }

  .chat-screen .chat-brand-mark .brand-logo,
  .chat-screen .chat-brand-mark .brand-logo-compact {
    width: 108px !important;
    max-width: min(37vw, 108px) !important;
  }
}

/* product-management-structure-2026-06-30 */
.product-management-home,
.product-management-subview {
  gap: 16px;
}

.product-management-actions {
  display: grid;
  gap: 16px;
}

.product-management-card {
  width: 100%;
  min-height: 128px;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(207, 226, 246, 0.7);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 254, 0.88)),
    #ffffff;
  color: var(--ink);
  padding: 18px;
  text-align: left;
  box-shadow: 0 14px 30px rgba(20, 55, 92, 0.08);
}

.product-action-icon {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
  background: #03070d;
}

.product-action-copy {
  min-width: 0;
  display: block;
}

.product-management-card strong {
  display: block;
  color: var(--primary-dark);
  font-size: 23px;
  line-height: 1.12;
}

.product-action-copy > span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
}

.product-management-card em {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #edf4fb;
  color: var(--primary);
  font-size: 28px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.product-subpage-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.product-subpage-head .chat-back {
  width: 34px;
  height: 34px;
  align-self: start;
}

.product-subpage-head strong {
  display: block;
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.08;
}

.product-subpage-head span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.product-management-subview .product-issue-panel {
  border-color: #cfe2f6;
  background:
    linear-gradient(135deg, rgba(17, 109, 214, 0.08), rgba(255, 255, 255, 0.96) 54%),
    #f8fbff;
}

.product-management-subview .product-issue-preview {
  grid-column: 1 / -1;
}

.product-management-subview .product-issue-form {
  grid-template-columns: minmax(0, 1fr);
}

.product-management-subview .product-choice-row,
.product-management-subview .product-issue-form > .btn {
  min-height: 58px;
}

.product-result-card {
  gap: 12px;
}

.product-result-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.product-result-actions,
.product-detail-actions {
  display: flex;
  justify-content: end;
  gap: 8px;
}

.product-result-actions .btn,
.product-detail-actions .btn {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 13px;
}

.product-record-detail-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #d7e6f8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
  box-shadow: 0 8px 18px rgba(17, 109, 214, 0.06);
}

@media (max-width: 560px) {
  .product-management-actions {
    gap: 14px;
  }

  .product-management-card {
    min-height: 122px;
    grid-template-columns: 78px minmax(0, 1fr) 30px;
    gap: 14px;
    padding: 16px;
  }

  .product-action-icon {
    width: 78px;
    height: 78px;
  }

  .product-management-card strong {
    font-size: 21px;
  }

  .product-action-copy > span {
    font-size: 13px;
  }

  .product-management-card em {
    width: 30px;
    height: 30px;
    font-size: 24px;
  }

  .product-summary-card {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .product-summary-card span,
  .product-summary-card em {
    width: fit-content;
  }

  .product-issue-form,
  .product-result-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-result-actions,
  .product-detail-actions {
    justify-content: stretch;
  }

  .product-result-actions .btn,
  .product-detail-actions .btn {
    flex: 1 1 0;
  }
}

/* chat-head-compact-2026-06-30
   Keep the header pieces the same size, but stop the action buttons from
   owning a separate row-height inside the title flow. */
@media (max-width: 640px) {
  .chat-screen .chat-room-head {
    padding: max(8px, env(safe-area-inset-top)) 12px 9px !important;
  }

  .chat-screen .chat-title-block {
    position: relative;
    grid-column: 2 !important;
    gap: 2px !important;
    padding-right: 0;
  }

  .chat-screen .chat-brand-mark {
    height: 18px;
    margin-bottom: 0;
  }

  .chat-screen .chat-brand-mark .brand-logo,
  .chat-screen .chat-brand-mark .brand-logo-compact {
    width: 122px !important;
    max-width: min(38vw, 122px) !important;
  }

  .chat-screen .chat-title-row strong {
    line-height: 0.98 !important;
  }

  .chat-screen .chat-meta-row {
    display: block !important;
    min-height: 16px;
  }

  .chat-screen .chat-meta-row > span {
    display: block;
    max-width: 100%;
    padding-right: 154px;
    font-size: 13px;
    line-height: 1.12;
  }

  .chat-screen .chat-head-actions {
    position: absolute;
    right: 0;
    top: 50%;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 8px;
    padding: 0;
    transform: translateY(-50%);
  }
}

/* chat-more-flow-fix-2026-06-30
   Expanded room actions should push the header open instead of floating over
   the title or the first messages. */
@media (max-width: 640px) {
  .chat-screen .chat-room-head {
    overflow: visible;
  }

  .chat-screen .chat-room-head.is-more-open {
    padding-bottom: 12px !important;
  }

  .chat-screen .chat-room-head.is-more-open .chat-title-block {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-areas:
      "back-space brand"
      "back-space title"
      "back-space meta"
      "actions actions"
      "more more";
    row-gap: 5px;
  }

  .chat-screen .chat-room-head.is-more-open .chat-brand-mark {
    grid-area: brand;
  }

  .chat-screen .chat-room-head.is-more-open .chat-title-row {
    grid-area: title;
  }

  .chat-screen .chat-room-head.is-more-open .chat-meta-row {
    display: contents !important;
  }

  .chat-screen .chat-room-head.is-more-open .chat-meta-row > span {
    grid-area: meta;
    padding-right: 0 !important;
  }

  .chat-screen .chat-room-head.is-more-open .chat-head-actions {
    grid-area: actions;
    position: static !important;
    width: 100%;
    transform: none !important;
    justify-content: end;
    gap: 8px;
    padding-top: 4px;
  }

  .chat-screen .chat-room-head.is-more-open .chat-more-panel {
    grid-area: more;
    position: static;
    width: 100%;
    margin-top: 2px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    transform: none;
  }

  .chat-screen:has(.chat-room-head.is-more-open) .chat-feed {
    padding-top: clamp(218px, 32vh, 286px);
  }
}

/* chat-more-two-line-2026-06-30
   Expanded state: meta + primary actions on one row, secondary actions on the
   next row. Keep the header compact while preserving a non-overlap feed offset. */
@media (max-width: 640px) {
  .chat-screen .chat-room-head.is-more-open {
    padding: max(9px, env(safe-area-inset-top)) 12px 10px !important;
  }

  .chat-screen .chat-room-head.is-more-open .chat-title-block {
    grid-column: 2 !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "brand brand"
      "title title"
      "meta actions"
      "more more" !important;
    column-gap: 8px;
    row-gap: 4px;
    align-items: center;
  }

  .chat-screen .chat-room-head.is-more-open .chat-title-row strong {
    font-size: 23px;
    line-height: 1.02;
  }

  .chat-screen .chat-room-head.is-more-open .chat-head-actions {
    grid-area: actions;
    justify-content: end;
    gap: 6px;
    padding-top: 0;
  }

  .chat-screen .chat-room-head.is-more-open .chat-head-actions .chat-head-button,
  .chat-screen .chat-room-head.is-more-open .chat-head-actions .more-toggle {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    border-radius: 12px;
  }

  .chat-screen .chat-room-head.is-more-open .chat-more-panel {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding: 7px;
  }

  .chat-screen .chat-room-head.is-more-open .chat-more-button {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    border-radius: 12px;
  }

  .chat-screen .chat-room-head.is-more-open .chat-more-button .head-icon {
    min-width: 27px;
    height: 27px;
  }

  .chat-screen .chat-room-head.is-more-open .chat-more-button .svg-icon svg {
    width: 23px;
    height: 23px;
  }

  .chat-screen:has(.chat-room-head.is-more-open) .chat-feed {
    padding-top: clamp(188px, 27vh, 238px);
  }
}

@media (max-width: 380px) {
  .chat-screen .chat-room-head {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .chat-screen .chat-title-block {
    padding-right: 0;
  }

  .chat-screen .chat-meta-row > span {
    padding-right: 140px;
  }

  .chat-screen .chat-head-actions {
    gap: 6px;
  }
}

/* chat-header-consistent-expand-2026-06-30
   Keep closed and open headers on the same skeleton. Opening the menu should
   only reveal one extra row, not rearrange the title and primary buttons. */
@media (max-width: 640px) {
  .chat-screen .chat-room-head,
  .chat-screen .chat-room-head.is-more-open {
    padding: max(9px, env(safe-area-inset-top)) 12px 10px !important;
  }

  .chat-screen .chat-title-block,
  .chat-screen .chat-room-head.is-more-open .chat-title-block {
    grid-column: 2 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "brand brand"
      "title title"
      "meta actions"
      "more more" !important;
    column-gap: 8px;
    row-gap: 4px;
    align-items: center;
  }

  .chat-screen .chat-brand-mark {
    grid-area: brand;
  }

  .chat-screen .chat-title-row {
    grid-area: title;
  }

  .chat-screen .chat-title-row strong,
  .chat-screen .chat-room-head.is-more-open .chat-title-row strong {
    font-size: 23px;
    line-height: 1.02;
  }

  .chat-screen .chat-meta-row {
    display: contents !important;
  }

  .chat-screen .chat-meta-row > span,
  .chat-screen .chat-room-head.is-more-open .chat-meta-row > span {
    grid-area: meta;
    padding-right: 0 !important;
    margin-top: 0;
  }

  .chat-screen .chat-head-actions,
  .chat-screen .chat-room-head.is-more-open .chat-head-actions {
    grid-area: actions;
    position: static !important;
    width: auto;
    transform: none !important;
    justify-content: end;
    gap: 6px;
    padding-top: 0;
  }

  .chat-screen .chat-head-actions .chat-head-button,
  .chat-screen .chat-head-actions .more-toggle,
  .chat-screen .chat-room-head.is-more-open .chat-head-actions .chat-head-button,
  .chat-screen .chat-room-head.is-more-open .chat-head-actions .more-toggle {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    border-radius: 12px;
  }

  .chat-screen .chat-more-panel,
  .chat-screen .chat-room-head.is-more-open .chat-more-panel {
    grid-area: more;
    position: static !important;
    width: 100%;
    margin-top: 2px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding: 7px;
    transform: none !important;
  }

  .chat-screen .chat-more-button,
  .chat-screen .chat-room-head.is-more-open .chat-more-button {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    border-radius: 12px;
  }

  .chat-screen:has(.chat-room-head.is-more-open) .chat-feed {
    padding-top: clamp(188px, 27vh, 238px);
  }
}

/* chat-brand-assets-2026-06-30 */
.send-button {
  overflow: hidden;
}

.send-button img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(3, 44, 101, 0.18));
}

.chat-screen .send-button img {
  width: 36px;
  height: 36px;
}

.as-message-card {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(238, 248, 255, 0.78)),
    #ffffff;
}

.as-message-card::before {
  content: "";
  position: absolute;
  inset: -8% -10% -12% -4%;
  z-index: -1;
  background: url("/monitor/assets/chat/as-card-cloud.png?v=chat-brand-send-12") right center / 92% auto no-repeat;
  opacity: 0.72;
  pointer-events: none;
}

.as-message-card > * {
  position: relative;
  z-index: 1;
}

/* chat-card-size-send-contrast-2026-06-30 */
.message-bubble.has-as-card,
.chat-screen .message-bubble.has-as-card {
  width: min(78vw, 360px);
  max-width: min(78vw, 360px);
  padding: 12px 13px 10px;
}

.message-bubble.has-as-card.is-mine,
.chat-screen .message-bubble.has-as-card.is-mine {
  justify-self: end;
}

.message-bubble.has-as-card.is-other,
.chat-screen .message-bubble.has-as-card.is-other {
  justify-self: start;
}

.message-bubble.has-as-card .as-message-card {
  min-height: 190px;
  width: 100%;
}

.message-bubble.has-as-card p {
  font-size: 18px;
  line-height: 1.34;
}

.send-button,
.chat-screen .send-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(226, 241, 255, 0.94)) !important;
  border: 1px solid rgba(138, 189, 240, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 8px 18px rgba(20, 55, 92, 0.14) !important;
}

.send-button img,
.chat-screen .send-button img {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 2px 3px rgba(3, 44, 101, 0.2));
}

/* form-clean-2026-06-30 */
.product-record-detail-panel {
  gap: 8px !important;
  border-color: transparent !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.product-record-detail-panel > .db-section-head {
  border: 1px solid rgba(207, 226, 246, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  padding: 12px;
  box-shadow: 0 8px 18px rgba(17, 62, 112, 0.06);
}

.product-record-detail-panel > .db-record-card {
  gap: 0 !important;
  border-color: rgba(213, 228, 243, 0.9) !important;
  background: rgba(255, 255, 255, 0.74) !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(17, 62, 112, 0.07) !important;
}

.product-record-detail-panel .db-record-head {
  padding: 13px 14px 11px;
  border-bottom: 1px solid rgba(220, 233, 246, 0.9);
  background: rgba(247, 251, 255, 0.72);
}

.product-record-detail-panel .db-record-fields {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
  padding: 0 12px 12px;
}

.product-record-detail-panel .db-record-field {
  min-height: 46px !important;
  grid-template-columns: 78px minmax(0, 1fr) !important;
  gap: 10px !important;
  border-width: 0 0 1px !important;
  border-color: rgba(226, 236, 247, 0.92) !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 8px 0 !important;
  box-shadow: none !important;
}

.product-record-detail-panel .db-record-field:last-child {
  border-bottom: 0 !important;
}

.product-record-detail-panel .db-record-field > span {
  color: #64758d;
  font-size: 12px;
}

.product-record-detail-panel .db-record-field > strong {
  font-size: 14px;
  font-weight: 800;
}

.product-record-detail-panel .db-cell-input,
.product-record-detail-panel .db-code-input,
.product-record-detail-panel .site-business-other-input {
  min-height: 36px !important;
  border-color: rgba(194, 215, 237, 0.82) !important;
  border-radius: 7px !important;
  background: rgba(255, 255, 255, 0.84) !important;
  box-shadow: inset 0 1px 3px rgba(18, 48, 84, 0.045) !important;
  font-size: 13px !important;
}

.product-record-detail-panel .site-business-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.product-record-detail-panel .site-business-choice-grid button {
  min-height: 34px;
  border-color: rgba(199, 219, 240, 0.82);
  border-radius: 7px;
  background: rgba(248, 251, 255, 0.8);
  box-shadow: none;
  font-size: 12px;
}

.product-detail-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 8px 0 0;
  background: linear-gradient(180deg, rgba(244, 249, 253, 0), rgba(244, 249, 253, 0.96) 28%);
}

.completion-modal {
  border-color: rgba(205, 224, 243, 0.86) !important;
  background: rgba(250, 253, 255, 0.96) !important;
  box-shadow: 0 18px 36px rgba(18, 48, 84, 0.14) !important;
}

.completion-progress {
  min-height: 42px !important;
  border: 1px solid rgba(211, 228, 246, 0.9) !important;
  background: rgba(241, 248, 255, 0.86) !important;
  box-shadow: none !important;
}

.completion-edit-form {
  gap: 9px !important;
}

.completion-survey-field,
.completion-edit-parts,
.completion-edit-memo,
.completion-other-input {
  gap: 8px !important;
  border-color: rgba(217, 232, 247, 0.92) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.62) !important;
  padding: 11px !important;
  box-shadow: none !important;
}

.completion-survey-field > span,
.completion-edit-memo > span,
.completion-edit-subhead strong {
  color: #61748e !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.completion-survey-choice-grid {
  gap: 6px !important;
}

.completion-survey-choice-grid button,
.completion-option-grid button {
  min-height: 36px !important;
  border-color: rgba(198, 218, 240, 0.86) !important;
  border-radius: 7px !important;
  background: rgba(248, 251, 255, 0.9) !important;
  box-shadow: none !important;
  padding: 0 10px !important;
  font-size: 13px !important;
}

.completion-survey-choice-grid button.is-selected,
.completion-option-grid button.is-selected {
  border-color: rgba(17, 109, 214, 0.82) !important;
  background: #e7f3ff !important;
  color: var(--primary) !important;
  box-shadow: inset 0 0 0 1px rgba(17, 109, 214, 0.14) !important;
}

.completion-option-grid.is-multi button::before,
.completion-survey-choice-grid button[data-field="fault_causes"]::before {
  content: "" !important;
  width: 14px !important;
  height: 14px !important;
  border-radius: 4px !important;
  margin-right: 6px !important;
  background: rgba(255, 255, 255, 0.9) !important;
}

.completion-option-grid.is-multi button.is-selected::before,
.completion-survey-choice-grid button[data-field="fault_causes"].is-selected::before {
  background: linear-gradient(180deg, #1684f0, var(--primary)) !important;
  box-shadow: inset 0 0 0 3px #e7f3ff !important;
}

.completion-edit-form textarea,
.completion-part-edit-row input,
.completion-other-input input,
.completion-memo {
  border-color: rgba(194, 215, 237, 0.86) !important;
  border-radius: 7px !important;
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: inset 0 1px 3px rgba(18, 48, 84, 0.045) !important;
  font-size: 13px !important;
}

.completion-part-edit-row {
  grid-template-columns: minmax(0, 1fr) 70px 56px !important;
}

.completion-part-edit-row button,
.completion-edit-subhead .btn {
  min-height: 34px !important;
  border-radius: 7px !important;
  box-shadow: none !important;
  font-size: 12px !important;
}

.completion-nav {
  position: sticky;
  bottom: 0;
  padding-top: 8px;
  background: linear-gradient(180deg, rgba(250, 253, 255, 0), rgba(250, 253, 255, 0.98) 30%);
}

/* notification-settings-polish-2026-07-01 */
.notification-backdrop {
  background: rgba(39, 58, 82, 0.42);
  backdrop-filter: blur(8px);
}

.notification-backdrop .notification-modal:not(.push-permission-modal) {
  width: min(100%, 500px);
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(185, 207, 228, 0.78);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(246, 250, 255, 0.98) 100%);
  box-shadow: 0 24px 58px rgba(13, 38, 72, 0.24), 0 4px 14px rgba(13, 38, 72, 0.12);
}

.notification-backdrop .notification-modal:not(.push-permission-modal) > .modal-head {
  min-height: 62px;
  grid-template-columns: minmax(0, 1fr) 54px;
  padding-bottom: 14px;
  border-bottom-color: rgba(204, 220, 237, 0.7);
}

.notification-backdrop .notification-modal:not(.push-permission-modal) > .modal-head strong {
  font-size: 30px;
  line-height: 1.05;
}

.notification-backdrop .notification-modal:not(.push-permission-modal) .modal-close {
  width: 54px;
  height: 54px;
  border: 1px solid #c8ddf1;
  border-radius: 12px;
  background: linear-gradient(180deg, #eef7ff 0%, #e4f1fc 100%);
  color: var(--primary-dark);
  font-size: 32px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 3px 8px rgba(26, 77, 124, 0.1);
}

.notification-backdrop .notify-mode-grid {
  gap: 12px;
}

.notification-backdrop .notify-mode {
  position: relative;
  min-height: 74px;
  padding: 14px 8px 12px;
  border: 1px solid rgba(201, 218, 235, 0.86);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.92));
  color: #53647c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 8px 16px rgba(18, 57, 98, 0.045);
}

.notification-backdrop .notify-mode::before {
  content: "";
  width: 24px;
  height: 24px;
  margin-bottom: 7px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.96) 0 33%, transparent 34%), linear-gradient(180deg, #d9e8f8, #eff6fd);
  box-shadow: inset 0 0 0 1px rgba(121, 153, 184, 0.18);
}

.notification-backdrop .notify-mode.is-selected {
  border-color: rgba(45, 147, 224, 0.9);
  background: linear-gradient(180deg, #f4fbff 0%, #e6f3ff 100%);
  color: var(--primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 8px 18px rgba(32, 128, 212, 0.14);
  transform: none;
}

.notification-backdrop .notify-mode.is-selected::before {
  background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.98) 0 30%, transparent 31%), linear-gradient(180deg, #2a9bf2, #0b6edc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 4px 9px rgba(11, 110, 220, 0.24);
}

.notification-backdrop .notify-mode span {
  color: inherit;
  font-size: 15px;
  line-height: 1.15;
}

.notification-backdrop .push-status-panel {
  gap: 12px;
  margin: 0;
}

.notification-backdrop .push-status-card {
  position: relative;
  min-height: 84px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px 16px 14px 48px;
  border: 1px solid rgba(185, 208, 231, 0.8);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 252, 255, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 8px 18px rgba(18, 57, 98, 0.045);
}

.notification-backdrop .push-status-card::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: #aeb9c8;
  box-shadow: 0 0 0 7px rgba(174, 185, 200, 0.12);
}

.notification-backdrop .push-status-card.is-good::before {
  background: #1d94e8;
  box-shadow: 0 0 0 7px rgba(29, 148, 232, 0.13);
}

.notification-backdrop .push-status-card.is-danger::before {
  background: #d95c5c;
  box-shadow: 0 0 0 7px rgba(217, 92, 92, 0.12);
}

.notification-backdrop .push-status-card span {
  margin: 0;
  color: #6f7c8e;
  font-size: 13px;
  font-weight: 800;
}

.notification-backdrop .push-status-card strong {
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.05;
}

.notification-backdrop .push-status-message {
  margin: -2px 0 0;
  padding: 0 2px;
  color: #0b6edc;
  font-size: 14px;
  font-weight: 900;
}

.notification-backdrop .time-grid {
  gap: 12px;
}

.notification-backdrop .time-field {
  grid-template-columns: 76px minmax(0, 1fr) 14px minmax(0, 1fr);
  gap: 10px;
  padding: 18px 14px 14px;
  border: 1px solid rgba(190, 212, 233, 0.84);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 8px 18px rgba(18, 57, 98, 0.04);
}

.notification-backdrop .time-field legend {
  padding: 0 8px;
  color: #53647c;
  font-size: 15px;
}

.notification-backdrop .time-field select,
.notification-backdrop .time-field input {
  min-height: 52px;
  border: 1px solid rgba(195, 215, 235, 0.88);
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #f2f7fd 100%);
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-size: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 3px 8px rgba(18, 57, 98, 0.035);
}

.notification-backdrop .time-field span {
  color: #52657d;
  font-size: 22px;
}

.notification-backdrop .time-grid.is-disabled {
  opacity: 1;
  filter: none;
}

.notification-backdrop .time-grid.is-disabled .time-field {
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.92), rgba(244, 248, 253, 0.9));
}

.notification-backdrop .time-grid.is-disabled .time-field legend,
.notification-backdrop .time-grid.is-disabled .time-field span {
  color: #7b899c;
}

.notification-backdrop .time-grid.is-disabled input,
.notification-backdrop .time-grid.is-disabled select {
  background: linear-gradient(180deg, #f5f8fc 0%, #eef3f8 100%);
  color: #9aa5b5;
  -webkit-text-fill-color: #9aa5b5;
  opacity: 1;
}

.notification-backdrop .actions {
  margin-top: 2px;
}

.notification-backdrop .actions .btn {
  min-height: 62px;
  border-radius: 12px;
  font-size: 18px;
}

/* completion-survey-polish-2026-07-01 */
.completion-modal {
  width: min(100%, 500px) !important;
  gap: 14px !important;
  padding: 20px !important;
  border: 1px solid rgba(185, 207, 228, 0.78) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(247, 251, 255, 0.98) 100%) !important;
  box-shadow: 0 24px 58px rgba(13, 38, 72, 0.24), 0 4px 14px rgba(13, 38, 72, 0.12) !important;
}

.completion-modal > .modal-head {
  min-height: 58px !important;
  grid-template-columns: minmax(0, 1fr) 54px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(204, 220, 237, 0.72) !important;
}

.completion-modal > .modal-head strong {
  font-size: 28px !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

.completion-modal .modal-close {
  width: 54px !important;
  height: 54px !important;
  border: 1px solid #c8ddf1 !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #eef7ff 0%, #e4f1fc 100%) !important;
  font-size: 32px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 3px 8px rgba(26, 77, 124, 0.1) !important;
}

.completion-modal .completion-summary-meta {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 48px !important;
  padding: 11px 14px !important;
  border: 1px solid rgba(198, 216, 234, 0.74) !important;
  border-radius: 10px !important;
  background: rgba(248, 252, 255, 0.78) !important;
  color: #617084 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.completion-modal .completion-progress {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 48px !important;
  padding: 11px 14px !important;
  border: 1px solid rgba(198, 216, 234, 0.74) !important;
  border-radius: 10px !important;
  background: rgba(248, 252, 255, 0.78) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

.completion-modal .completion-progress span,
.completion-modal .completion-progress b {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

.completion-modal .completion-progress span {
  color: #617084 !important;
}

.completion-modal .completion-progress b {
  color: #0b6edc !important;
  text-align: right !important;
}

.completion-survey-field {
  gap: 10px !important;
  padding: 14px !important;
  border: 1px solid rgba(195, 215, 235, 0.8) !important;
  border-radius: 13px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.94)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 7px 16px rgba(18, 57, 98, 0.035) !important;
}

.completion-survey-field > span,
.completion-modal section > strong {
  display: block !important;
  margin: 0 0 2px !important;
  color: #617084 !important;
  font-family: var(--font-sans) !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

.completion-survey-choice-grid,
.completion-option-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  align-items: stretch !important;
}

.completion-survey-choice-grid:has(button:nth-child(4)),
.completion-option-grid:has(button:nth-child(4)) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.completion-survey-choice-grid button,
.completion-option-grid button {
  min-height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(198, 216, 234, 0.9) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #ffffff, #f5f9fe) !important;
  color: var(--primary-dark) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 3px 7px rgba(18, 57, 98, 0.035) !important;
  font-family: var(--font-display) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.completion-survey-choice-grid button.is-selected,
.completion-option-grid button.is-selected {
  border-color: rgba(45, 147, 224, 0.9) !important;
  background: linear-gradient(180deg, #f3fbff 0%, #e5f3ff 100%) !important;
  color: #0b6edc !important;
  box-shadow: inset 0 0 0 1px rgba(45, 147, 224, 0.18), 0 5px 10px rgba(32, 128, 212, 0.12) !important;
}

.completion-option-grid.is-multi button,
.completion-survey-choice-grid button[data-field="fault_causes"] {
  justify-content: center !important;
  padding-left: 10px !important;
}

.completion-option-grid.is-multi button::before,
.completion-survey-choice-grid button[data-field="fault_causes"]::before {
  flex: 0 0 auto !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  border: 1px solid rgba(170, 193, 214, 0.78) !important;
  border-radius: 4px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: inset 0 1px 2px rgba(18, 48, 84, 0.045) !important;
}

.completion-option-grid.is-multi button.is-selected::before,
.completion-survey-choice-grid button[data-field="fault_causes"].is-selected::before {
  border-color: #1684f0 !important;
  background: linear-gradient(180deg, #1684f0, var(--primary)) !important;
  box-shadow: inset 0 0 0 3px #e7f3ff !important;
}

.completion-survey-field .completion-part-edit-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 78px 64px !important;
  gap: 8px !important;
  align-items: center !important;
}

.completion-part-edit-row input,
.completion-other-input input,
.completion-memo,
.completion-survey-field textarea {
  min-height: 44px !important;
  border: 1px solid rgba(194, 215, 237, 0.86) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: var(--primary-dark) !important;
  box-shadow: inset 0 1px 3px rgba(18, 48, 84, 0.045) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

.completion-survey-field textarea,
.completion-memo {
  min-height: 122px !important;
  resize: vertical !important;
  line-height: 1.45 !important;
}

.completion-part-edit-row button,
.completion-edit-subhead .btn,
.completion-survey-field .btn.quick {
  min-height: 38px !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #f7fbff, #edf5fd) !important;
  border: 1px solid rgba(190, 212, 233, 0.84) !important;
  color: #0b6edc !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

.completion-edit-subhead {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
}

.completion-empty {
  min-height: 38px !important;
  display: grid !important;
  align-items: center !important;
  padding: 0 12px !important;
  border: 1px dashed rgba(185, 207, 228, 0.72) !important;
  border-radius: 8px !important;
  color: #7a8798 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.completion-modal .completion-nav {
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  padding-top: 10px !important;
}

.completion-modal .completion-nav .btn {
  min-height: 56px !important;
  border-radius: 10px !important;
  font-size: 16px !important;
  font-weight: 900 !important;
}

.completion-modal .completion-nav .btn.quick:not(.ghost),
.completion-modal .completion-nav .btn:not(.ghost):last-child {
  background: linear-gradient(180deg, #1988f4 0%, #0b6edc 72%, #0a62c5 100%) !important;
  color: #fff !important;
  border-color: rgba(70, 155, 232, 0.92) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 12px 22px rgba(11, 110, 220, 0.2) !important;
}

@media (max-width: 430px) {
  .completion-modal {
    padding: 18px !important;
  }

  .completion-survey-choice-grid,
  .completion-option-grid,
  .completion-survey-choice-grid:has(button:nth-child(4)),
  .completion-option-grid:has(button:nth-child(4)) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .completion-survey-choice-grid button,
  .completion-option-grid button {
    min-height: 40px !important;
    font-size: 13px !important;
  }
}

/* completion-history-polish-2026-07-01 */
.as-detail-screen .as-history-panel {
  gap: 12px !important;
  padding: 16px !important;
  border: 1px solid rgba(195, 215, 235, 0.8) !important;
  border-radius: 13px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.94)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 7px 16px rgba(18, 57, 98, 0.035) !important;
}

.as-detail-screen .as-history-head {
  min-height: 34px !important;
  padding: 0 2px 4px !important;
  border-bottom: 1px solid rgba(204, 220, 237, 0.58) !important;
}

.as-detail-screen .as-history-head strong {
  color: var(--primary-dark) !important;
  font-size: 20px !important;
  line-height: 1.1 !important;
}

.as-detail-screen .as-history-head span {
  min-height: 26px !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  background: #edf6ff !important;
  color: #0b6edc !important;
  font-size: 12px !important;
}

.as-detail-screen .as-history-list {
  gap: 9px !important;
}

.as-detail-screen .as-history-item {
  grid-template-columns: 64px minmax(0, 1fr) 74px !important;
  gap: 10px !important;
  min-height: 66px !important;
  padding: 11px 12px !important;
  border: 1px solid rgba(198, 216, 234, 0.9) !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, #ffffff, #f7fbff) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 3px 7px rgba(18, 57, 98, 0.035) !important;
}

.as-detail-screen .as-history-item b {
  min-height: 32px !important;
  padding: 0 8px !important;
  border: 1px solid rgba(195, 215, 235, 0.82) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #f7fbff, #edf5fd) !important;
  color: #0b6edc !important;
  font-size: 12px !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
}

.as-detail-screen .as-history-item.is-completion b {
  border-color: rgba(45, 147, 224, 0.55) !important;
  background: linear-gradient(180deg, #f3fbff 0%, #e5f3ff 100%) !important;
  color: #0b6edc !important;
}

.as-detail-screen .as-history-item div {
  gap: 4px !important;
}

.as-detail-screen .as-history-item strong {
  color: var(--primary-dark) !important;
  font-size: 16px !important;
  line-height: 1.15 !important;
}

.as-detail-screen .as-history-item span,
.as-detail-screen .as-history-item em {
  color: #6f7c8e !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.as-detail-screen .as-history-item em {
  display: block !important;
  max-height: 2.8em !important;
  overflow: hidden !important;
}

.as-detail-screen .as-history-survey-button {
  min-height: 38px !important;
  width: 74px !important;
  padding: 0 8px !important;
  border: 1px solid rgba(70, 155, 232, 0.7) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #f3fbff 0%, #e5f3ff 100%) !important;
  color: #0b6edc !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 5px 10px rgba(32, 128, 212, 0.1) !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
}

.as-detail-screen .as-history-empty {
  min-height: 44px !important;
  border: 1px dashed rgba(185, 207, 228, 0.72) !important;
  border-radius: 10px !important;
  background: rgba(250, 253, 255, 0.78) !important;
  color: #7a8798 !important;
  font-size: 13px !important;
}

.completion-modal .completion-summary {
  gap: 8px !important;
}

.completion-modal .meta-row {
  min-height: 44px !important;
  display: grid !important;
  grid-template-columns: 94px minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: center !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(198, 216, 234, 0.82) !important;
  border-radius: 9px !important;
  background: linear-gradient(180deg, #ffffff, #f7fbff) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
}

.completion-modal .meta-row span:first-child {
  color: #6f7c8e !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.completion-modal .meta-row span:last-child {
  min-width: 0 !important;
  color: var(--primary-dark) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.35 !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 430px) {
  .as-detail-screen .as-history-item {
    grid-template-columns: 58px minmax(0, 1fr) 66px !important;
    padding: 10px !important;
  }

  .as-detail-screen .as-history-survey-button {
    width: 66px !important;
  }
}

/* chat-header-logo-top-left-2026-07-01 */
@media (max-width: 640px) {
  .chat-screen .chat-room-head,
  .chat-screen .chat-room-head.is-more-open {
    width: calc(100% - 18px) !important;
    margin: 0 auto !important;
    padding: max(8px, env(safe-area-inset-top)) 10px 9px !important;
    grid-template-columns: 36px minmax(0, 1fr) !important;
    column-gap: 7px !important;
    border-radius: 16px !important;
  }

  .chat-screen .chat-room-head .chat-back {
    align-self: start !important;
    margin-top: 12px !important;
  }

  .chat-screen .chat-title-block,
  .chat-screen .chat-room-head.is-more-open .chat-title-block {
    grid-column: 2 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "brand actions"
      "title actions"
      "meta actions"
      "more more" !important;
    column-gap: 8px !important;
    row-gap: 0 !important;
    align-items: start !important;
  }

  .chat-screen .chat-brand-mark,
  .chat-screen .chat-room-head.is-more-open .chat-brand-mark {
    grid-area: brand !important;
    height: 18px !important;
    margin: -1px 0 5px !important;
    align-self: start !important;
  }

  .chat-screen .chat-brand-mark .brand-logo,
  .chat-screen .chat-brand-mark .brand-logo-compact {
    width: 116px !important;
    max-width: min(37vw, 116px) !important;
  }

  .chat-screen .chat-title-row,
  .chat-screen .chat-room-head.is-more-open .chat-title-row {
    grid-area: title !important;
    min-width: 0 !important;
    margin-top: 0 !important;
  }

  .chat-screen .chat-title-row strong,
  .chat-screen .chat-room-head.is-more-open .chat-title-row strong {
    font-size: 24px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .chat-screen .chat-meta-row {
    display: contents !important;
  }

  .chat-screen .chat-meta-row > span,
  .chat-screen .chat-room-head.is-more-open .chat-meta-row > span {
    grid-area: meta !important;
    margin-top: 1px !important;
    padding-right: 0 !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
  }

  .chat-screen .chat-head-actions,
  .chat-screen .chat-room-head.is-more-open .chat-head-actions {
    grid-area: actions !important;
    position: static !important;
    width: auto !important;
    align-self: start !important;
    justify-self: end !important;
    transform: none !important;
    gap: 6px !important;
    padding-top: 0 !important;
  }

  .chat-screen .chat-head-actions .chat-head-button,
  .chat-screen .chat-head-actions .more-toggle,
  .chat-screen .chat-room-head.is-more-open .chat-head-actions .chat-head-button,
  .chat-screen .chat-room-head.is-more-open .chat-head-actions .more-toggle {
    flex: 0 0 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    border-radius: 12px !important;
  }

  .chat-screen .chat-head-button .head-icon,
  .chat-screen .chat-head-actions .chat-head-button .head-icon {
    min-width: 25px !important;
    width: 25px !important;
    height: 25px !important;
  }

  .chat-screen .chat-more-panel,
  .chat-screen .chat-room-head.is-more-open .chat-more-panel {
    grid-area: more !important;
    margin-top: 8px !important;
  }
}

@media (max-width: 380px) {
  .chat-screen .chat-room-head,
  .chat-screen .chat-room-head.is-more-open {
    width: calc(100% - 14px) !important;
    grid-template-columns: 32px minmax(0, 1fr) !important;
  }

  .chat-screen .chat-brand-mark .brand-logo,
  .chat-screen .chat-brand-mark .brand-logo-compact {
    width: 104px !important;
    max-width: min(35vw, 104px) !important;
  }

  .chat-screen .chat-title-row strong,
  .chat-screen .chat-room-head.is-more-open .chat-title-row strong {
    font-size: 22px !important;
  }

  .chat-screen .chat-head-actions .chat-head-button,
  .chat-screen .chat-head-actions .more-toggle,
  .chat-screen .chat-room-head.is-more-open .chat-head-actions .chat-head-button,
  .chat-screen .chat-room-head.is-more-open .chat-head-actions .more-toggle {
    flex-basis: 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
  }
}

/* transparent-composer-shell-2026-07-01 */
.chat-screen .chat-composer {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.chat-screen .chat-composer::before,
.chat-screen .chat-composer::after {
  display: none !important;
}

.chat-screen .composer-tray-head,
.chat-screen .composer-card-pager,
.chat-screen .composer-row textarea,
.chat-screen .composer-plus-button,
.chat-screen .send-button {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 8px 18px rgba(18, 57, 98, 0.08) !important;
}

.chat-screen .composer-row {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.chat-screen .composer-card-tray {
  background: transparent !important;
}

@media (max-width: 640px) {
  .chat-screen .chat-composer {
    width: calc(100% - 18px) !important;
    left: 9px !important;
    right: 9px !important;
    padding: 0 0 max(10px, env(safe-area-inset-bottom)) !important;
  }
}

/* composer-card-compact-height-2026-07-01 */
.chat-screen .composer-card-pager {
  grid-template-columns: 36px minmax(0, 1fr) 36px !important;
  gap: 7px !important;
  min-height: 74px !important;
  padding: 5px !important;
  align-items: stretch !important;
}

.chat-screen .tray-arrow {
  min-height: 64px !important;
  height: 64px !important;
  align-self: center !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  border-radius: 13px !important;
  font-size: 28px !important;
  line-height: 1 !important;
}

.chat-screen .composer-card-window {
  min-height: 64px !important;
  height: 64px !important;
  padding: 5px !important;
  display: grid !important;
  align-items: stretch !important;
}

.chat-screen .composer-as-button {
  min-height: 54px !important;
  height: 54px !important;
  display: grid !important;
  align-content: center !important;
  justify-content: stretch !important;
  padding: 6px 10px !important;
  border-radius: 11px !important;
}

.chat-screen .composer-as-button .as-card-title {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 0 !important;
}

.chat-screen .composer-as-button .as-card-copy {
  display: grid !important;
  align-content: center !important;
  gap: 1px !important;
  min-width: 0 !important;
}

.chat-screen .composer-as-button .as-card-title strong {
  font-size: 18px !important;
  line-height: 1.05 !important;
}

.chat-screen .composer-as-button .as-card-date {
  font-size: 12px !important;
  line-height: 1.05 !important;
}

.chat-screen .composer-as-button .as-card-title b {
  min-height: 24px !important;
  display: inline-grid !important;
  place-items: center !important;
  align-self: center !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

.chat-screen .composer-as-button .as-card-title::after {
  content: none !important;
  display: none !important;
}

/* composer-card-wrapper-transparent-2026-07-01 */
.chat-screen .composer-card-pager {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.chat-screen .composer-card-pager::before,
.chat-screen .composer-card-pager::after {
  content: none !important;
  display: none !important;
}

/* composer-vertical-gap-tight-2026-07-01 */
.chat-screen .chat-composer {
  gap: 0 !important;
}

@media (max-width: 380px) {
  .chat-screen .composer-card-pager {
    grid-template-columns: 34px minmax(0, 1fr) 34px !important;
    min-height: 70px !important;
    gap: 6px !important;
  }

  .chat-screen .tray-arrow {
    min-height: 60px !important;
    height: 60px !important;
    font-size: 26px !important;
  }

  .chat-screen .composer-card-window {
    min-height: 60px !important;
    height: 60px !important;
  }

  .chat-screen .composer-as-button {
    min-height: 50px !important;
    height: 50px !important;
  }

  .chat-screen .composer-as-button .as-card-title strong {
    font-size: 16px !important;
  }
}

/* card-drag-label-hide-2026-07-01 */
.chat-screen .composer-as-button.is-dragging::after,
.chat-panel .composer-as-button.is-dragging::after,
.composer-as-button.is-dragging::after {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

/* button-contrast-fix-2026-07-01 */
.btn,
.btn.ghost,
.btn.secondary,
.login-panel .actions .btn,
.account-panel .actions .btn,
.account-terms-summary .btn,
.verify-actions .btn,
.notification-modal .btn,
.member-action-modal .btn,
.leave-confirm-actions .btn,
.completion-modal .completion-nav .btn.ghost,
.push-permission-actions .btn:not(.primary),
.install-tutorial-actions .btn.secondary {
  color: var(--primary-dark) !important;
  text-shadow: none !important;
}

.btn.primary,
.leave-confirm-primary:not([disabled]),
.completion-modal .completion-nav .btn:not(.ghost):not([disabled]),
.push-permission-actions .btn.primary:not([disabled]),
.install-tutorial-actions .btn:not(.secondary):not([disabled]) {
  color: #ffffff !important;
  text-shadow: 0 1px 1px rgba(0, 42, 100, 0.28) !important;
}

.leave-confirm-actions .leave-confirm-primary,
.leave-confirm-actions .leave-confirm-primary:not([disabled]) {
  border: 1px solid #b8d4ee !important;
  background:
    linear-gradient(180deg, #ffffff, #edf6ff) !important;
  color: var(--primary-dark) !important;
  text-shadow: none !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(24, 54, 88, 0.08) !important;
}

.btn[disabled],
.btn:disabled,
.login-panel .actions .btn[disabled],
.account-panel .actions .btn[disabled],
.verify-actions .btn[disabled],
.notification-modal .btn[disabled],
.completion-modal .completion-nav .btn[disabled],
.push-permission-actions .btn[disabled] {
  color: rgba(7, 28, 62, 0.58) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(231, 243, 255, 0.9)) !important;
  border-color: rgba(166, 195, 224, 0.82) !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.account-form-company-picker .db-company-picker-list button,
.db-company-picker .db-company-picker-list button {
  color: var(--primary-dark) !important;
}

.account-form-company-picker .db-company-picker-list button span,
.db-company-picker .db-company-picker-list button span {
  color: #52657f !important;
}

/* app-exit-closed-2026-07-01 */
.app-closed-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 42px 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(71, 161, 239, 0.18), transparent 34%),
    linear-gradient(180deg, #eef7ff 0%, #d9ecff 100%);
}

.app-closed-panel {
  width: min(100%, 360px);
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 30px 22px 24px;
  border: 1px solid rgba(145, 183, 220, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(29, 73, 120, 0.16);
  text-align: center;
}

.app-closed-panel strong {
  color: var(--primary-dark);
  font-size: 28px;
  line-height: 1.15;
}

.app-closed-panel span {
  color: #50637d;
  font-size: 16px;
  line-height: 1.45;
}

.app-closed-reopen {
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  color: var(--primary-dark) !important;
  font-size: 18px;
}

/* route-smoothing-2026-07-01
   Keep normal UI richness, but make full-screen route swaps composited and cheap. */
@keyframes routeSurfaceIn {
  from {
    opacity: 0.86;
    transform: translate3d(0, 8px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

html.is-route-rendering .screen {
  animation: routeSurfaceIn 150ms cubic-bezier(0.2, 0.78, 0.24, 1) both;
  will-change: opacity, transform;
  transform: translate3d(0, 0, 0);
  contain: paint;
}

html.is-route-rendering .app-shell::before,
html.is-route-rendering .app-shell::after {
  display: none;
}

html.is-route-rendering .modal-backdrop,
html.is-route-rendering .account-company-sheet,
html.is-route-rendering .notification-modal,
html.is-route-rendering .chat-room-head,
html.is-route-rendering .chat-composer {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.is-route-rendering .panel,
html.is-route-rendering .card,
html.is-route-rendering .room-card,
html.is-route-rendering .db-record-card,
html.is-route-rendering .chat-room-head,
html.is-route-rendering .chat-composer,
html.is-route-rendering .account-company-sheet,
html.is-route-rendering .modal-card {
  box-shadow: 0 6px 16px rgba(18, 57, 98, 0.055) !important;
}

html.is-route-rendering * {
  scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  html.is-route-rendering .screen {
    animation: none;
    will-change: auto;
  }
}
/* Server management dashboard */
.server-monitor-panel .actions {
  margin: 10px 0 14px;
}

html:has(.db-screen),
body:has(.db-screen),
body:has(.db-screen) .app-shell {
  overflow-y: auto;
  height: auto;
  min-height: var(--app-vvh);
}

.db-screen {
  height: auto;
  min-height: var(--app-vvh);
  overflow-y: visible;
  padding-bottom: max(48px, env(safe-area-inset-bottom));
}

.server-metric-grid,
.server-chart-grid {
  margin-bottom: 14px;
}

.server-metric-card {
  min-height: 184px;
  align-content: start;
  justify-items: center;
  text-align: center;
  position: relative;
  isolation: isolate;
  padding: 18px 14px 16px;
  border-color: rgba(90, 143, 198, 0.26);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(243,248,253,0.98) 100%);
  box-shadow:
    0 18px 38px rgba(25, 68, 116, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.96);
}

.server-metric-card::before {
  content: "";
  position: absolute;
  inset: 10px 12px auto;
  height: 42%;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0));
  pointer-events: none;
  z-index: -1;
}

.server-metric-value {
  margin-top: 10px;
  padding: 5px 10px;
  border: 1px solid rgba(107, 140, 178, 0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  color: #41556f;
}

.server-donut {
  --server-free: 0;
  width: min(100%, 138px);
  aspect-ratio: 1;
  position: relative;
  margin: 0 auto 10px;
  border-radius: 50%;
  filter: drop-shadow(0 12px 18px rgba(19, 82, 138, 0.18));
}

.server-donut svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: rotate(-90deg);
}

.server-donut-track,
.server-donut-fill {
  fill: none;
  stroke-width: 17;
}

.server-donut-track {
  stroke: #d8dee5;
}

.server-donut-fill {
  stroke: #10a7d5;
  stroke-linecap: butt;
  stroke-dasharray: calc(var(--server-free) * 2.7646) 276.46;
}

.server-donut-fill.is-warn {
  stroke: #d8a12f;
}

.server-donut-fill.is-danger {
  stroke: #d85a4f;
}

.server-donut-center {
  position: absolute;
  inset: 27%;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #ffffff 0%, #f8fbff 58%, #e9f1f8 100%);
  box-shadow:
    inset 0 2px 5px rgba(255,255,255,0.95),
    inset 0 -5px 10px rgba(47, 88, 126, 0.08);
}

.server-donut-center strong {
  font-size: clamp(21px, 7vw, 31px);
  line-height: 1;
  color: #142640;
}

.server-donut-center span {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #667085;
}

.server-donut-card .db-record-card-head {
  width: 100%;
  justify-content: center;
}

/* toss-blue-reference-skin-2026-07-03
   Toss reference adaptation for NEWK: keep the blue brand, change density,
   logo emphasis, menu controls, and chart cards without copying Toss assets. */
@font-face {
  font-family: "LINE Seed Sans KR";
  src: url("./fonts/line-seed-sans-kr/LINESeedKR-Th.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "LINE Seed Sans KR";
  src: url("./fonts/line-seed-sans-kr/LINESeedKR-Bd.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --toss-bg: #f4f6fb;
  --toss-surface: #ffffff;
  --toss-ink: #202632;
  --toss-muted: #7a838f;
  --toss-line: #edf0f5;
  --toss-blue: #3182f6;
  --toss-blue-deep: #0b6edc;
  --toss-blue-soft: #eaf3ff;
  --toss-radius-card: 20px;
  --toss-radius-control: 15px;
  --toss-shadow-card: 0 10px 26px rgba(28, 43, 68, 0.055);
}

body,
.app-shell {
  background: var(--toss-bg);
  color: var(--toss-ink);
}

.login-screen {
  align-content: center;
  padding: max(54px, env(safe-area-inset-top)) 20px max(38px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 42%, rgba(49, 130, 246, 0.08), transparent 22%),
    var(--toss-bg);
}

.login-screen::before {
  opacity: 0.035;
  width: 220px;
  height: 220px;
  top: 70px;
  right: -68px;
}

.login-wrap {
  width: min(100%, 390px);
}

.login-brand-mark {
  gap: 10px;
  margin: 0 0 22px;
}

.login-brand-mark::before {
  content: "";
  width: 92px;
  height: 92px;
  display: block;
  border-radius: 30px;
  background:
    radial-gradient(circle at 30% 70%, rgba(122, 203, 255, 0.92), transparent 32%),
    conic-gradient(from 210deg, #00b7ff, #006bff 38%, #0a4fe8 58%, #34b8ff 76%, #00a4ff);
  box-shadow:
    inset 12px 12px 18px rgba(255, 255, 255, 0.24),
    inset -14px -16px 22px rgba(0, 45, 160, 0.18),
    0 22px 34px rgba(49, 130, 246, 0.18);
  transform: rotate(-18deg) skew(-5deg);
}

.login-brand-mark .brand-logo {
  width: 186px;
  max-width: 58vw;
}

.login-brand-mark span {
  color: #495260;
  font-size: 15px;
  font-weight: 800;
}

.login-panel,
.account-panel,
.verify-card,
.notification-modal,
.member-modal,
.assignment-modal,
.completion-modal,
.product-confirm-modal,
.db-company-picker {
  border: 0;
  border-radius: var(--toss-radius-card);
  background: var(--toss-surface);
  box-shadow: var(--toss-shadow-card);
}

.login-panel {
  gap: 14px;
  padding: 22px 20px 20px;
}

.login-panel .field {
  gap: 8px;
}

.login-panel .field label {
  color: #2f3744;
  font-size: 14px;
  font-weight: 900;
}

.login-panel .field input,
.account-panel .field input,
.verify-card input,
.db-search-box input,
.site-search-box input,
.composer-row textarea {
  min-height: 56px;
  border: 1px solid var(--toss-line);
  border-radius: var(--toss-radius-control);
  background: #f8fafc;
  color: var(--toss-ink);
  font-size: 18px;
  font-weight: 700;
  box-shadow: none;
}

.login-panel .field input::placeholder,
.account-panel .field input::placeholder,
.verify-card input::placeholder {
  color: #a8b0bc;
  font-weight: 700;
}

.login-panel .field input:focus,
.account-panel .field input:focus,
.verify-card input:focus,
.db-search-box input:focus,
.site-search-box input:focus,
.composer-row textarea:focus {
  border-color: rgba(49, 130, 246, 0.55);
  background: #ffffff;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(49, 130, 246, 0.1);
}

.login-panel .actions .btn,
.login-panel .login-submit,
.btn.primary,
.site-detail-room-button.is-primary,
.db-edit-actions .btn[data-action="db-sheet-save"],
.db-edit-actions .btn[data-action="db-sheet-edit"],
.product-issue-form > .btn {
  min-height: 58px;
  border: 0;
  border-radius: var(--toss-radius-control);
  background: var(--toss-blue);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 12px 20px rgba(49, 130, 246, 0.2);
}

.login-support-actions {
  gap: 12px;
  padding-top: 3px;
}

.login-create-link,
.login-profile-link {
  color: #536071;
  font-size: 14px;
  font-weight: 900;
}

.login-create-link {
  color: var(--toss-blue-deep);
}

.login-wrap .install-app-section {
  margin-top: 14px;
}

.login-wrap .install-app-pill {
  min-height: 58px;
  border-radius: 999px;
  border-color: #dce7f6;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 18px rgba(28, 43, 68, 0.05);
}

.login-wrap .install-app-pill.is-primary {
  border-color: rgba(49, 130, 246, 0.38);
  background: #f3f8ff;
  color: var(--toss-blue-deep);
}

.screen:not(.login-screen) {
  background: var(--toss-bg);
}

.topbar {
  padding-inline: max(24px, env(safe-area-inset-left));
}

.topbar .brand strong,
.chat-room-head strong,
.db-page-head strong {
  color: var(--toss-ink);
  font-family: var(--font-sans);
  font-size: clamp(23px, 6.1vw, 31px);
  font-weight: 950;
  line-height: 1.14;
}

.topbar .brand span,
.chat-room-head span,
.db-page-head span {
  color: var(--toss-muted);
  font-size: 14px;
  font-weight: 800;
}

.menu-grid {
  width: min(100%, 430px);
  gap: 12px;
  margin-top: 18px;
  padding: 0 18px max(24px, env(safe-area-inset-bottom));
}

.menu-button {
  min-height: 92px;
  grid-template-columns: 58px minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 16px;
  border: 0;
  border-radius: var(--toss-radius-card);
  background: var(--toss-surface);
  padding: 17px 18px;
  box-shadow: var(--toss-shadow-card);
}

.menu-card-art {
  width: 58px;
  height: 58px;
  min-height: 0;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.88), transparent 30%),
    var(--toss-blue-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.menu-card-art img {
  object-fit: cover;
  transform: scale(1.18);
}

.menu-card-copy {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.menu-button strong {
  font-family: var(--font-sans);
  color: var(--toss-ink);
  font-size: 25px;
  font-weight: 950;
  line-height: 1.1;
}

.menu-card-copy > span {
  color: var(--toss-muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.menu-button::before {
  content: "›";
  position: absolute;
  right: 18px;
  top: 50%;
  color: #b6bfca;
  font-size: 32px;
  line-height: 1;
  transform: translateY(-52%);
}

.db-section-panel,
.db-record-card,
.db-stat-card,
.product-summary-card,
.product-issue-panel,
.site-result-card,
.site-detail-panel,
.selected-site-card,
.db-selected-site-card,
.server-metric-card {
  border: 0;
  border-radius: var(--toss-radius-card);
  background: var(--toss-surface);
  box-shadow: var(--toss-shadow-card);
}

.server-metric-card {
  min-height: 178px;
  padding: 20px 16px 18px;
}

.server-metric-card::before {
  content: none;
}

.server-donut {
  width: min(100%, 126px);
  filter: none;
}

.server-donut-track,
.server-donut-fill {
  stroke-width: 12;
}

.server-donut-track {
  stroke: #e5e9ef;
}

.server-donut-fill {
  stroke: var(--toss-blue);
  stroke-linecap: round;
}

.server-donut-fill.is-warn {
  stroke: #f59f00;
}

.server-donut-fill.is-danger {
  stroke: #e5484d;
}

.server-donut-center {
  inset: 25%;
  background: #ffffff;
  box-shadow: none;
}

.server-donut-center strong {
  color: var(--toss-ink);
  font-size: clamp(24px, 7vw, 34px);
  font-weight: 950;
}

.server-donut-center span,
.server-metric-value {
  color: var(--toss-muted);
  font-weight: 900;
}

.server-metric-value {
  border: 0;
  background: #f3f6fa;
  border-radius: 999px;
}

.blackbox-chart-modal {
  background: var(--toss-bg);
}

.blackbox-chart-card {
  border: 0;
  border-radius: var(--toss-radius-card);
  background: var(--toss-surface);
  box-shadow: var(--toss-shadow-card);
}

.blackbox-chart {
  background: transparent;
}

.blackbox-axis,
.blackbox-grid-line {
  stroke: #e5e9ef;
  stroke-width: 2;
}

.blackbox-line {
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 640px) {
  .login-brand-mark::before {
    width: 78px;
    height: 78px;
    border-radius: 25px;
  }

  .login-brand-mark .brand-logo {
    width: 174px;
  }

  .menu-grid {
    width: 100%;
    padding-inline: 20px;
  }

  .menu-button {
    min-height: 86px;
    grid-template-columns: 54px minmax(0, 1fr);
    padding: 15px 17px;
  }

  .menu-card-art {
    width: 54px;
    height: 54px;
    border-radius: 17px;
  }

  .menu-button strong {
    font-size: 23px;
  }
}

/* kiosk-menu-art-restore-2026-07-03
   Keep the Toss-inspired login/chart polish, but restore the home menu to
   compact kiosk-style image cards. */
.menu-grid {
  width: min(100%, 390px);
  gap: 12px;
  margin: 12px auto 0;
  padding: 0;
}

.menu-button {
  height: 180px;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 128px 52px;
  align-content: end;
  gap: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 248, 255, 0.94)),
    var(--surface);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(18, 53, 92, 0.1);
}

.menu-card-art {
  position: relative;
  z-index: 0;
  width: auto;
  height: 128px;
  min-height: 0;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.menu-card-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 42%;
  transform: scale(0.72);
  transform-origin: center center;
}

.menu-button[data-nav="/as"] .menu-card-art img {
  object-position: center 44%;
  transform: scale(0.74);
}

.menu-button[data-nav="/db"] .menu-card-art img {
  object-position: center 46%;
  transform: scale(0.78);
}

.menu-card-copy {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 10px;
  min-height: 0;
  height: 52px;
  padding: 7px 16px 9px;
  background: rgba(247, 251, 255, 0.96);
  border-top: 1px solid rgba(189, 208, 229, 0.72);
}

.menu-button strong {
  font-family: var(--font-display);
  color: var(--primary-dark);
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
}

.menu-card-copy > span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.25;
}

.menu-button::before {
  content: none;
}

@media (max-width: 640px) {
  .menu-grid {
    width: min(100%, 390px);
    padding-inline: 0;
    gap: 10px;
  }

  .menu-button {
    height: 174px;
    min-height: 0;
    grid-template-rows: 124px 50px;
    grid-template-columns: 1fr;
    padding: 0;
  }

  .menu-card-art {
    width: auto;
    height: 124px;
    min-height: 0;
    border-radius: 0;
  }

  .menu-card-copy {
    height: 50px;
    padding: 6px 15px 8px;
  }

  .menu-button strong {
    font-size: 28px;
  }

  .menu-card-copy > span {
    font-size: 14px;
  }
}

/* home-menu-two-up-2026-07-03
   Keep both kiosk menu cards visible together on common mobile heights. */
.screen > .topbar + .menu-grid,
.screen .menu-grid {
  max-width: min(100%, 390px);
}

@media (max-height: 760px) {
  .menu-grid {
    gap: 10px;
    margin-top: 10px;
  }

  .menu-button {
    height: 158px;
    min-height: 0;
    grid-template-rows: 110px 48px;
  }

  .menu-card-art {
    height: 110px;
    min-height: 0;
  }

  .menu-card-copy {
    height: 48px;
    min-height: 0;
    padding-block: 6px 8px;
  }
}

/* iphone-home-fit-2026-07-03
   Force the two kiosk cards into one default iPhone viewport. */
@media (max-width: 430px) and (max-height: 900px) {
  .screen > .topbar + .menu-grid,
  .screen .menu-grid {
    gap: 9px;
    margin-top: 9px;
  }

  .menu-button {
    height: 156px;
    grid-template-rows: 108px 48px;
  }

  .menu-card-art {
    height: 108px;
  }

  .menu-card-copy {
    height: 48px;
    padding: 6px 14px 8px;
  }

  .menu-button strong {
    font-size: 27px;
  }

  .menu-card-copy > span {
    font-size: 13px;
  }
}

/* menu-image-fit-2026-07-03
   Fit the kiosk artwork inside the compact button image area without top/bottom
   blank bands, while keeping the two-card iPhone layout. */
.menu-card-art {
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.82), transparent 46%),
    #f5f9ff;
}

.menu-card-art img {
  object-fit: cover;
  object-position: center center;
}

.menu-button[data-nav="/as"] .menu-card-art img,
.menu-button[data-nav="/db"] .menu-card-art img {
  object-fit: cover;
  transform: scale(1.14);
}

.menu-button[data-nav="/as"] .menu-card-art img {
  object-position: center 68%;
}

.menu-button[data-nav="/db"] .menu-card-art img {
  object-position: center 62%;
}

@media (max-width: 430px) and (max-height: 900px) {
  .menu-button[data-nav="/as"] .menu-card-art img,
  .menu-button[data-nav="/db"] .menu-card-art img {
    transform: scale(1.16);
  }

  .menu-button[data-nav="/as"] .menu-card-art img {
    object-position: center 70%;
  }

  .menu-button[data-nav="/db"] .menu-card-art img {
    object-position: center 64%;
  }
}

/* menu-right-corner-rounding-2026-07-03
   Round the kiosk cards' right-side corners after the compact image overrides. */
.menu-button {
  border-radius: 10px 22px 22px 10px;
}

.menu-card-art {
  border-top-right-radius: 22px;
}

.menu-card-copy {
  border-bottom-right-radius: 22px;
}

/* menu-image-fill-hard-2026-07-03
   Final kiosk-image rule: the artwork must cover the button image area with no
   shrunken image strip or blank band above it. */
.menu-card-art {
  position: relative;
  overflow: hidden;
  background: #f5f9ff;
}

.menu-card-art img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover !important;
  transform: none !important;
  transform-origin: center center;
}

.menu-button[data-nav="/as"] .menu-card-art img {
  object-position: center 62% !important;
}

.menu-button[data-nav="/db"] .menu-card-art img {
  object-position: center 58% !important;
}

/* menu-image-tall-fit-2026-07-03
   Use the available vertical space in the card instead of flattening the source
   artwork. The image keeps its native ratio and the art row is taller. */
.menu-button {
  height: 204px;
  grid-template-rows: 154px 50px;
}

.menu-card-art {
  height: 154px;
}

.menu-card-copy {
  height: 50px;
}

.menu-button[data-nav="/as"] .menu-card-art img {
  object-position: center 36% !important;
}

.menu-button[data-nav="/db"] .menu-card-art img {
  object-position: center 32% !important;
}

@media (max-width: 430px) and (max-height: 900px) {
  .menu-grid {
    gap: 9px;
  }

  .menu-button {
    height: 196px;
    grid-template-rows: 148px 48px;
  }

  .menu-card-art {
    height: 148px;
  }

  .menu-card-copy {
    height: 48px;
  }
}

@media (max-height: 760px) {
  .menu-button {
    height: 184px;
    grid-template-rows: 138px 46px;
  }

  .menu-card-art {
    height: 138px;
  }

  .menu-card-copy {
    height: 46px;
  }
}

/* menu-card-y-origin-2026-07-03
   The card's own top is the image origin. Do not push the art row down and
   leave unused space above it. */
.menu-button {
  align-content: start !important;
  grid-template-rows: minmax(0, 1fr) 50px;
}

.menu-card-art {
  height: 100% !important;
}

.menu-card-copy {
  height: 50px;
}

@media (max-width: 430px) and (max-height: 900px) {
  .menu-button {
    grid-template-rows: minmax(0, 1fr) 48px;
  }

  .menu-card-copy {
    height: 48px;
  }
}

@media (max-height: 760px) {
  .menu-button {
    grid-template-rows: minmax(0, 1fr) 46px;
  }

  .menu-card-copy {
    height: 46px;
  }
}

/* menu-image-box-fill-2026-07-03
   Final rule for the menu artwork: do not crop, contain, or hand-edit the
   source. Stretch the original image to the current box so the whole image
   appears and the box is fully covered. */
.menu-card-art img,
.menu-button[data-nav="/as"] .menu-card-art img,
.menu-button[data-nav="/db"] .menu-card-art img {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
  object-position: center center !important;
  transform: none !important;
}

/* menu-two-zone-card-2026-07-03
   A menu button has only two zones: image and label. No third top spacer. */
.menu-button {
  display: grid !important;
  align-content: stretch !important;
  align-items: stretch !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: minmax(0, 1fr) 50px !important;
}

.menu-card-art {
  grid-row: 1 !important;
  align-self: stretch !important;
  height: auto !important;
  min-height: 0 !important;
}

.menu-card-copy {
  grid-row: 2 !important;
  height: 50px !important;
}

@media (max-width: 430px) and (max-height: 900px) {
  .menu-button {
    grid-template-rows: minmax(0, 1fr) 48px !important;
  }

  .menu-card-copy {
    height: 48px !important;
  }
}

@media (max-height: 760px) {
  .menu-button {
    grid-template-rows: minmax(0, 1fr) 46px !important;
  }

  .menu-card-copy {
    height: 46px !important;
  }
}

/* menu-image-square-center-2026-07-03
   Keep the two-zone card, but stop stretching artwork horizontally. The source
   image is square, centered, and sized by the image-zone height. */
.menu-card-art img,
.menu-button[data-nav="/as"] .menu-card-art img,
.menu-button[data-nav="/db"] .menu-card-art img {
  top: 0 !important;
  bottom: 0 !important;
  left: 50% !important;
  right: auto !important;
  width: auto !important;
  height: 100% !important;
  aspect-ratio: 1 / 1;
  object-fit: fill !important;
  transform: translateX(-50%) !important;
}

/* menu-compact-square-card-2026-07-03
   Compact the menu cards while keeping the two-zone layout and square artwork. */
.menu-grid {
  gap: 8px;
}

.menu-button {
  height: 168px !important;
  grid-template-rows: minmax(0, 1fr) 44px !important;
}

.menu-card-copy {
  height: 44px !important;
  padding: 5px 14px 7px;
  gap: 9px;
}

.menu-button strong {
  font-size: 25px;
}

.menu-card-copy > span {
  font-size: 13px;
}

@media (max-width: 430px) and (max-height: 900px) {
  .menu-button {
    height: 168px !important;
    grid-template-rows: minmax(0, 1fr) 44px !important;
  }

  .menu-card-copy {
    height: 44px !important;
    padding: 5px 14px 7px;
  }
}

@media (max-height: 760px) {
  .menu-button {
    height: 160px !important;
    grid-template-rows: minmax(0, 1fr) 42px !important;
  }

  .menu-card-copy {
    height: 42px !important;
    padding: 4px 13px 6px;
  }

  .menu-button strong {
    font-size: 24px;
  }

  .menu-card-copy > span {
    font-size: 12px;
  }
}

/* menu-compact-card-width-2026-07-03
   Narrow the AS/DB menu cards so the square artwork does not sit inside a wide
   empty strip. */
.screen > .topbar + .menu-grid,
.screen .menu-grid,
.menu-grid {
  width: min(100%, 176px) !important;
  max-width: min(100%, 176px) !important;
  margin-left: auto;
  margin-right: auto;
}

.menu-card-copy {
  grid-template-columns: 1fr !important;
  justify-items: center;
  align-content: center;
  gap: 1px;
  padding: 4px 8px 6px !important;
  text-align: center;
}

.menu-button strong {
  font-size: 24px;
}

.menu-card-copy > span {
  font-size: 11px;
  line-height: 1.15;
}

/* menu-balanced-card-design-2026-07-03
   Final visual balance: not a full-width kiosk tile and not a narrow tower.
   Keep two cards visible, center the square artwork, and restore a readable
   horizontal label row. */
.screen > .topbar + .menu-grid,
.screen .menu-grid,
.menu-grid {
  width: min(100%, 312px) !important;
  max-width: min(100%, 312px) !important;
  gap: 12px !important;
}

.menu-button {
  height: 190px !important;
  grid-template-rows: 138px 52px !important;
  border-radius: 18px !important;
  box-shadow: 0 16px 34px rgba(18, 53, 92, 0.105);
}

.menu-card-art {
  display: grid !important;
  place-items: center !important;
  padding: 6px 0 0;
}

.menu-card-art img,
.menu-button[data-nav="/as"] .menu-card-art img,
.menu-button[data-nav="/db"] .menu-card-art img {
  position: static !important;
  width: 132px !important;
  height: 132px !important;
  aspect-ratio: 1 / 1;
  object-fit: fill !important;
  transform: none !important;
}

.menu-card-copy {
  height: 52px !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  justify-items: start;
  align-items: center;
  align-content: center;
  gap: 10px;
  padding: 7px 16px 9px !important;
  text-align: left;
}

.menu-button strong {
  font-size: 28px;
  line-height: 1;
}

.menu-card-copy > span {
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-height: 760px) {
  .screen > .topbar + .menu-grid,
  .screen .menu-grid,
  .menu-grid {
    gap: 10px !important;
  }

  .menu-button {
    height: 178px !important;
    grid-template-rows: 128px 50px !important;
  }

  .menu-card-art img,
  .menu-button[data-nav="/as"] .menu-card-art img,
  .menu-button[data-nav="/db"] .menu-card-art img {
    width: 122px !important;
    height: 122px !important;
  }

  .menu-card-copy {
    height: 50px !important;
    padding: 6px 15px 8px !important;
  }
}

/* menu-large-image-tight-label-2026-07-03
   Screen overflow is allowed: make the artwork fill a large square card area
   and shrink the label band to its text. */
.screen > .topbar + .menu-grid,
.screen .menu-grid,
.menu-grid {
  width: min(100%, 390px) !important;
  max-width: min(100%, 390px) !important;
  gap: 16px !important;
}

.menu-button {
  height: auto !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto auto !important;
  align-content: start !important;
  border-radius: 18px !important;
  overflow: hidden;
}

.menu-card-art {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  display: block !important;
  padding: 0 !important;
  background: #f5f9ff;
}

.menu-card-art img,
.menu-button[data-nav="/as"] .menu-card-art img,
.menu-button[data-nav="/db"] .menu-card-art img {
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  aspect-ratio: 1 / 1;
  object-fit: fill !important;
  object-position: center center !important;
  transform: none !important;
}

.menu-card-copy {
  height: auto !important;
  min-height: 0 !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center;
  align-content: center;
  justify-items: start;
  gap: 10px;
  padding: 9px 18px 10px !important;
  text-align: left;
}

.menu-button strong {
  font-size: 28px;
  line-height: 1;
}

.menu-card-copy > span {
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

/* startup-splash-polish-2026-07-03
   One-second app launch splash with a glossy NEWK brand mark. */
.newk-startup-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 44%, rgba(49, 130, 246, 0.1), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  opacity: 1;
  transition: opacity 240ms ease, transform 240ms ease;
}

.newk-startup-splash.is-hiding {
  opacity: 0;
  transform: scale(1.012);
  pointer-events: none;
}

.newk-startup-mark {
  display: grid;
  justify-items: center;
  gap: 18px;
  transform: translateY(-3vh);
  animation: newkSplashRise 620ms cubic-bezier(0.18, 0.82, 0.24, 1) both;
}

.newk-startup-symbol {
  position: relative;
  width: 104px;
  height: 104px;
  display: block;
  border-radius: 32px;
  background:
    radial-gradient(circle at 27% 72%, rgba(119, 217, 255, 0.92), transparent 32%),
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.34), transparent 24%),
    conic-gradient(from 210deg, #03b9ff, #087cff 38%, #0c55e8 58%, #39c3ff 78%, #00a7f4);
  box-shadow:
    inset 13px 13px 20px rgba(255, 255, 255, 0.28),
    inset -18px -20px 28px rgba(0, 39, 148, 0.2),
    0 26px 44px rgba(49, 130, 246, 0.24);
  transform: rotate(-18deg) skew(-5deg);
  overflow: hidden;
}

.newk-startup-symbol::before {
  content: "";
  position: absolute;
  inset: 9px 16px auto 11px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.08));
  filter: blur(0.2px);
  transform: rotate(-17deg);
}

.newk-startup-symbol::after {
  content: "";
  position: absolute;
  inset: -24px auto auto 45px;
  width: 38px;
  height: 150px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0));
  transform: rotate(13deg);
}

.newk-startup-mark img {
  width: min(230px, 64vw);
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(13, 48, 98, 0.1));
}

@keyframes newkSplashRise {
  0% {
    opacity: 0;
    transform: translateY(calc(-3vh + 10px)) scale(0.94);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(-3vh) scale(1);
    filter: blur(0);
  }
}

@media (max-width: 640px) {
  .newk-startup-mark {
    gap: 15px;
  }

  .newk-startup-symbol {
    width: 90px;
    height: 90px;
    border-radius: 29px;
  }

  .newk-startup-mark img {
    width: min(204px, 64vw);
  }
}

/* header-icon-refine-2026-07-02 */
.chat-screen .chat-head-button .bell-icon svg,
.chat-screen .chat-head-button .language-icon svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.35;
}

.chat-screen .chat-head-button.is-language .language-icon svg {
  stroke-width: 2.1;
}

/* chat-message-surface-2026-07-02
   Scope this to the central message list only. Header, action buttons,
   composer, and AS tray/card controls keep their existing treatment. */
.chat-screen .chat-feed {
  position: relative;
  isolation: isolate;
  gap: 8px;
  padding-inline: clamp(14px, 4vw, 22px);
  background:
    linear-gradient(180deg, rgba(246, 251, 255, 0.18), rgba(225, 239, 252, 0.32)),
    url("/monitor/assets/chat-room-bg.jpg") center top / cover no-repeat,
    #dceefa;
  border-color: rgba(188, 213, 238, 0.42);
}

.chat-screen .chat-feed.is-drop-target {
  background:
    linear-gradient(180deg, rgba(228, 242, 255, 0.36), rgba(213, 233, 252, 0.48)),
    url("/monitor/assets/chat-room-bg.jpg") center top / cover no-repeat,
    #dceefa;
}

.chat-screen .chat-feed.is-chat-drop-zone {
  background:
    linear-gradient(180deg, rgba(226, 241, 255, 0.42), rgba(207, 231, 252, 0.54)),
    url("/monitor/assets/chat-room-bg.jpg") center top / cover no-repeat,
    #dceefa;
}

.chat-screen .message-bubble:not(.has-as-card):not(.has-address-review-card) {
  width: fit-content;
  min-width: clamp(74px, 22vw, 116px);
  max-width: min(78%, 420px);
  gap: 4px;
  padding: 9px 12px 7px;
  border-radius: 16px 16px 16px 7px;
  border-color: rgba(196, 214, 232, 0.82);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 5px 14px rgba(31, 70, 112, 0.075);
}

.chat-screen .message-bubble.is-mine:not(.has-as-card):not(.has-address-review-card) {
  justify-self: end;
  border-radius: 16px 16px 7px 16px;
  border-color: rgba(153, 198, 236, 0.76);
  background: rgba(219, 238, 255, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.64),
    0 5px 14px rgba(11, 110, 220, 0.095);
}

.chat-screen .message-bubble.is-other:not(.has-as-card):not(.has-address-review-card) {
  justify-self: start;
}

.chat-screen .message-bubble .bubble-name {
  color: #3476b8;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 800;
}

.chat-screen .message-bubble p {
  color: #193554;
  font-size: 15px;
  line-height: 1.42;
}

.chat-screen .message-bubble time {
  margin-top: 1px;
  color: rgba(94, 117, 142, 0.72);
  font-size: 11px;
  line-height: 1.1;
  font-weight: 700;
}

.chat-screen .message-bubble.is-system,
.chat-screen .message-bubble.is-compact-system {
  width: fit-content;
  min-width: 0;
  max-width: min(82%, 340px);
  justify-self: center;
  padding: 7px 11px;
  border-radius: 999px;
  border-color: rgba(164, 198, 230, 0.58);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 12px rgba(31, 70, 112, 0.07);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.chat-screen .message-bubble.is-system .bubble-name,
.chat-screen .message-bubble.is-compact-system .bubble-name {
  color: #2e6fae;
  font-size: 11px;
  font-weight: 800;
}

.chat-screen .message-bubble.is-system p,
.chat-screen .message-bubble.is-compact-system p {
  color: #3a5876;
  font-size: 13px;
  line-height: 1.32;
}

.chat-screen .message-bubble.is-system time,
.chat-screen .message-bubble.is-compact-system time {
  display: none;
}

@media (max-width: 640px) {
  .chat-screen .chat-feed {
    padding-inline: 13px;
    background-size: cover, cover, auto;
    background-position: center top, center top, center;
  }

  .chat-screen .message-bubble:not(.has-as-card):not(.has-address-review-card) {
    max-width: 79%;
    padding: 8px 11px 7px;
  }
}
