@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho+B1:wght@600&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

:root {
  --bg-top: #f7f4ee;
  --bg-bottom: #efe5d4;
  --card: #fffdf8;
  --ink: #1a1a1a;
  --muted: #4f4a42;
  --accent: #0b6f57;
  --accent-2: #d11f1f;
  --line: #d8cbb6;
  --shadow: rgba(25, 15, 5, 0.12);
  --tag-yellow: #f3d34c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Zen Kaku Gothic New", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.5), transparent 45%),
    radial-gradient(circle at 75% 15%, rgba(240, 220, 180, 0.55), transparent 45%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  min-height: 100vh;
}

[v-cloak] {
  display: none;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 20px 80px;
}

.hero {
  background: #fff;
  border-bottom: none;
  padding: 24px 28px;
  border-radius: 0;
  display: block;
  margin-bottom: 20px;
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  margin: 0 0 10px;
}

h1 {
  font-family: "Shippori Mincho", "Noto Serif JP", "Source Han Serif", sans-serif;
  font-size: 56px;
  font-weight: 700;
  color: #e00000;
  letter-spacing: 0.05em;
  line-height: 1.1;
  margin: 0 0 12px;
  word-break: keep-all;
  white-space: nowrap;
}

.eyecatch {
  font-size: 14px;
  margin: 0 0 6px;
  color: #333;
}

.lead {
  font-size: 20px;
  line-height: 1.4;
  margin: 0;
}

.lead-first {
  margin: 0;
  color: var(--ink);
}

.lead-second {
  margin: 0;
  color: var(--accent);
}

.issue-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.issue-chip {
  background: var(--accent-2);
  color: #fff;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.08em;
}

.issue-date {
  font-size: 22px;
  font-weight: 700;
  color: #222;
}


.stat {
  text-align: center;
  background: #0a7a3b;
  border: none;
  padding: 8px 10px;
  border-radius: 14px;
  min-width: 150px;
  margin-top: 0;
  box-shadow: none;
  color: #fff;
}

.stat-num {
  font-weight: 600;
  font-size: 30px;
  letter-spacing: 0.1em;
}

.stat-label {
  text-align: right;
  color: #aaa;
}

.panel {
  margin-top: 0;
  padding: 24px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px var(--shadow);
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 10px;
}

label {
  font-weight: 600;
  letter-spacing: 0.04em;
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.8);
  transition: border 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 127, 134, 0.2);
}

