@import url("https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@500;600;700&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap");

/* 作家・中川 — 部品のスタイル。色・余白・角はすべて tokens.css の変数から取る */

.sn-page { background: var(--paper); color: var(--ink-body); font-family: var(--font-sans); font-size: 17px; line-height: 1.9; }

/* ---- ロゴ（名刺の「N」のキー＋文字のロゴ） ---- */
.sn-logo { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; font-family: var(--font-mincho); font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: 0.3em; color: var(--ink); text-decoration: none; }
.sn-logo:hover { color: var(--ink); }
.sn-logo:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: var(--radius-sm); }
.sn-logo__key { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: var(--logo-key-size); height: var(--logo-key-size); box-sizing: border-box; padding-top: 1px; font-family: var(--font-sans); font-size: 18px; font-weight: 700; line-height: 1; letter-spacing: 0; color: var(--ink); background: linear-gradient(var(--key-top), var(--key-bottom)); border: 1px solid var(--key-edge); border-bottom-width: 4px; border-radius: 8px; box-shadow: 0 2px 5px rgba(70, 58, 34, 0.14); }

/* ---- ヘッダ（全ページ共通。上に固定。狭い幅（960px 以下）はハンバーガーメニュー: ロゴ＋（主要ボタン）＋三本線の1段。開くと下に縦のメニュー、開いている間は×） ---- */
.sn-header { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--rule); padding: 0 max(16px, 4vw); }
.sn-header__inner { max-width: var(--page-max); margin: 0 auto; min-height: var(--header-height); display: flex; flex-wrap: wrap; align-items: center; gap: 0 28px; }
.sn-header__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-left: auto; font-size: 16px; font-weight: 500; }
.sn-header__nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.sn-header__nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.sn-header__nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.sn-key.sn-header__cta { min-height: 48px; padding: 0 20px; font-size: 16px; }
.sn-header__sub { display: none; align-items: center; min-height: 44px; padding: 0 4px; font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
.sn-header__sub:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sn-header__menu { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; color: var(--ink); background: var(--paper-raised); border: 1px solid var(--rule-control); border-radius: var(--radius-sm); cursor: pointer; }
.sn-header__menu svg { width: 22px; height: 22px; }
.sn-header__menu .sn-header__icon-close { display: none; }
.sn-header--open .sn-header__menu .sn-header__icon-open { display: none; }
.sn-header--open .sn-header__menu .sn-header__icon-close { display: block; }
.sn-header__menu:focus-visible, .sn-header__nav a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
@media (max-width: 960px) {
  .sn-header__inner { gap: 0 6px; }
  .sn-header .sn-logo { min-height: var(--header-height); font-size: 18px; letter-spacing: 0.1em; gap: 8px; }
  .sn-header__nav { display: none; }
  .sn-header__sub { display: inline-flex; margin-left: auto; }
  .sn-header__sub + .sn-key.sn-header__cta { margin-left: 0; }
  .sn-key.sn-header__cta { margin-left: auto; min-height: 44px; padding: 0 12px; font-size: 15px; border-bottom-width: 4px; }
  .sn-header__menu { display: inline-flex; margin-left: auto; }
  .sn-header__cta + .sn-header__menu { margin-left: 0; }
  .sn-header--open .sn-header__nav { display: flex; flex-direction: column; align-items: stretch; gap: 0; order: 10; width: 100%; margin: 0; padding: 0 0 var(--space-3); border-top: 1px solid var(--rule); }
  .sn-header--open .sn-header__nav a { min-height: 52px; border-bottom: 1px solid var(--rule); font-size: 17px; }
}

@media (max-width: 380px) {
  .sn-header__inner { gap: 0 4px; }
  .sn-header .sn-logo { font-size: 17px; letter-spacing: 0.04em; gap: 6px; }
  .sn-key.sn-header__cta { padding: 0 10px; }
}

/* ---- 読み上げだけに出す文（「新しいタブで開きます」など） ---- */
.sn-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---- ページ内リンクの飛び先（固定ヘッダに隠れないように） ---- */
.sn-anchor { scroll-margin-top: var(--anchor-offset); }

/* ---- フッタの著作権表示（全ページ中央寄せ） ---- */
.sn-footer__copy { margin: 0; text-align: center; font-size: 14px; font-weight: 500; line-height: 1.6; color: var(--ink-muted); }

/* ---- 見出し ---- */
.sn-heading { margin: 0; padding-bottom: var(--space-3); border-bottom: 1px solid var(--rule); font-family: var(--font-mincho); font-size: 30px; font-weight: 600; line-height: 1.5; letter-spacing: 0.2em; color: var(--ink); }
.sn-heading small { margin-left: var(--space-3); font-family: var(--font-sans); font-size: 14px; font-weight: 700; letter-spacing: 0; color: var(--ink-muted); }

/* ---- キー（ボタン） ---- */
.sn-key { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--key-height); padding: 0 var(--space-5); box-sizing: border-box; font-family: var(--font-sans); font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--ink); text-decoration: none; background: linear-gradient(var(--key-top), var(--key-bottom)); border: 1px solid var(--key-edge); border-bottom-width: 6px; border-radius: var(--radius-key); box-shadow: var(--shadow-key); cursor: pointer; transition: transform 0.08s, border-bottom-width 0.08s; }
.sn-key:hover { transform: translateY(1px); }
.sn-key:active { transform: translateY(3px); border-bottom-width: 3px; }
.sn-key:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.sn-key--primary { color: var(--ink-on-dark); background: linear-gradient(var(--key-ink-top), var(--key-ink-bottom)); border-color: var(--key-ink-bottom); }
.sn-key--block { display: flex; width: 100%; }
.sn-key:disabled, .sn-key[aria-disabled="true"] { color: var(--ink-muted); background: var(--paper-deep); border-color: var(--rule); border-bottom-width: 1px; box-shadow: none; transform: none; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .sn-key { transition: none; } }

