:root {
  color-scheme:light;
  --paper:#f6f3e9;
  --white:#fffdf6;
  --ink:#25382e;
  --green:#143c2f;
  --muted:#58675e;
  --line:#d8ddce;
  --lime:#e0eea5;
  --rust:#8c422f;
  font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",system-ui,sans-serif;
  font-size:16px;
  color:var(--ink);
  background:var(--paper);
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
  min-height:100dvh;
}
button,input {
  font:inherit;
}
button {
  cursor:pointer;
}
button:disabled {
  cursor:wait;
  opacity:.65;
}
button:focus-visible,a:focus-visible,input:focus-visible {
  outline:3px solid #54826a;
  outline-offset:4px;
}
[hidden] {
  display:none!important;
}
.top {
  background:var(--green);
  color:#fffdf6;
  padding-top:env(safe-area-inset-top);
}
.bar {
  max-width:55rem;
  margin:auto;
  min-height:4.25rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.5rem;
  padding:0 max(1rem,env(safe-area-inset-right)) 0 max(1rem,env(safe-area-inset-left));
}
.brand,.plain {
  border:0;
  background:transparent;
  color:inherit;
  min-height:44px;
}
.brand {
  display:flex;
  align-items:center;
  gap:.65rem;
  padding:0;
  font-weight:750;
}
.seal {
  border-radius:.55rem;
  display:grid;
  place-items:center;
  width:2rem;
  height:2rem;
  background:var(--lime);
  color:var(--green);
  font:700 1.2rem Georgia,serif;
}
.plain {
  padding:.5rem .6rem;
  font-size:.9rem;
  text-decoration:underline;
  text-underline-offset:.2em;
}
.shell {
  max-width:45rem;
  margin:0 auto;
  padding:clamp(1.15rem,5vw,3.25rem) max(1rem,env(safe-area-inset-right)) max(2rem,env(safe-area-inset-bottom)) max(1rem,env(safe-area-inset-left));
}
.shell:focus {
  outline:none;
}
.card,.hero {
  border-radius:1.5rem;
  padding:clamp(1.15rem,5vw,2.5rem);
}
.card {
  background:var(--white);
  border:1px solid var(--line);
  box-shadow:0 6px 0 #e8e9dc;
}
.hero {
  position:relative;
  overflow:hidden;
  background:var(--green);
  color:var(--white);
  display:grid;
  gap:1.2rem;
  min-height:16rem;
  align-content:center;
}
.hero p {
  color:#dce9d4;
  max-width:27ch;
  word-break:keep-all;
  overflow-wrap:anywhere;
}
.hero-copy {
  position:relative;
  z-index:1;
}
.hero-title {
  font-size:clamp(2rem,7.2vw,3.65rem);
  line-height:1.14;
  margin:.4rem 0 .8rem;
  letter-spacing:-.055em;
}
.hero .primary {
  margin-top:1rem;
  background:var(--lime);
  color:var(--green);
}
.tiles {
  display:grid;
  position:absolute;
  right:1.5rem;
  top:50%;
  transform:translateY(-50%) rotate(-8deg);
  grid-template-columns:repeat(2,3rem);
  gap:.35rem;
  opacity:.48;
}
.tiles span {
  display:grid;
  place-items:center;
  aspect-ratio:1;
  border:1px solid #b5cf9a;
  border-radius:.5rem;
  color:#e0eea5;
  font:700 1.7rem Georgia,serif;
}
.kicker {
  font-size:.88rem;
  font-weight:750;
  color:var(--muted);
  margin:0 0 .65rem;
}
.hero .kicker {
  color:var(--lime);
}
h1,h2,h3,p {
  margin:0;
}
h1 {
  font-size:clamp(1.75rem,5.2vw,2.5rem);
  letter-spacing:-.045em;
  line-height:1.23;
}
h2 {
  font-size:1.18rem;
}
p {
  line-height:1.65;
}
.subtle {
  color:var(--muted);
}
.metrics {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.8rem;
  margin-top:1rem;
}
.metric {
  border:1px solid var(--line);
  border-radius:1rem;
  background:var(--white);
  padding:1rem;
}
.metric span {
  display:block;
  color:var(--muted);
  font-weight:650;
  font-size:.9rem;
}
.metric strong {
  display:block;
  font-size:1.5rem;
  margin-top:.3rem;
  color:var(--green);
}
.primary,.secondary,.option {
  border:1px solid transparent;
  border-radius:.78rem;
  min-height:48px;
  padding:.75rem 1rem;
  font-weight:750;
  text-align:center;
}
.primary {
  background:var(--green);
  color:white;
}
.secondary {
  background:var(--white);
  color:var(--green);
  border-color:var(--line);
}
.primary:hover {
  filter:brightness(1.12);
}
.secondary:hover,.option:hover {
  background:#eaf1dd;
}
.stack {
  display:grid;
  gap:1rem;
}
.actions {
  display:flex;
  flex-wrap:wrap;
  gap:.6rem;
}
.actions>* {
  flex:1 0 9rem;
}
.progress {
  display:flex;
  gap:.5rem;
  margin-top:.2rem;
}
.progress span {
  flex:1;
  height:.35rem;
  border-radius:1rem;
  background:var(--line);
}
.progress .active {
  background:#527955;
}
.story {
  background:#edf1e4;
  border-left:4px solid #83a77c;
  border-radius:.45rem .8rem .8rem .45rem;
  padding:1rem;
  font-size:clamp(1.04rem,3.3vw,1.2rem);
  line-height:1.8;
  word-break:keep-all;
}
.options {
  display:grid;
  gap:.55rem;
}
.option {
  display:flex;
  align-items:center;
  gap:.8rem;
  text-align:left;
  color:var(--green);
  background:var(--white);
  border-color:var(--line);
  font-size:1.09rem;
}
.option span {
  display:grid;
  place-items:center;
  width:1.8rem;
  height:1.8rem;
  border-radius:50%;
  background:#e8ecdd;
  font-size:.85rem;
}
.option.right {
  border-color:#52835e;
  background:#deedce;
}
.option.wrong {
  border-color:#bc806f;
  background:#f7e4dc;
}
.option:disabled {
  opacity:1;
  cursor:default;
}
.feedback {
  border-top:1px solid var(--line);
  padding-top:1rem;
}
.hanja {
  font-size:1.1em;
  color:#416c4e;
}
.example {
  color:var(--muted);
  padding:.6rem .8rem;
  background:#f1eee1;
  border-radius:.5rem;
}
.feedback a {
  color:var(--green);
  text-underline-offset:.2em;
  font-size:.88rem;
  width:fit-content;
}
.form {
  display:grid;
  gap:.85rem;
}
.form label {
  display:grid;
  gap:.35rem;
  font-weight:700;
}
.form input {
  width:100%;
  min-height:46px;
  padding:.55rem .7rem;
  border:1px solid #a7b2a6;
  border-radius:.55rem;
  background:#fff;
  color:var(--ink);
}
.notice {
  position:fixed;
  z-index:2;
  left:50%;
  bottom:max(1rem,env(safe-area-inset-bottom));
  transform:translateX(-50%);
  width:max-content;
  max-width:calc(100% - 2rem);
  border-radius:.7rem;
  background:#243b31;
  color:#fff;
  padding:.7rem 1rem;
  box-shadow:0 4px 20px #172b2360;
}
.error {
  color:var(--rust);
}
@media(max-width:36rem) {
  .tiles {
    right:.9rem;
    top:1.35rem;
    transform:rotate(-10deg);
    opacity:.22;
    grid-template-columns:repeat(2,2rem);
  }
  .tiles span {
    font-size:1.15rem;
  }
  .hero-copy {
    max-width:100%;
  }
  .hero .primary {
    width:100%;
  }
}
.empty {
  margin-top: 1rem;
}

