:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #17181a;
  --muted: #5f6368;
  --border: #e3e3df;
  --accent: #1f8a70;
  --accent-text: #ffffff;
  --warn-bg: #fff7e6;
  --warn-border: #f0d9a8;
  --error: #c0392b;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121314;
    --surface: #1c1d1f;
    --text: #ececea;
    --muted: #a3a6aa;
    --border: #2e3033;
    --accent: #3cc49c;
    --accent-text: #0d1f19;
    --warn-bg: #2a2416;
    --warn-border: #4a3f22;
    --error: #ff7b6b;
  }
}
:root[data-theme="dark"] {
  --bg: #121314; --surface: #1c1d1f; --text: #ececea; --muted: #a3a6aa;
  --border: #2e3033; --accent: #3cc49c; --accent-text: #0d1f19;
  --warn-bg: #2a2416; --warn-border: #4a3f22; --error: #ff7b6b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }

.top, .foot, .wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.top { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.logo { font-weight: 800; font-size: 1.3rem; color: var(--text); text-decoration: none; }
.logo span { color: var(--accent); }
.toplink { color: var(--muted); text-decoration: none; font-size: .95rem; }

.hero { padding: 32px 0 8px; text-align: center; }
h1 { font-size: clamp(1.6rem, 6vw, 2.4rem); line-height: 1.15; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 20px; }

.platforms { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px; }
.chip { font-size: .85rem; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }

.search { display: flex; gap: 8px; flex-wrap: wrap; }
.search input {
  flex: 1 1 260px; min-width: 0; padding: 14px 16px; font-size: 1rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button, .btn {
  padding: 14px 20px; font-size: 1rem; font-weight: 600; border-radius: var(--radius);
  border: 0; background: var(--accent); color: var(--accent-text); cursor: pointer;
  text-decoration: none; text-align: center;
}
button:disabled { opacity: .6; cursor: wait; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.search button { flex: 1 0 auto; }
@media (min-width: 560px) { .search button { flex: 0 0 auto; } }

.msg { min-height: 1.5em; margin: 12px 0 0; color: var(--muted); }
.msg.error { color: var(--error); }

.card {
  display: flex; gap: 16px; margin: 20px 0; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.card[hidden] { display: none; }
.card img { width: 110px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; flex: none; background: var(--border); }
.info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.author { font-weight: 700; margin: 0; }
.desc { margin: 0; color: var(--muted); font-size: .92rem; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; }
.consent input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.btn.disabled { opacity: .45; pointer-events: auto; cursor: not-allowed; }

.warn {
  margin: 28px 0; padding: 16px 18px; border-radius: var(--radius);
  background: var(--warn-bg); border: 1px solid var(--warn-border); font-size: .92rem;
}
.warn h2 { font-size: 1rem; margin: 0 0 8px; }
.warn p { margin: 0 0 8px; }
.warn p:last-child { margin: 0; }

.foot { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; padding: 24px 16px 40px; font-size: .88rem; }
.foot a { color: var(--muted); }

.legal h1 { text-align: left; margin-top: 16px; }
.legal h2 { margin-top: 32px; font-size: 1.25rem; }
.legal p, .legal li { color: var(--text); }
.legal .note { color: var(--muted); font-size: .9rem; }

@media (max-width: 420px) {
  .card { flex-direction: column; }
  .card img { width: 100%; max-height: 320px; aspect-ratio: auto; }
}

.contact { display: flex; flex-direction: column; gap: 14px; margin: 20px 0; padding: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.contact label:not(.consent) { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; }
.contact input:not([type="checkbox"]), .contact textarea {
  font: inherit; font-weight: 400; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg); color: var(--text); width: 100%; }
.contact input:focus, .contact textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.contact .hp { display: none; }
.contact button { align-self: flex-start; }
