header { border-bottom: 1px solid var(--line); }
.bar, main { width: min(1060px, 91%); margin: 0 auto; }
.bar { display: flex; align-items: center; gap: 16px; min-height: 70px; }
.bar .brand { font-size: 1.32rem; }
.area-name { padding-left: 14px; border-left: 1px solid #a6b2a6; font-size: .85rem; color: var(--muted); }
.bar button { margin-left: auto; }
main { padding-block: clamp(24px,4vw,50px) 56px; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.035em; }
h1 { font-size: clamp(2rem, 3.7vw, 3.4rem); margin-bottom: .46em; line-height: 1.35; }
h2 { font-size: clamp(1.32rem, 2.2vw, 1.7rem); line-height: 1.45; margin-bottom: .6em; }
#workspace :is(h1, h2)[tabindex="-1"]:focus { outline: none; }
.line { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; padding: 21px clamp(20px,3vw,36px); color: #fffaf1; background: var(--forest); border-radius: 5px 30px 5px 5px; }
.line div { display: grid; }
.line div span { color: #d8e5da; font-size: .8rem; }
.line strong { font: 500 clamp(1.6rem,3.6vw,2.65rem)/1.25 Georgia, serif; letter-spacing: .025em; }
#line-state { font-size: .84rem; padding: .3em .9em; border: 1px solid #8eafa0; border-radius: 99px; }
.layout { display: grid; grid-template-columns: minmax(10rem, .29fr) minmax(0,1fr); align-items: start; gap: clamp(16px,3vw,34px); }
#settings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.dashboard-menu { display: grid; gap: 4px; position: sticky; top: 16px; padding: 6px; background: #eeefe5; border: 1px solid var(--line); border-radius: 14px; }
.dashboard-menu a { display: flex; align-items: center; min-height: 44px; padding: .6rem .85rem; border-radius: 9px; color: var(--muted); font-weight: 650; font-size: .92rem; text-decoration: none; }
.dashboard-menu a:hover { color: var(--forest); background: #e0e8da; }
.dashboard-menu a[aria-current] { background: var(--forest); color: white; }
.panel { border: 1px solid var(--line); border-radius: 6px 20px 6px 6px; padding: clamp(20px,2.6vw,32px); background: var(--white); }
body:has(#login:not([hidden])) .area-name { display: none; }
#login { max-width: 25rem; margin: clamp(20px, 9vh, 90px) auto; }
.line h1 { margin: 0; font-family: inherit; font-size: .85rem; font-weight: 500; line-height: 1.6; color: #d8e5da; letter-spacing: .02em; }
#login h1 { font-size: clamp(1.9rem, 3.1vw, 2.8rem); line-height: 1.4; margin: 0 0 .36em; }
.login-intro { font-size: 1rem; color: var(--muted); line-height: 1.85; overflow-wrap: anywhere; }
#login form { margin-top: 1.5rem; }
#login label { margin: 0 0 .4rem; }
#login input {
  width: 100%; min-height: 50px; padding: .65rem .85rem; border: 1px solid #8b9e90; border-radius: 9px;
  background: white; font-size: 1rem; color: var(--ink);
}
#login-code { font-variant-numeric: tabular-nums; letter-spacing: .3em; }
#login .action { display: block; width: 100%; min-height: 49px; margin-top: 1rem; background: #174a3d; color: #fffaf0; }
#login .action:hover { background: #0c382e; }
.login-links { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 .7rem; margin-top: .45rem; }
.login-links button { border: 0; border-radius: 4px; min-height: 44px; padding: .3rem 0; text-decoration: underline; text-underline-offset: .25em; font-size: .83rem; }
.login-links button:hover { background: transparent; text-decoration-thickness: 2px; }
#login-note:not(:empty), #login noscript { display: block; margin-top: .9rem; font-size: .9rem; }
#login-note[data-error] { color: #8b351e; }
#login-retry { margin-top: .6rem; }
.hint, .preview, [role="status"] { font-size: .87rem; color: var(--muted); }
.preview { margin-top: .85rem; background: #edf2e9; border-radius: 6px; padding: .45rem .72rem; }
.preview summary { color: var(--forest); font-weight: 650; }
.preview ol { padding-left: 1.35rem; margin: .6rem 0; }
.preview li + li { margin-top: .3rem; }
label { display: block; margin: .78rem 0 .25rem; font-size: .94rem; font-weight: 650; }
.check { display: flex; align-items: center; gap: .55rem; margin: 1.05rem 0; font-weight: 500; }
.check input { width: 1.05rem; height: 1.05rem; flex-shrink: 0; accent-color: var(--forest); }
#settings .check { margin: 1rem 0; }
.opening-preview { background: #edf2e9; padding: .8rem 1rem; border-radius: 8px; }
.opening-preview label { margin-top: 0; }
#voice-sample { margin-top: .6rem; }
#voice-sample audio { display: block; max-width: 100%; height: 40px; margin-top: .3rem; }
#opening-preview { margin-top: .65rem; overflow-wrap: anywhere; }
.settings-actions { grid-column: 1/-1; }
.settings-actions .buttons { margin: 0; }
select, textarea, input[type="tel"], input[type="number"], input[type="datetime-local"], input[type="time"] { width: 100%; min-width: 0; padding: .57rem .7rem; border: 1px solid #9aaea0; border-radius: 6px; background: white; font-size: 1rem; }
.schedule-current { background: #edf2e9; padding: .65rem .85rem; margin-block: .6rem 1.15rem; border-radius: 8px; }
.schedule-modes, .schedule-days { border: 0; padding: 0; margin: 1rem 0; min-width: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.schedule-modes legend, .schedule-days legend { padding: 0; margin-bottom: .3rem; font-size: .94rem; font-weight: 650; }
.schedule-modes label, .schedule-days label { display: inline-flex; min-height: 44px; padding: .35rem .65rem; gap: .35rem; align-items: center; margin: 0; border: 1px solid var(--line); border-radius: 8px; font-size: .88rem; cursor: pointer; }
.schedule-modes input, .schedule-days input { accent-color: var(--forest); margin: 0; }
.schedule-modes label:has(:checked), .schedule-days label:has(:checked) { border-color: var(--forest); background: var(--mint); }
textarea { display: block; resize: vertical; }
.field-title, .buttons { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.field-title span { font-variant-numeric: tabular-nums; font-size: .78rem; }
#staff-sms .action { margin-top: 1rem; }
.pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.buttons { margin-top: 1.15rem; justify-content: start; flex-wrap: wrap; }
button, .action { display: inline-block; padding: .48rem 1.1rem; border: 1px solid #829a8b; border-radius: 99px; background: transparent; color: var(--forest); text-decoration: none; font-size: .9rem; font-weight: 650; }
button:hover, .action:hover { background: #e6eee5; }
.action { background: var(--forest); border-color: var(--forest); color: white; }
.action:hover { background: #0c382e; }
button:disabled { opacity: .6; cursor: default; }
#settings-edits:not(:empty) { color: #835034; margin: 0 0 .55rem; }
.panel button { min-height: 44px; }
form p[role="status"]:not(:empty) { margin-top: .65rem; }
@media (max-width: 720px) {
  .bar, main { width: calc(100% - 32px); }
  .bar { gap: 8px; min-height: 60px; }
  .area-name { padding-left: 8px; }
  .bar button { padding-inline: .6rem; }
  .layout, #settings { grid-template-columns: 1fr; gap: 14px; }
  .dashboard-menu { position: static; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dashboard-menu a { justify-content: center; text-align: center; padding: .45rem .15rem; font-size: .82rem; }
  .line { margin-bottom: 14px; }
}
@media (max-width: 640px) { #login { margin: 28px auto; } }
#history-items { list-style: none; padding: 0; margin: .75rem 0; }
#history-items li { padding: .55rem 0; border-top: 1px solid var(--line); }
#history-items summary { cursor: pointer; font-weight: 600; }
#history-items p { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .4rem; }
#schedule-form input[type="datetime-local"] { min-width: 0; }
