@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700&display=swap');

:root {
  --paper: #f6f3ea;
  --surface: #fbf9f3;
  --ink: #24332a;
  --muted: #6c786e;
  --line: #dfd6be;
  --moss: #1b2d23;
  --moss-deep: #122018;
  --moss-soft: #2b4235;
  --gold: #d4b26a;
  --gold-bright: #e5c988;
  --gold-muted: #b8944c;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 85% 8%, rgba(212, 178, 106, 0.14), transparent 42%),
    linear-gradient(180deg, #f8f5ed 0%, var(--paper) 100%);
  color: var(--ink);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

/* Header: 上品なモスグリーン帯＋ゴールド文字 */
.site-header {
  width: 100%;
  background: linear-gradient(180deg, var(--moss-soft) 0%, var(--moss) 100%);
  border-bottom: 1px solid rgba(212, 178, 106, 0.45);
  box-shadow: 0 4px 20px rgba(18, 32, 24, 0.08);
}

.site-header > .site-name,
.site-header > .header-link,
.site-header > .header-caption {
  display: inline-flex;
  align-items: center;
}

.site-header {
  padding: 0 24px;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-name {
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-name:hover {
  color: #f3dfb0;
}

.header-link {
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(212, 178, 106, 0.35);
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.header-link:hover {
  background: rgba(212, 178, 106, 0.14);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}

.header-caption {
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.eyebrow,
.section-number {
  color: var(--gold-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.page {
  width: min(100% - 40px, 760px);
  margin: auto;
}

.intro {
  padding: 72px 0 50px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
}

h1 {
  margin: 0;
  color: var(--moss);
  font-size: clamp(32px, 6vw, 46px);
  font-weight: 700;
  letter-spacing: 0.08em;
}

h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.intro-copy {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 2.1;
}

.panel {
  padding: 34px 0 48px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
}

.section-number {
  color: var(--moss-soft);
}

h2 {
  margin: 0;
  color: var(--moss);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

#question-form,
.login-panel form {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 0 0 1px rgba(212, 178, 106, 0.2),
    0 12px 30px rgba(27, 45, 35, 0.05);
  border-radius: 10px;
}

textarea,
input {
  width: 100%;
  border: 1px solid #d5ccb4;
  border-radius: 6px;
  outline: none;
  background: #fffefa;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  display: block;
  min-height: 220px;
  resize: vertical;
  padding: 17px;
  font-size: 15px;
  line-height: 1.9;
}

input {
  padding: 12px 14px;
  font-size: 14px;
}

textarea:focus,
input:focus {
  border-color: var(--gold-muted);
  box-shadow: 0 0 0 3px rgba(212, 178, 106, 0.22);
}

textarea::placeholder,
input::placeholder {
  color: #9da49c;
}

.form-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

/* モスグリーン背景 × ゴールド文字のボタン */
.button-primary {
  background: linear-gradient(180deg, var(--moss-soft) 0%, var(--moss) 100%);
  border-color: rgba(212, 178, 106, 0.55);
  color: var(--gold-bright);
  box-shadow: 0 4px 14px rgba(27, 45, 35, 0.16);
}

.button-primary:hover {
  background: linear-gradient(180deg, var(--moss) 0%, var(--moss-deep) 100%);
  border-color: var(--gold-bright);
  color: #f4e2b6;
}

.button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.button-quiet {
  background: #ece6d5;
  border-color: #d8cca9;
  color: var(--moss);
}

.button-quiet:hover {
  background: #e3dac3;
}

.status-message {
  min-height: 1.5em;
  margin: 12px 0 0;
  color: var(--moss);
  font-size: 13px;
  font-weight: 500;
}

.status-message.is-error {
  color: #9e382e;
}

.privacy-note {
  margin: 4px 0 58px;
  padding: 20px 22px;
  border-left: 3px solid var(--gold);
  background: #f1ece0;
  border-radius: 0 6px 6px 0;
}

.privacy-note h2 {
  font-size: 13px;
}

.privacy-note p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}

.site-footer {
  width: min(100% - 48px, 1120px);
  min-height: 82px;
  margin: 24px auto 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.site-footer a {
  color: var(--moss);
  text-underline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Admin */
.admin-page {
  max-width: 900px;
}

.admin-intro {
  padding-bottom: 42px;
}

.login-panel {
  max-width: 560px;
  margin: 0 auto 60px;
}

.login-panel form {
  display: grid;
  gap: 12px;
}

.login-panel label,
.block-form label {
  color: var(--muted);
  font-size: 12px;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 12px 0 20px;
}

.admin-section-title {
  font-size: 24px;
}

.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.tab {
  padding: 11px 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.tab.is-active {
  border-bottom-color: var(--gold-muted);
  color: var(--moss);
  font-weight: 700;
}

.question-list {
  display: grid;
  gap: 14px;
}

.question-card,
.block-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.question-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.question-body {
  margin: 13px 0 16px;
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap:anywhere;
}

.question-ip {
  color: var(--muted);
  font-size: 11px;
}

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

.button-small {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 11px;
}

.button-secondary {
  background: #ece6d5;
  border-color: #d8cca9;
  color: var(--moss);
}

.button-danger {
  background: #f6e7e4;
  border-color: #e4bdb6;
  color: #963f36;
}

.empty-state {
  padding: 30px 16px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.blocks-panel {
  padding-top: 28px;
}

.block-form {
  padding: 18px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.inline-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.block-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  .site-header {
    padding: 0 18px;
    min-height: 64px;
  }

  .page {
    width: calc(100% - 36px);
  }

  .intro {
    padding: 54px 0 38px;
  }

  .intro-copy {
    font-size: 13px;
    text-align: left;
  }

  .panel {
    padding: 27px 0 38px;
  }

  #question-form,
  .login-panel form {
    padding: 16px;
  }

  textarea {
    min-height: 200px;
    padding: 13px;
    font-size: 14px;
  }

  .form-bottom {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .form-bottom .button {
    width: 100%;
  }

  .site-footer {
    width: calc(100% - 36px);
  }

  .admin-toolbar {
    align-items: start;
  }

  .tabs {
    overflow-x: auto;
  }

  .tab {
    padding-inline: 13px;
    white-space: nowrap;
  }

  .question-card,
  .block-card {
    padding: 16px;
  }

  .inline-form {
    flex-direction: column;
  }

  .inline-form .button {
    width: 100%;
  }
}