/* 공용 부품 (ui.js 와 짝). 누름 1px · 120ms · 넘침 0 · 그라데이션 · 빛 번짐 0. */
.hr-btn {
  min-height: var(--hr-tap); padding: 10px 18px; border-radius: var(--hr-r-sm);
  border: 1px solid var(--hr-hair-strong); background: var(--hr-paper); color: var(--hr-ink);
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform var(--hr-t-press) ease-out, background var(--hr-t-press) ease-out;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.hr-btn:active { transform: translateY(1px); }
.hr-btn.is-main { background: var(--hr-burgundy); border-color: var(--hr-burgundy); color: var(--hr-cream); width: 100%; min-height: 52px; font-size: 17px; }
.hr-btn.is-main:active { background: var(--hr-deep); border-color: var(--hr-deep); }
.hr-btn.is-text { border-color: transparent; background: transparent; color: var(--hr-burgundy); padding: 10px 8px; }
.hr-btn[disabled], .hr-btn.is-busy { opacity: 0.55; cursor: default; }
.hr-btn.is-busy::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: hr-spin 800ms linear infinite; }
@keyframes hr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hr-btn.is-busy::after { animation: none; } }

.hr-card { background: var(--hr-paper); border-radius: var(--hr-r-sm); box-shadow: var(--hr-shadow-1); padding: 16px; }
.hr-paper { background: var(--hr-paper); border-radius: var(--hr-r-xs); box-shadow: var(--hr-shadow-1); padding: 20px 24px; }

.hr-list { background: var(--hr-paper); border-radius: var(--hr-r-sm); box-shadow: var(--hr-shadow-1); margin: 0; padding: 0; list-style: none; overflow: hidden; }
.hr-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px; width: 100%; text-align: left;
  border: 0; background: transparent; border-top: 1px solid var(--hr-hair); cursor: default; }
.hr-list > li:first-child > .hr-row { border-top: 0; }
button.hr-row, a.hr-row { cursor: pointer; text-decoration: none; color: inherit; }
button.hr-row:active, a.hr-row:active { background: var(--hr-press); }
.hr-row .t { font-weight: 600; }
.hr-row .s { color: var(--hr-muted); font-size: var(--hr-fs-sm); line-height: 20px; }
.hr-row .r { margin-left: auto; color: var(--hr-muted); font-size: var(--hr-fs-sm); }
.hr-row .chev { color: var(--hr-brass); }
/* 승인 대기 기기 한 칸 (10-H 1) */
.hr-pend { padding: 12px 16px; border-left: 3px solid var(--hr-brass); }

.hr-chip { min-height: var(--hr-tap); display: inline-flex; align-items: center; justify-content: center; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--hr-hair-strong); background: var(--hr-paper); cursor: pointer; }
/* 글자 링크도 누름 면 44 (검수 지적 10) */
.hr-tlink { display: inline-flex; align-items: center; min-height: var(--hr-tap); min-width: var(--hr-tap); padding: 0 2px; }
.hr-chip.is-on { border-color: var(--hr-brass); box-shadow: inset 0 0 0 1px var(--hr-brass); font-weight: 600; }

.hr-field { display: flex; flex-direction: column; gap: 6px; }
.hr-field label { font-weight: 600; font-size: var(--hr-fs-sm); }
.hr-field input, .hr-field textarea, .hr-field select { min-height: var(--hr-tap); padding: 10px 12px; border-radius: var(--hr-r-sm);
  border: 1px solid var(--hr-hair-strong); background: var(--hr-white); }
.hr-field input.is-digits { font-size: 24px; letter-spacing: 0.3em; text-align: center; }
.hr-field .err { color: var(--hr-burgundy); font-size: var(--hr-fs-sm); }

