* {
  box-sizing: border-box;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #1f2937;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
button:hover {
  background: #374151;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #b89b72;
  outline-offset: 3px;
}
.secondary {
  background: #fff;
  color: #374151;
  border-color: var(--border);
}
.secondary:hover {
  background: #f3f4f6;
}
.danger {
  color: #a23b3b;
  background: #fff4f3;
  border-color: #f2d9d7;
}
.danger:hover {
  background: #fbe5e3;
}
input,
select,
textarea {
  min-height: 44px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 10px 13px;
  border: 1px solid #dce0e6;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #b89b7226;
}
input:disabled {
  background: #f3f4f6;
}
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: #1f2937;
}
input[type="file"] {
  padding: 8px;
  background: #f9fafb;
}
input::file-selector-button {
  border: 0;
  background: #eaecef;
  padding: 5px 10px;
  border-radius: 4px;
  margin-right: 10px;
  color: #374151;
}
label {
  display: grid;
  gap: 7px;
  font-weight: 600;
  font-size: 13px;
  margin: 16px 0;
}
label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.8px;
  line-height: 1.35;
  margin-bottom: 10px;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.4px;
  margin-bottom: 12px;
}
h3 {
  font-size: 16px;
  margin-bottom: 12px;
}
a {
  color: #475569;
}
main {
  min-width: 0;
}
.hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.8;
}
.eyebrow,
.small-label {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #9b805a;
}
.eyebrow {
  margin-bottom: 10px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
  margin-bottom: 22px;
  box-shadow: 0 3px 12px #11182703;
}
.bar,
.section-heading,
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.section-heading {
  margin-bottom: 18px;
}
.section-heading h2,
.section-heading h3,
.bar h2 {
  margin: 0;
}
.page-heading {
  margin-bottom: 28px;
}
.page-heading .hint {
  margin-bottom: 0;
}
.page-chip,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: #f3f4f6;
  color: #6b7280;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.page-chip {
  padding: 7px 12px;
  border: 1px solid var(--border);
  background: #fff;
}
.badge[data-status="retained"] {
  background: #ecf5ef;
  color: #397052;
}
.badge[data-status="review"] {
  background: #fbf3e7;
  color: #98713a;
}
.badge[data-status="recording"] {
  background: #edf2fb;
  color: #4a68a4;
}
.badge[data-status="closed"] {
  background: #f0f0f2;
  color: #757580;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f5f5f5;
  text-decoration: none;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.5px;
}
.brand b {
  color: #c2a77f;
  font-weight: 500;
}
.brand small {
  display: block;
  font-size: 8px;
  color: #8c94a4;
  letter-spacing: 2.6px;
  margin-top: 1px;
}
.brand-symbol {
  display: inline-grid;
  place-items: center;
  width: 39px;
  height: 43px;
  border: 1px solid #b89b7266;
  border-radius: 8px;
  color: #d4ba93;
  font:
    28px Georgia,
    serif;
  background: #b89b7210;
}
.nav-caption {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #7b8496;
  margin: 42px 12px 14px;
}
nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  margin: 5px 0;
  background: transparent;
  color: #aab3c3;
  font-size: 13px;
  border-radius: 7px;
}
nav button:hover {
  background: #ffffff09;
  color: #fff;
}
nav button[aria-current="page"] {
  background: #b89b721c;
  color: #dfc5a1;
  border-color: #b89b7230;
}
nav button span {
  font-size: 10px;
  color: #b89b72;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 24px 12px 0;
  border-top: 1px solid #ffffff10;
}
.sidebar-bottom p {
  font-size: 12px;
  color: #7e899c;
  margin: 8px 0 22px;
}
.sidebar-bottom button {
  width: 100%;
  background: #ffffff07;
  color: #b8c0cd;
  border-color: #ffffff12;
}
.header-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-heading strong {
  color: #374151;
  font-weight: 500;
}
.header-separator {
  margin: 0 15px;
  color: #c8cbd1;
}
#navToggle {
  display: none;
}
#workspace,
#profile,
#members,
#trash {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}
#newForm,
.filter-bar,
#searchForm {
  display: flex;
  gap: 12px;
  align-items: center;
}
#newForm input {
  flex: 1;
}
#newForm button {
  flex-shrink: 0;
}
.filter-bar input {
  max-width: 360px;
}
.filter-bar select {
  width: 160px;
  margin-left: auto;
}
ul {
  padding: 0;
  margin: 0;
  list-style: none;
}
li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid #eef0f3;
  min-width: 0;
  overflow-wrap: anywhere;
  flex-wrap: wrap;
}
li:last-child {
  border-bottom: 0;
}
li > span:first-child {
  flex: 1;
  min-width: 0;
}
li button {
  font-size: 12px;
  min-height: 34px;
  padding: 6px 12px;
  background: #fff;
  border-color: var(--border);
  color: #5b6473;
}
li button:hover {
  background: #f5f6f8;
}
#list li > button:first-child {
  flex: 1;
  text-align: left;
  color: #1f2937;
  border: 0;
  background: transparent;
  font-size: 14px;
  padding: 0;
  min-width: 100px;
  font-weight: 600;
}
.row-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 7px;
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
}
.empty-state:before {
  content: "—";
  display: block;
  font-size: 26px;
  color: #b89b72;
  margin-bottom: 8px;
}
#detail > label {
  max-width: 260px;
  margin: 24px 0;
}
#detail .hint {
  max-width: 850px;
}
#detail .bar:has(#timer) {
  justify-content: flex-start;
  background: #f8f9fb;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
