:root,
[data-theme="paper"] {
  --bg: #f4efe6;
  --surface: #fffaf3;
  --fg: #1b1814;
  --muted: #655d52;
  --line: rgba(27, 24, 20, 0.14);
  --accent: #b5522a;
  --accent-fg: #fffaf3;
}
[data-theme="ink"] {
  --bg: #141210;
  --surface: #221e1a;
  --fg: #f4efe6;
  --muted: #b3a89a;
  --line: rgba(244, 239, 230, 0.16);
  --accent: #e07a45;
  --accent-fg: #141210;
}
[data-theme="sea"] {
  --bg: #e4eef2;
  --surface: #f7fbfc;
  --fg: #12262e;
  --muted: #4d6670;
  --line: rgba(18, 38, 46, 0.14);
  --accent: #0c6e86;
  --accent-fg: #f7fbfc;
}
[data-theme="moss"] {
  --bg: #e6eee4;
  --surface: #f7faf6;
  --fg: #1a291c;
  --muted: #516355;
  --line: rgba(26, 41, 28, 0.14);
  --accent: #3d6b45;
  --accent-fg: #f7faf6;
}
:root {
  --sans: "Outfit", "Noto Sans", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", "Noto Sans Devanagari", ui-sans-serif, system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --control: 2.75rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, [role="button"] { cursor: pointer; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.03em; text-wrap: balance; margin: 0; }
p { margin: 0; }

.wrap { width: min(1120px, calc(100% - 2.5rem)); margin-inline: auto; }
header.bar, footer.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding-block: 1.1rem;
}
.brand { font-family: var(--display); font-size: 1.35rem; text-decoration: none; }
.tools { margin-inline-start: auto; display: flex; align-items: center; gap: 0.35rem; }
.emoji-pick {
  width: 2.75rem;
  min-height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  font-size: 1.05rem;
  text-align: center;
  padding: 0 0.15rem;
}
#install[hidden] { display: none; }
#install { width: auto; padding: 0 0.75rem; font-size: 0.85rem; }
.lang { position: relative; }
.lang-menu[hidden] { display: none; }
.lang-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  inset-inline-end: 0;
  z-index: 20;
  min-width: 14rem;
  max-height: min(70vh, 28rem);
  overflow: auto;
  padding: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  box-shadow: 0 16px 40px color-mix(in srgb, var(--fg) 12%, transparent);
}
.lang-menu a {
  padding: 0.75rem 1rem;
  border-radius: 0.7rem;
  text-decoration: none;
  white-space: nowrap;
}
.lang-menu a[aria-current="page"] { background: var(--accent); color: var(--accent-fg); }
nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
nav a, .quiet { color: var(--muted); text-decoration: none; }
nav a:hover, .quiet:hover { color: var(--fg); }

main { display: flex; flex-direction: column; gap: 2.5rem; padding-bottom: 4rem; }
.hero { display: grid; gap: 1.5rem; align-items: end; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.1fr 0.9fr; } }
.kicker { color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.75rem; }
.display { font-size: clamp(3.2rem, 8vw, 6.4rem); line-height: 0.9; }
.lede { font-size: 1.25rem; color: var(--muted); max-width: 38rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.grid { display: grid; gap: 0.9rem; }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.four { grid-template-columns: 1fr 1fr; } }
.card { background: var(--surface); border-radius: 1.4rem; padding: 1.15rem 1.2rem; display: flex; flex-direction: column; gap: 0.45rem; }
.card h2 { font-size: 1.7rem; }
.muted { color: var(--muted); }
.frame { border-radius: 1.6rem; overflow: hidden; background: var(--surface); }
.frame img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: var(--control);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  text-decoration: none;
}
.btn span.disc {
  width: var(--control);
  height: var(--control);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-fg);
}
.btn.quiet span.disc { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn:disabled { opacity: 0.55; cursor: wait; }

label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); }
.field, select.field, textarea.field {
  width: 100%;
  min-height: var(--control);
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  padding-inline: 0.9rem;
}
textarea.field { min-height: 7rem; padding-block: 0.75rem; resize: vertical; }
.field:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
form.stack, .stack { display: flex; flex-direction: column; gap: 0.8rem; }
.err { color: var(--accent); font-size: 0.9rem; }
.desk { display: grid; gap: 1rem; }
@media (min-width: 900px) { .desk { grid-template-columns: 0.9fr 1.1fr; } }
.kinds { display: flex; flex-wrap: wrap; gap: 0.4rem; }
footer.bar { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
audio { width: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
