body {
  background:
    linear-gradient(180deg, rgba(18, 31, 49, 0.52), rgba(9, 17, 29, 0) 240px),
    radial-gradient(circle at top left, rgba(79, 124, 255, 0.08), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", "BIZ UDPGothic", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

a {
  color: var(--text);
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid rgba(34, 49, 69, 0.9);
  border-radius: var(--radius-md);
  padding: var(--panel-padding);
  box-shadow: var(--shadow-soft);
}

.panel--soft {
  background: var(--panel-2);
}

.eyebrow,
.section-kicker,
.preview-label,
.content-label {
  margin: 0 0 8px;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title,
.card h2,
.panel h2,
.panel h3,
.card h3 {
  margin: 0;
}

.section-copy,
.brand-note,
.hero-note,
.mini-panel-copy {
  margin: 0;
  color: var(--text-muted);
}

.field-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid--compact {
  grid-template-columns: minmax(0, 240px);
}

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

.field--full {
  grid-column: 1 / -1;
}

.field--checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field--inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field-label,
.meta-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

input[type="text"],
input[type="date"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  border: 1px solid rgba(34, 49, 69, 0.9);
  border-radius: var(--radius-sm);
  background: rgba(8, 15, 27, 0.92);
  color: var(--text);
  min-height: 42px;
  padding: 10px 12px;
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input[type="text"]::placeholder,
input[type="url"]::placeholder,
input[type="number"]::placeholder,
textarea::placeholder {
  color: var(--text-dim);
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 132, 255, 0.14);
  background: rgba(10, 18, 31, 0.98);
}

textarea {
  min-height: 120px;
  line-height: 1.65;
  resize: vertical;
}

input[type="checkbox"] {
  accent-color: var(--accent);
  inline-size: 18px;
  block-size: 18px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: rgba(16, 25, 39, 0.92);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  min-height: 36px;
  padding: 8px 11px;
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

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

.button--secondary {
  border-color: rgba(91, 132, 255, 0.22);
  background: rgba(26, 39, 68, 0.56);
  color: #d8e4ff;
}

.button--ghost {
  border-color: rgba(34, 49, 69, 0.9);
  background: rgba(10, 18, 31, 0.64);
  color: var(--text-muted);
}

.button--success {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.4);
  color: #b8f5c9;
}

.button--danger {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ffc5c5;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(8, 15, 29, 0.86);
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.45;
  padding: 6px 10px;
}

.status--info {
  border-color: var(--border);
  color: var(--text-muted);
}

.status--loading {
  border-color: rgba(245, 158, 11, 0.4);
  color: #f9cb77;
}

.status--success {
  border-color: rgba(34, 197, 94, 0.4);
  color: #9ae6b4;
}

.status--error {
  border-color: rgba(239, 68, 68, 0.4);
  color: #ffb4b4;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(12, 20, 34, 0.82);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  min-height: 28px;
  padding: 6px 9px;
}

.badge--draft,
.badge--inactive,
.badge--warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.12);
  color: #f4c66b;
}

.badge--published,
.badge--success,
.badge--active,
.badge--read {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.14);
  color: #9ee9b2;
}

.badge--danger,
.badge--unread {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.14);
  color: #ffb7b7;
}

.badge--neutral,
.badge--info {
  border-color: rgba(79, 124, 255, 0.28);
  background: rgba(79, 124, 255, 0.14);
  color: #c5d7ff;
}

.subtle-note {
  color: var(--text-dim);
  font-size: 0.88rem;
}

.tab-panel--hidden,
.notice--hidden,
.empty-state--hidden {
  display: none !important;
}

.meta-grid,
.meta-stack {
  display: grid;
  gap: 10px;
}

.meta-chip,
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.data-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.data-list li {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: rgba(7, 15, 27, 0.7);
  padding: 14px;
  box-shadow: 0 4px 14px rgba(2, 6, 23, 0.12);
}

.list-empty {
  color: var(--text-dim);
  text-align: center;
  padding: 20px 14px;
}

.list-row {
  display: grid;
  gap: 10px;
}

.list-row-header,
.list-row-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.list-row-title {
  margin: 0;
  font-size: 1rem;
}

.list-row-meta,
.list-row-copy,
.list-row small {
  color: var(--text-muted);
}

.list-row-copy {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

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

.button--small {
  font-size: 0.8rem;
  min-height: 32px;
  padding: 5px 8px;
}

.bullet-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.notice {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(8, 15, 29, 0.88);
  padding: 14px;
}

.notice--error {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(50, 16, 16, 0.35);
}

.notice--warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(55, 37, 6, 0.35);
}

.notice--info {
  border-color: rgba(79, 124, 255, 0.34);
  background: rgba(19, 35, 68, 0.34);
}

.notice--success {
  border-color: rgba(45, 212, 191, 0.34);
  background: rgba(13, 55, 53, 0.34);
}

.notice-copy {
  display: grid;
  gap: 6px;
}

.notice-title,
.notice-body {
  margin: 0;
}

.notice-title {
  font-weight: 700;
}

.notice-body {
  color: var(--text-muted);
  line-height: 1.6;
}

.notice .list-actions {
  align-items: flex-start;
}

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

.profile-grid p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  border-bottom: 1px solid rgba(34, 50, 74, 0.55);
  padding-bottom: 10px;
}

.content-block {
  border-top: 1px solid rgba(34, 50, 74, 0.6);
  margin-top: 18px;
  padding-top: 18px;
}

.content-block--accent {
  border-top-style: dashed;
}

.empty-state {
  display: grid;
  gap: 6px;
  border-top: 1px dashed rgba(34, 50, 74, 0.65);
  margin-top: 18px;
  padding-top: 18px;
}

.empty-state-title,
.empty-state-body {
  margin: 0;
}

.empty-state-title {
  color: var(--text);
  font-weight: 700;
}

.empty-state-body {
  color: var(--text-muted);
  line-height: 1.7;
}

dialog {
  margin: auto;
  border: 0;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(3, 8, 16, 0.6);
  backdrop-filter: blur(4px);
}

@media (max-width: 900px) {
  .field-grid,
  .field-grid--compact {
    grid-template-columns: 1fr;
  }

  .field--inline {
    align-items: stretch;
    flex-direction: column;
  }

  .action-row,
  .list-row-header,
  .list-row-footer,
  .meta-chip,
  .meta-row,
  .notice {
    align-items: stretch;
    flex-direction: column;
  }
}
