/* ==================================================
 * surfaces.css：面の構造（Surfaces & Shell）
 * .md3-theme の基本書式、本文コンテナ、ページヘッダー、パンくず、フォーカス表示を置く
 * 色・文字・角丸・影は tokens.css の変数を参照する
 * ================================================== */

/* === .md3-theme の基本書式 === */
.md3-theme {
  font-family: 'Roboto', 'Noto Sans JP', sans-serif;
  font-weight: 400;
  color: var(--text-main);
  font-size: var(--typescale-body);
  line-height: var(--typescale-body-line-height);
  background-color: transparent;
}

.md3-theme * {
  font-weight: inherit;
  box-sizing: border-box;
}

.md3-theme a {
  text-decoration: none !important;
}

.md3-theme .material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
}

/* === 本文コンテナ === */
.page #main .md3-theme {
  min-width: 0;
  padding: 8px 0 40px;
  text-align: left;
  overflow-wrap: anywhere;
}

/* === ページヘッダー === */
/* 標準形を定義し、画面ごとの差分は features/ で上書き */
/* features/shop.css の :where() による上書きを効かせるため、.md3-theme を前に付けず詳細度を上げない */
.md3-page-header {
  position: static;   /* 親サイトの header { position: relative; z-index: 99999; } を打ち消す */
  z-index: auto;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--md-primary);
}

.md3-page-title {
  font-size: var(--typescale-headline);
  line-height: var(--typescale-headline-line-height);
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.md3-page-subtitle {
  font-size: var(--typescale-body);
  line-height: var(--typescale-body-line-height);
  color: var(--text-muted);
  margin: 8px 0 0;
}

/* 戻るリンクを見出しの上に表示 */
.md3-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted) !important;
  font-size: var(--typescale-label);
  line-height: var(--typescale-label-line-height);
  font-weight: 700;
  margin-bottom: 12px;
  transition: color 0.2s;
}

.md3-back-link:hover {
  color: var(--md-primary) !important;
}

/* === フォーカス表示 === */
.md3-theme a:focus-visible,
.md3-theme button:focus-visible,
.md3-theme summary:focus-visible {
  outline: 3px solid var(--md-secondary);
  outline-offset: 3px;
}

@media (max-width: 737px) {

  .page #main .md3-theme {
    padding: 16px 4% 32px;
  }
}