#uploadForm {
  margin: 22px 0;
  padding: 20px;
  border: 1px dashed #cdd2db;
  border-radius: 8px;
  background: #fafbfc;
  display: flex;
  align-items: end;
  gap: 14px;
}
#uploadForm label {
  flex: 1;
  margin: 0;
}
#uploadForm button {
  flex-shrink: 0;
}
audio {
  width: 100%;
  height: 38px;
  margin-top: 10px;
}
#passwordForm {
  max-width: 520px;
}
#profileInfo {
  padding: 15px;
  background: #f8f9fb;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
#searchForm label {
  flex: 1;
  margin: 0;
}
#users {
  margin: 24px 0 30px;
}
#userForm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
  max-width: 900px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
#userForm > button {
  margin-top: 18px;
}
#userFormTitle {
  margin-top: 30px;
}
#trash h3 {
  margin-top: 30px;
}
#message:empty {
  display: none;
}
.login-panel {
  width: 100%;
  padding: 40px;
  border-radius: 16px;
  border: 1px solid #ffffff20;
  background: #20242bdb;
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px #0005;
}
.login-logo {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 20px;
  margin-bottom: 28px;
  box-shadow: 0 6px 20px #0003;
}
.login-panel h2 {
  font-size: 26px;
  color: #f1f1f1;
  font-weight: 550;
}
.login-panel h2 span {
  font-weight: 400;
  color: #c1a67d;
}
.login-panel .hint {
  color: #9fa6b2;
  margin-bottom: 28px;
}
#login label {
  color: #cbd0d9;
  font-size: 12px;
  margin: 20px 0;
}
#login input {
  background: #151b24a6;
  border-color: #ffffff26;
  color: #fff;
  min-height: 48px;
}
#login button {
  width: 100%;
  margin-top: 8px;
  min-height: 48px;
  background: #b89b72;
  color: #191d25;
}
#login button:hover {
  background: #c6ac87;
}
.secure-note {
  font-size: 11px;
  color: #8d95a2;
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid #ffffff12;
}
body:not(.authenticated) #message {
  position: static;
  max-width: none;
  margin-top: 18px;
  background: #472b2b;
  color: #ffd2c9;
  border-color: #ae66665c;
  box-shadow: none;
}
dialog::backdrop {
  background: #11182780;
  backdrop-filter: blur(4px);
}
dialog p {
  color: #6b7280;
  line-height: 1.8;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
}
[hidden] {
  display: none !important;
}
.loading {
  opacity: 0.6;
  pointer-events: none;
}
:root {
  font-family:
    Inter,
    "Pretendard",
    "Noto Sans KR",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #1f2937;
  background: #f5f6f8;
  font-size: 14px;
  line-height: 1.6;
  --accent: #b89b72;
  --border: #e5e7eb;
  --muted: #6b7280;
  --surface: #202329;
  --radius: 12px;
  --header-height: 72px;
}
body {
  margin: 0;
  overflow-wrap: anywhere;
}
main,
section,
form,
label,
.header-heading {
  min-width: 0;
}
button,
li button {
  min-height: 44px;
}
input,
select,
textarea,
button,
audio,
summary {
  scroll-margin-block: 90px 110px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
#sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 244px;
  background: #111827;
  color: #c4cad4;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  z-index: 30;
  overflow-y: auto;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}
#appHeader {
  position: fixed;
  top: 0;
  left: 244px;
  right: 0;
  height: calc(var(--header-height) + env(safe-area-inset-top));
  background: #ffffffed;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 64px);
  gap: 20px;
  z-index: 20;
  font-size: 12px;
  color: #6b7280;
  padding-top: env(safe-area-inset-top);
}
body.authenticated main {
  margin-left: 244px;
  padding: 110px clamp(24px, 4vw, 64px) 40px;
  padding-top: calc(var(--header-height) + env(safe-area-inset-top) + 24px);
}
#identity {
  font-size: 12px;
  text-align: right;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#workspace,
