:root {
  --bg: #f2efe6;
  --card: rgba(255, 252, 247, 0.96);
  --card-strong: #fffdf8;
  --text: #172219;
  --text-soft: #536154;
  --forest: #294235;
  --forest-deep: #182920;
  --line: rgba(23, 34, 25, 0.1);
  --shadow: 0 22px 50px rgba(24, 41, 32, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(41, 66, 53, 0.08), transparent 28%),
    linear-gradient(180deg, #f3efe6 0%, #faf7f0 100%);
  color: var(--text);
  font-family: "Avenir Next", "Yu Gothic", "Hiragino Sans", sans-serif;
}

a {
  color: inherit;
}

.admin-shell {
  width: min(1120px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  display: grid;
  gap: 1rem;
}

.admin-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.admin-card--hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.admin-card--inner {
  box-shadow: none;
  border-style: dashed;
}

.admin-card--hidden {
  display: none;
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--forest);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.65rem;
}

h2 {
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
}

p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.top-link {
  text-decoration: none;
  font-weight: 700;
  color: var(--forest);
}

.stack-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  max-width: 460px;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  border: 1px solid rgba(23, 34, 25, 0.14);
  border-radius: 16px;
  background: var(--card-strong);
  padding: 0.9rem 0.95rem;
  font: inherit;
}

.field input:focus {
  outline: none;
  border-color: rgba(41, 66, 53, 0.46);
  box-shadow: 0 0 0 4px rgba(41, 66, 53, 0.08);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--forest);
  color: #f8f5ef;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button--ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(23, 34, 25, 0.16);
}

.status {
  min-height: 1.5rem;
}

.status[data-tone="error"] {
  color: #8d3d2f;
  font-weight: 700;
}

.status[data-tone="success"] {
  color: var(--forest);
  font-weight: 700;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.empty-state {
  text-align: center;
  padding: 1.25rem;
}

.message-list {
  display: grid;
  gap: 0.9rem;
}

.message-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 34, 25, 0.08);
  border-radius: 22px;
  padding: 1.2rem;
  display: grid;
  gap: 0.8rem;
}

.message-card__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.message-card__head h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  background: rgba(41, 66, 53, 0.1);
  color: var(--forest);
  font-size: 0.76rem;
  font-weight: 700;
}

.message-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.message-box {
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid rgba(23, 34, 25, 0.08);
  border-radius: 18px;
  padding: 0.95rem;
}

.message-box strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--forest-deep);
}

.message-body {
  white-space: pre-wrap;
  line-height: 1.7;
}

@media (max-width: 760px) {
  .admin-card--hero,
  .panel-head,
  .message-card__head,
  .message-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .panel-actions {
    width: 100%;
  }

  .button,
  .panel-actions .button {
    width: 100%;
  }
}
