:root {
  --bg: #f4f1ec;
  --card: #ffffff;
  --ink: #222222;
  --sub: #777777;
  --line: #e4ded5;
  --acc: #e8663d;
  --acc2: #fde7de;
  --note: #fff8d6;
  --tabs-h: 64px;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
}
.topbar h1 { margin: 0; font-size: 18px; }

main {
  flex: 1;
  padding: 16px 16px calc(var(--tabs-h) + env(safe-area-inset-bottom) + 16px);
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.card h2 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 4px 0; font-size: 14px; line-height: 1.5; }
.card ol { margin: 6px 0; padding-left: 20px; font-size: 14px; line-height: 1.6; }

.card.note { background: var(--note); border-color: #eedc8a; }
.muted { color: var(--sub); font-size: 13px; }
.center { text-align: center; }

.big {
  display: block;
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  background: var(--acc);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
}
.big:disabled { background: #cccccc; }

.empty { text-align: center; padding: 32px 8px; }
.empty .ico { font-size: 40px; }

.tabs {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  flex: 1;
  height: var(--tabs-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--sub);
  text-decoration: none;
  font-size: 12px;
}
.tabs a .ico { font-size: 22px; line-height: 1; filter: grayscale(1); opacity: .7; }
.tabs a.on { color: var(--acc); font-weight: 700; }
.tabs a.on .ico { filter: none; opacity: 1; }
