@font-face {
  font-family: "NanumGothic";
  src: url("fonts/nanum/NanumGothic-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

:root {
  --bg: #F4F5F7;
  --card: #FFFFFF;
  --ink: #111111;
  --ink-2: #333333;
  --ink-3: #555555;
  --mute: #6A6E76;
  --line: #D5D8DE;
  --yolk: #E6A61A;
  --yolk-d: #C48A0E;
  --shell: #F7E4A8;
  --ok: #145C32;
  --ok-bg: #E7F4EC;
  --wait: #9A4A00;
  --wait-bg: #FFF1E4;
  --sel: #111111;
  --chip: #ECEEF1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "NanumGothic", "Noto Sans CJK KR", "Apple SD Gothic Neo", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.phone {
  width: 100%;
  height: 100%;
  min-height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
}

.status {
  height: 44px;
  padding: 12px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.status .time {
  font-size: 15px;
  letter-spacing: -0.2px;
  color: var(--ink);
}
.status .icons { display: flex; align-items: center; gap: 6px; }

.top {
  height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.egg-mark {
  width: 22px;
  height: 28px;
  border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
  background: var(--yolk);
  border: 1.5px solid var(--yolk-d);
  flex-shrink: 0;
}
.word {
  font-size: 24px;
  letter-spacing: -0.4px;
  color: var(--ink);
  line-height: 1;
}
.role {
  margin-left: auto;
  font-size: 16px;
  color: var(--ink-2);
  padding: 6px 10px;
  background: var(--chip);
  border-radius: 8px;
}
.back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  margin-left: -6px;
}

.scroll {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 4px 20px 10px;
}

.h1 {
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin: 2px 0 14px;
}
.h2 {
  font-size: 20px;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 8px;
}
.body {
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink-2);
}
.sub {
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink-3);
}
.note {
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink-2);
  background: #EEF1F5;
  border-radius: 10px;
  padding: 14px 16px;
}
.ex {
  font-size: 16px;
  color: var(--mute);
}

.hero {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 18px 18px 16px;
  margin-bottom: 16px;
}
.hero .when {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin: 6px 0 8px;
}
.hero .meta {
  font-size: 20px;
  color: var(--ink-2);
  line-height: 1.4;
}

.eggs {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
}
.dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--shell);
  border: 1.5px solid var(--yolk-d);
  flex-shrink: 0;
}
.dot.n {
  background: transparent;
  border-style: dashed;
  border-color: #B8BCC4;
}
.eggs .cnt {
  font-size: 18px;
  color: var(--ink-2);
  margin-left: 4px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 60px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 22px;
  letter-spacing: -0.3px;
  text-decoration: none;
  font-family: inherit;
  cursor: default;
}
.btn + .btn { margin-top: 10px; }
.links {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 16px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  font-size: 20px;
}
.link .chev { color: var(--mute); font-size: 22px; }

.card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 16px 16px 14px;
}
.card + .card { margin-top: 10px; }
.card.on {
  border-color: var(--ink);
  border-width: 2px;
  padding: 15px 15px 13px;
}
.card .name {
  font-size: 22px;
  color: var(--ink);
  line-height: 1.3;
}
.card .price {
  font-size: 20px;
  color: var(--ink);
  margin-top: 6px;
}
.card .term {
  font-size: 18px;
  color: var(--ink-3);
  margin-top: 4px;
}
.mark {
  display: inline-block;
  margin-top: 10px;
  font-size: 16px;
  color: var(--ok);
  background: var(--ok-bg);
  padding: 4px 8px;
  border-radius: 6px;
}
.mark.wait {
  color: var(--wait);
  background: var(--wait-bg);
}

.sec {
  margin-top: 18px;
}
.sec:first-child { margin-top: 0; }
.sec-h {
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 8px;
}

