/* Little Day Diner site: the game's watercolour paper, ink and sage. */
:root {
  --paper: #f6efe0;
  --paper-2: #efe5cf;
  --card: #fbf7ee;
  --ink: #4b3a2a;
  --ink-soft: #7a6854;
  --sage: #5f8a62;
  --sage-dark: #3f6648;
  --rose: #c9705a;
  --line: #d9c9a8;
  --shadow: 0 10px 30px rgba(92, 70, 40, 0.12);
  --zh: "ZCOOL KuaiLe", "Mali", system-ui, sans-serif;
  --ui: "Mali", "ZCOOL KuaiLe", system-ui, sans-serif;
  --brush: "Caveat Brush", "ZCOOL KuaiLe", cursive;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  background-image:
    radial-gradient(1200px 500px at 20% -10%, #fbf6ea 0%, transparent 60%),
    radial-gradient(900px 400px at 100% 30%, #eef0e2 0%, transparent 60%);
  color: var(--ink);
  font: 16px/1.7 var(--ui);
  -webkit-font-smoothing: antialiased;
}
html[lang="zh-CN"] body { font-family: var(--zh); letter-spacing: 0.02em; }
img { max-width: 100%; display: block; }
a { color: var(--sage-dark); }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px clamp(16px, 4vw, 48px);
  background: rgba(246, 239, 224, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px dashed var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-size: 20px; }
.brand img { width: 30px; }
nav { display: flex; align-items: center; gap: clamp(8px, 2vw, 22px); }
nav a { text-decoration: none; color: var(--ink-soft); }
nav a:hover { color: var(--ink); }
.pill, .lang {
  border: 1.5px solid var(--sage); border-radius: 999px; padding: 2px 14px;
  color: var(--sage-dark) !important; background: transparent; font: inherit; cursor: pointer;
}
.lang { border-color: var(--line); color: var(--ink-soft) !important; padding: 2px 10px; }

section { padding: clamp(40px, 7vw, 90px) clamp(16px, 5vw, 64px); max-width: 1180px; margin: 0 auto; }
h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 400; text-align: center; margin: 0 0 28px; }
html[lang="en"] h2 { font-family: var(--brush); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; padding-bottom: 10px; }
.kicker { display: inline-block; margin: 0 0 8px; padding: 2px 12px; border-radius: 999px; background: #e4ecd9; color: var(--sage-dark); font-size: 14px; }
h1 { margin: 0 0 14px; line-height: 1.05; font-weight: 400; }
.zh-title { display: block; font-family: var(--zh); font-size: clamp(48px, 8vw, 88px); }
.en-title { display: block; font-family: var(--brush); font-size: clamp(30px, 4.5vw, 52px); color: #8a6f4e; }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-soft); max-width: 34em; }
.cta { display: flex; align-items: center; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.platforms { color: var(--ink-soft); font-size: 14px; }
.hero-cast { position: relative; height: 260px; }
.hero-cast .mochi { position: absolute; right: 30%; bottom: 0; height: 230px; animation: bob 3.2s ease-in-out infinite; }
.hero-cast .pip { position: absolute; right: 8%; bottom: 0; height: 150px; animation: bob 2.6s ease-in-out infinite reverse; }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* Buttons: painted paper buttons from the game. */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font: 600 16px var(--ui); color: var(--ink);
  padding: 10px 24px; border: 10px solid transparent;
  border-image: url(/img/btn.png) 10 fill / 10px stretch;
  background: none; transition: transform .12s, filter .12s;
}
html[lang="zh-CN"] .btn { font-family: var(--zh); font-weight: 400; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn:active { transform: translateY(1px); }
.btn.primary { border-image-source: url(/img/btn_marker.png); }
.btn.big { font-size: 18px; padding: 12px 30px; }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }

/* Desk: the game sitting at the bottom of a screen. */
.desk { padding-top: 10px; }
.desk-screen {
  position: relative; border-radius: 18px; overflow: hidden;
  background: linear-gradient(#e9eef0, #f3efe4 70%);
  box-shadow: var(--shadow), inset 0 0 0 10px #3d3a36;
  padding: 40px 10px 0; aspect-ratio: 16 / 5;
  display: flex; align-items: flex-end;
}
.desk-screen::before {
  content: ""; position: absolute; inset: 10px 10px auto; height: 22px;
  background: rgba(255, 255, 255, .55); border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.desk-screen img { width: 100%; }
.caption { text-align: center; color: var(--ink-soft); font-size: 14px; margin-top: 14px; }

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 16px;
  padding: 22px 20px; box-shadow: var(--shadow); text-align: center;
}
.card img { width: 64px; margin: 0 auto 8px; }
.card h3 { margin: 0 0 6px; font-weight: 600; font-size: 19px; }
html[lang="zh-CN"] .card h3 { font-weight: 400; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* Places */
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 18px; }
.tab { font: inherit; padding: 6px 16px; border: 10px solid transparent; border-image: url(/img/btn.png) 10 fill / 10px stretch; background: none; cursor: pointer; color: var(--ink); }
.tab.on { border-image-source: url(/img/btn_pressed.png); color: var(--ink); font-weight: 600; }
.place-view { background: linear-gradient(#eef1ec, var(--paper-2)); border-radius: 18px; padding: 18px 10px 0; box-shadow: var(--shadow); }
.place-view img { width: 100%; transition: opacity .25s; }
.place-note { text-align: center; color: var(--ink-soft); margin-top: 12px; min-height: 1.7em; }

/* Sign-up: the game's ledger page. */
.ledger {
  max-width: 760px; margin: 0 auto; position: relative;
  border: solid transparent; border-width: 72px 30px 30px;
  border-image: url(/img/page.png) 72 26 22 26 fill / 72px 30px 30px stretch;
  padding: 0 clamp(4px, 2vw, 24px) 10px;
  filter: drop-shadow(0 12px 24px rgba(92, 70, 40, .14));
}
.brush { font-family: var(--brush); font-weight: 400; font-size: clamp(30px, 4vw, 42px); margin: -58px 0 22px; text-align: left; }
html[lang="zh-CN"] .brush { font-family: var(--zh); }
.sub { color: var(--ink-soft); margin: 0 0 20px; }
form { display: grid; gap: 14px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label > span, legend { display: block; font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fffdf7;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(95, 138, 98, .18); }
.code input { font: 600 20px/1.2 "Mali", monospace; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
fieldset.choice { border: 0; padding: 0; margin: 0; display: flex; gap: 10px; flex-wrap: wrap; }
fieldset.choice legend { width: 100%; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; }
.opt span {
  display: inline-block; padding: 6px 22px; border: 10px solid transparent; cursor: pointer;
  border-image: url(/img/btn.png) 10 fill / 10px stretch;
}
.opt input:checked + span { border-image-source: url(/img/btn_pressed.png); color: var(--ink); font-weight: 600; }
.opt input:focus-visible + span { outline: 2px solid var(--sage); }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); }
.agree input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--sage); }
.agree span { margin: 0; }
.error { color: var(--rose); min-height: 1.4em; margin: 0; font-size: 15px; }
#submit { justify-self: center; }

.done { text-align: center; }
.done-pip { width: 90px; margin: 0 auto; animation: bob 2.4s ease-in-out infinite; }
.done h3 { margin: 4px 0 6px; text-align: center; }
.downloads { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 18px 0 6px; }
.small { font-size: 13px; color: var(--ink-soft); }
.howto { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; text-align: left; }
.note {
  border: 18px solid transparent; border-image: url(/img/note.png) 30 fill / 18px stretch;
  padding: 4px 6px; font-size: 14px; color: var(--ink);
}
.note h4 { margin: 0 0 4px; }
.note p { margin: 0; }

/* FAQ */
.faq { max-width: 760px; }
details { background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-size: 17px; }
details p { color: var(--ink-soft); margin: 8px 0 0; }

footer { text-align: center; padding: 30px 16px 50px; color: var(--ink-soft); font-size: 14px; }
footer img { width: 64px; margin: 0 auto 6px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-cast { height: 180px; }
  .hero-cast .mochi { height: 170px; right: 40%; }
  .hero-cast .pip { height: 110px; right: 15%; }
  .cards { grid-template-columns: 1fr 1fr; }
  .desk-screen { aspect-ratio: auto; min-height: 160px; }
}
@media (max-width: 560px) {
  nav a:not(.pill) { display: none; }
  .cards, .grid, .howto { grid-template-columns: 1fr; }
  .ledger { border-width: 60px 16px 22px; border-image-width: 60px 16px 22px; }
  .brush { margin-top: -50px; }
}

[hidden] { display: none !important; }
.btn.off { opacity: .45; pointer-events: none; }