#profile,
#members,
#trash,
#homeScreen {
  max-width: 1280px;
  margin-inline: auto;
}
#workspace > #createScreen,
#workspace > #listScreen,
#workspace > #detail {
  display: none;
}
body[data-screen="list"] #workspace > #listScreen,
body[data-screen="create"] #workspace > #createScreen,
body[data-screen="detail"] #workspace > #detail:not([hidden]) {
  display: block;
}
#listScreen .section-heading {
  margin-bottom: 12px;
}
#createScreen {
  max-width: 760px;
  margin-inline: auto;
}
#createScreen .section-heading {
  margin: 0;
}
#newForm {
  align-items: end;
}
#newForm label {
  flex: 1;
  margin: 0;
}
.filter-bar {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(140px, 2fr) repeat(3, minmax(100px, 1fr));
  gap: 10px;
}
.filter-bar input,
.filter-bar select {
  width: 100%;
  max-width: none;
  margin: 0;
}
.case-columns,
.case-row {
  display: grid;
  grid-template-columns:
    minmax(130px, 2fr) 88px minmax(100px, 1fr)
    90px 90px 52px;
  gap: 12px;
  align-items: center;
}
.case-columns {
  color: var(--muted);
  font-size: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
#list .case-row {
  padding: 14px 0;
}
#list .case-row > * {
  min-width: 0;
}
#list .case-row > .case-link {
  min-width: 0;
  font-size: 15px;
  line-height: 1.6;
}
.case-owner,
.case-date,
.case-updated {
  font-size: 12px;
  color: var(--muted);
}
.case-row .badge {
  justify-self: start;
  white-space: normal;
}
body[data-role="lawyer"] .case-columns,
body[data-role="lawyer"] .case-row {
  grid-template-columns: minmax(130px, 2fr) 88px 90px 90px 52px;
}
body[data-role="lawyer"] .case-columns > span:nth-child(3) {
  display: none;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}
#moreCases,
#appTabs,
.mobile-only {
  display: none;
}
#login {
  min-height: 100svh;
  display: flex;
  grid-template-columns: 1fr 430px;
  align-items: center;
  gap: 70px;
  padding: max(28px, env(safe-area-inset-top)) 20px;
  background:
    linear-gradient(90deg, #141a22c9, #141a2280),
    url(/images/login-office.png) center/cover no-repeat;
  background-color: #141a22;
  color: #fff;
  justify-content: center;
}
#login .login-panel {
  width: min(440px, 100%);
  margin: auto;
}
#login .login-logo {
  margin: 0 auto 24px;
}
#login .login-panel h2 {
  text-align: center;
}
#editTitleForm {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 12px 0 20px;
}
#editTitleForm label {
  flex: 1;
  margin: 0;
}
#editTitleForm button {
  flex-shrink: 0;
}
#titleEditor summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
  font-weight: 600;
}
#detail {
  border-top: 3px solid #b89b72;
  scroll-margin-top: 95px;
  max-width: 960px;
  margin-inline: auto;
}
#detailBadge {
  margin-bottom: 12px;
}
#caseTitle {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.5;
}
.recorder-panel {
  max-width: 600px;
  margin: 16px auto;
  padding: 20px;
  background: var(--surface);
  color: #f5f5f5;
  text-align: center;
  border: 1px solid #bba16a55;
  border-radius: var(--radius);
}
#recordState {
  margin: 0 0 4px;
}
#timer {
  margin-left: auto;
  font:
    22px ui-monospace,
    monospace;
  color: #eee;
  display: block;
  margin: 0;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}
