@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@1.3.9/dist/web/static/pretendard.min.css");
@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@500;600&display=swap");

/* 아이캔토스 원형. Paper, one ink pill, one orange dot. Not Toss blue. Not SIMPLICITY. */

:root {
  --paper: #f6f6f5;
  --ink: #111111;
  --ink-2: #3f3f3d;
  --ink-3: #5c5c5a;
  --line: #e8e8e6;
  --dot: #ff4d00;
  --on-ink: #f6f6f5;
  --on-ink-2: #c4c4c0;
  --ink-hover: #000000;

  --font: "Pretendard", "Pretendard Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-quote: "Noto Serif KR", "Source Han Serif KR", Georgia, "Times New Roman", serif;

  --fs-meta: 14px;
  --fs-body: 16px;
  --fs-title: 18px;
  --fs-card: 22px;
  --fs-quote: 20px;
  --fs-lead: clamp(28px, 2.4vw + 22px, 40px);
  --fs-parent: clamp(24px, 3.2vw + 16px, 32px);
  --fs-done: 18px;

  --lh-meta: 1.4;
  --lh-body: 1.6;
  --lh-title: 1.35;
  --lh-lead: 1.28;
  --lh-btn: 1.2;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --gutter: clamp(20px, 6.4vw, 48px);
  --sheet-max: 640px;
  --top-h: 56px;
  --hit: 44px;
  --btn-h: 52px;
  --dot-size: 6px;

  --r-pill: 999px;
  --r-card: 24px;

  --elev-0: none;
  --elev-1: 0 0 0 1px var(--line);

  --ease-enter: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-press: 120ms;
  --scale-press: 0.96;

  --z-base: 0;
  --z-sticky: 30;
  --z-skip: 70;

  --focus: var(--ink);
  --focus-on-ink: var(--paper);
  --focus-w: 2px;
  --focus-off: 3px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100dvh;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--paper);
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgb(17 17 17 / 0.12);
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
ol,
ul,
li {
  margin: 0;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: var(--focus-w) solid var(--focus);
  outline-offset: var(--focus-off);
}

/* Skip — copy lives in HTML */
.skip {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-skip);
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip:focus,
.skip:focus-visible {
  width: auto;
  height: auto;
  min-height: var(--hit);
  min-width: var(--hit);
  padding: 12px 16px;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--r-pill);
  outline: var(--focus-w) solid var(--focus);
  outline-offset: var(--focus-off);
}

.top {
  flex-shrink: 0;
  min-width: 0;
  min-height: var(--top-h);
  max-width: var(--sheet-max);
  width: 100%;
  margin: 0 auto;
  padding: 6px var(--gutter);
  padding-top: calc(6px + env(safe-area-inset-top));
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--hit);
  min-width: var(--hit);
  padding: 12px;
  color: var(--ink-3);
  font-size: var(--fs-meta);
  font-weight: 500;
  line-height: var(--lh-meta);
}

.nav a:hover {
  color: var(--ink);
}

.nav a.is-now {
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 -1px 0 var(--ink);
}

.sheet {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--sheet-max);
  min-width: 0;
  margin: 0 auto;
  padding: 0 var(--gutter);
  padding-bottom: calc(var(--space-7) + env(safe-area-inset-bottom));
}

#main {
  scroll-margin-top: var(--space-4);
}

.dot {
  display: block;
  width: var(--dot-size);
  height: var(--dot-size);
  margin: 0 0 var(--space-4);
  border-radius: 50%;
  background: var(--dot);
  flex-shrink: 0;
}

.kicker {
  color: var(--ink-3);
  font-size: var(--fs-meta);
  font-weight: 500;
  line-height: var(--lh-meta);
}

.lead {
  margin-top: var(--space-3);
  min-width: 0;
  max-width: 100%;
  font-size: var(--fs-lead);
  font-weight: 600;
  line-height: var(--lh-lead);
  overflow-wrap: anywhere;
}

.card-title {
  margin-top: var(--space-2);
  min-width: 0;
  max-width: 100%;
  font-size: var(--fs-card);
  font-weight: 600;
  line-height: var(--lh-title);
  overflow-wrap: anywhere;
}

.card-context {
  margin-top: var(--space-3);
  color: var(--ink-2);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.quote {
  margin-top: var(--space-3);
  max-width: 100%;
  font-family: var(--font-quote);
  font-size: var(--fs-quote);
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: normal;
}

h1.card-title .quote {
  display: block;
  margin-top: 0;
  margin-bottom: var(--space-2);
}

/* Declare — first viewport is the sentence */
.page-declare .stage-first {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: calc(100dvh - var(--top-h));
  padding-block: var(--space-6);
}

.principles {
  list-style: none;
  padding: 0;
}

.principle {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--line);
}