/* ---- 入口のキー（廃止予定。キーの形はボタン専用のため、新しい画面では使わない） ---- */
.sn-entry { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); color: var(--ink); text-decoration: none; background: linear-gradient(var(--key-top), var(--key-bottom)); border: 1px solid var(--key-edge); border-bottom-width: 7px; border-radius: var(--radius-key); box-shadow: var(--shadow-key); }
.sn-entry:hover { transform: translateY(1px); }
.sn-entry:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.sn-entry__label { display: flex; flex-direction: column; gap: var(--space-1); }
.sn-entry__kind { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-muted); }
.sn-entry__name { font-family: var(--font-mincho); font-size: 28px; font-weight: 600; letter-spacing: 0.12em; line-height: 1.4; }
.sn-entry__count { font-size: 17px; font-weight: 700; white-space: nowrap; }

/* ---- 状態の札 ---- */
.sn-status { display: inline-flex; align-items: center; padding: 2px var(--space-2); font-size: 14px; font-weight: 700; line-height: 1.6; color: var(--ink); border: 1px solid var(--ink); border-radius: var(--radius-sm); }
.sn-status--soon { color: var(--ink-muted); border-style: dashed; border-color: var(--ink-muted); }

/* ---- 作品カード ---- */
.sn-work { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-4); color: var(--ink); text-decoration: none; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-card); }
a.sn-work:hover { border-color: var(--rule-control); }
a.sn-work:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
a.sn-work--book:hover .sn-work__cover { box-shadow: 0 6px 18px rgba(28, 27, 24, 0.26); }
.sn-work--soon { border-style: dashed; border-color: var(--key-edge); }
.sn-work__icon { width: 72px; height: 72px; flex-shrink: 0; border-radius: var(--radius-icon); object-fit: cover; background: var(--paper-deep); }
.sn-work__body { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.sn-work__title { margin: 0; font-family: var(--font-mincho); font-size: 20px; font-weight: 600; line-height: 1.5; letter-spacing: 0.04em; }
.sn-work__sub { margin: 0; font-size: 15px; color: var(--ink-body); }
.sn-work--book { flex-direction: column; align-items: stretch; padding: 0; background: none; border: 0; }
.sn-work__link { position: relative; display: inline-flex; align-items: center; gap: 6px; margin-top: var(--space-2); font-family: var(--font-sans); font-size: 17px; font-weight: 700; line-height: 1.5; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.sn-work__link svg { width: 16px; height: 16px; flex-shrink: 0; }
a.sn-work:hover .sn-work__link { text-decoration-thickness: 2px; }
.sn-work--book .sn-work__cover { width: 100%; aspect-ratio: 2 / 3; max-width: 100%; border-radius: var(--radius-sm); box-shadow: var(--shadow-cover); object-fit: cover; background: var(--paper-deep); }

/* ---- 新着の一覧 ---- */
.sn-news { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.sn-news li { display: grid; grid-template-columns: 6em minmax(0, 1fr) auto; gap: var(--space-4); align-items: center; padding: var(--space-3) 0; border-bottom: 1px solid var(--rule); }
.sn-news__kind { font-size: 14px; font-weight: 700; color: var(--ink-muted); }
.sn-news__title { font-family: var(--font-mincho); font-size: 20px; font-weight: 600; color: var(--ink); text-decoration: none; }
.sn-news__title:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---- 新着の棚（トップ: 新着の作品を表紙・アイコンつきで横に並べ、スワイプか矢印で送る。自動では動かない） ---- */
.sn-shelf-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.sn-shelf-nav { display: flex; gap: var(--space-2); }
.sn-shelf-nav__btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; color: var(--ink); background: var(--paper-raised); border: 1px solid var(--rule-control); border-radius: var(--radius-sm); cursor: pointer; }
.sn-shelf-nav__btn:hover { background: var(--paper-deep); }
.sn-shelf-nav__btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sn-shelf-nav__btn svg { width: 18px; height: 18px; }
.sn-shelf { margin: 0; padding: 6px 6px var(--space-3); list-style: none; display: flex; gap: var(--space-4); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 6px; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--rule-control) transparent; }
.sn-shelf > li { position: relative; flex: 0 0 max(220px, calc((100% - 2 * var(--space-4)) / 3)); scroll-snap-align: start; }
@media (prefers-reduced-motion: no-preference) { .sn-shelf { scroll-behavior: smooth; } }
.sn-shelf__item { display: flex; flex-direction: column; gap: var(--space-2); height: 100%; color: var(--ink); text-decoration: none; }
.sn-shelf__item:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: var(--radius-sm); }
.sn-shelf__media { display: flex; align-items: flex-end; height: 140px; margin-bottom: var(--space-2); border-bottom: 1px solid var(--rule); }
.sn-shelf__icon { display: block; width: 96px; height: 96px; margin-bottom: 8px; border-radius: 20px; object-fit: cover; background: var(--paper-deep); }
.sn-shelf__cover { display: block; width: 88px; height: 132px; margin-bottom: 4px; border-radius: var(--radius-sm); box-shadow: var(--shadow-cover); object-fit: cover; background: var(--paper-deep); }
.sn-shelf__kind { font-size: 14px; font-weight: 700; line-height: 1.6; color: var(--ink-muted); }
.sn-shelf__title { font-family: var(--font-mincho); font-size: 20px; font-weight: 600; line-height: 1.5; letter-spacing: 0.04em; }
.sn-shelf__item .sn-work__link { margin-top: auto; padding-top: var(--space-1); }
.sn-shelf__item:hover .sn-work__link { text-decoration-thickness: 2px; }
.sn-shelf__sub { font-size: 15px; line-height: 1.7; color: var(--ink-body); }

/* ---- 控えめなテキストリンク（一覧へ・次へ） ---- */
.sn-more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 17px; font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.sn-more:hover { text-decoration-thickness: 2px; }
.sn-more svg { width: 16px; height: 16px; flex-shrink: 0; }
.sn-more:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: var(--radius-sm); }

/* ---- 入力欄 ---- */
.sn-field { display: flex; flex-direction: column; gap: var(--space-2); font-size: 15px; font-weight: 700; color: var(--ink); }
.sn-field__req { margin-left: var(--space-2); font-size: 14px; color: var(--danger); }
.sn-field input, .sn-field select, .sn-field textarea { font: inherit; font-size: 17px; font-weight: 400; padding: 12px 14px; color: var(--ink); background: var(--paper-raised); border: 1px solid var(--rule-control); border-radius: var(--radius-sm); width: 100%; box-sizing: border-box; }
.sn-field textarea { min-height: 120px; resize: vertical; }
.sn-field input:focus-visible, .sn-field select:focus-visible, .sn-field textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; }
.sn-field--error input, .sn-field--error select, .sn-field--error textarea { border-color: var(--danger); border-width: 2px; }
.sn-field__error { font-size: 15px; font-weight: 500; color: var(--danger); }
