:root {
  --bg: #070A10;
  --panel: #0D1420;
  --panel-border: #1E2A3A;
  --text: #E8EEF5;
  --text-dim: #8FA3B8;
  --accent: #00E5FF;
  --accent-dark: #003B44;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.6;
}

header {
  text-align: center;
  padding: 28px 16px 8px;
}

header h1 {
  margin: 0;
  font-size: 1.7rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

header .sub {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 16px;
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  border-left: 4px solid var(--accent);
  padding-left: 8px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.panel-head h2 {
  margin-bottom: 0;
}

.btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  background: #16222F;
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover {
  border-color: var(--accent);
}

.btn.accent {
  background: var(--accent-dark);
  border-color: var(--accent);
  color: var(--accent);
}

.btn.primary {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  font-size: 1.05rem;
  font-weight: bold;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #04222A;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

.btn.primary:hover {
  opacity: 0.88;
}

textarea {
  width: 100%;
  margin-top: 12px;
  background: #0A101B;
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.7;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.count {
  text-align: right;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 4px;
}

.options .opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px dashed var(--panel-border);
  cursor: pointer;
  flex-wrap: wrap;
}

.options .opt:last-of-type {
  border-bottom: none;
}

.options input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.options .hint {
  color: var(--text-dim);
  font-size: 0.82rem;
}

.options select {
  background: #16222F;
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.9rem;
  font-family: inherit;
}

.stats {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 0.92rem;
}

.stats th,
.stats td {
  border: 1px solid var(--panel-border);
  padding: 7px 10px;
  text-align: right;
}

.stats th {
  background: #111B29;
  color: var(--text-dim);
  font-weight: normal;
}

.stats td:first-child,
.stats th:first-child {
  text-align: left;
  color: var(--text-dim);
}

.note {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin: 8px 0 0;
}

footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
  padding: 8px 16px 28px;
}

@media (max-width: 640px) {
  header h1 {
    font-size: 1.35rem;
  }

  main {
    padding: 10px;
  }

  .panel {
    padding: 12px;
  }

  .panel-head {
    flex-direction: column;
  }

  .btn {
    padding: 7px 10px;
    font-size: 0.85rem;
  }
}