.principle-title {
  font-size: var(--fs-title);
  font-weight: 600;
  line-height: var(--lh-title);
  text-wrap: balance;
}

.principle-body {
  margin-top: var(--space-2);
  color: var(--ink-2);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-wrap: anywhere;
}

.note-3d {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.note-3d .note-line {
  color: var(--ink-3);
  font-size: var(--fs-meta);
  font-weight: 500;
  line-height: var(--lh-meta);
}

.note-3d .note-line + .note-line {
  margin-top: var(--space-2);
}

.note-3d .quote {
  margin-top: var(--space-3);
}

.note-3d + .kicker {
  margin-top: var(--space-7);
}

/* Mission / parent — one card as a stamp on paper */
.page-mission .sheet,
.page-parent .sheet {
  display: flex;
  flex-direction: column;
}

.mission-card,
.parent-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-block: auto;
  padding: var(--space-6);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--elev-0);
}

.page-parent .card-title {
  font-size: var(--fs-parent);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.btn,
.btn-ghost {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  cursor: pointer;
  border-radius: var(--r-pill);
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: var(--lh-btn);
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
}

.btn {
  min-height: var(--btn-h);
  min-width: var(--hit);
  padding: 0 28px;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  transition: transform var(--duration-press) var(--ease-enter);
}

.btn:hover {
  background: var(--ink-hover);
}

.btn:active {
  transform: scale(var(--scale-press));
}

.btn:focus-visible {
  outline: var(--focus-w) solid var(--focus);
  outline-offset: var(--focus-off);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  transform: none;
}

.btn-ghost {
  display: none;
  min-height: var(--hit);
  min-width: var(--hit);
  padding: 10px 24px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  transition: transform var(--duration-press) var(--ease-enter);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-ghost:active {
  transform: scale(var(--scale-press));
}

.btn-ghost:focus-visible {
  outline: var(--focus-w) solid var(--focus);
  outline-offset: var(--focus-off);
}

.done-msg {
  display: none;
  min-width: 0;
  max-width: 100%;
  font-size: var(--fs-done);
  font-weight: 600;
  line-height: var(--lh-title);
  overflow-wrap: anywhere;
}

.mission-card.is-done,
.parent-card.is-done {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

.mission-card.is-done .kicker,
.parent-card.is-done .kicker,
.mission-card.is-done .card-context,
.parent-card.is-done .card-context,
.mission-card.is-done .note-line,
.parent-card.is-done .note-line {
  color: var(--on-ink-2);
}

.mission-card.is-done .quote,
.parent-card.is-done .quote {
  color: var(--on-ink);
}

.mission-card.is-done .btn,
.parent-card.is-done .btn {
  display: none;
}

.mission-card.is-done .done-msg,
.parent-card.is-done .done-msg {
  display: block;
  color: var(--on-ink);
}

.mission-card.is-done .btn-ghost,
.parent-card.is-done .btn-ghost {
  display: inline-flex;
  color: var(--on-ink);
  border-color: rgb(246 246 245 / 0.28);
}

.mission-card.is-done .btn-ghost:hover,
.parent-card.is-done .btn-ghost:hover {
  border-color: var(--on-ink);
  background: rgb(246 246 245 / 0.08);
}

.mission-card.is-done .btn-ghost:focus-visible,
.parent-card.is-done .btn-ghost:focus-visible {
  outline-color: var(--focus-on-ink);
}

.empty {
  margin-block: auto;
  color: var(--ink-2);
  font-size: var(--fs-body);
}

.empty .btn-ghost {
  display: inline-flex;
  margin-top: var(--space-5);
}

@media (min-width: 768px) {
  .mission-card,
  .parent-card {
    padding: 40px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover,
  .btn-ghost:hover,
  .nav a:hover {
    cursor: pointer;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn-ghost {
    transition: none;
  }

  .btn:active,
  .btn-ghost:active {
    transform: none;
  }
}

@media print {
  .top,
  .skip,
  .actions {
    display: none;
  }

  body,
  .mission-card,
  .parent-card,
  .mission-card.is-done,
  .parent-card.is-done {
    background: #fff;
    color: #000;
    border-color: #000;
    box-shadow: none;
  }
}