.calendar {
  --calendar-cell: 12px;
  --calendar-gap: 4px;
  padding: clamp(.85rem, 3vw, 1.4rem);
  margin-bottom: 1.2rem;
  min-width: 0;
}

.calendar-header, .calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}

.calendar-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: #eeeee2;
  padding: 2px;
}

.calendar-toggle button, .calendar-nav button {
  border: 0;
  min-height: 44px;
  min-width: 44px;
  border-radius: .6rem;
  background: transparent;
  color: var(--green);
  font-size: .9rem;
  font-weight: 750;
}

.calendar-toggle button {
  padding: .35rem .65rem;
}

.calendar-toggle button[aria-pressed="true"] {
  background: var(--green);
  color: var(--white);
}

.calendar-nav {
  justify-content: center;
  margin-top: .6rem;
}

.calendar-nav h3 {
  min-width: 8rem;
  text-align: center;
  font-size: 1rem;
}

.calendar-nav button {
  border: 1px solid var(--line);
  font-size: 1.35rem;
}

.calendar-nav button:disabled {
  opacity: .35;
  cursor: default;
}

.calendar-summary {
  margin: .5rem 0 .65rem;
  font-size: .875rem;
  color: var(--muted);
}

.heat-layout {
  display: flex;
  gap: .45rem;
}

.heat-scroll {
  min-width: 0;
  overflow-x: auto;
  padding-bottom: .4rem;
  scrollbar-width: thin;
}

.heat-scroll:focus-visible {
  outline: 2px solid #54826a;
  outline-offset: 2px;
}

.heat-grid {
  display: flex;
  gap: var(--calendar-gap);
  width: max-content;
  padding-right: .3rem;
}

.heat-week, .heat-weekdays {
  display: grid;
  grid-template-rows: 1.1rem repeat(7, var(--calendar-cell));
  gap: var(--calendar-gap);
}

.heat-week {
  width: var(--calendar-cell);
}

.heat-weekdays, .heat-month, .heat-legend {
  color: var(--muted);
  font-size: .76rem;
  line-height: 1;
}

.heat-month {
  white-space: nowrap;
}

.heat-cell {
  display: inline-block;
  width: var(--calendar-cell);
  height: var(--calendar-cell);
  border-radius: 3px;
  background: #e6eadf;
}

.heat-cell.outside { visibility: hidden; }
.heat-cell.level-1 { background: #c6dda3; }
.heat-cell.level-2 { background: #8ebd77; }
.heat-cell.level-3 { background: #4e885e; }
.heat-cell.level-4 { background: #21553c; }

.heat-legend {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: .28rem;
  margin-top: .55rem;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .25rem;
}

.month-weekday {
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  padding: .2rem 0;
}

.month-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 3rem;
  border: 1px solid #e2e5da;
  border-radius: .4rem;
  padding: .2rem 0;
  font-size: .83rem;
  font-variant-numeric: tabular-nums;
}

.month-day.has-score {
  background: #e5edd8;
  border-color: #cbdcbc;
}

.month-day.is-today {
  border-color: #54826a;
}

.month-day.is-today time {
  font-weight: 800;
}

.month-score {
  margin-top: .16rem;
  color: var(--green);
  font-weight: 800;
  font-size: clamp(.68rem, 2.7vw, .9rem);
}

.month-score span {
  opacity: .72;
  padding-inline: .03em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 45rem) {
  .calendar {
    --calendar-cell: 9px;
    --calendar-gap: 2px;
  }
}
