/* M3 のカラーロール(ベースカラー #415f91 から生成した値) */
:root {
  --md-sys-color-primary: #415f91;
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-surface: #f9f9ff;
  --md-sys-color-on-surface: #191c20;
  --md-sys-color-on-surface-variant: #44474e;
  --md-sys-color-outline-variant: #c4c6d0;

  --md-ref-typeface: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --md-sys-color-primary: #aac7ff;
    --md-sys-color-error: #ffb4ab;
    --md-sys-color-surface: #111318;
    --md-sys-color-on-surface: #e2e2e9;
    --md-sys-color-on-surface-variant: #c4c6d0;
    --md-sys-color-outline-variant: #44474e;
  }
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-family: var(--md-ref-typeface);
  -webkit-text-size-adjust: 100%;
}

.top-app-bar,
main,
.footer {
  max-width: 720px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Top app bar (small) + title-large */
.top-app-bar {
  padding: 16px;
}

.top-app-bar h1 {
  margin: 0;
  font-size: 22px;
  line-height: 28px;
  font-weight: 400;
}

/* List: 区切り線付き、タップ・ホバーには反応させない */
.list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-item {
  padding: 12px 16px;
}

.list-item + .list-item {
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

/* label-medium */
.meta {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--md-sys-color-on-surface-variant);
}

/* title-medium */
.title {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: 0.15px;
  overflow-wrap: anywhere;
}

/* body-large */
.content {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* 本文中の URL。色は primary、下線でリンクとわかるようにする */
.content a {
  color: var(--md-sys-color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content a:focus-visible {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* body-medium */
.status {
  margin: 0;
  padding: 16px;
  text-align: center;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.25px;
  color: var(--md-sys-color-on-surface-variant);
}

.status.is-error {
  color: var(--md-sys-color-error);
}

.actions {
  display: flex;
  justify-content: center;
  padding: 8px 16px 16px;
}

/* Text button + label-large。状態は M3 の state layer(8% / 10%)を背景色で表現 */
.text-button {
  min-height: 40px;
  padding: 0 12px;
  border: none;
  border-radius: 20px;
  background: transparent;
  color: var(--md-sys-color-primary);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: 0.1px;
  cursor: pointer;
}

.text-button:hover {
  background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
}

.text-button:active {
  background: color-mix(in srgb, var(--md-sys-color-primary) 10%, transparent);
}

.text-button:focus-visible {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

.text-button:disabled {
  background: transparent;
  color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
  cursor: default;
}

/* label-small */
.footer {
  padding: 24px 16px;
  font-size: 11px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--md-sys-color-on-surface-variant);
  text-align: center;
}

.footer p {
  margin: 0;
}
