:root {
  --text: #222833;
  --muted: #5d6573;
  --line: #d5dae2;
  --soft: #f1f4f8;
  --navy: #1d3557;
  --title: #14213d;
  --accent: #2f6fde;
  --tint: #e7eefb;
  --wf-ink: #3a3f48;
  --wf-line: #b9c0cb;
  --wf-fill: #eceff3;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  background: #e9ecf1;
  color: var(--text);
  font:
    400 14px/1.6 "Pretendard Variable",
    Pretendard,
    "Malgun Gothic",
    sans-serif;
  font-variant-numeric: tabular-nums;
}

button {
  font: inherit;
  cursor: pointer;
}

.top {
  background: #ffffff;
  border-bottom: 2px solid var(--navy);
}

.top-in {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
}

.title {
  padding-bottom: 14px;
}

.sec {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.sec::before {
  content: "";
  width: 28px;
  height: 4px;
  background: var(--accent);
}

h1 {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--title);
}

.toc {
  display: flex;
  gap: 8px;
  padding-bottom: 14px;
}

.toc a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--navy);
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

.toc a:hover {
  background: var(--tint);
}

.toc span,
.doc-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--navy);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.doc-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--title);
  scroll-margin-top: 16px;
}

.doc-title:first-of-type {
  margin-top: 4px;
}

.doc-title span {
  width: 28px;
  height: 28px;
  font-size: 15px;
}

.doc-title small {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px 40px;
}

.notice {
  margin: 0 0 14px;
  padding: 10px 14px;
  background: var(--tint);
  border-left: 4px solid var(--accent);
  color: var(--navy);
}

.sheet {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 20px 24px 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.docinfo {
  table-layout: fixed;
}

.docinfo th,
.docinfo td {
  padding: 7px 10px;
  border: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

.docinfo th {
  width: 90px;
  background: var(--soft);
  color: var(--navy);
  font-weight: 600;
  white-space: nowrap;
}

.docinfo tr:first-child th,
.docinfo tr:first-child td {
  border-top: 2px solid var(--navy);
}

.sb {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px;
  margin-top: 20px;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.desc h3 {
  margin: 0 0 8px;
  padding-bottom: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--title);
  border-bottom: 1px solid var(--line);
}

.desc h3 + * {
  margin-bottom: 20px;
}

.notes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notes li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}

.notes li:last-child {
  border-bottom: 0;
}

.notes b {
  display: block;
  color: var(--navy);
}

.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.bul {
  margin: 0;
  padding-left: 18px;
}

.bul li + li {
  margin-top: 4px;
}

.pager {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pg {
  flex: none;
  padding: 7px 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--navy);
  font-weight: 600;
}

.pg:disabled {
  color: #a4abb6;
  cursor: default;
}

.steps {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps button {
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
}

.steps button[aria-current="true"] {
  background: var(--tint);
  border-color: var(--accent);
  color: var(--navy);
  font-weight: 600;
}

.frame {
  position: relative;
  width: 340px;
  height: 680px;
  border: 10px solid #2b2f36;
  border-radius: 30px;
  background: #ffffff;
  overflow: hidden;
  color: var(--wf-ink);
  font-size: 13px;
}

.frame.pc {
  width: 640px;
  height: 420px;
  border-width: 8px;
  border-radius: 8px;
}

.wf {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.wf-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--wf-line);
  font-weight: 700;
}

.wf-bar .back {
  color: #8a919c;
}

.wf-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px;
}

.wf-foot {
  flex: none;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--wf-line);
}

.wf-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 11px;
  border: 1.5px solid var(--wf-ink);
  background: var(--wf-ink);
  color: #ffffff;
  font-weight: 700;
  text-align: center;
}

.wf-btn.line {
  background: #ffffff;
  color: var(--wf-ink);
}

.wf-btn:disabled {
  border-color: var(--wf-line);
  background: var(--wf-fill);
  color: #9aa1ab;
  cursor: default;
}

.mk {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 2px #ffffff;
  pointer-events: none;
}

.rel {
  position: relative;
}

.chips {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.chip {
  flex: 1;
  padding: 6px 0;
  border: 1px solid var(--wf-line);
  text-align: center;
  font-size: 12px;
}

.chip.on {
  border-color: var(--wf-ink);
  background: var(--wf-ink);
  color: #ffffff;
}

.card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid var(--wf-line);
  background: #ffffff;
  color: inherit;
  text-align: left;
}

.card .ph {
  height: 56px;
  background:
    linear-gradient(
      to top right,
      transparent calc(50% - 0.5px),
      var(--wf-line) 50%,
      transparent calc(50% + 0.5px)
    ),
    linear-gradient(
      to top left,
      transparent calc(50% - 0.5px),
      var(--wf-line) 50%,
      transparent calc(50% + 0.5px)
    ),
    var(--wf-fill);
}

.card b {
  display: block;
}

.card small {
  display: block;
  color: #7c838e;
  font-size: 12px;
}

.card.off {
  color: #a4abb6;
  cursor: default;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #6c737e;
}

.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 3px;
  vertical-align: -1px;
  border: 1px solid var(--wf-line);
}

.slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.slot {
  position: relative;
  padding: 6px 0;
  border: 1px solid var(--wf-line);
  background: #ffffff;
  color: inherit;
  font-size: 12px;
  text-align: center;
}

.slot.taken,
.legend .taken {
  background: var(--wf-fill);
  color: #a4abb6;
  text-decoration: line-through;
  cursor: default;
}

.slot.hold,
.legend .hold {
  background: repeating-linear-gradient(-45deg, #ffffff 0 4px, var(--wf-fill) 4px 8px);
  color: #8a919c;
  cursor: default;
}

.slot.past {
  color: #c3c8d0;
  border-style: dashed;
  cursor: default;
}

.slot.sel,
.legend .sel {
  background: var(--wf-ink);
  border-color: var(--wf-ink);
  color: #ffffff;
}

.sum {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--wf-line);
  background: var(--wf-fill);
  font-size: 12px;
}

.sum b {
  font-size: 14px;
}

.box {
  padding: 10px 12px;
  border: 1px solid var(--wf-line);
}

.box dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 4px 8px;
  margin: 0;
}

.box dt {
  color: #7c838e;
}

.box dd {
  margin: 0;
  font-weight: 600;
}

.timer {
  margin: 16px 0;
  text-align: center;
}

.timer b {
  display: block;
  font-size: 36px;
  letter-spacing: 0.04em;
}

.timer small {
  color: #6c737e;
}

.agree {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 12px;
}

.agree input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.pay {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 10px;
  border: 1px solid var(--wf-line);
  margin-bottom: 6px;
  cursor: pointer;
}

.pay input {
  margin: 0;
}

.pay small {
  display: block;
  color: #7c838e;
  font-size: 11px;
}

.pay.off {
  color: #a4abb6;
  cursor: default;
}

.total {
  display: flex;
  justify-content: space-between;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--wf-line);
  margin-bottom: 12px;
  font-weight: 700;
}

.done {
  text-align: center;
  padding: 6px 0 12px;
}

.done .ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--wf-ink);
  border-radius: 50%;
  font-weight: 700;
}

.pin {
  margin: 10px 0;
  padding: 14px 12px;
  border: 1.5px solid var(--wf-ink);
  text-align: center;
}

.pin .code {
  display: block;
  margin: 6px 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.3em;
}

.pin small {
  color: #6c737e;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pc-wrap {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  height: 100%;
}

.pc-nav {
  border-right: 1px solid var(--wf-line);
  background: var(--wf-fill);
  padding: 10px 0;
  font-size: 12px;
}

.pc-nav div {
  padding: 6px 12px;
  color: #6c737e;
}

.pc-nav div.on {
  background: #ffffff;
  color: var(--wf-ink);
  font-weight: 700;
}

.pc-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px 12px;
  gap: 8px;
}

.pc-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.kpi div {
  padding: 6px 8px;
  border: 1px solid var(--wf-line);
  font-size: 11px;
  color: #6c737e;
}

.kpi b {
  display: block;
  color: var(--wf-ink);
  font-size: 15px;
}

.wtable th,
.wtable td {
  padding: 4px 6px;
  border: 1px solid var(--wf-line);
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
}

.wtable th {
  background: var(--wf-fill);
  font-weight: 600;
}

.tag {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid var(--wf-line);
  font-size: 10px;
}

.tag.bad {
  border-color: var(--wf-ink);
  font-weight: 700;
}

.mini {
  padding: 1px 6px;
  border: 1px solid var(--wf-ink);
  background: #ffffff;
  font-size: 10px;
}

.est-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--title);
}

.est-head h2 small,
.h small {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.est-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.h {
  margin: 26px 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}

.grid th,
.grid td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.grid thead th {
  background: var(--navy);
  color: #ffffff;
  font-weight: 600;
  border-bottom: 0;
  white-space: nowrap;
}

.grid .n {
  text-align: right;
  white-space: nowrap;
}

.grid tr.sub td {
  background: var(--soft);
  color: var(--navy);
  font-weight: 600;
}

.grid tr.sum td {
  background: var(--tint);
  color: var(--title);
  font-weight: 700;
}

.grid td.src {
  color: var(--muted);
  font-size: 12px;
}

.grid .ph1 {
  color: var(--accent);
  font-weight: 600;
}

.foot-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .top-in,
  main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .sheet {
    padding: 14px;
    overflow-x: auto;
  }

  .sb {
    grid-template-columns: minmax(0, 1fr);
  }

  .docinfo,
  .docinfo tbody {
    display: block;
  }

  .docinfo tr {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .docinfo tr:first-child th,
  .docinfo tr:first-child td {
    border-top: 1px solid var(--line);
  }

  .docinfo tr:first-child th:first-child,
  .docinfo tr:first-child td:nth-child(2) {
    border-top: 2px solid var(--navy);
  }

  .docinfo th {
    width: auto;
  }

  .pager {
    flex-wrap: wrap;
  }

  .steps {
    order: -1;
    flex-basis: 100%;
  }

  .frame.pc {
    width: 100%;
    min-width: 560px;
  }

  .toc a {
    padding: 6px 10px;
    font-size: 13px;
  }
}
