:root {
  color-scheme: light;
  --ink: #1f2428;
  --muted: #66717b;
  --line: #d9e1e8;
  --paper: #f6f8fb;
  --panel: #ffffff;
  --accent: #3662d8;
  --accent-dark: #213f9a;
  --good: #187a55;
  --warn: #ad6a00;
  --shadow: 0 18px 48px rgba(22, 36, 64, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, #eef4ff 0, #f8fafc 42%, #ffffff 100%);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
}

button,
select,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 56px;
}

.hero,
.control-panel,
.result-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero {
  padding: clamp(24px, 5vw, 48px);
  margin-bottom: 18px;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 7vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.9;
}

.notice {
  max-width: 900px;
  margin-bottom: 0;
  padding: 14px 16px;
  border: 1px solid #e7d9b7;
  border-radius: 8px;
  color: #654819;
  background: #fff8e7;
  line-height: 1.8;
}

.tool-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.control-panel,
.result-panel {
  padding: 22px;
}

label,
fieldset {
  display: block;
  margin-bottom: 16px;
}

label {
  color: var(--muted);
  font-weight: 800;
}

select {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 900;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  color: var(--ink);
  font-weight: 700;
}

.check input {
  width: 18px;
  height: 18px;
}

.primary,
.secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 900;
  line-height: 1.35;
  white-space: normal;
}

.primary {
  border: 0;
  color: #fff;
  background: var(--accent);
}

.primary:hover {
  background: var(--accent-dark);
}

.secondary {
  margin-top: 10px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.status-row h2 {
  margin-bottom: 6px;
}

#statusText {
  margin-bottom: 4px;
  color: var(--muted);
}

.data-meta {
  margin-bottom: 0;
  color: #4c5b68;
  font-size: 0.86rem;
  line-height: 1.6;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--accent-dark);
  background: #e9eeff;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.result-list {
  display: grid;
  gap: 12px;
}

.novel-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--paper);
}

.novel-card h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
  line-height: 1.45;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.meta-row span {
  border-radius: 999px;
  padding: 4px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.story {
  color: var(--muted);
  line-height: 1.8;
}

.official-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  font-weight: 900;
}

.disabled-link {
  color: var(--muted);
  background: #e9eef5;
}

.empty {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--paper);
}

.empty strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.empty p {
  margin-bottom: 8px;
}

.empty ul {
  margin: 0;
  padding-left: 1.25em;
  line-height: 1.8;
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 20px, 1180px);
    margin-top: 10px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }
}
