:root {
  --bg: #f2f2f7; --surface: #fff; --text: #1c1c1e; --muted: #8e8e93; --border: #e5e5ea;
  --yellow-btn: #ffdc00; --red: #000;
  --primary: #8b7355; --radius: 14px; --radius-sm: 10px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; height: 100%; height: -webkit-fill-available; }
body { margin: 0; min-height: 100%; min-height: -webkit-fill-available; min-height: 100dvh; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
#root { min-height: 100%; min-height: -webkit-fill-available; min-height: 100dvh; max-width: 480px; margin: 0 auto; background: var(--surface); display: flex; flex-direction: column; position: relative; z-index: 1; }
.view { display: none; flex: 1; flex-direction: column; min-height: 0; }
.view.active { display: flex; }
.topbar { display: flex; align-items: center; padding: calc(8px + var(--safe-t)) 8px 8px 4px; gap: 4px; flex-shrink: 0; border-bottom: 1px solid var(--border); }
.topbar h1 { flex: 1; text-align: center; font-size: 17px; font-weight: 600; margin: 0; }
.topbar-actions { display: flex; align-items: center; }
.icon-btn { width: 40px; height: 40px; border: none; background: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); position: relative; touch-action: manipulation; }
.icon-btn svg { width: 22px; height: 22px; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: var(--safe-b); }
.edit-scroll { overflow-y: scroll; -webkit-overflow-scrolling: auto; }
#edit-form { padding: 12px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.toggles-row { display: flex; gap: 6px; padding: 10px 16px 0; overflow-x: auto; flex-shrink: 0; scrollbar-width: none; }
.toggles-row::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }
.list-toolbar { display: flex; flex-direction: column; gap: 8px; padding: 10px 16px 12px; flex-shrink: 0; }
.list-stats { padding: 10px 16px 0; font-size: 13px; color: var(--muted); text-align: center; flex-shrink: 0; }
.search-row input,
.sort-row select {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}
.sort-row select {
  padding-right: 36px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.case-item { display: flex; gap: 12px; padding: 12px 16px; border: none; border-bottom: 1px solid var(--border); width: 100%; text-align: left; font: inherit; color: inherit; background: none; cursor: pointer; }
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #ddd; flex-shrink: 0; }
.avatar.lg { width: 72px; height: 72px; }
.photo-rect { width: 72px; height: 96px; border-radius: 8px; object-fit: cover; background: #ddd; flex-shrink: 0; }
.name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.tag-emergency { background: var(--red); color: #fff; font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.fab { position: fixed; bottom: calc(16px + var(--safe-b)); right: max(16px, calc(50% - 220px)); width: 52px; height: 52px; border-radius: 50%; background: var(--yellow-btn); border: none; font-size: 28px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.15); z-index: 10; touch-action: manipulation; }
.section-head { display: flex; align-items: center; gap: 8px; padding: 8px 16px; font-size: 15px; font-weight: 600; }
.case-num { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 500; }
.person-card { margin: 0 16px 8px; padding: 12px; background: var(--bg); border-radius: var(--radius-sm); display: flex; gap: 12px; align-items: center; }
.primary-btn { display: block; width: calc(100% - 32px); margin: 0 16px 16px; padding: 14px; background: var(--yellow-btn); border: none; border-radius: var(--radius-sm); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.status-row { display: flex; gap: 12px; padding: 0 16px 16px; font-size: 13px; color: var(--muted); }
.panel { position: fixed; top: 0; left: 100vw; width: min(100%, 400px); max-width: 100vw; height: 100%; height: 100dvh; background: var(--surface); z-index: 60; display: flex; flex-direction: column; padding-top: var(--safe-t); pointer-events: none; visibility: hidden; transition: left .25s ease; }
.panel.open { left: auto; right: 0; pointer-events: auto; visibility: visible; }
.panel-overlay[hidden], .panel[hidden], .modal-overlay[hidden] { display: none !important; pointer-events: none !important; }
.panel-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50; pointer-events: none; }
.panel-overlay.open { display: block; pointer-events: auto; }
.panel-head { display: flex; align-items: center; padding: 12px; border-bottom: 1px solid var(--border); }
.panel-head h2 { flex: 1; margin: 0; font-size: 17px; text-align: center; }
.panel-body { flex: 1; overflow-y: auto; padding: 16px; padding-bottom: calc(16px + var(--safe-b)); }
.btn-sm { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 13px; cursor: pointer; touch-action: manipulation; min-height: 36px; }
.btn-sm.primary { background: var(--yellow-btn); border-color: transparent; }
.btn-sm.danger { color: var(--red); }
.field { margin-bottom: 0; min-width: 0; max-width: 100%; }
.field > label:not(.radio-opt):not(.checkbox-row), .field > .field-label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]), .field select, .field textarea { width: 100%; min-width: 0; max-width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 16px; background: var(--surface); touch-action: manipulation; -webkit-user-select: text; user-select: text; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]) { -webkit-appearance: none; appearance: none; }
.field input[type="date"], .field input[type="time"], .field input[type="datetime-local"] { display: block; -webkit-min-logical-width: 0; min-height: 44px; }
.field input[type="hidden"], .field input[type="file"] { display: none !important; }
.field textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.35; }
.field label:has(input[type="checkbox"]) { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text); margin-bottom: 0; }
.field input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--yellow-btn); }
.login-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 24px 40px;
}
.login-brand {
  text-align: center;
  margin-bottom: 36px;
  animation: login-fade-in 0.55s ease both;
}
.login-brand h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.login-brand p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
  max-width: 280px;
  margin-inline: auto;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: login-slide-up 0.55s ease 0.08s both;
}
.login-wrap .field { margin: 0; }
.login-wrap .field > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  transition: color 0.2s ease;
}
.login-wrap .field:focus-within > label { color: var(--primary); }
.login-wrap .field input {
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.25s ease, background-color 0.2s ease, transform 0.2s ease;
}
.login-wrap .field input::placeholder { color: #aeaeb2; }
.login-wrap .field input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(139, 115, 85, 0.14);
  transform: translateY(-1px);
}
.login-wrap .primary-btn {
  width: 100%;
  margin: 6px 0 0;
  min-height: 50px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.login-wrap .primary-btn:active:not([disabled]) { transform: scale(0.985); }
.login-wrap .primary-btn[disabled] { opacity: 0.65; cursor: wait; }
.login-wrap .error {
  color: var(--red);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  min-height: 18px;
  margin: -4px 0 0;
  transition: opacity 0.2s ease;
}
.login-wrap .error:not(:empty) { animation: login-shake 0.38s ease; }
@keyframes login-fade-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes login-slide-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes login-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .login-brand, .login-form, .login-wrap .field input, .login-wrap .primary-btn { animation: none; transition: none; }
  .login-wrap .field input:focus { transform: none; }
}
.error { color: var(--red); font-size: 13px; margin-top: 8px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.toast { position: fixed; bottom: calc(20px + var(--safe-b)); left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.82); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 100; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.phys-row { display: flex; justify-content: space-between; gap: 12px; padding: 0; font-size: 14px; line-height: 1.4; }
.phys-row .label { color: var(--muted); }
.edit-actions { display: flex; gap: 8px; padding: 12px 16px; padding-bottom: calc(12px + var(--safe-b)); border-top: 1px solid var(--border); flex-shrink: 0; background: var(--surface); position: relative; z-index: 2; }
.edit-actions button { flex: 1; padding: 12px; border-radius: var(--radius-sm); font: inherit; font-size: 15px; cursor: pointer; border: 1px solid var(--border); background: var(--surface); touch-action: manipulation; min-height: 44px; }
.edit-actions .save { background: var(--yellow-btn); border-color: transparent; font-weight: 600; }
.form-section { margin: 0; border: none; background: transparent; min-width: 0; max-width: 100%; }
.form-section > summary { list-style: none; padding: 12px 2px; font-weight: 600; font-size: 15px; cursor: pointer; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 8px; user-select: none; border-bottom: 1px solid var(--border); touch-action: manipulation; }
.form-section > summary::-webkit-details-marker { display: none; }
.form-section > summary::after { content: '▸'; color: var(--muted); font-size: 12px; flex-shrink: 0; }
.form-section[open] > summary::after { content: '▾'; }
.form-section[open] > summary { border-bottom-color: transparent; margin-bottom: 8px; }
.form-section__body { display: flex; flex-direction: column; gap: 10px; padding-bottom: 4px; min-width: 0; max-width: 100%; }
.btn-sm, .add-row-btn, .chip-btn, .reveal-btn { -webkit-appearance: none; appearance: none; }
.field-subgroup { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.field-subgroup__title { margin: 0 0 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .field-row-2 { grid-template-columns: 1fr; } }
.segmented { display: flex; gap: 2px; padding: 3px; margin: 10px 16px 0; background: var(--bg); border-radius: var(--radius-sm); flex-shrink: 0; }
.segmented button { flex: 1; padding: 7px 8px; border: none; border-radius: 8px; background: none; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.segmented button.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.photo-upload { display: flex; align-items: flex-start; gap: 12px; width: 100%; }
.photo-upload-actions { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.photo-upload-actions .btn-sm { width: 100%; text-align: center; }
.field--photo .photo-upload { padding: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.field--photo .photo-upload .avatar.lg,
.field--photo .photo-upload .photo-rect { flex-shrink: 0; }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 80; align-items: center; justify-content: center; padding: 16px; pointer-events: none; }
.modal-overlay.open { display: flex; pointer-events: auto; }
.modal-box { background: var(--surface); border-radius: var(--radius); padding: 18px; width: min(100%, 380px); max-height: 85vh; overflow-y: auto; }
.modal-head { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.modal-text { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.modal-actions { display: flex; gap: 8px; margin-top: 6px; }
.modal-actions button { flex: 1; padding: 11px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 14px; cursor: pointer; }
.modal-actions button.primary { background: var(--yellow-btn); border-color: transparent; font-weight: 600; }
.modal-actions button.danger { color: var(--red); }
[disabled] { opacity: .6; cursor: default; }
.vis-badge { display: inline-block; font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 4px; margin-left: 4px; vertical-align: middle; text-transform: uppercase; letter-spacing: 0.03em; }
.vis-badge.vis-public { background: #e8f5e9; color: #2e7d32; }
.vis-badge.vis-private { background: #fce4ec; color: #c62828; }
.field-label-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.field[data-hidden="1"] { display: none !important; }
.field--radio .field-label-row { margin-bottom: 8px; }
.radio-group { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; width: 100%; min-width: 0; }
.radio-group--inline { flex-direction: row; flex-wrap: nowrap; }
.radio-opt { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 14px; margin: 0; font-size: 16px; line-height: 1.35; color: var(--text); cursor: pointer; border-bottom: 1px solid var(--border); box-sizing: border-box; width: 100%; min-width: 0; -webkit-user-select: none; user-select: none; }
.radio-group--inline .radio-opt { flex: 1 1 0; min-width: 0; border-bottom: none; border-right: 1px solid var(--border); padding: 10px 12px; }
.radio-opt:last-child { border-bottom: none; border-right: none; }
.radio-opt input[type="radio"] { appearance: none; -webkit-appearance: none; display: block; width: 22px; height: 22px; min-width: 22px; min-height: 22px; margin: 0; padding: 0; border: 2px solid #c7c7cc; border-radius: 50%; background: var(--surface); flex: 0 0 22px; -webkit-flex: 0 0 22px; flex-shrink: 0; -webkit-flex-shrink: 0; box-sizing: border-box; vertical-align: middle; position: relative; }
.radio-opt input[type="radio"]:checked { border-color: #e6c200; background: var(--yellow-btn); background-clip: padding-box; box-shadow: inset 0 0 0 4px var(--surface); }
.radio-opt__text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .radio-group--inline { flex-direction: column; flex-wrap: nowrap; }
  .radio-group--inline .radio-opt { flex: none; width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .radio-group--inline .radio-opt:last-child { border-bottom: none; }
}
.checkbox-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; margin: 0; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.checkbox-row input[type="checkbox"] { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--yellow-btn); }
.repeat-block { margin-bottom: 0; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.repeat-block > .field-label-row { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 10px; }
.repeat-list { display: flex; flex-direction: column; gap: 8px; }
.repeat-row { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.repeat-row__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.repeat-row__field { margin-bottom: 0; }
.add-row-btn { margin-top: 8px; width: 100%; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip-btn { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 13px; cursor: pointer; touch-action: manipulation; min-height: 36px; position: relative; z-index: 1; }
.chip-btn.active { background: var(--text); color: #fff; border-color: var(--text); }
.cloth-row { margin-bottom: 0; }
.cloth-row__remove { margin-top: 6px; align-self: flex-start; }
.cloth-rows { display: flex; flex-direction: column; gap: 10px; }
.cloth-block { display: flex; flex-direction: column; gap: 10px; }
.reveal-actions { margin-bottom: 0; }
.reveal-actions .reveal-btn { margin-right: 6px; margin-bottom: 0; }
.danger-text { color: var(--red); border-color: transparent; background: none; }
.file-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.file-name { font-size: 13px; color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.witness-card { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.witness-card__when { font-weight: 600; font-size: 14px; }
.witness-card__who { font-size: 13px; color: var(--muted); margin-top: 2px; }
.witness-card__details { font-size: 14px; margin-top: 6px; line-height: 1.45; }
.view-block { padding: 0 16px 12px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.view-section-card { margin: 0 12px 10px; padding: 12px; background: var(--bg); border-radius: 10px; display: flex; flex-direction: column; gap: 8px; }
.view-subgroup-title {
  margin: 10px 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.view-subgroup-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.phys-row--empty span:last-child { color: var(--muted); }
.history-section {
  margin-top: 24px;
  padding: 16px 0 8px;
  border-top: 2px solid var(--border);
  background: linear-gradient(180deg, #ebebf0 0%, var(--bg) 120px);
}
.history-section__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.history-section__head::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
.history-section__body { padding: 0 4px; }
.history-card { margin: 0 12px 10px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.history-card__meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.history-card__title { font-weight: 600; margin-bottom: 6px; }
.history-change { padding: 6px 0; border-top: 1px solid var(--border); line-height: 1.45; }
.history-change:first-of-type { border-top: none; padding-top: 0; }
.history-change__label { color: var(--muted); font-size: 12px; }
.history-change__values { margin-top: 2px; word-break: break-word; }
.history-empty { color: var(--muted); font-size: 13px; padding: 0 16px 12px; }
.notice-banner { padding: 10px 12px; background: #fff8e1; border-radius: 8px; font-size: 13px; line-height: 1.4; color: #5c4a00; }
.settings-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: none; border-bottom: 1px solid var(--border); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.settings-item__title { font-size: 15px; font-weight: 500; }
.settings-item__desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.settings-item__chev { margin-left: auto; color: var(--muted); font-size: 18px; flex-shrink: 0; }
.order-list { padding: 8px 0; }
.order-item { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.order-item__label { flex: 1; font-size: 15px; min-width: 0; }
.order-item__actions { display: flex; gap: 4px; flex-shrink: 0; }
.order-item__actions .icon-btn { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; }
.order-item__actions .icon-btn:disabled { opacity: .35; cursor: default; }
.order-group { display: flex; flex-direction: column; }
.order-item__expand { width: 28px; height: 28px; border: none; background: none; color: var(--muted); flex-shrink: 0; transition: transform .15s ease; }
.order-item__expand svg { transition: transform .15s ease; }
.order-item__expand.is-open svg { transform: rotate(90deg); }
.order-fields { display: flex; flex-direction: column; background: var(--bg); border-top: 1px solid var(--border); }
.order-field-item { display: flex; flex-direction: row; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px dashed var(--border); }
.order-field-item__indent { width: 28px; flex-shrink: 0; }
.order-field-item .order-item__label { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.order-field-item .order-item__actions { display: flex; flex-direction: row; gap: 4px; flex-shrink: 0; }
.order-field-item:last-child { border-bottom: none; }
.order-field-item .order-item__actions .icon-btn { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 8px; }
.settings-toolbar { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); flex-shrink: 0; }
.settings-toolbar button { flex: 1; padding: 12px; border-radius: var(--radius-sm); font: inherit; font-size: 15px; cursor: pointer; border: 1px solid var(--border); background: var(--surface); }
.settings-toolbar .save { background: var(--yellow-btn); border-color: transparent; font-weight: 600; }
.css-editor-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 12px; gap: 8px; }
.css-editor-hint { font-size: 13px; color: var(--muted); line-height: 1.4; margin: 0; }
.css-editor { flex: 1; width: 100%; min-height: 240px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.45; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); resize: none; background: var(--surface); color: var(--text); tab-size: 2; white-space: pre; overflow: auto; }
@media (min-width: 481px) { body { background: #111; } }
