/* 根戸ろまん ハブ — 白黒マンガの原稿。差し色は俺のクリエイティブ基地の --pink */

:root {
  --paper: #f7f5f0;
  --white: #ffffff;
  --ink: #16151a;
  --ink-2: #4a4850;
  --ink-3: #7c7a82;
  --pink: #ff4e8b;
  --pink-soft: #ffd9e5;

  --border: 3px;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-hover: 7px 7px 0 var(--pink);
  --radius: 4px;

  --font-display: "Dela Gothic One", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 180ms;

  --icon-size: clamp(96px, 38vw, 150px);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  /* WebGL が使えないときのトーン（canvas が上に重なれば見えない） */
  background-color: var(--paper);
  background-image: radial-gradient(rgba(22, 21, 26, 0.16) 1.2px, transparent 1.4px);
  background-size: 9px 9px;
}

#tone {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.no-webgl #tone { display: none; }

.page {
  position: relative;
  z-index: 1;
  max-width: 460px;
  margin: 0 auto;
  padding: 36px 16px 32px;
}

/* ── コマ（共通の枠） ── */
.panel {
  position: relative;
  background: var(--white);
  border: var(--border) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ── 扉のコマ（PV の最後の画。枠は .pv が持つ） ──
   正方形が基本・中身が収まらない幅では縦に伸びる（overflow: clip なら aspect-ratio の最小高さが中身に従う） */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  align-content: center;
  column-gap: 12px;
  aspect-ratio: 1;
  padding: 20px 16px 20px 18px;
  overflow: clip;
  isolation: isolate;
  background: var(--white);
}

/* 集中線：中心は抜く */
.hero::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: -1;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    rgba(22, 21, 26, 0.10) 0deg 0.9deg,
    transparent 0.9deg 5deg
  );
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 22%, #000 48%);
  mask-image: radial-gradient(circle at 50% 50%, transparent 22%, #000 48%);
  transform: translate(-12%, -14%);
}

.icon {
  grid-column: 1;
  grid-row: 1;
  width: var(--icon-size);
  height: var(--icon-size);
  border-radius: 50%;
  border: var(--border) solid var(--ink);
  background: var(--white);
}

.bubble {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 22px;
}

/* 吹き出しのしっぽ：アイコンへ向ける */
.bubble::before,
.bubble::after {
  content: "";
  position: absolute;
  left: 34px;
  width: 0;
  height: 0;
  border-style: solid;
}
.bubble::before {
  top: -16px;
  border-width: 0 9px 16px 9px;
  border-color: transparent transparent var(--ink) transparent;
}
.bubble::after {
  top: -12px;
  left: 36px;
  border-width: 0 7px 13px 7px;
  border-color: transparent transparent var(--white) transparent;
}

.bubble p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  font-weight: 700;
}

/* 文節の途中で折り返さない */
.ph { display: inline-block; }

.name {
  grid-column: 2;
  grid-row: 1 / span 3;
  margin: 0;
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 12vw, 52px);
  line-height: 1;
  letter-spacing: 0.06em;
  align-self: start;
}

.alias {
  grid-column: 1;
  grid-row: 3;
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--ink-3);
}

/* ── リンクのコマ割り ── */
.koma {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.link {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 108px;
  padding: 12px 14px;
  color: var(--ink);
  text-decoration: none;
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.link:hover,
.link:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hover);
  outline: none;
}

.link:focus-visible { border-color: var(--pink); }

.link:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
}

.kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}

.label {
  font-family: var(--font-display);
  font-size: clamp(22px, 7vw, 26px);
  line-height: 1.15;
}

/* 一番大きいコマ＝主導線。白黒反転 */
.link-main {
  grid-column: 1 / -1;
  min-height: 132px;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.link-main .kicker { color: var(--pink-soft); }
.link-main .label { font-size: 40px; }
.link-main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(
    -62deg,
    rgba(255, 255, 255, 0.07) 0 2px,
    transparent 2px 14px
  );
}
.link-main:hover,
.link-main:focus-visible { box-shadow: var(--shadow-hover); }

/* 網トーンを貼ったコマ */
.link-toned {
  background-color: var(--white);
  background-image: radial-gradient(rgba(22, 21, 26, 0.22) 1.3px, transparent 1.5px);
  background-size: 7px 7px;
  background-position: right bottom;
  -webkit-mask-image: none;
}
.link-toned .label,
.link-toned .kicker {
  align-self: flex-start;
  background: var(--white);
  padding: 0 4px;
  margin-left: -4px;
}

/* ── 奥付 ── */
.foot {
  margin-top: 28px;
  padding: 10px 12px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  font-size: 11px;
  color: var(--ink-2);
  text-align: center;
}
.foot p { margin: 0; }
.foot .copy { margin-top: 4px; color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  .link { transition: none; }
}
