:root { --ink: #1c1c1e; --muted: #414141; --line: #ececec; --accent: #c0392b; --bg: #fafafa; }
* { box-sizing: border-box; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  max-width: 1280px; margin: 0 auto; padding: 3.5rem 2rem 6rem;
  color: var(--ink); background: var(--bg); font-size: 17px;
}
h1 { font-size: 2.4rem; margin: 0 0 0.25rem; letter-spacing: -0.01em; }
.tagline { color: var(--muted); font-size: 1.15rem; margin: 0 0 2rem; }
.bar { display: flex; gap: 0.6rem; }
#q {
  flex: 1; padding: 1rem 1.15rem; font-size: 1.15rem;
  border: 1px solid #d0d0d2; border-radius: 10px; background: #fff;
}
#q:focus { outline: none; border-color: var(--accent); }
#clear { background: #fff; color: var(--ink); border-color: #d0d0d2; }
select, button {
  padding: 1rem 1.15rem; font-size: 1.1rem; border-radius: 10px;
  border: 1px solid #d0d0d2; background: #fff; cursor: pointer;
}
button { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 500; }
button:disabled { opacity: 0.45; cursor: default; }
.note { font-size: 1rem; color: var(--muted); margin: 0.6rem 0 0; }
.examples { margin-top: 0.8rem; font-size: 0.92rem; }
.examples .label { color: var(--muted); margin-right: 0.5rem; }
.examples a { color: var(--accent); cursor: pointer; margin-right: 1rem; text-decoration: none; border-bottom: 1px dotted var(--accent); }
.how { margin-top: 1rem; font-size: 1rem; }
.how summary { color: var(--accent); cursor: pointer; width: fit-content; }
.how p { color: #555; line-height: 1.6; margin: 0.7rem 0 0; font-size: 1rem; }
.status { margin: 1.6rem 0 0.5rem; color: var(--muted); font-size: 0.95rem; min-height: 1.2em; }
.result {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 1.3rem 1.5rem; margin-bottom: 0.9rem; transition: border-color 0.15s;
}
.result:hover { border-color: #c8c8cc; }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.title { font-weight: 600; line-height: 1.5; font-size: 1.18rem; }
.rank { font-size: 1.15rem; color: var(--muted); margin-right: 0.4rem; }
.score {
  position: relative; flex-shrink: 0; font-size: 0.95rem; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px; padding: 0.25rem 0.75rem;
  white-space: nowrap;
}
.score[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; bottom: 135%; right: 0;
  white-space: nowrap; background: var(--ink); color: #fff; font-size: 0.85rem;
  padding: 0.4rem 0.6rem; border-radius: 6px; pointer-events: none; z-index: 10;
}
.meta { font-size: 0.95rem; color: var(--muted); margin-top: 0.4rem; }
.brand { color: var(--ink); font-weight: 500; }
.desc { font-size: 1rem; color: #555; margin-top: 0.5rem; line-height: 1.55; }
.skeleton { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 1.3rem; margin-bottom: 0.8rem; }
.skeleton .bar1, .skeleton .bar2 { height: 0.85rem; background: #eee; border-radius: 4px; }
.skeleton .bar1 { width: 60%; margin-bottom: 0.65rem; }
.skeleton .bar2 { width: 35%; }
footer { margin-top: 3.5rem; padding-top: 1.2rem; border-top: 2px solid #d8d8dc;
  font-size: 0.95rem; color: #414141; line-height: 1.85; }
@media (max-width: 640px) {
  body { padding: 1.5rem 1rem 4rem; font-size: 16px; }
  h1 { font-size: 1.8rem; }
  .tagline { font-size: 1rem; }
  .bar { flex-wrap: wrap; }
  #q { flex: 1 1 100%; }
  select, button { flex: 1 1 auto; }
  .result-head { flex-direction: column; gap: 0.5rem; }
  .score { align-self: flex-start; }
  .score[data-tip]:hover::after {
    right: auto; left: 0;
    white-space: normal;
    max-width: 70vw;
    width: max-content;
  }
}