.field-row {
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
  min-width: 0;
  align-items: flex-start;
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

.hint-link {
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
}

.range-grid {
  display: grid;
  gap: 10px;
}

.range-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.range-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.field-row-grid {
  display: grid;
  gap: 16px;
}

.author-field {
  min-width: 0;
}

.field-row-grid .field.author-field input {
  max-width: 300px;
}

@media (max-width: 980px) {
  .field-row-grid {
    grid-template-columns: 1fr;
  }
}


.panel-footer {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(15, 127, 134, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: none;
}

.btn.ghost:hover {
  transform: translateY(-1px);
  box-shadow: none;
}

.export-btn {
  padding: 10px 18px;
  font-size: 12px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(15, 127, 134, 0.28);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status {
  font-size: 12px;
  color: var(--muted);
}

.results {
  margin-top: 32px;
}

.results-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.results-title {
  font-size: 18px;
  font-weight: 700;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--accent);
}

.results-meta {
  font-size: 12px;
  color: var(--muted);
}

.error {
  margin-top: 14px;
  background: rgba(191, 91, 47, 0.12);
  border: 1px solid rgba(191, 91, 47, 0.3);
  color: #7a2b12;
  padding: 12px 16px;
  border-radius: 12px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 12px 24px var(--shadow);
  animation: rise 0.4s ease both;
}

.card-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.card-title {
  font-size: 16px;
  margin: 0 0 6px;
}

.card-type {
  font-size: 11px;
}

.card-subtitle {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.card-actions {
  margin-top: 12px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 127, 134, 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.card-link:hover {
  background: rgba(15, 127, 134, 0.2);
  transform: translateY(-1px);
}

.empty {
  margin-top: 24px;
  text-align: center;
  color: var(--muted);
}

@keyframes rise {
  from {
    transform: translateY(8px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 840px) {
  .hero {
    padding: 20px;
  }

  .hero-top {
    grid-template-columns: 1fr;
  }

  .hero-side {
    align-items: flex-start;
    padding-left: 0;
  }

  .stat {
    align-self: flex-start;
  }
}

@media (max-width: 600px) {
  .panel {
    padding: 18px;
  }

  .panel-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-meta {
    flex-direction: column;
    gap: 4px;
  }
}


.pager {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.pager-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.pager-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pager-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


.pager-input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.pager-input input {
  width: 64px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 12px;
  background: #fff;
}


.view-toggle {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}

.view-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
}

.view-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.results-table {
  margin-top: 16px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px var(--shadow);
}

.table-row {
  display: grid;
  grid-template-columns: 90px minmax(220px, 2fr) 160px 120px 70px;
  gap: 12px;
  min-width: 400px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(216, 193, 160, 0.5);
  font-size: 12px;
  align-items: center;
}

.table-head {
  background: rgba(15, 127, 134, 0.08);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.table-title-row {
  display: flex;
}

.table-title {
  font-weight: 600;
  font-size: 13px;
  margin-left: 6px;
}

.table-subtitle {
  color: var(--muted);
  font-size: 11px;
}

.table-type {
  font-size: 11px;
  width: fit-content;
}

.table-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 900px) {
  .table-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .table-head {
    display: none;
  }
}


.page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.page-size select {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}


.case-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.case-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}


.field.toggle .case-toggle {
  display: inline-flex;
  margin-top: 4px;
}

.field.toggle label:first-child {
  display: block;
}

.field.toggle {
  align-content: start;
  justify-items: start;
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: start;
}

.login-area {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  margin-top: 0;
  padding-right: 20px;
}

.login-btn {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.login-btn.ghost {
  background: transparent;
  color: var(--accent);
}

.tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tooltip-text {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff7ec;
  color: #7a2b12;
  border: 1px solid rgba(216, 193, 160, 0.6);
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 10px 18px rgba(90, 60, 20, 0.1);
  z-index: 5;
}

.tooltip:hover .tooltip-text {
  opacity: 1;
  transform: translateY(0);
}

.login-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.login-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: grid;
  place-items: center;
  z-index: 1000;
}

.login-panel {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  width: min(360px, 90vw);
  display: grid;
  gap: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.admin-dialog-panel {
  width: min(300px, 90vw);
}

.login-title {
  font-weight: 600;
}

.login-panel input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
}

.login-actions {
  display: flex;
  gap: 8px;
}

.login-actions .btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: none;
}

.login-error {
  color: #7a2b12;
  font-size: 12px;
}




.admin-panel {
  margin-top: 32px;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px var(--shadow);
  max-width: 460px;
  width: 100%;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.admin-title {
  font-weight: 600;
  font-size: 16px;
}

.admin-error {
  margin-top: 10px;
  color: #7a2b12;
  font-size: 12px;
}

.admin-empty {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(216, 193, 160, 0.6);
  color: var(--muted);
  font-size: 13px;
}

.admin-form {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr auto auto auto;
  gap: 10px;
  align-items: center;
}

.admin-form input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
}

.admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.admin-table {
  margin-top: 16px;
  display: grid;
  gap: 8px;
  max-width: 420px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.admin-row {
  display: grid;
  grid-template-columns: 60px minmax(150px, 1fr) 76px 76px;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid rgba(216, 193, 160, 0.6);
  border-radius: 12px;
  background: #fff;
  align-items: center;
}

.admin-head-row {
  background: rgba(15, 127, 134, 0.08);
  font-weight: 600;
  color: var(--muted);
}

.admin-row input[type="text"],
.admin-row input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
}

.admin-row .btn.ghost {
  padding: 6px 12px;
  font-size: 12px;
}


.admin-username {
  font-size: 13px;
  color: var(--text);
}

.admin-dialog-input {
  width: 100%;
}

.admin-dialog-panel .admin-dialog-input {
  width: 100%;
}

.admin-footer {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  max-width: 420px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.admin-link {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

@media (max-width: 800px) {
  .admin-form {
    grid-template-columns: 1fr;
  }

  .admin-row {
    grid-template-columns: 60px minmax(150px, 1fr) 76px 76px;
  }

  .admin-table,
  .admin-head,
  .admin-footer {
    max-width: 100%;
  }
}


.table-main {
  position: relative;
  padding-right: 70px;
}

.table-type-badge {
  position: absolute;
  right: 0;
  top: 0;
  background: var(--accent-2);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 10px;
  letter-spacing: 0.08em;
}

.hero-main {
  max-width: 620px;
}

.hero-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-left: 20px;
}

.feature-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feature-chip {
  background: #e00000;
  color: #fff;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 10px;
  letter-spacing: 0.12em;
}


.field label {
  line-height: 1.1;
}

.field-row-grid > .field.toggle > label {
  min-height: 2.2em;
  display: flex;
  align-items: flex-end;
}

.site-footer {
  margin-top: 32px;
  padding: 18px 20px 28px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.site-footer-inner {
  display: inline-block;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}


.field-row-pair {
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) minmax(220px, 1fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 980px) {
  .field-row-pair {
    grid-template-columns: 1fr;
  }
}


  .panel-aside {
    order: 2;
  }
}

.range-row input {
  width: 100%;
  max-width: none;
}

.panel-illustration {
  align-self: start;
  text-align: center;
  opacity: 0.9;
}

.panel-illustration img {
  max-width: 200px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.panel-illustration-caption {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 20px;
  align-items: start;
}

.panel-main {
  display: grid;
  gap: 18px;
}

@media (max-width: 980px) {
  .panel-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer a {
  color: inherit;
  text-decoration: underline;
}