.hr-slot { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.hr-slot .hr-chip { scroll-snap-align: start; flex: none; }

.hr-ticks { display: flex; align-items: center; gap: 6px; font-size: var(--hr-fs-sm); color: var(--hr-muted); }
.hr-ticks .dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--hr-brass); }
.hr-ticks .dot.is-on { background: var(--hr-brass); }
.hr-ticks .bar { flex: 1; height: 1px; background: var(--hr-hair-strong); }
.hr-ticks .is-now { color: var(--hr-ink); font-weight: 600; }

.hr-state { padding: 48px 16px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; color: var(--hr-muted); }
.hr-state .big { color: var(--hr-ink); font-weight: 600; font-size: var(--hr-fs-lg); }
.hr-skel { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.hr-skel i { display: block; height: 52px; border-radius: var(--hr-r-sm); background: var(--hr-paper); box-shadow: var(--hr-shadow-1); }

.hr-sheet-scrim {
  position: fixed; inset: 0; margin: 0; width: 100%; max-width: none; height: 100%; max-height: none;
  padding: 0; border: none; background: transparent; color: var(--hr-ink);
}
.hr-sheet-scrim[open] { display: grid; place-items: end center; }
.hr-sheet-scrim::backdrop { background: color-mix(in srgb, var(--hr-obsidian) 62%, transparent); }
.hr-sheet {
  width: min(100%, 500px); background: var(--hr-paper); border-top: 2px solid var(--hr-gilt);
  border-radius: 12px 12px 0 0; box-shadow: var(--hr-shadow-2);
  padding: 24px clamp(18px, 5vw, 32px) max(22px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 18px;
  max-height: min(90dvh, 850px); overflow: auto; overscroll-behavior: contain;
}
.hr-sheet h2 { font-size: 24px; letter-spacing: -.04em; }
.hr-sheet .acts { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 640px) {
  .hr-sheet-scrim[open] { place-items: center; padding: 20px; }
  .hr-sheet { border-radius: 6px; padding: 28px 32px; }
}
@keyframes hr-sheet-in { from { opacity: .4; transform: translateY(10px); } }
@media (prefers-reduced-motion: no-preference) {
  .hr-sheet { animation: hr-sheet-in 190ms var(--hr-ease); }
  .hr-sheet-scrim::backdrop { animation: hr-fade 140ms ease-out; }
}
.hr-toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--hr-obsidian); color: var(--hr-paper); font: 600 14px/1.6 var(--hr-font);
  padding: 11px 18px; border-inline-start: 2px solid var(--hr-gilt); box-shadow: var(--hr-shadow-2); z-index: 50;
  max-width: calc(100% - 32px);
}
.hr-tabs {
  position: fixed; inset: auto 0 0; z-index: 30; pointer-events: none;
  display: flex; justify-content: center; padding: 0 12px max(9px, env(safe-area-inset-bottom));
}
.hr-tabs nav {
  pointer-events: auto; display: flex; width: 100%; max-width: 432px; padding: 4px;
  border: 1px solid var(--hr-hair-strong); border-radius: 11px; background: var(--hr-paper);
  box-shadow: var(--hr-shadow-2);
}
.hr-tabs a {
  position: relative; flex: 1; min-height: 44px; display: grid; place-items: center; border-radius: 7px;
  font: 600 14px/1.45 var(--hr-font); text-decoration: none; color: var(--hr-muted);
  transition: color var(--hr-t-press), background-color var(--hr-t-press);
}
.hr-tabs a.is-on { background: var(--hr-claret); color: var(--hr-paper); }
.hr-tabs a:focus-visible { outline-offset: -3px; outline-color: var(--hr-brass); }
@media (hover: hover) { .hr-tabs a:not(.is-on):hover { background: var(--hr-press); color: var(--hr-ink); } }

.hr-side { display: flex; flex-direction: column; gap: 2px; padding: 16px 8px; min-width: 200px; border-right: 1px solid var(--hr-hair); background: var(--hr-paper); }
.hr-side a { padding: 10px 12px; border-radius: var(--hr-r-sm); text-decoration: none; color: var(--hr-ink); }
.hr-side a.is-on { box-shadow: inset 2px 0 0 var(--hr-brass); font-weight: 600; }