#waveform {
  display: block;
  width: 100%;
  max-width: 400px;
  height: 48px;
  margin: 8px auto;
}
[data-state="idle"] #waveform,
[data-state="idle"] #timer {
  display: none;
}
[data-state="recording"] #recordState {
  color: #ff8992;
}
[data-state="paused"] #recordState {
  color: #e4c37c;
}
.record-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.mic-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  padding: 6px;
  border-radius: 50%;
  background: var(--accent);
  color: #202329;
}
.stop-button {
  background: #a93640;
  color: white;
}
#recordPreview {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 10px auto;
}
#recordReview p {
  margin: 12px 0;
  font-size: 14px;
}
#recordReview button {
  margin: 4px;
}
#recordings li > a {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
#deleteCase {
  margin-top: 24px;
}
.empty-state {
  padding: 44px 16px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #e5e7eb;
  border-radius: 8px;
  margin: 16px 0 0;
  font-size: 13px;
}
#message {
  position: fixed;
  bottom: 20px;
  right: 24px;
  max-width: min(560px, calc(100vw - 32px));
  padding: 15px 20px;
  border: 1px solid #e7d7ba;
  border-radius: 10px;
  background: #fffcf5;
  color: #765d35;
  box-shadow: 0 10px 35px #11182715;
  z-index: 60;
  white-space: pre-wrap;
  font-size: 14px;
  margin: 0;
  pointer-events: none;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px;
  max-width: 460px;
  width: calc(100% - 36px);
  color: #1f2937;
  box-shadow: 0 30px 100px #11182730;
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
#homeScreen > h1 {
  font-size: 26px;
}
.home-primary {
  display: flex;
  align-items: start;
  flex-direction: column;
  width: 100%;
  padding: 24px;
  border-radius: 16px;
  background: var(--surface);
  margin: 24px 0 14px;
  text-align: left;
  gap: 10px;
}
.home-primary > span {
  font-size: 32px;
  color: #d2b588;
}
.home-primary strong {
  font-size: 22px;
}
.home-primary small {
  font-size: 14px;
  font-weight: 400;
  color: #d0d0d3;
}
.home-list {
  display: flex;
  width: 100%;
  padding: 20px;
  background: white;
  color: #24272d;
  border: 1px solid var(--border);
  border-radius: 12px;
  justify-content: space-between;
  gap: 12px;
}
.home-list span {
  color: #80643c;
}
.pwa-notice {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 8px 32px #11182725;
}
.pwa-notice p {
  margin-bottom: 12px;
}
.pwa-notice button {
  margin-right: 8px;
}
.offline-page {
  max-width: 600px;
  margin: 12vh auto;
  padding: 24px;
  text-align: center;
}
.offline-page h1 {
  margin-top: 24px;
}
.offline-page a {
  display: inline-block;
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
@media (min-width: 1024px) and (max-width: 1199px) {
  #sidebar {
    width: 210px;
    padding: 24px 16px;
  }
  body.authenticated main {
    margin-left: 210px;
    padding-inline: 20px;
  }
  #appHeader {
    left: 210px;
    padding-inline: 20px;
  }
  .case-columns,
  .case-row {
    gap: 8px;
    grid-template-columns:
      minmax(100px, 2fr) 76px minmax(80px, 1fr)
      80px 80px 48px;
  }
}
@media (max-width: 1023px) {
  #sidebar {
    width: min(280px, 85%);
    padding: 28px 20px;
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  body.nav-open #sidebar {
    transform: translateX(0);
  }
  body.nav-open {
    overflow: hidden;
  }
  body.authenticated main {
    margin-left: 0;
    padding-inline: 24px;
  }
  #appHeader {
    left: 0;
    padding-inline: 24px;
  }
  #navToggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
  }
  #navBackdrop {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #11182780;
    z-index: 25;
    border: 0;
    border-radius: 0;
  }
  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .case-columns {
    display: none;
  }
  #list .case-row,
  body[data-role="lawyer"] #list .case-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
  }
  #list .case-row > .case-link {
    grid-column: 1/-1;
    font-size: 17px;
  }
  .case-row > .badge {
    grid-column: 2;
    grid-row: 2;
  }
  .case-row > .case-owner {
    grid-column: 1;
    grid-row: 2;
  }
  .case-row > .case-date {
    grid-column: 1;
    grid-row: 3;
  }
  .case-row > .case-date:before {
    content: "등록 ";
  }
  .case-row > .case-updated {
    grid-column: 1;
    grid-row: 4;
  }
  .case-row > .case-updated:before {
    content: "수정 ";
  }
  .case-row > span:last-child {
    grid-column: 2;
    grid-row: 3/5;
    justify-self: end;
  }
}
@media (max-width: 767px) {
  :root {
    font-size: 16px;
    --header-height: 60px;
  }
  html {
    scroll-padding-block: 80px 110px;
  }
  body.authenticated main {
    padding: calc(var(--header-height) + env(safe-area-inset-top) + 20px)
      max(16px, env(safe-area-inset-right))
      calc(100px + env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
  }
  #appHeader {
    padding-inline: 16px;
  }
  .header-heading {
    width: 100%;
    flex-direction: row-reverse;
    justify-content: space-between;
  }
  #headerPage {
    font-size: 21px;
  }
  #identity {
    display: none;
  }
  .card {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    margin-bottom: 20px;
  }
  h2 {
    font-size: 22px;
  }
  h3 {
    font-size: 18px;
  }
  label,
  #login label {
    font-size: 15px;
  }
  .hint {
    font-size: 14px;
    line-height: 1.7;
  }
  input,
  select,
  textarea {
    font-size: 16px;
    min-height: 50px;
  }
  button {
    min-height: 48px;
  }
  #newForm,
  #editTitleForm,
  #uploadForm,
  #searchForm {
    flex-wrap: wrap;
    gap: 12px;
  }
  #newForm label,
  #newForm input,
  #newForm button,
  #editTitleForm label,
  #editTitleForm button,
  #uploadForm label,
  #uploadForm button,
  #searchForm label {
    flex-basis: 100%;
    width: 100%;
  }
  .filter-bar {
    gap: 8px;
  }
  .filter-bar input {
    grid-column: 1/-1;
  }
  .filter-bar select {
    font-size: 14px;
    min-height: 44px;
    padding: 8px;
  }
  #listScreen .section-heading {
    gap: 8px;
  }
  #listScreen .section-heading > .hint {
    font-size: 12px;
  }
  .case-owner,
  .case-date,
  .case-updated {
    font-size: 13px;
  }
  .pagination {
    display: none;
  }
  #moreCases:not([hidden]) {
    display: block;
    width: 100%;
  }
  #appTabs:not([hidden]) {
    position: fixed;
    inset: auto 0 0;
    z-index: 22;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    background: #fffffff5;
    border-top: 1px solid var(--border);
    backdrop-filter: blur(16px);
  }
  #appTabs button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    margin: 0;
    padding: 4px 0;
    min-height: 60px;
    text-align: center;
    font-size: 12px;
    background: transparent;
    color: #646975;
    border: 0;
    border-radius: 10px;
  }
  #appTabs button[aria-current] {
    color: #775c35;
    background: #b89b721a;
  }
  #appTabs svg {
    width: 24px;
    height: 24px;
  }
  #backCases {
    display: inline-flex;
    margin-bottom: 16px;
    background: #fff;
  }
  #detailBadge {
    float: right;
    margin-top: 8px;
  }
  #caseTitle {
    font-size: 24px;
  }
  #detail > label {
    max-width: none;
    margin: 16px 0;
  }
  #titleEditor {
    background: #fff;
    border-radius: 12px;
    padding: 0 16px;
    margin: 16px 0;
  }
  #detail .section-heading {
    margin-top: 24px;
  }
  #detail .section-heading .badge {
    display: none;
  }
  .recorder-panel {
    margin: 16px 0;
    padding: 20px 12px;
    border-radius: 16px;
  }
  .record-controls > button:not(.mic-button) {
    flex: 1;
    padding: 10px;
  }
  #recordReview button {
    width: 100%;
    margin: 8px 0 0;
  }
  #uploadForm {
    padding: 16px;
    background: #fff;
  }
  #recordings li {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
  }
  #profile,
  #members,
  #trash {
    padding: 20px 16px;
    background: #fff;
    border-radius: 12px;
  }
  #userForm {
    grid-template-columns: minmax(0, 1fr);
  }
  #users li > span:first-child {
    flex-basis: 100%;
  }
  #passwordForm > button {
    width: 100%;
  }
  #message {
    bottom: calc(88px + env(safe-area-inset-bottom));
    right: 16px;
  }
  dialog {
    padding: 20px;
    width: calc(100% - 24px);
    border-radius: 16px;
  }
  .dialog-actions button {
    flex: 1;
  }
  .login-panel {
    padding: 26px;
  }
  .keyboard-open #appTabs {
    display: none;
  }
  .keyboard-open #message {
    bottom: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none;
    animation: none;
    scroll-behavior: auto;
  }
}
#headerPage {
  font-size: 20px;
  margin: 0;
  letter-spacing: -0.4px;
  color: #24272d;
}
#connectionNotice {
  max-width: 760px;
  margin: 24px auto;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--accent);
  border-radius: 12px;
}
body.offline-mode main > section:not(#connectionNotice) {
  display: none;
}
body.offline-mode.recording-active #workspace {
  display: block;
}
body.offline-mode.recording-active #detail > :not(#recorderPanel) {
  display: none;
}
body.offline-mode #reviewInfo {
  display: none;
}

.ai-panel{margin-block:1rem;padding:1rem;border:1px solid #cbd5e1;border-radius:12px;min-width:0}.ai-text{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;max-height:28rem;overflow:auto}.ai-panel textarea{width:100%;box-sizing:border-box}.ai-panel button{margin:0.4rem}.ai-panel label{display:block}
