:root {
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: #202620;
  background: #f5f6f1;
  --ink: #202620;
  --muted: #596055;
  --line: #d8ddd3;
  --green: #205844;
  --deep: #164333;
  --pale: #e7f0e8;
  --white: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #997622; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.035em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { line-height: 1.6; }
a { color: var(--green); }
small { font-size: .78rem; }
.wait { padding: 3rem; }
.entry {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(410px, .88fr);
}
.entry-context {
  position: relative;
  background: #173e31;
  color: #f6f6eb;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4rem;
  overflow: hidden;
  padding: clamp(2rem, 7vw, 7rem);
}
.entry-context::before, .entry-context::after {
  content: "";
  position: absolute;
  pointer-events: none;
  width: clamp(22rem, 42vw, 48rem);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #a2c4a74f;
  bottom: -22%;
  right: -15%;
}
.entry-context::after { bottom: -35%; right: 4%; }
.identity, .entry-title, .entry-bottom { position: relative; z-index: 1; }
.identity { display: flex; gap: .65rem; align-items: center; font-weight: 650; }
.identity span, .brand-mark { display: inline-block; width: 1rem; height: 1rem; background: #c2e0ad; transform: rotate(45deg); border-radius: 2px; }
.entry-title > p { color: #c2e0ad; letter-spacing: .025em; }
.entry-title h1 { font-size: clamp(2.65rem, 5.55vw, 6rem); line-height: 1.04; letter-spacing: -.08em; margin: .7rem 0 1.2rem; }
.entry-bottom { border-top: 1px solid #77a18a; padding-top: 1rem; color: #d3e2d4; }
.sign-in { width: min(100%, 480px); align-self: center; justify-self: center; padding: 3rem clamp(1.4rem, 4vw, 3.8rem); }
.sign-in h2 { font-size: 2.05rem; }
.sign-in > p { color: var(--muted); margin-top: .7rem; margin-bottom: 1.6rem; }
.sign-in form { margin: 0 0 1.5rem; }
.sign-in .button { width: 100%; }
form { display: grid; gap: .9rem; align-items: start; }
form > .button { justify-self: start; }
.sign-in form > .button { justify-self: stretch; }
label:not(.check) { display: grid; gap: .4rem; font-size: .91rem; font-weight: 650; min-width: 0; }
input:not([type="checkbox"]), select, textarea {
  min-width: 0;
  width: 100%;
  padding: .75rem .85rem;
  background: var(--white);
  color: var(--ink);
  border: 1px solid #aab6aa;
  border-radius: 6px;
  line-height: 1.4;
  font-weight: 400;
}
input:not([type="checkbox"]), select { min-height: 44px; }
input[type="checkbox"] { accent-color: var(--green); width: 1.1rem; height: 1.1rem; vertical-align: middle; }
textarea { resize: vertical; }
textarea:focus, input:focus, select:focus { outline: 2px solid #48785c; outline-offset: 1px; }
textarea:disabled, input:disabled, select:disabled { color: #4c554a; background: #eff1ec; opacity: 1; }
button, .button { min-height: 42px; }
.button {
  background: var(--white);
  color: var(--ink);
  border: 1px solid #abb8ac;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem 1rem;
  font-weight: 650;
  font-size: .91rem;
  line-height: 1.35;
}
.button:hover:not(:disabled) { background: #eff4ee; }
.button.primary { background: var(--green); color: var(--white); border-color: var(--green); }
.button.primary:hover:not(:disabled) { background: var(--deep); }
.button:disabled { background: #e9ede6; color: #596455; border-color: #ccd3c8; }
.button.quiet { background: transparent; border-color: transparent; }
.text-link { font-weight: 650; text-underline-offset: 3px; }
.top { background: var(--white); border-bottom: 1px solid var(--line); }
.top-inner, .layout { max-width: 1320px; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 3rem); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 73px; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--ink); }
.brand-mark { background: var(--green); width: .9rem; height: .9rem; margin-inline: .2rem; }
.brand small { display: block; color: var(--muted); margin-top: .15rem; }
.top-user { display: flex; align-items: center; gap: .75rem; font-size: .84rem; }
#connection { color: var(--muted); white-space: nowrap; }
#connection.connected { color: var(--green); }
#connection::before { content: ""; background: currentColor; display: inline-block; width: .43rem; height: .43rem; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.layout { padding-top: 1.5rem; padding-bottom: 4rem; }
.member-layout { max-width: 1120px; }
.stage-rail { display: flex; align-items: center; background: var(--white); border: 1px solid var(--line); margin-bottom: 1.55rem; min-height: 70px; border-radius: 8px; overflow: hidden; }
.stage-current { display: grid; gap: .25rem; padding: .8rem 1rem; flex: 0 0 auto; min-width: 130px; border-right: 1px solid var(--line); }
.stage-current > span { font-size: .75rem; color: var(--muted); }
.stage-current strong { color: var(--green); }
.stage-rail ol { display: flex; align-items: center; justify-content: space-around; list-style: none; padding: .75rem .6rem; margin: 0; overflow: auto; flex: 1; scrollbar-width: thin; gap: .25rem; }
.stage-rail li { display: flex; align-items: center; gap: .36rem; color: var(--muted); font-size: .79rem; white-space: nowrap; padding: .35rem .3rem; }
.stage-rail li > span { display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #edf0eb; font-weight: 700; }
.stage-rail li[aria-current] { color: var(--green); font-weight: 750; }
.stage-rail li[aria-current] span { color: var(--white); background: var(--green); }
.stage-rail li.done span { color: var(--green); background: var(--pale); }
.tabs { display: flex; align-items: center; gap: .25rem; margin-bottom: 1.35rem; overflow: auto; border-bottom: 1px solid var(--line); }
.tab { white-space: nowrap; background: transparent; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 650; padding: .6rem .8rem; }
.tab.chosen { color: var(--green); border-bottom-color: var(--green); }
.page-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .65rem; align-items: center; margin: 1.25rem 0; }
.page-title h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; }
.page-title p { color: var(--muted); margin-top: .35rem; }
.dashboard-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 1rem; align-items: start; }
.results-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: clamp(.9rem, 2.3vw, 1.5rem); margin-bottom: 1rem; min-width: 0; }
.section-title { margin-bottom: 1rem; }
.section-title p, .empty, .explanation, .muted { color: var(--muted); }
.section-title p { margin-top: .25rem; font-size: .88rem; }
.empty { padding-block: .7rem; }
.explanation { margin-bottom: .75rem; }
.current { background: var(--deep); color: #fff; border-radius: 6px; padding: .95rem; display: grid; gap: .2rem; }
.current span, .next-stage > span { font-size: .79rem; font-weight: 650; }
.current strong { font-size: 1.65rem; letter-spacing: -.04em; }
.next-stage { padding: .85rem 0 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; display: grid; gap: .5rem; }
.next-stage p { font-size: .91rem; }
.next-stage .button { justify-self: start; }
.blocking { color: #884428; }
.gate-row { display: grid; grid-template-columns: 1fr auto auto; gap: .55rem; align-items: center; border-bottom: 1px solid #eef0eb; padding: .55rem 0; }
.gate-row:last-child { border: 0; padding-bottom: 0; }
.gate-row .button { min-height: 39px; min-width: 69px; }
.pill { display: inline-flex; align-items: center; color: #51564a; background: #edf0eb; border-radius: 999px; padding: .24rem .57rem; font-size: .76rem; font-weight: 680; white-space: nowrap; }
.pill.live { background: var(--pale); color: #155235; }
.metrics, .counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; background: #fafbf8; }
.metrics > div, .counts > div { display: grid; gap: .27rem; border-right: 1px solid var(--line); padding: .85rem; }
.metrics > div:last-child, .counts > div:last-child { border: 0; }
.metrics span, .counts span { color: var(--muted); font-size: .79rem; }
.metrics strong, .counts strong { color: var(--deep); font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.metrics small, .counts small { color: var(--muted); margin-left: .15rem; }
.counts { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.table-wrap { overflow: auto; margin: .9rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .87rem; }
th, td { padding: .55rem .6rem; border-bottom: 1px solid #e8ece6; text-align: left; }
th { white-space: nowrap; }
thead th { color: var(--muted); background: #f3f5ef; font-size: .78rem; }
td { font-variant-numeric: tabular-nums; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.history { padding-left: 1.2rem; line-height: 1.7; color: var(--muted); }
.member-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(175px, 240px); align-items: start; gap: 2rem; background: #e5efe5; border-radius: 8px; padding: clamp(1.25rem, 5vw, 2.7rem); margin-bottom: 1rem; }
.member-hero h1 { color: var(--deep); font-size: clamp(2rem, 5vw, 3.55rem); line-height: 1.12; margin: .5rem 0 .7rem; }
.member-hero .actions { margin-top: 1.25rem; }
.eyebrow { font-size: .86rem; color: var(--green); font-weight: 700; }
.my-status { padding-left: 1.2rem; border-left: 1px solid #b4c7b5; }
.my-status h2 { font-size: .96rem; margin-bottom: .45rem; }
.my-status > div { display: flex; justify-content: space-between; gap: .55rem; padding-block: .5rem; font-size: .86rem; }
.keywords { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.keywords span { padding: .35rem .58rem; background: var(--pale); color: var(--green); border-radius: 4px; font-size: .85rem; }
.materials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; align-items: start; }
details:not(.panel) { border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
summary { cursor: pointer; font-weight: 650; }
details:not(.panel) summary { padding: .7rem .85rem; }
summary span { color: var(--green); margin-right: .45rem; font-variant-numeric: tabular-nums; }
summary small { font-weight: 400; color: var(--muted); }
details:not(.panel) > div, details:not(.panel) > p, details:not(.panel) > a, details:not(.panel) > label { margin: .25rem .85rem .75rem; }
.materials p { margin-bottom: .6rem; }
.preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.record-list, .note-list { margin-block: .7rem; display: grid; gap: .4rem; }
.record-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; border-bottom: 1px solid var(--line); padding: .6rem 0; }
.record-row p { color: var(--muted); font-size: .87rem; }
.input-layout { display: grid; grid-template-columns: minmax(210px, .68fr) minmax(0, 1.32fr); gap: 1rem; align-items: start; }
.input-list h2 { margin-bottom: .55rem; }
.input-list h2 small { color: var(--muted); font-weight: 500; }
.item { display: grid; grid-template-columns: 1.5rem 1fr auto; align-items: center; text-align: left; min-height: 47px; gap: .35rem; padding: .55rem .35rem; background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid #eef0eb; width: 100%; }
.item:hover { background: #f5f7f2; }
.item.active { background: var(--pale); color: var(--deep); border-radius: 5px; }
.item > span, .item small { color: var(--muted); font-size: .75rem; }
.item strong { font-size: .88rem; }
.project-body { margin: .7rem 0 1rem; }
.callout { padding: .65rem .9rem; border-left: 3px solid #ad7626; background: #f9edd6; color: #624218; margin: 0 0 1rem; font-size: .92rem; }
.score-fields, .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.score-total { color: var(--green); }
.score-total span { color: var(--muted); margin-left: .6rem; }
.edit-box { border: 1px solid #a9bda9; background: #f5f8f2; padding: .85rem; margin: .9rem 0; border-radius: 6px; }
#member-password { width: min(28rem, calc(100% - 2rem)); margin: auto; }
#member-password::backdrop { background: #14271f80; }
#member-password [hidden] { display: none; }
.project-settings { margin-block: .4rem; }
#notice:not(:empty) { position: fixed; padding: .7rem .95rem; background: var(--deep); color: #fff; border-radius: 6px; z-index: 4; bottom: 1rem; right: 1rem; max-width: min(92vw, 31rem); box-shadow: 0 8px 24px #23302726; }
#notice.error:not(:empty) { background: #863c2f; }
@media (max-width: 860px) {
  .dashboard-grid { grid-template-columns: 1fr; gap: 0; }
  .stage-rail ol { justify-content: flex-start; }
  .entry { grid-template-columns: 1fr 1fr; }
  .counts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .entry { display: block; }
  .entry-context { min-height: 0; padding: 1.6rem; gap: 1.6rem; }
  .entry-title h1 { font-size: clamp(2.4rem, 8.3vw, 3.5rem); margin: .5rem 0; }
  .entry-bottom { display: none; }
  .sign-in { margin-inline: auto; padding: 1.9rem 1.15rem 2.5rem; }
  .top-inner { min-height: 59px; }
  .top-user { gap: .2rem; }
  .brand { gap: .4rem; font-size: .82rem; }
  .brand small, .user-name { display: none; }
  .top-user .button { padding-inline: .35rem; font-size: .75rem; }
  #connection { font-size: .71rem; }
  .layout { padding-top: .75rem; }
  .stage-rail { display: block; }
  .stage-current { border: 0; border-bottom: 1px solid var(--line); padding: .6rem .7rem; display: flex; align-items: center; gap: .5rem; }
  .stage-rail ol { padding: .35rem .45rem; }
  .member-hero { grid-template-columns: 1fr; gap: 1.1rem; }
  .my-status { border-top: 1px solid #b4c7b5; border-left: 0; padding: .8rem 0 0; }
  .materials, .input-layout { grid-template-columns: 1fr; }
  .input-list { max-height: 242px; overflow: auto; }
  .counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .counts > div { border-bottom: 1px solid var(--line); }
  input:not([type="checkbox"]), select, textarea { font-size: 16px; }
}