.row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.row + .row { margin-top: 8px; }
.row .l { flex: 1; min-width: 0; }
.row .who {
  font-size: 20px;
  color: var(--ink);
  line-height: 1.35;
}
.row .what {
  font-size: 18px;
  color: var(--ink-3);
  margin-top: 4px;
}
.row .tag {
  font-size: 16px;
  color: var(--ok);
  background: var(--ok-bg);
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 2px;
}
.row .amt {
  font-size: 18px;
  color: var(--ink);
  text-align: right;
  flex-shrink: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}
.chip {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  background: var(--chip);
  border: 1.5px solid transparent;
  color: var(--ink-2);
  font-size: 18px;
}
.chip.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin: 8px 0 16px;
}
.step .pm {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--ink);
}
.step .n {
  font-size: 28px;
  min-width: 72px;
  text-align: center;
  color: var(--ink);
}

.person {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.person + .person { margin-top: 10px; }
.person .nm {
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 10px;
}
.person .chips { margin: 0; }

.detail {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 18px 16px;
  margin-bottom: 14px;
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}
.kv + .kv { border-top: 1px solid var(--line); }
.kv .k { font-size: 18px; color: var(--ink-3); }
.kv .v { font-size: 20px; color: var(--ink); text-align: right; }
.shift {
  margin: 4px 0 16px;
  padding: 14px 16px;
  background: var(--wait-bg);
  border-radius: 10px;
  font-size: 20px;
  color: var(--ink);
  line-height: 1.4;
}

.mini {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.mini a {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 72px;
  padding: 12px 14px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
}
.mini .t { font-size: 20px; }
.mini .s { font-size: 16px; color: var(--ink-3); margin-top: 4px; }

.datebar {
  font-size: 20px;
  color: var(--ink-2);
  margin: -6px 0 12px;
}

.tabs {
  height: 68px;
  display: flex;
  align-items: stretch;
  background: #fff;
  border-top: 1.5px solid var(--line);
  flex-shrink: 0;
  padding: 0 4px;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--mute);
  font-size: 16px;
}
.tab.on { color: var(--ink); }
.tab svg {
  width: 24px;
  height: 24px;
}
.safe {
  height: 22px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-ind {
  width: 128px;
  height: 5px;
  border-radius: 3px;
  background: #111;
}

.hint {
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--shell);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.blk { margin-bottom: 12px; }
.blk .sec-h { margin-bottom: 6px; }

.affil {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.affil .farm {
  font-size: 22px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}
.affil .info {
  font-size: 18px;
  color: var(--ink-3);
  margin-top: 6px;
  line-height: 1.4;
}
.joined {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 14px;
  flex-shrink: 0;
}

.tog {
  display: flex;
  background: var(--chip);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 10px;
}
.tog span {
  flex: 1;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 18px;
  color: var(--ink-2);
}
.tog span.on {
  background: #fff;
  color: var(--ink);
}

.cal-h {
  font-size: 20px;
  color: var(--ink);
  margin: 0 0 6px;
}
.cal-w, .cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.cal-w span {
  text-align: center;
  font-size: 13px;
  color: var(--mute);
  padding: 0 0 4px;
}
.cal .d {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  border-radius: 7px;
  color: var(--ink);
}
.cal .d.x { color: transparent; }
.cal .d.has { background: var(--shell); }
.cal .d.on { background: var(--ink); color: #fff; }

.hist {
  margin-top: 8px;
}
.hist .hr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}
.hist .hr + .hr { border-top: 1px solid var(--line); }
.hist .p { font-size: 17px; color: var(--ink); }
.hist .st {
  font-size: 15px;
  color: var(--ok);
  background: var(--ok-bg);
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}
.hist .st.off {
  color: var(--mute);
  background: var(--chip);
}

.nextx {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0;
}
.nextx .lab {
  font-size: 18px;
  color: var(--ink-3);
}
.nextx .eq {
  font-size: 20px;
  color: var(--ink);
  margin-top: 6px;
  line-height: 1.4;
}
.nextx .to {
  font-size: 24px;
  color: var(--ink);
  margin-top: 8px;
  letter-spacing: -0.4px;
}

.kv.sm { padding: 5px 0; }
.kv.sm .k { font-size: 16px; }
.kv.sm .v { font-size: 18px; }
.detail.sm { padding: 10px 14px; margin-bottom: 10px; }
.shift.sm { margin: 0 0 10px; padding: 10px 14px; font-size: 18px; }
.scroll.tight { padding: 2px 16px 8px; }


/* —— desktop: one set, no phone bezel, left rail (same 4 items) —— */
@media (min-width: 900px) {
  html, body {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    overflow: hidden;
  }

  .phone {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-rows: 64px minmax(0, 1fr);
    background: var(--bg);
  }

  /* hide phone chrome */
  .status,
  .safe {
    display: none !important;
  }

  .top {
    grid-column: 1 / -1;
    grid-row: 1;
    height: 64px;
    padding: 0 28px;
    background: #fff;
    border-bottom: 1.5px solid var(--line);
    gap: 12px;
  }
  .word { font-size: 26px; }
  .role { font-size: 17px; padding: 7px 12px; }
  .back { width: 40px; height: 40px; font-size: 30px; }

  nav.tabs {
    grid-column: 1;
    grid-row: 2;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: auto;
    width: 220px;
    padding: 18px 14px;
    gap: 6px;
    border-top: 0;
    border-right: 1.5px solid var(--line);
    background: #fff;
  }
  .tab {
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    height: 52px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 18px;
    color: var(--ink-3);
  }
  .tab.on {
    background: var(--shell);
    color: var(--ink);
  }
  .tab svg { width: 26px; height: 26px; }

  .scroll,
  .scroll.tight {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    max-width: 840px;
    padding: 28px 40px 40px;
    overflow: auto;
  }

  .h1 { font-size: 28px; margin: 4px 0 16px; }
  .h2 { font-size: 22px; }
  .body { font-size: 20px; }
  .sub { font-size: 18px; }
  .note { font-size: 18px; padding: 16px 18px; }
  .sec-h { font-size: 22px; }

  .hero { padding: 22px 22px 20px; }
  .hero .when { font-size: 30px; }
  .hero .meta { font-size: 20px; }

  .btn {
    width: 100%;
    height: 64px;
    font-size: 22px;
    border-radius: 12px;
  }

  .chip { height: 48px; padding: 0 18px; font-size: 18px; }
  .step .pm { width: 56px; height: 56px; }
  .step .n { font-size: 30px; }

  .card { padding: 18px 20px 16px; }
  .card .name { font-size: 22px; }
  .row { padding: 16px 18px; }
  .row .who { font-size: 20px; }
  .row .what { font-size: 18px; }

  .link { height: 56px; font-size: 20px; }
  .person { padding: 18px 20px; }
  .person .nm { font-size: 22px; }

  .cal-h { font-size: 22px; margin: 4px 0 10px; }
  .cal-w span { font-size: 15px; padding-bottom: 8px; }
  .cal .d {
    height: 40px;
    font-size: 17px;
    border-radius: 8px;
  }

  .hint { font-size: 18px; padding: 14px 16px; }
  .datebar { font-size: 20px; }
  .tog { margin-bottom: 14px; }
  .tog span { height: 44px; font-size: 18px; }

  .detail { padding: 20px 20px; }
  .kv .k { font-size: 18px; }
  .kv .v { font-size: 20px; }
  .shift { font-size: 20px; padding: 16px 18px; }
  .nextx { padding: 18px 20px; }
  .nextx .to { font-size: 26px; }

  .affil { padding: 16px 20px; }
  .affil .farm { font-size: 22px; }
  .affil .info { font-size: 18px; }

  .hist .p { font-size: 18px; }
  .hist .st { font-size: 16px; }
}
