/* Shared styles for dice-roll.online landing pages.
   Token values match index.html so all pages feel like one site. */

:root {
  --bg: oklch(0.985 0.003 85);
  --card: oklch(1 0 0);
  --ink: oklch(0.18 0.005 260);
  --ink-2: oklch(0.42 0.008 260);
  --ink-3: oklch(0.50 0.008 260);
  --line: oklch(0.92 0.005 260);
  --line-strong: oklch(0.86 0.006 260);
  --accent: oklch(0.66 0.17 45);
  --crit: oklch(0.55 0.14 155);
  --fumble: oklch(0.55 0.18 25);
  --drop: oklch(0.75 0.005 260);
  --soft: oklch(0.97 0.005 85);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 32px 20px 64px; }

header { display: flex; align-items: center; justify-content: space-between; padding: 8px 2px 20px; margin-bottom: 12px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: 17px; letter-spacing: -0.01em;
}
.logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.logo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

.head-actions { display: flex; align-items: center; gap: 12px; }
.back { font-size: 14px; color: var(--ink-3); text-decoration: none; }
.back:hover { color: var(--ink); }
.lang-switch {
  font-size: 13px; color: var(--ink-2); text-decoration: none;
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--card);
}
.lang-switch:hover { border-color: var(--line-strong); color: var(--ink); }

h1 { font-size: 32px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.01em; }
.lede { color: var(--ink-2); font-size: 17px; margin: 0 0 32px; }
h2 { font-size: 22px; margin: 32px 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 17px; margin: 20px 0 8px; }
p { margin: 0 0 12px; }
ul { padding-left: 22px; margin: 0 0 12px; }
li { margin-bottom: 4px; }
code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 14px; background: oklch(0.94 0.012 70); padding: 1px 6px; border-radius: 4px; }
a { color: var(--ink); }

.roller {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin: 0 0 32px;
}
.roller-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.roller-head h2 { font-size: 18px; margin: 0; font-weight: 600; }
.roll-btn {
  font: inherit;
  font-weight: 600;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.15s;
}
.roll-btn:hover { background: oklch(0.10 0.005 260); }
.roll-btn:active { transform: translateY(1px); }
.roll-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.input-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.input-row label { font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.input-row input[type="number"], .input-row input[type="text"] {
  font: inherit; font-size: 15px;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--card); color: var(--ink);
  width: 88px;
}
.input-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.summary { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.summary strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.cta {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--ink);
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 18px;
  text-decoration: none;
  font-weight: 500;
  margin-top: 12px;
}
.cta:hover { background: var(--ink); color: #fff; }

footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); display: flex; gap: 12px; flex-wrap: wrap; }
footer a { color: var(--ink-3); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Share row — privacy-friendly: plain links and Web Share API, no third-party scripts */
.share-row { margin: 40px 0 0; text-align: center; }
.share-row h2 {
  font-size: 13px; font-weight: 600;
  color: var(--ink-2);
  margin: 0 0 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.share-row .share-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.share-row .share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.share-row .share-btn:hover { border-color: var(--ink); color: var(--ink); }
.share-row .share-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.share-row .share-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.share-row .share-btn[hidden] { display: none; }
.share-row .share-copy.copied {
  background: oklch(0.94 0.04 50);
  border-color: var(--accent);
  color: var(--accent);
}

/* News list — extends the .roller card look. */
.news-search { display: flex; gap: 8px; margin: 0 0 16px; flex-wrap: wrap; }
.news-search-input {
  flex: 1 1 240px;
  font: inherit; font-size: 15px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink);
}
.news-search-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.news-search-btn {
  font: inherit; font-weight: 600;
  background: var(--ink); color: #fff;
  border: none; border-radius: 8px; padding: 9px 16px; cursor: pointer;
  transition: background 0.15s;
}
.news-search-btn:hover { background: oklch(0.10 0.005 260); }

.news-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; }
.news-tag {
  font-size: 13px; color: var(--ink-2); text-decoration: none;
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.news-tag:hover { border-color: var(--line-strong); color: var(--ink); }
.news-tag.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.news-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.news-card {
  display: flex; gap: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px;
  transition: border-color 0.15s;
}
.news-card:hover { border-color: var(--line-strong); }
.news-thumb {
  flex-shrink: 0;
  width: 96px; height: 96px;
  border-radius: 8px;
  background: var(--soft);
  object-fit: cover;
}
.news-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.news-title {
  display: block;
  color: var(--ink); text-decoration: none;
  font-size: 16px; font-weight: 600; line-height: 1.35;
  letter-spacing: -0.005em;
}
.news-title:hover { color: var(--accent); }
.news-summary {
  margin: 0;
  color: var(--ink-2); font-size: 14px; line-height: 1.5;
  /* Cap to ~3 visual lines without depending on JS. */
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-meta {
  margin: 0; font-size: 12px; color: var(--ink-3);
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.news-feed { font-weight: 500; color: var(--ink-2); }
.news-sep { opacity: 0.6; }
.news-cat {
  text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 11px;
}

.news-empty {
  margin: 32px 0; padding: 24px;
  background: var(--card); border: 1px dashed var(--line); border-radius: 12px;
  text-align: center; color: var(--ink-3);
}

.news-pager {
  display: flex; justify-content: space-between; align-items: center;
  margin: 24px 0 0;
  font-size: 14px;
}
.news-pager-link {
  color: var(--ink); text-decoration: none;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card);
}
.news-pager-link:hover { border-color: var(--line-strong); }
.news-pager-link.disabled { color: var(--ink-3); border-color: var(--line); cursor: default; }
.news-pager-page { color: var(--ink-3); }

@media (max-width: 480px) {
  .news-card { flex-direction: column; }
  .news-thumb { width: 100%; height: 160px; }
}