.hr-table { width: 100%; border-collapse: collapse; background: var(--hr-paper); border-radius: var(--hr-r-sm); box-shadow: var(--hr-shadow-1); overflow: hidden; }
.hr-table th, .hr-table td { padding: 10px 12px; border-top: 1px solid var(--hr-hair); text-align: left; font-size: 15px; }
.hr-table th { color: var(--hr-muted); font-weight: 600; border-top: 0; }
.hr-table td.num { text-align: right; }

.hr-band { position: sticky; top: 0; z-index: 35; background: var(--hr-ink); color: var(--hr-cream); display: flex; align-items: center; gap: 12px; padding: 8px var(--hr-gutter); }
.hr-band .hr-btn { min-height: 36px; padding: 4px 14px; background: var(--hr-cream); color: var(--hr-ink); border-color: var(--hr-cream); }

.hr-logo { display: block; }
.hr-door { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: 32px 0; }
.hr-door .mark { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hr-door .mark h1 { font-size: 28px; letter-spacing: 0.04em; }
.hr-door .links { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hr-consent { max-height: 50dvh; overflow: auto; }
.hr-qr { background: var(--hr-white); border-radius: var(--hr-r-xs); padding: 12px; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }

.hr-field :is(input, textarea, select) { transition: border-color var(--hr-t-press), box-shadow var(--hr-t-press); }
.hr-field :is(input, textarea, select):focus-visible {
  border-color: var(--hr-claret); outline: 2px solid var(--hr-claret); outline-offset: 2px;
}
.hr-field [aria-invalid="true"] { border-color: var(--hr-burgundy); }

/* 등록과 고지, 증명서 조회는 같은 창구 양식으로 이어진다. */
.service-standalone, .hr-app:has(.service-panel) { max-width: none; width: 100%; }
.service-standalone, .hr-main:has(.service-panel) {
  display: grid; align-content: safe center; min-height: 100dvh;
  padding: clamp(20px, 6vw, 76px) max(14px, env(safe-area-inset-left));
  background: var(--hr-fog);
}
.service-panel {
  width: min(100%, 580px); margin: auto; overflow: hidden;
  border: 1px solid var(--hr-hair-strong); border-radius: 9px;
  background: var(--hr-paper); box-shadow: var(--hr-shadow-2); color: var(--hr-ink);
}
.service-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px clamp(18px, 4vw, 38px); background: var(--hr-obsidian);
  color: var(--hr-paper); border-bottom: 2px solid var(--hr-gilt);
  font: 600 14px/1.5 var(--hr-font);
}
.service-brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: inherit; text-decoration: none; }
.service-brand svg { color: var(--hr-gilt); }
.service-office { color: var(--hr-gilt); white-space: nowrap; }
.service-content { padding: clamp(22px,4vw,39px); }
.service-content > h1 { font-size: clamp(28px, 4vw, 39px); letter-spacing: -.06em; margin-bottom: 18px; }
.service-content :is(p, dl, label, button, input) { font-family: var(--hr-font); }
.service-intro { color: var(--hr-muted); line-height: 1.7; margin-bottom: 25px; }
.service-facts { display: grid; margin: 0; border-top: 1px solid var(--hr-hair-strong); }
.service-facts > div { display: grid; grid-template-columns: minmax(7em, 36%) 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hr-hair); }
.service-facts dt { font-weight: 650; }
.service-facts dd { margin: 0; color: var(--hr-muted); }
.service-disclosure { margin-top: 24px; }
.service-disclosure h2 { font-size: 19px; margin-bottom: 7px; }
.service-sample { font-size: 14px; color: var(--hr-muted); padding: 14px 0 20px; }
.service-foot { padding: 10px clamp(18px, 4vw, 38px); border-top: 1px solid var(--hr-hair); font: 500 14px/1.6 var(--hr-font); color: var(--hr-muted); }
.service-foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--hr-claret); text-underline-offset: 4px; }
.service-panel .hr-btn.is-main { background: var(--hr-claret); color: var(--hr-paper); border-color: var(--hr-claret); }
.service-form, .service-enroll { display: grid; gap: 16px; }
.service-enroll .hr-center { text-align: start; }
.service-enroll :empty:is(p[role=alert]), .service-error:empty { display: none; }
.service-error { margin-top: 10px; color: var(--hr-burgundy); }
#v-result:not(:empty) { margin-top: 20px; }
.service-form .hr-field input.is-no { font: 600 18px/1.4 var(--hr-font); letter-spacing: .07em; }
@media (max-width: 365px) { .service-facts > div { grid-template-columns: 1fr; gap: 2px; } }

