@font-face {
  font-family: 'Pretendard';
  src: url('/static/fonts/pretendard/PretendardVariable.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #f6f8fa; --surface: #fff; --ink: #18252b; --muted: #63717b;
  --line: #e0e6ea; --accent: #087f78; --accent-hover: #066a64; --soft: #edf7f5;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif;
  font-synthesis: none; font-size: 15px; line-height: 1.65;
  font-weight: 400; letter-spacing: -.015em;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button, a, summary, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a, summary { touch-action: manipulation; }
button { border: 1px solid transparent; }
button:disabled { opacity: .5; cursor: not-allowed; }
button, a, input, select, textarea, summary { transition: background-color .15s, border-color .15s, box-shadow .15s; }
:focus-visible { outline: 3px solid #6fbdb6; outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 26px; font-weight: 600; letter-spacing: -.035em; line-height: 1.4; margin-bottom: 0; }
h2, h3, .sectionTitle { font-size: 18px; font-weight: 600; letter-spacing: -.025em; line-height: 1.5; margin: 0 0 16px; }
h1, h2, h3, .sectionTitle, label { word-break: keep-all; overflow-wrap: anywhere; }
strong, b { font-weight: 600; }
p { margin-bottom: 16px; }
small, .mutedText { color: var(--muted); font-size: 13px; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 650; letter-spacing: -.4px; line-height: 1.35; }
.brand > .icon { width: 26px; height: 26px; color: var(--accent); }
.topBar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.topBar .brand { margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.buttonRow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.buttonRow > a { color: var(--accent); font-weight: 600; text-decoration: none; }
.accountName { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; }
.accountControls { margin-left: auto; justify-content: flex-end; }
.accountMenu { position: relative; flex-shrink: 0; }
.accountAvatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); background: var(--surface); }
.accountAvatar:hover, .accountAvatar[aria-expanded="true"] { background: var(--soft); border-color: var(--accent); }
.accountMenuPanel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 100; width: min(230px, calc(100vw - 40px)); padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 12px 32px #18252b14; }
.accountMenuName { padding: 10px 12px; margin: 0 0 4px; border-bottom: 1px solid var(--line); font-weight: 600; overflow-wrap: anywhere; }
.accountMenuPanel > button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 8px; background: var(--surface); color: var(--ink); text-align: left; }
.accountMenuPanel > button:hover { background: var(--soft); }
.profileDialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; margin: auto; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 64px #18252b24; }
.profileDialog::backdrop { background: #18252b40; }
.profileDialog .stack { gap: 16px; }
.profileDialog p { margin-bottom: 0; }
.profileDialog [role="status"]:empty, .profileDialog [role="alert"]:empty { display: none; }
.profileDetails { display: grid; gap: 14px; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.profileDetails dt { font-size: 12px; color: var(--muted); }
.profileDetails dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.statusButton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 1px solid #ccd7dc; border-radius: 8px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 550; white-space: nowrap; }
.statusButton:hover { background: var(--bg); }
.appShell { min-height: 100vh; padding: 36px 32px 110px; }
.phoneFrame { width: min(100%, 1040px); margin: auto; }
.content { min-width: 0; padding-top: 28px; }
.stack { display: grid; gap: 24px; min-width: 0; }
.imageTransferZone { border: 1px dashed #b5c9cc; border-radius: 12px; padding: 16px; }
.imageTransferZone:focus-visible, .imageTransferZone.isDragging { outline: 2px solid var(--accent); outline-offset: 2px; background: #f4faf9; }
.stack > .sectionTitle { margin-bottom: -8px; }
.bottomNav { position: fixed; z-index: 10; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: min(390px, calc(100% - 32px)); padding: 7px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 30px #18252b12; }
.bottomNav a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 600; }
.bottomNav a:hover { background: var(--bg); }
.bottomNav a.active { background: var(--soft); color: var(--accent); }
.adminShell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 28px 18px; }
.sidebar .brand { margin: 0 6px 32px; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 7px; text-decoration: none; color: var(--muted); font-weight: 600; }
.sidebar nav a[aria-current] { background: var(--soft); color: var(--accent); box-shadow: inset 3px 0 var(--accent); }
.sidebar nav a:hover { background: var(--soft); }
.workspace { min-width: 0; width: 100%; max-width: 1500px; padding: 36px 28px; }
.workspace .topBar { border: 0; padding-bottom: 0; min-height: 40px; }
.workspace .content { display: grid; gap: 24px; }
.metricGrid, .metrics, .miniStats, .actionGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 22px; min-width: 0; }
.metric strong { display: block; color: var(--accent); font-size: 32px; font-weight: 650; line-height: 1.3; font-variant-numeric: tabular-nums; }
.metric span { color: var(--muted); font-size: 13px; }
.metrics .metric { display: grid; grid-template-columns: 26px 1fr; gap: 8px 12px; align-items: center; }
.metrics .metric strong { grid-column: 2; }
.actionGrid, .miniStats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel, .formPanel, .detailPanel { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 24px; min-width: 0; }
.formPanel { display: grid; gap: 18px; }
.formGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; background: transparent; border: 0; padding: 0; }
.formGrid form { display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 24px; }
.formGrid form h3 { margin-bottom: 2px; }
.formGrid form button[type=submit] { margin-top: auto; }
label { display: grid; gap: 7px; color: #37474f; font-size: 13px; font-weight: 550; }
input, select, textarea { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #ccd7dc; background: #fff; color: var(--ink); border-radius: 8px; padding: 10px 12px; font-size: 14px; font-weight: 400; }
input::placeholder, textarea::placeholder { color: #84929a; }
input:hover, select:hover, textarea:hover { border-color: #9eafb7; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px #087f7814; }
textarea { resize: vertical; min-height: 100px; }
input[type=file] { background: var(--bg); font-size: 13px; }
input::file-selector-button { font: inherit; border: 0; background: #e7eeee; color: #35454c; padding: 6px 10px; border-radius: 5px; margin-right: 12px; cursor: pointer; }
.primaryButton, .secondaryButton, .dangerButton, .panel button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 14px; line-height: 1.5; text-decoration: none; }
.primaryButton, .panel button { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.primaryButton:hover:not(:disabled), .panel button:hover:not(:disabled) { background: var(--accent-hover); }
.secondaryButton { background: #fff; border: 1px solid #ccd7dc; color: #37474f; }
.secondaryButton:hover { background: var(--bg); }
.dangerButton, .panel button.danger { background: #fff5f4; border: 1px solid #f0cfca; color: #b23b32; }
.dangerButton:hover, .panel button.danger:hover { background: #fce8e5; }
.panel td button { min-height: 34px; padding: 6px 12px; font-size: 12px; background: #fff; color: var(--accent); border-color: #b9d8d4; }
.panel td button:hover:not(:disabled) { background: var(--soft); }
.panel p { color: var(--muted); }
.searchForm { display: flex; gap: 10px; }
.homeEntry, .homeDrafts { display: grid; gap: 16px; }
.homeEntry .sectionTitle, .homeDrafts .sectionTitle { margin: 0; }
.homeDrafts .customerRow { grid-template-columns: minmax(0, 1fr) auto; }
.homeDrafts .customerRowBody strong { overflow-wrap: anywhere; }
.homeSummary { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 13px; }
.customerAutocomplete { flex: 1; min-width: 0; position: relative; }
.customerAutocomplete > input { width: 100%; }
.customerSuggestions { position: absolute; inset: calc(100% + 6px) 0 auto; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; box-shadow: 0 8px 24px #2437461a; max-height: 360px; overflow-y: auto; }
.customerSuggestions [role=option] { display: flex; flex-direction: column; align-items: flex-start; text-align: left; width: 100%; min-height: 56px; border: 0; border-radius: 6px; padding: 10px 12px; background: #fff; color: var(--ink); overflow-wrap: anywhere; white-space: normal; }
.customerSuggestions [role=option] span { color: var(--muted); font-size: 12px; }
.customerSuggestions [role=option]:hover, .customerSuggestions [aria-selected=true] { background: #eaf7f5; }
.customerSuggestions p { margin: 8px; font-size: 12px; }
.searchForm input { flex: 1; min-width: 0; }
.searchForm button { flex-shrink: 0; }
details > summary { list-style: none; width: fit-content; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { margin-bottom: 16px; color: var(--accent); border-color: #80bcb5; }
details > summary .icon { transition: transform .15s; }
details[open] > summary .icon { transform: rotate(45deg); }
.list { display: grid; gap: 12px; }
.customerSearchPanel { display: grid; gap: 16px; }
.customerSearchPanel .sectionTitle { margin: 0; }
.customerSearchPanel > .list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customerRow { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 16px; text-decoration: none; }
.customerRow:hover { border-color: #9ecfc8; background: #fbfefd; }
.customerRowBody { display: grid; gap: 3px; min-width: 0; }
.customerRowBody strong { font-size: 15px; font-weight: 650; }
.customerRowBody span, .customerRowBody small { font-size: 12px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.avatar { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; background: var(--soft); }
.avatar img, .customerDetailPhoto img { width: 100%; height: 100%; object-fit: cover; }
.customerDetailHeader { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.customerDetailHeader h2 { margin-bottom: 6px; }
.customerDetailHeader p { margin: 0; color: var(--muted); }
.customerDetailPhoto { width: 90px; height: 100px; flex-shrink: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.detailPanel > details { display: inline-block; margin: 0 8px 16px 0; vertical-align: top; }
.detailPanel > details[open] { display: block; }
.detailPanel > .dangerButton { margin-bottom: 16px; }
.customerDetailList { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.customerDetailList dt { color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.customerDetailList dd { margin: 0; overflow-wrap: anywhere; }
.miniStats { margin-bottom: 24px; }
.miniStats .metric { padding: 16px; background: var(--bg); border: 0; }
.miniStats .metric strong { font-size: 24px; }
.recordRow, .resultRow { display: grid; gap: 7px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.recordRow > span { color: var(--muted); font-size: 13px; }
.resultImage { max-width: 100%; width: min(100%, 380px); aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.photoPreview { max-width: 100%; max-height: 220px; object-fit: contain; }
.photoDropZone { display: grid; gap: 12px; padding: 20px; border: 1px dashed #9eafb7; border-radius: 10px; background: var(--bg); min-width: 0; }
.photoDropZone p { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.photoDropZone small { display: block; }
.photoDropZone .secondaryButton { justify-self: start; }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.55; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 14px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
th { background: var(--bg); font-size: 13px; font-weight: 500; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfd; }
td[colspan] { padding: 32px 16px; text-align: center; color: var(--muted); }
.codePanel code { display: block; padding: 16px; margin: 16px 0; border-radius: 8px; border: 1px dashed #9dbbb7; background: var(--soft); color: #23665f; overflow-wrap: anywhere; }
.auditList { list-style: none; display: grid; margin: 0; padding: 0; }
.auditList li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding: 14px 0; font-size: 13px; overflow-wrap: anywhere; }
.auditList strong { font-weight: 550; }
.auditList span { color: var(--muted); }
.accountHeading { min-width: 0; max-width: 100%; }
.accountAffiliation { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 20px; }
.salonIdentity { min-width: 0; max-width: min(360px, 100%); overflow-wrap: anywhere; }
.accountRole { display: inline-flex; align-items: center; flex-shrink: 0; padding: 2px 8px; border-radius: 6px; background: var(--soft); color: var(--accent); font-size: 12px; line-height: 20px; }
.resumeLabel { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; color: var(--accent); font-size: 13px; }
.customerListNavigation { margin-top: 20px; }
.customerChannels { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.customerChannels legend { font-size: 14px; padding: 0 4px; }
.customerChannels legend small { color: var(--muted); }
.customerChannelChoices { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.customerChannelOther { display: flex; flex: 1 1 240px; align-items: center; gap: 8px; min-width: 0; }
.customerChannelOther > .chartCheck { flex-shrink: 0; }
.customerChannelOther [data-channel-note] { flex: 1; min-width: 0; }
.customerChannels .chartCheck { margin: 0; }
.uploadQr { width: 240px; max-width: 100%; height: auto; background: white; }
.photoDropPage { max-width: 540px; margin: 24px auto; padding: 16px; }
.chartOther { display: flex; flex: 1 1 280px; gap: 8px; align-items: center; min-width: 0; }
.chartOther > label { flex-shrink: 0; }
.visitWorkspace .chartOther > textarea { flex: 1; width: 0; min-width: 0; min-height: 44px; margin: 0; }
.draftMetric { text-decoration: none; color: inherit; }
.draftMetric span { display: inline-flex; align-items: center; gap: 4px; }
.draftMetric .icon { width: 14px; height: 14px; }
.draftMetric:hover { border-color: var(--accent); background: var(--soft); }
.draftMetric:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#customer-drafts .list, #customer-results .list { grid-template-columns: minmax(0, 1fr); }
#customer-drafts .customerRow { grid-template-columns: minmax(0, 1fr) auto; }
#customer-drafts .sectionTitle small { color: var(--muted); font-size: 13px; font-weight: 400; }
.adminShell button, .adminShell .sidebar nav a { min-height: 44px; }
.adminShell .panel td button { min-height: 44px; font-size: 14px; }
.adminResponsiveTable td:last-child { white-space: normal; }
@media (max-width: 1000px) {
  .adminShell .panel:has(.adminResponsiveTable) { overflow: visible; min-width: 0; }
  .adminShell .adminResponsiveTable { display: block; min-width: 0; }
  .adminResponsiveTable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .adminResponsiveTable tbody { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; }
  .adminResponsiveTable tbody tr { display: flex; flex-direction: column; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
  .adminResponsiveTable td { display: block; padding: 0 0 12px; border: 0; min-width: 0; overflow-wrap: anywhere; }
  .adminResponsiveTable td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
  .adminResponsiveTable td:last-child { margin-top: auto; padding-bottom: 0; }
  .adminResponsiveTable td:last-child button { width: 100%; }
  .adminResponsiveTable .buttonRow { display: flex; flex-wrap: wrap; gap: 8px; }
  .adminResponsiveTable .buttonRow button { flex: 1 1 90px; }
  .adminResponsiveTable td[colspan] { padding: 12px 0; }
  .adminShell .auditList li { flex-direction: column; gap: 4px; }
}
.errorText { color: #ad362c; background: #fff3f1; border: 1px solid #f0d1cb; border-radius: 8px; padding: 12px 16px; font-size: 13px; overflow-wrap: anywhere; margin: 0; }
#page-error:not([hidden]) { margin-bottom: 20px; }
.entryPage .appShell { display: grid; align-items: start; padding: clamp(32px, 9vh, 100px) 20px 40px; }
.entryPage .phoneFrame { width: min(100%, 480px); }
.entryPage .topBar { padding: 0 0 24px; }
.entryPage .topBar h1 { font-size: 23px; }
.entryPage .topBar .brand { margin-bottom: 18px; }
.entryPage .topBar .buttonRow { align-self: flex-end; }
.entryPage .content { padding-top: 24px; }
.entryPage .formPanel { padding: 32px; gap: 20px; box-shadow: 0 6px 24px #18252b05; }
.entryPage .formPanel p { color: var(--muted); line-height: 1.8; margin: 0; }
.entryIcon { display: grid; place-items: center; width: 48px; height: 48px; background: var(--soft); color: var(--accent); border-radius: 12px; }
.entryIcon .icon { width: 24px; height: 24px; }
.entryPage .sectionTitle { margin: 0; font-size: 20px; }
.loginPanel { margin: 0; }
#google-login { min-height: 44px; max-width: 100%; }
#google-login > button { background: #fff; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 12px 20px; }
.visitSection { border-top: 1px solid var(--line); padding-top: 24px; margin-bottom: 28px; display: grid; gap: 20px; }
.visitSection h2, .visitSection h3, .visitWorkspace h2 { margin-bottom: 0; }
.visitSectionHeading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.visitEyebrow { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.visitRecap { display: grid; gap: 16px; background: var(--soft); border-radius: 10px; padding: 20px; }
.visitRecap p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.visitRecap strong { color: var(--ink); }
.previousCondition { background: var(--soft); border-radius: 8px; padding: 12px 14px; display: grid; gap: 6px; font-size: 13px; overflow-wrap: anywhere; }
.previousConditionHeader { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; }
.previousConditionHeader strong { font-size: 13px; }
.previousConditionHeader .secondaryButton { min-height: 44px; padding: 6px 10px; font-size: 12px; width: auto; }
.previousCondition .visitChartRows { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; }
.previousCondition .visitChartRows > div { display: inline-flex; flex-wrap: wrap; gap: 4px; border: 0; padding: 0; }
.previousCondition .visitChartRows dt, .previousCondition .visitChartRows dd { margin: 0; font-size: 13px; }
.previousCondition p { margin: 0; }
.previousCondition [data-copy-hair-status]:empty { display: none; }
#visit-finalization #direction-preview { max-width: 240px; margin: 0; }
#visit-finalization #direction-preview img { width: 100%; max-height: 200px; object-fit: contain; }
.visitHistoryCard { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 0; }
.visitHistoryRow { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px; border-radius: 10px; text-decoration: none; min-height: 48px; }
.visitHistoryRow:hover { background: var(--soft); }
.visitHistoryCard [data-delete-visit] { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 0 18px 18px; }
.visitHistoryCard [data-form-error] { flex-basis: 100%; margin: 0; }
.visitArchiveActions { margin: 0 18px 18px; }
.visitTrash .visitArchiveActions { margin: 12px 0 0; }
.visitTrash [data-purge-visit] { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 16px 0 0; gap: 12px; }
.visitTrash [data-purge-visit] p { margin: 0; }
.visitTrash [data-purge-visit] button { justify-self: start; scroll-margin-bottom: 110px; }
.visitArchiveActions > summary { min-height: 44px; display: flex; align-items: center; justify-content: flex-end; color: #b23b32; font-size: 13px; }
.archiveReason { white-space: pre-wrap; overflow-wrap: anywhere; }
.visitHistoryRow > div { min-width: 0; }
.visitHistoryRow strong, .visitHistoryRow span { display: block; }
.visitHistoryRow p { margin: 8px 0 0; color: var(--muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.visitHistoryRow div > span { font-size: 13px; color: var(--muted); }
.visitBadge { display: inline-block; flex-shrink: 0; padding: 5px 10px; border-radius: 6px; background: var(--bg); font-size: 12px; color: var(--muted); }
.visitBadge.isDraft { background: var(--soft); color: var(--accent); }
.visitStart > summary, .visitReadOnly > summary { min-height: 44px; }
.visitStartMeta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.visitDateField { display: grid; gap: 7px; }
.visitDateControls { display: flex; gap: 8px; min-width: 0; }
.visitCalendar { position: relative; display: grid; place-items: center; flex: 0 0 48px; border: 1px solid #ccd7dc; border-radius: 8px; background: #fff; }
.visitCalendar input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.visitCalendar:focus-within { outline: 3px solid #6fbdb6; outline-offset: 2px; }
@media (max-width: 400px) { .visitStartMeta { grid-template-columns: minmax(0, 1fr); } }
.visitReadOnly > summary { display: flex; align-items: center; font-weight: 600; }
.visitWorkspace { width: 100%; margin-inline: auto; }
.visitBack { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); text-decoration: none; }
.visitSaveRow { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.visitSaveRow span { color: var(--muted); font-size: 13px; }
.visitWorkspace textarea { min-height: 120px; scroll-margin: 24px 0 130px; }
.visitWorkspace label + textarea { margin-top: -10px; }
.visitReview { display: grid; gap: 18px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.visitReviewContext, .visitReviewDirection { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); min-width: 0; }
.visitReviewContext p, .visitReviewDirection dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.visitReviewContext.stack, .visitReviewContext .stack, .visitReviewDirection.stack { gap: 12px; }
.visitReviewContext :is(h4, p, dl), .visitReviewDirection :is(h4, p, dl), .visitReview > :is(h4, p) { margin: 0; }
.visitReviewContext .visitReviewDirection { background: #fff; padding: 16px; }
.visitReviewPhotos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.visitReviewPhotos figure { margin: 0; min-width: 0; }
.visitReviewPhotos img { width: 100%; height: 220px; object-fit: contain; border-radius: 10px; background: white; }
.visitReviewPhotos figcaption { padding-top: 8px; font-size: 13px; color: var(--muted); }
.reviewRating { border: 0; padding: 0; margin: 0; min-width: 0; }
.reviewRating legend { font-size: 13px; font-weight: 550; margin-bottom: 10px; }
.reviewChoices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.reviewChoices label { position: relative; }
.reviewChoices input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; }
.reviewChoices span { display: grid; place-content: center; gap: 3px; text-align: center; min-height: 64px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 12px; }
.reviewChoices strong { font-size: 15px; }
.reviewChoices input:checked + span { background: var(--soft); border-color: var(--accent); color: var(--accent); }
.reviewChoices input:focus-visible + span { outline: 3px solid #6fbdb6; outline-offset: 2px; }
.fullChart { display: grid; gap: 14px; }
.chartSection { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.chartSection > summary { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 16px; font-weight: 600; }
.chartSection > summary::after { content: '+'; color: var(--accent); font-size: 20px; margin-left: 12px; }
.chartSection[open] > summary { margin-bottom: 0; border-bottom: 1px solid var(--line); }
.chartSection[open] > summary::after { content: '−'; }
.chartSectionBody { display: grid; gap: 18px; padding: 18px; }
.chartFieldPair, .chartFieldGroup { display: grid; gap: 18px; min-width: 0; }
@media (min-width: 960px) {
  .chartFieldPair { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
.chartField { display: grid; gap: 7px; min-width: 0; }
.chartField label + textarea { margin-top: 0; }
.chartChoices { border: 0; padding: 0; margin: 0; min-width: 0; }
.chartChoices legend { font-size: 13px; font-weight: 550; margin-bottom: 10px; }
.chartChips { display: flex; flex-wrap: wrap; gap: 8px; }
.chartChips label { position: relative; }
.chartChips input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; }
.chartChips span { display: flex; align-items: center; min-height: 44px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.chartChips input:checked + span { background: var(--soft); border-color: var(--accent); color: var(--accent); }
.chartChips input:focus-visible + span { outline: 3px solid #6fbdb6; outline-offset: 2px; }
.chartCheck { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.chartCheck input { width: 20px; min-height: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; }
.chartCustomerInfo { display: flex; flex-wrap: wrap; gap: 14px 28px; margin: 0; }
.chartCustomerInfo dt { font-size: 12px; color: var(--muted); }
.chartCustomerInfo dd { margin: 0; overflow-wrap: anywhere; }
.visitStart[open] > summary.primaryButton { color: #fff; }
.visitChartRows { margin: 16px 0 0; display: grid; gap: 16px; }
.visitChartRows dt { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.visitChartRows dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.togetherPlan { gap: 24px; }
.togetherPlan dd { font-size: 18px; }
.togetherPhotos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 18px; margin-bottom: 24px; }
.togetherPhotos figure { margin: 0; min-width: 0; }
.togetherPhotos img { width: 100%; height: 320px; object-fit: contain; border-radius: 10px; background: var(--bg); }
.togetherPhotos figcaption { padding: 10px 0; color: var(--muted); }
.visitPhotoGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 18px; }
.visitPhotoCard { padding: 16px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.visitPhotoCard img { width: 100%; height: 220px; object-fit: contain; background: var(--bg); border-radius: 8px; }
.visitPhotoCard p { margin: 10px 0; }
#visit-photo-list > .visitPhotoCard { display:flex; flex-direction:column; }
.visitPhotoActions { margin-top:auto; padding-top:12px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.visitPhotoActions button { min-height:48px; width:100%; padding:8px; font-size:13px; margin:0; align-self:stretch; }
.visitPhotoCard .dangerButton { background: #fff5f4; border: 1px solid #f0cfca; color: #b23b32; }
.visitPhotoCard .dangerButton:hover { background: #fce8e5; }
.visitPhotoCard [data-select-direction][aria-pressed="true"] { background: var(--soft); border-color: var(--accent); color: var(--accent); }
.visitSelectedPreview { margin: 0; display: grid; gap: 10px; }
.visitSelectedPreview img { width: 100%; max-width: 360px; max-height: 320px; object-fit: contain; border-radius: 10px; background: var(--bg); }
.visitSelectedPreview figcaption { color: var(--muted); font-size: 13px; }
.visitFlowNav { display: flex; flex-wrap: wrap; gap: 8px; }
.visitFlowNav a, .visitFlowNav span { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 8px; background: var(--soft); color: var(--accent); font-size: 13px; text-decoration: none; }
.visitFlowNav a:hover { text-decoration: underline; }
.visitFlowNav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hasVisitSteps .visitFlowNav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); scroll-margin-top:16px; position:sticky; top:0; z-index:10; background:var(--bg); padding:8px 0; }
.hasVisitSteps .visitFlowNav:has(button:nth-child(3):last-child) { grid-template-columns:repeat(3,minmax(0,1fr)); }
.visitFlowNav [role="tab"] { min-height:48px; padding:10px 8px; border:1px solid var(--line); background:#fff; color:var(--muted); border-radius:8px; font:inherit; font-size:14px; cursor:pointer; }
.visitFlowNav [aria-selected="true"] { background:var(--soft); color:var(--accent); border:2px solid var(--accent); font-weight:700; }
.visitFlowNav [role="tab"]:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.visitStepActions { padding:20px; border:1px solid var(--line); border-radius:12px; background:#fff; display:grid; gap:12px; }
.visitStepProgress { margin:0; font-weight:700; }
.visitReferences { padding:18px; background:var(--bg); border:1px solid var(--line); border-radius:10px; }
.visitReferences h4, .visitReferences p { margin:0; }
#reference-title { scroll-margin-top:88px; }
.visitReferences .visitPhotoGrid img { max-height:240px; object-fit:contain; }
.visitStepActions #visit-save-status { color:var(--muted); font-size:13px; }
.visitStepButtons { display:flex; flex-wrap:wrap; gap:12px; }
.visitStepButtons button { min-height:48px; }
.visitStepButtons button:last-child { margin-left:auto; }
.visitStickyHeader { position: sticky; top: 0; z-index: 12; background: var(--bg); padding: 10px 0 0; border-bottom: 1px solid var(--line); }
.visitStickyHeader .visitSectionHeading { gap: 8px; }
.visitStickyHeader .visitSectionHeading h2 { font-size: 20px; margin: 0; }
.visitStickyHeader .visitEyebrow { margin: 0 0 4px; font-size: 12px; }
.hasVisitSteps .visitStickyHeader .visitFlowNav { position: static; }
.visitLiveMeta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 8px; font-size: 12px; }
.visitLiveMeta #visit-save-status { color: var(--muted); overflow-wrap: anywhere; }
.visitDesktopLayout, .visitMainColumn { min-width: 0; }
.visitReferenceRail { display: none; }
.visitStickyHeader ~ .visitDesktopLayout :is(input, textarea, select, [role="tabpanel"], summary) { scroll-margin-top: calc(var(--visit-header-height, 160px) + 12px); scroll-margin-bottom: 100px; }
.visitKeyboardOpen .bottomNav { display: none; }
.visitKeyboardOpen .visitStickyHeader .visitSectionHeading { display: none; }
@media (min-width: 1024px) {
  .visitDesktopLayout.hasReferenceRail { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
  .visitReferenceRail { display: grid; position: sticky; top: calc(var(--visit-header-height, 160px) + 12px); max-height: calc(100dvh - var(--visit-header-height, 160px) - 110px); overflow-y: auto; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; gap: 14px; min-width: 0; overscroll-behavior: contain; }
  .visitReferenceRail :is(h3, h4, p, dl) { margin: 0; }
  .visitReferenceRail :is(h3, h4) { font-size: 14px; }
  .visitReferenceRail :is(p, dd) { font-size: 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
  .visitReferenceRail .stack { gap: 12px; }
  .visitReferenceRail .visitReviewPhotos img { height: 160px; }
  .visitRailHistory { border-top: 1px solid var(--line); padding-top: 16px; }
  .visitReferenceRail .visitReviewDirection { padding: 12px; }
}
@media (max-width: 600px) {
  .visitWorkspace :is(input, textarea, select) { font-size: 16px; }
  .visitStickyHeader .visitSectionHeading h2 { font-size: 17px; }
  .visitStickyHeader .visitBadge { font-size: 11px; }
  .visitLiveMeta { font-size: 11px; }
  .visitStickyHeader .visitFlowNav [role="tab"] { min-height: 44px; }
}
.hasVisitSteps input, .hasVisitSteps select, .hasVisitSteps textarea { scroll-margin-top:88px; }
@media(max-width:600px) {
  .hasVisitSteps .visitFlowNav { gap:4px; }
  .visitFlowNav [role="tab"] { font-size:13px; padding:8px 4px; }
  .visitStepActions { padding:16px; }
  .visitStepButtons { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .visitStepButtons button:last-child { grid-column:1 / -1; margin-left:0; }
}
#visit-start-review, #full-chart-title, #visit-photos, #visit-selection, #visit-treatment { scroll-margin-top: 20px; }
#visit-treatment details[open] > summary.primaryButton { color: #fff; }
#visit-treatment-form button { scroll-margin-bottom: 110px; }
@media (max-width: 540px) { .visitHistoryRow { flex-direction: column; gap: 10px; } }
@media (min-width: 821px) {
  #record-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #record-form > h2, #record-form > p, #record-form > button, #record-form > label:has(textarea) { grid-column: 1 / -1; }
}
@media (max-width: 1000px) { .adminShell { grid-template-columns: 200px minmax(0, 1fr); } .workspace { padding: 28px 20px; } .accountName { display: none; } .metrics .metric { padding: 16px; gap: 6px; } }
@media (max-width: 820px) {
  .adminShell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { padding: 16px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin: 0 0 16px; } .sidebar .brand br { display: none; }
  .sidebar nav { display: flex; gap: 8px; flex-wrap: wrap; }
  .sidebar nav a { padding: 10px 12px; font-size: 13px; }
  .formGrid { grid-template-columns: minmax(0, 1fr); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topBar { gap: 12px; flex-wrap: wrap; } .workspace .topBar h1 { font-size: 25px; }
  .appShell { padding: 24px 20px 110px; }
}
@media (max-width: 540px) {
  .workspace { padding: 24px 16px; } .appShell { padding: 24px 16px 110px; }
  .panel, .formPanel, .detailPanel, .formGrid form { padding: 20px; }
  .metricGrid { gap: 8px; } .metricGrid .metric { padding: 16px 12px; }
  .metricGrid .metric strong { font-size: 25px; } .metricGrid .metric span { font-size: 11px; }
  .customerSearchPanel > .list { grid-template-columns: minmax(0, 1fr); }
  .customerDetailList { grid-template-columns: minmax(0, 1fr); }
  .panel:has(table) { overflow-x: auto; } .panel table { min-width: 440px; }
  .auditList li { flex-direction: column; gap: 4px; }
  input, select, textarea { font-size: 16px; }
  .entryPage .formPanel { padding: 24px; } .entryPage .topBar h1 { font-size: 22px; }
  .entryPage .topBar .buttonRow { align-self: auto; }
  .bottomNav { bottom: max(12px, env(safe-area-inset-bottom)); }
}
.aiPhotoGroup { min-width: 0; margin: 0; padding: 16px; border: 1px solid #dbe4e8; border-radius: 12px; }
.aiPhotoGroup legend { padding: 0 6px; font-weight: 600; }
.aiPhotoChoices { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; align-items: start; }
.aiPhotoChoice.aiPhotoChoiceNone { grid-column: 1 / -1; flex-direction: row; align-items: center; width: fit-content; max-width: 100%; }
.aiPhotoChoice.aiPhotoChoiceNone .aiPhotoSelected { margin: 0; }
.aiPhotoChoice { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px; border: 2px solid #e2e8ec; border-radius: 10px; cursor: pointer; background: white; }
.aiPhotoChoice:has(input:checked) { border-color: #008682; background: #eff9f7; }
.aiPhotoChoice:has(input:focus-visible) { outline: 3px solid #155e75; outline-offset: 2px; }
.aiPhotoChoice:has(input:disabled) { opacity: .6; cursor: wait; }
.aiPhotoChoice input[type=radio] { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: #008682; }
.aiPhotoChoice img { width: 100%; height: 160px; object-fit: contain; background: #f5f7f9; border-radius: 6px; }
.aiPhotoChoice span { font-size: 14px; overflow-wrap: anywhere; }
.aiPhotoChoice > span:not(.aiPhotoSelected) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#visit-ai-form [role=tablist] { margin-bottom: 16px; }
#visit-ai-form [role=tab] { min-height: 44px; background: white; color: #526678; border: 1px solid #dbe5ea; }
#visit-ai-form [role=tab][aria-selected=true] { background: #eff9f7; border-color: #008682; color: #007d78; }
[data-salon-library] button { padding-inline: 8px; min-height: 44px; }
#salon-style-library .visitPhotoGrid { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
#salon-style-library .photoPreview { width: 100%; height: 180px; object-fit: contain; background: #f5f7f9; border-radius: 8px; }
.aiPhotoSelected { visibility: hidden; color: #006c68; font-weight: 600; margin-top: auto; }
.aiPhotoChoice:has(input:checked) .aiPhotoSelected { visibility: visible; }
@media (max-width: 540px) { .aiPhotoGroup { padding: 12px; } .aiPhotoChoices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .aiPhotoChoice { padding: 8px; } .aiPhotoChoice img { height: 120px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
