:root {
  --carbon: #18243a;
  --carbon-soft: #536078;
  --muted: #536078;
  --blueprint: #3449d7;
  --blueprint-deep: #2336b3;
  --copy-blue: #e8edff;
  --copy-blue-2: #d9e1ff;
  --signal: #ff6846;
  --signal-ink: #ff6846;
  --signal-soft: #fff0eb;
  --register: #f7f9fd;
  --paper: #ffffff;
  --line: #ccd4e4;
  --line-dark: #aeb9ce;
  --success: #087a61;
  --success-soft: #dff6ef;
  --warning: #865800;
  --warning-soft: #ffefbd;
  --danger: #b63c35;
  --body: "IBM Plex Sans KR", sans-serif;
  --display: "Black Han Sans", "IBM Plex Sans KR", sans-serif;
  --mono: "Space Mono", monospace;
  --shadow: 0 22px 55px rgba(24, 36, 58, 0.16);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--register);
  color: var(--carbon);
  font-family: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { outline-color: transparent; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex="-1"]:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--carbon);
}
.is-hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--carbon);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
  min-height: 44px;
}
.wordmark--inverse { color: #fff; }
.wordmark__symbol { display: inline-flex; align-items: flex-end; gap: 3px; height: 22px; }
.wordmark__symbol i { display: block; width: 6px; border-radius: 1px; background: var(--signal-ink); }
.wordmark--inverse .wordmark__symbol i { background: var(--signal); }
.wordmark__symbol i:nth-child(1) { height: 9px; }
.wordmark__symbol i:nth-child(2) { height: 16px; }
.wordmark__symbol i:nth-child(3) { height: 22px; }
.overline, .panel-code {
  margin: 0 0 8px;
  color: var(--blueprint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.overline--light { color: #b8c4ff; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.button:hover { transform: translateY(-1px); }
.button--primary { border-color: var(--blueprint); background: var(--blueprint); color: #fff; }
.button--primary:hover { border-color: var(--blueprint-deep); background: var(--blueprint-deep); }
.button--signal { border-color: var(--signal); background: var(--signal); color: var(--carbon); }
.button--signal:hover { background: #ff8265; }
.button--outline { border-color: var(--line-dark); background: #fff; color: var(--carbon); }
.button--outline:hover, .button--quiet:hover { border-color: var(--carbon); }
.button--quiet { border-color: transparent; background: transparent; color: var(--carbon-soft); }
.button--danger { border-color: #e8bbb5; background: #fff; color: var(--danger); }
.button--danger:hover { border-color: var(--danger); background: var(--signal-soft); }
.button--hero { min-height: 54px; padding-inline: 20px; font-size: 14px; }
.plain-button { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; border: 0; padding: 0; background: transparent; }
.text-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  padding: 8px 0;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.text-action--dark { border-color: var(--blueprint); color: var(--blueprint); }

/* Intro: the oversized routing ticket is the visual thesis. */
.welcome {
  min-height: 100vh;
  overflow: hidden;
  background: var(--blueprint);
  color: #fff;
}
.welcome__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0 clamp(22px, 5vw, 78px);
}
.demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 99px;
  padding: 8px 12px;
  color: #dbe0ff;
  font-size: 12px;
  line-height: 1.4;
}
.demo-chip span { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }
.welcome__main {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(460px, 0.9fr);
  align-items: center;
  gap: clamp(36px, 7vw, 110px);
  min-height: calc(100svh - 82px);
  padding: clamp(56px, 7vw, 104px) clamp(22px, 5vw, 78px) 70px;
}
.hero-copy { position: relative; z-index: 2; max-width: 720px; }
.hero-copy h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(48px, 4.3vw, 74px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.065em;
  white-space: nowrap;
}
.hero-title__line { display: block; }
.hero-copy h1 em { color: var(--signal); font-style: normal; }
.hero-copy__lead { max-width: 620px; margin: 30px 0 0; color: #d9deff; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.75; word-break: keep-all; }
.hero-actions { display: flex; align-items: center; gap: 22px; margin-top: 34px; }
.hero-object { position: relative; height: 480px; perspective: 1200px; }
.routing-card {
  position: absolute;
  z-index: 2;
  inset: 14px 0 auto auto;
  width: min(520px, 100%);
  min-height: 430px;
  border: 1px solid var(--carbon);
  background: var(--paper);
  color: var(--carbon);
  box-shadow: 24px 26px 0 #2338b6, 36px 40px 0 rgba(17, 28, 93, 0.28);
  transform: rotate(2.2deg);
  animation: ticket-arrive 720ms cubic-bezier(.2,.8,.2,1) both;
}
.routing-card::after {
  content: "";
  position: absolute;
  left: -8px;
  top: 0;
  bottom: 0;
  width: 14px;
  background: radial-gradient(circle at 0 8px, transparent 0 6px, var(--paper) 6.5px) 0 0 / 14px 18px repeat-y;
}
.routing-card__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 16px;
  border-bottom: 2px solid var(--carbon);
  padding: 20px 24px 17px 30px;
}
.routing-card__head span, .routing-card__head em { font-family: var(--mono); font-size: 10px; font-style: normal; letter-spacing: 0.13em; }
.routing-card__head strong { grid-column: 1; font-size: 21px; letter-spacing: -0.04em; }
.routing-card__head em { grid-column: 2; grid-row: 1 / span 2; border: 2px solid var(--signal-ink); padding: 8px; color: var(--signal-ink); font-weight: 700; transform: rotate(-5deg); }
.routing-card__body { display: grid; grid-template-columns: 1fr auto; align-items: end; border-bottom: 1px dashed var(--line-dark); padding: 23px 24px 20px 30px; }
.routing-card__body p { margin: 0; color: var(--carbon-soft); font-size: 14px; line-height: 1.45; }
.routing-card__body strong { grid-column: 2; grid-row: 1 / span 2; font-family: var(--mono); font-size: 64px; line-height: 0.9; }
.routing-card__body span { margin-top: 5px; font-size: 12px; line-height: 1.45; }
.mini-route { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 28px 24px 26px 30px; list-style: none; }
.mini-route li { position: relative; display: grid; gap: 7px; border-top: 3px solid var(--line); padding-top: 14px; }
.mini-route li::before { content: ""; position: absolute; top: -8px; left: 0; width: 11px; height: 11px; border: 2px solid var(--line-dark); border-radius: 50%; background: #fff; }
.mini-route li.is-current { border-color: var(--signal-ink); }
.mini-route li.is-current::before { border-color: var(--signal-ink); background: var(--signal-ink); }
.mini-route span { font-size: 12px; line-height: 1.35; }
.mini-route b { font-family: var(--mono); font-size: 24px; }
.routing-card__foot { display: flex; gap: 8px; border-top: 1px solid var(--line); padding: 15px 24px 17px 30px; }
.routing-card__foot span { border: 1px solid var(--line); padding: 5px 7px; color: var(--carbon-soft); font-size: 12px; line-height: 1.35; }
.ticket-shadow { position: absolute; right: -42px; bottom: 0; color: rgba(255, 255, 255, 0.13); font-family: var(--mono); font-size: 22px; letter-spacing: 0.08em; transform: rotate(90deg); transform-origin: right bottom; }
.demo-scope {
  scroll-margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  background: var(--blueprint);
  transition: background-color 240ms ease, box-shadow 240ms ease;
}
.demo-scope__header {
  display: grid;
  gap: 7px;
  padding: 34px clamp(22px, 5vw, 78px) 24px;
}
.demo-scope__header .overline { margin-bottom: 0; }
.demo-scope__header h2 { margin: 0; font-size: clamp(24px, 2.4vw, 36px); line-height: 1.3; letter-spacing: -0.04em; }
.demo-scope__header > p:last-child { margin: 0; color: #c9d0fb; font-size: 14px; line-height: 1.65; }
.demo-scope.is-highlighted,
.demo-scope.is-targeted,
.demo-scope[data-highlighted="true"] {
  background: #2438bd;
  box-shadow: inset 0 0 0 4px var(--signal);
  animation: scope-highlight 700ms ease both;
}
.demo-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255, 255, 255, 0.22); }
.demo-facts article { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 28px clamp(22px, 4vw, 58px); border-right: 1px solid rgba(255, 255, 255, 0.22); }
.demo-facts article:last-child { border-right: 0; }
.fact-index { color: var(--signal); font-family: var(--mono); font-size: 11px; font-weight: 700; }
.demo-facts strong { font-size: 15px; line-height: 1.4; }
.demo-facts p { margin: 7px 0 0; color: #c9d0fb; font-size: 13px; line-height: 1.65; word-break: keep-all; }
.demo-scope__action { display: flex; justify-content: flex-end; border-top: 1px solid rgba(255, 255, 255, 0.22); padding: 24px clamp(22px, 5vw, 78px) 32px; }

/* Working application */
.app { min-height: 100vh; background: var(--register); }
.app-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(18px, 3.5vw, 56px);
  background: rgba(247, 249, 253, 0.96);
  backdrop-filter: blur(12px);
}
.app-header__brand, .app-header__actions { display: flex; align-items: center; gap: 10px; }
.app-header__brand .plain-button { display: inline-flex; }
.app-header__divider { width: 1px; height: 28px; margin: 0 5px; background: var(--line); }
.app-header__brand > div { display: grid; gap: 2px; }
.app-header__brand > div strong { font-size: 13px; line-height: 1.35; }
.app-header__brand > div span { color: var(--carbon-soft); font-size: 12px; line-height: 1.4; }
.workspace { width: min(1540px, 100%); margin: 0 auto; padding: 28px clamp(18px, 3.5vw, 56px) 70px; }
.workspace-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.workspace-title h1 { margin: 0; font-family: var(--display); font-size: clamp(36px, 3.5vw, 50px); font-weight: 400; line-height: 1.1; letter-spacing: -0.04em; }
.workspace-title > div > p:last-child { margin: 8px 0 0; color: var(--carbon-soft); font-size: 13px; line-height: 1.5; }

.route-board { display: grid; grid-template-columns: 240px 1fr; border: 1px solid var(--carbon); background: var(--paper); box-shadow: 8px 8px 0 var(--copy-blue-2); }
.route-board__label { display: flex; flex-direction: column; justify-content: space-between; min-height: 140px; border-right: 1px solid var(--carbon); padding: 18px 20px; background: var(--carbon); color: #fff; }
.route-board__label span { color: #e3e7f0; font-family: var(--mono); font-size: 12px; line-height: 1.4; letter-spacing: 0.1em; }
.route-board__label h2 { max-width: 185px; margin: 0; font-size: 20px; line-height: 1.45; letter-spacing: -0.04em; }
.route-scroll-hint { display: none; margin: 12px 0 0; color: #f1f3ff; font-size: 12px; line-height: 1.5; }
.route { display: grid; grid-template-columns: repeat(5, minmax(104px, 1fr)); scrollbar-color: var(--blueprint) #e4e8f1; scrollbar-width: thin; }
.route::-webkit-scrollbar { height: 8px; }
.route::-webkit-scrollbar-track { background: #e4e8f1; }
.route::-webkit-scrollbar-thumb { border-radius: 99px; background: var(--blueprint); }
.route-stop { position: relative; display: grid; align-content: center; gap: 5px; min-width: 0; border: 0; border-right: 1px solid var(--line); padding: 16px 18px; background: #fff; color: var(--carbon); text-align: left; }
.route-stop:last-child { border-right: 0; }
.route-stop::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 17px; height: 3px; background: var(--line); transition: background 160ms ease; }
.route-stop:hover { background: #f9faff; }
.route-stop.is-selected { background: var(--copy-blue); }
.route-stop.is-selected::after { background: var(--blueprint); }
.route-stop span { color: var(--carbon-soft); font-size: 13px; line-height: 1.35; font-weight: 600; }
.route-stop strong { font-family: var(--mono); font-size: 28px; }
.route-stop small { margin-bottom: 7px; color: var(--muted); font-size: 12px; line-height: 1.35; }

.summary-strip { display: grid; grid-template-columns: repeat(3, minmax(140px, .8fr)) 1.6fr; margin-top: 28px; border: 1px solid var(--line); background: #fff; }
.summary-strip article { display: grid; align-content: center; gap: 8px; min-height: 128px; overflow: visible; border-right: 1px solid var(--line); padding: 22px 22px; }
.summary-strip article:last-child { border-right: 0; }
.summary-strip span { color: var(--carbon-soft); font-size: 13px; line-height: 1.4; font-weight: 600; }
.summary-strip strong { overflow: visible; color: var(--carbon); font-family: var(--body); font-size: clamp(26px, 2vw, 28px); font-variant-numeric: tabular-nums; line-height: 1.25; letter-spacing: -0.035em; }
.summary-strip small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.summary-strip__note { align-content: center; background: var(--signal-soft); }
.summary-strip__note span { color: var(--danger); font-family: var(--mono); letter-spacing: 0.12em; }
.summary-strip__note p { margin: 0; color: #694840; font-size: 13px; line-height: 1.6; }

.queue-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 22px 0 10px; }
.queue-tools > div { display: flex; gap: 8px; }
.queue-tools > p { margin: 0; color: var(--carbon-soft); font-family: var(--mono); font-size: 12px; line-height: 1.4; }
.search-control { display: flex; align-items: center; gap: 7px; width: min(350px, 48vw); min-height: 46px; border: 1px solid var(--line-dark); border-radius: 4px; padding: 0 12px; background: #fff; color: var(--carbon-soft); }
.search-control:focus-within, .select-control:focus-within { border-color: var(--blueprint); box-shadow: 0 0 0 3px rgba(52, 73, 215, .1); }
.search-control input { min-width: 0; width: 100%; border: 0; background: transparent; color: var(--carbon); font-size: 14px; line-height: 1.45; }
.select-control { display: block; border: 1px solid var(--line-dark); border-radius: 4px; background: #fff; }
.select-control select { min-height: 44px; border: 0; padding: 0 34px 0 12px; background: transparent; color: var(--carbon); font-size: 14px; line-height: 1.45; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(330px, .7fr); align-items: start; gap: 18px; }
.queue-panel { min-width: 0; border: 1px solid var(--line-dark); background: #fff; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; min-height: 72px; border-bottom: 2px solid var(--carbon); padding: 13px 20px; }
.panel-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.04em; }
.panel-head > span { color: var(--carbon-soft); font-size: 12px; line-height: 1.45; }
.queue-list { display: grid; max-height: 520px; overflow-y: auto; scrollbar-color: var(--blueprint) #e4e8f1; scrollbar-width: thin; }
.queue-item {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1.25fr .75fr .8fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 104px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  background: #fff;
  color: var(--carbon);
  text-align: left;
  transition: background 150ms ease, box-shadow 150ms ease;
}
.queue-item:last-child { border-bottom: 0; }
.queue-item:hover { background: #f9faff; }
.queue-item.is-selected { z-index: 1; background: var(--copy-blue); box-shadow: inset 4px 0 0 var(--blueprint); }
.queue-item__id { display: grid; gap: 4px; min-width: 0; }
.queue-item__id strong { font-family: var(--mono); font-size: 13px; line-height: 1.4; }
.queue-item__id span, .queue-item__customer span, .queue-item__time { color: var(--carbon-soft); font-size: 12px; line-height: 1.45; }
.queue-item__customer { display: grid; gap: 4px; min-width: 0; }
.queue-item__customer strong { overflow: hidden; font-size: 16px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.queue-item__customer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-item__amount { font-family: var(--mono); font-size: 14px; line-height: 1.4; font-weight: 700; white-space: nowrap; }
.queue-item__arrow { color: var(--blueprint); font-size: 18px; }
.status-label { display: inline-flex; align-items: center; width: max-content; min-height: 30px; border: 1px solid transparent; border-radius: 99px; padding: 0 10px; font-size: 12px; line-height: 1.3; font-weight: 700; white-space: nowrap; }
.status--접수 { border-color: #bdc8f8; background: var(--copy-blue); color: var(--blueprint-deep); }
.status--내용-확인 { border-color: #f0d170; background: var(--warning-soft); color: var(--warning); }
.status--진행-중 { border-color: #9adbc9; background: var(--success-soft); color: var(--success); }
.status--완료 { border-color: #d7dce6; background: #eef1f6; color: var(--muted); }
.empty-state { display: grid; place-items: center; gap: 8px; min-height: 310px; padding: 40px 22px; text-align: center; }
.empty-state strong { font-size: 15px; }
.empty-state p { margin: 0 0 7px; color: var(--carbon-soft); font-size: 13px; line-height: 1.55; }

.work-ticket { position: sticky; top: 94px; min-height: 470px; scroll-margin-top: 96px; border: 1px solid var(--carbon); background: #fff; box-shadow: 8px 8px 0 var(--signal-soft); }
.ticket-perforation { height: 15px; border-bottom: 1px dashed var(--line-dark); background: radial-gradient(circle at 8px -1px, var(--register) 0 5px, transparent 5.5px) 0 0 / 18px 14px repeat-x; }
.ticket-empty { display: grid; align-content: end; min-height: 455px; padding: 34px; }
.ticket-empty__mark { margin-bottom: auto; color: var(--signal-ink); font-family: var(--mono); font-size: 44px; }
.ticket-empty h2 { margin: 0; font-size: 25px; line-height: 1.35; letter-spacing: -0.05em; }
.ticket-empty > p:last-child { margin: 15px 0 0; color: var(--carbon-soft); font-size: 14px; line-height: 1.65; }
.ticket-content { padding: 25px 25px 28px; }
.ticket-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 2px solid var(--carbon); padding-bottom: 20px; }
.ticket-heading h2 { margin: 0; font-family: var(--mono); font-size: 17px; letter-spacing: -0.05em; }
.status-stamp { border: 2px solid var(--signal-ink); padding: 7px 8px; color: var(--signal-ink); font-family: var(--body); font-size: 12px; line-height: 1.3; font-weight: 700; transform: rotate(-4deg); }
.status-stamp.is-stamping { animation: stamp 280ms ease both; }
.ticket-data { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin: 0 0 18px; }
.ticket-data div { display: grid; grid-template-columns: 68px 1fr; gap: 8px; border-bottom: 1px dashed var(--line); padding: 8px 0; }
.ticket-data dt { color: var(--carbon-soft); font-size: 12px; line-height: 1.45; }
.ticket-data dd { overflow-wrap: anywhere; margin: 0; font-size: 14px; line-height: 1.45; font-weight: 600; }
.ticket-field { display: grid; gap: 7px; margin-top: 15px; }
.ticket-field > span { color: var(--carbon-soft); font-size: 13px; line-height: 1.4; font-weight: 700; }
.ticket-field select, .ticket-field textarea, .form-field input, .form-field select, .form-field textarea {
  width: 100%;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  background: #fff;
  color: var(--carbon);
  font-size: 14px;
  line-height: 1.5;
}
.ticket-field select, .form-field input, .form-field select { min-height: 46px; padding: 0 11px; }
.ticket-field textarea, .form-field textarea { resize: vertical; padding: 11px; line-height: 1.55; }
.ticket-actions { display: flex; justify-content: space-between; gap: 9px; margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }

.modal-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
  visibility: hidden;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 28, 47, 0.58);
  opacity: 0;
  transition: opacity 180ms ease, visibility 180ms ease;
}
.modal-layer.is-open { visibility: visible; opacity: 1; }
.modal { width: min(610px, 100%); border: 1px solid var(--carbon); border-radius: 5px; background: #fff; box-shadow: var(--shadow); transform: translateY(12px); transition: transform 180ms ease; }
.modal-layer.is-open .modal { transform: translateY(0); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 2px solid var(--carbon); padding: 21px 24px; }
.modal__head h2 { margin: 0; font-size: 23px; letter-spacing: -0.04em; }
.close-button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-dark); border-radius: 3px; background: #fff; color: var(--carbon); font-size: 24px; }
.modal__form { display: grid; gap: 16px; padding: 23px 24px 25px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-field { display: grid; gap: 7px; color: var(--carbon-soft); font-size: 13px; line-height: 1.4; font-weight: 700; }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: 28px; visibility: hidden; max-width: calc(100vw - 30px); border-radius: 4px; padding: 13px 17px; background: var(--carbon); color: #fff; box-shadow: var(--shadow); font-size: 13px; line-height: 1.45; font-weight: 600; opacity: 0; transform: translate(-50%, 12px); transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease; }
.toast.is-visible { visibility: visible; opacity: 1; transform: translate(-50%, 0); }

@keyframes ticket-arrive { from { opacity: 0; transform: translate(80px, 25px) rotate(6deg); } to { opacity: 1; transform: translate(0, 0) rotate(2.2deg); } }
@keyframes stamp { 0% { opacity: .3; transform: scale(1.3) rotate(-8deg); } 100% { opacity: 1; transform: scale(1) rotate(-4deg); } }
@keyframes scope-highlight { 0%, 100% { box-shadow: inset 0 0 0 4px var(--signal); } 50% { box-shadow: inset 0 0 0 8px var(--signal); } }

@media (max-width: 1080px) {
  .welcome__main { grid-template-columns: minmax(0, 1fr) minmax(390px, .85fr); }
  .hero-copy h1 { font-size: clamp(46px, 4.8vw, 56px); }
  .route-board { grid-template-columns: 190px 1fr; }
  .route-board__label { min-height: 155px; }
  .work-grid { grid-template-columns: minmax(0, 1.3fr) minmax(310px, .8fr); }
  .queue-item { grid-template-columns: 1.1fr 1.2fr .7fr auto; }
  .queue-item__time { display: none; }
  .summary-strip { grid-template-columns: repeat(3, 1fr); }
  .summary-strip__note { grid-column: 1 / -1; min-height: 88px !important; border-top: 1px solid var(--line); }
}

@media (min-width: 821px) and (max-width: 1180px) {
  .welcome__main { grid-template-columns: 1fr; }
  .hero-copy { max-width: 720px; }
  .hero-object { width: min(540px, calc(100% - 18px)); height: 440px; }
  .routing-card { inset: 0 auto auto 7px; }
}

@media (max-width: 820px) {
  .welcome__main { grid-template-columns: 1fr; padding-top: 62px; }
  .hero-copy { max-width: 650px; }
  .hero-object { width: min(540px, calc(100% - 18px)); height: 430px; }
  .routing-card { inset: 0 auto auto 7px; }
  .demo-facts { grid-template-columns: 1fr; }
  .demo-facts article { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
  .demo-facts article:last-child { border-bottom: 0; }
  .route-board { grid-template-columns: 1fr; box-shadow: 6px 6px 0 var(--copy-blue-2); }
  .route-board__label { min-height: auto; border-right: 0; padding: 18px 20px; }
  .route-board__label h2 { max-width: none; margin-top: 8px; font-size: 17px; }
  .route { overflow-x: auto; grid-template-columns: repeat(5, minmax(130px, 1fr)); }
  .route-scroll-hint { display: block; }
  .work-grid { grid-template-columns: 1fr; }
  .work-ticket { position: relative; top: 0; scroll-margin-top: 88px; }
  .ticket-data { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .welcome__header { min-height: 70px; }
  .demo-chip { border: 0; padding: 0; font-size: 12px; }
  .welcome__main { gap: 54px; min-height: calc(100svh - 70px); padding: 52px 20px 58px; }
  .hero-copy h1 { font-size: clamp(28px, 8.5vw, 44px); line-height: 1.08; letter-spacing: -0.07em; }
  .hero-copy__lead { margin-top: 23px; font-size: 16px; line-height: 1.7; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 15px; }
  .hero-actions .button--hero, .hero-actions .text-action { width: 100%; justify-content: center; }
  .hero-object { height: 380px; }
  .routing-card { min-height: 360px; box-shadow: 13px 14px 0 #2338b6; transform: rotate(1deg); }
  .routing-card__head { padding: 16px 16px 14px 22px; }
  .routing-card__body { padding: 18px 16px 17px 22px; }
  .routing-card__body strong { font-size: 50px; }
  .mini-route { overflow: visible; grid-template-columns: repeat(4, minmax(54px, 1fr)); padding: 24px 16px 20px 22px; }
  .routing-card__foot { flex-wrap: wrap; padding: 12px 16px 13px 22px; }
  .demo-scope__header { padding: 30px 20px 22px; }
  .demo-scope__header h2 { font-size: 25px; }
  .demo-facts article { padding: 24px 20px; }
  .demo-scope__action { padding: 22px 20px 30px; }
  .demo-scope__action .button { width: 100%; }
  .app-header { min-height: 68px; padding: 10px 12px; }
  .app-header__brand > div, .app-header__divider, .hide-small { display: none; }
  .app-header__brand, .app-header__actions { min-width: 0; }
  .app-header__actions { gap: 6px; }
  .app-header .button { min-height: 44px; padding-inline: 10px; font-size: 13px; }
  .workspace { padding: 30px 14px 50px; }
  .workspace-title { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .workspace-title .button { width: 100%; }
  .route { grid-template-columns: repeat(5, minmax(118px, 1fr)); }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-strip article { min-height: 124px; padding: 20px 18px; }
  .summary-strip article:nth-child(2) { border-right: 0; }
  .summary-strip article:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--line); border-right: 0; }
  .summary-strip__note { grid-column: 1 / -1; }
  .queue-tools { align-items: stretch; flex-direction: column; margin-top: 26px; }
  .queue-tools > div { flex-direction: column; }
  .search-control, .select-control, .select-control select { width: 100%; }
  .queue-tools > p { text-align: right; }
  .panel-head { align-items: flex-start; flex-direction: column; gap: 7px; }
  .search-control input, .select-control select,
  .ticket-field select, .ticket-field textarea,
  .form-field input, .form-field select, .form-field textarea { font-size: 16px; }
  .queue-item { grid-template-columns: 1fr auto; gap: 10px 14px; min-height: 118px; padding: 17px 15px; }
  .queue-item__customer { grid-column: 1; }
  .queue-item__amount { grid-column: 1; }
  .queue-item .status-label { grid-column: 2; grid-row: 1; }
  .queue-item__arrow { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
  .work-ticket { min-height: 430px; }
  .ticket-content { padding: 22px 20px 24px; }
  .ticket-data { grid-template-columns: 1fr; }
  .ticket-actions { flex-direction: column-reverse; }
  .ticket-actions .button { width: 100%; }
  .modal-layer { align-items: end; padding: 0; }
  .modal { max-height: 94vh; max-height: 94dvh; overflow-y: auto; border-radius: 7px 7px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .welcome__header { padding-inline: 16px; }
  .demo-chip { max-width: 142px; text-align: right; }
  .app-header__brand .wordmark > span:last-child { display: none; }
  .app-header__actions .button { padding-inline: 8px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