/* Unfilled record while the authorized route loads. */
.hr-main:has(.record-ghost.is-profile) { width:min(100%,1180px); margin-inline:auto; padding:clamp(16px,4vw,52px) clamp(12px,3.6vw,48px) 96px; }
.hr-main:has(.record-ghost.is-payroll) { padding:0; }
.record-ghost { width:100%; }
.record-ghost-spread { border:1px solid #d8cebd; background:var(--hr-paper); overflow:hidden; }
.record-ghost-cover { padding:clamp(22px,3vw,42px); color:#f3ebdc; background:radial-gradient(ellipse at 74% 18%,#36453b70,transparent 61%),linear-gradient(127deg,#302c28,#19201c); }
.record-ghost-cover h1 { font:500 clamp(29px,3.7vw,52px)/1.25 var(--hr-font); letter-spacing:-.055em; }
.record-ghost-cover p { font-size:14px; color:#d3d0bf; margin-top:12px; }
.record-ghost-lines { display:grid; gap:12px; }
.record-ghost-lines i { display:block; width:100%; height:8px; border-radius:1px; background:#dfd8ca; }
.record-ghost-lines i:nth-child(2) { width:64%; }
.record-ghost-lines.crumb { width:55px; height:52px; align-content:center; }
.record-ghost-paper { padding:clamp(18px,3vw,40px); }
.record-ghost-row { display:grid; grid-template-columns:1fr 1.5fr; gap:16px; min-height:96px; align-items:center; border-bottom:1px solid #dfd7c9; }
.record-ghost-row:last-child { border:0; }
.record-ghost-row .caption { width:65%; max-width:110px; }
.record-ghost-row .value { width:83%; max-width:210px; }
.record-ghost-lines.side { display:flex; gap:20px; align-items:center; padding:20px 16px; background:#261c19; }
.record-ghost-lines.side i { width:36px; background:#655a4e; height:6px; }
.record-ghost.is-payroll .record-ghost-spread { margin:clamp(18px,3vw,48px); }
@media(min-width:760px) {
  .record-ghost.is-profile .record-ghost-spread { display:grid; grid-template-columns:minmax(247px,.83fr) minmax(0,1.56fr); min-height:510px; }
  .record-ghost.is-profile .record-ghost-cover { padding-top:86px; }
}
@media(min-width:960px) {
  .record-ghost.is-payroll { display:grid; grid-template-columns:clamp(200px,20vw,248px) 1fr; min-height:100dvh; }
  .record-ghost-lines.side { flex-direction:column; align-items:flex-start; gap:36px; padding:68px 32px; }
  .record-ghost.is-payroll .record-ghost-spread { align-self:start; max-width:1080px; }
}
@media(prefers-reduced-motion:no-preference) {
  .record-ghost-row .value i { background:linear-gradient(101deg,#dfd8ca 32%,#eee8dd 49%,#dfd8ca 66%) 100% 50% / 240% 100%;
    animation:record-ghost-light 2.4s ease-in-out infinite; }
  @keyframes record-ghost-light { to { background-position:-80% 50%; } }
}
