/* 《虎虎誌》網站：精品出廠標籤。黑白二色、引號刊名、等寬小字，圓形頭像是唯一的圖。 */

@font-face {
  font-family: "Huhu Display";
  src: url("/fonts/huhu-display.woff") format("woff");
  font-weight: 900;
  font-display: swap;
  /* Noto Sans TC Black（OFL）子集，只含標題用字 */
}

@font-face {
  font-family: "Huhu Mono";
  src: url("/fonts/huhu-mono.woff") format("woff");
  font-weight: 400;
  font-display: swap;
  /* JetBrains Mono（OFL）子集，只含英數與標點 */
}

:root {
  --paper: #f2f2ef;
  --ink: #0e0e0e;
  --ink-soft: #2a2a28; /* 按鈕 hover：只比墨色淺一點點 */
  --muted: #5f5f5b;
  --quote: #8a8a85;
  --hair: #c9c9c4;
  --display: "Huhu Display", "Noto Sans TC", "PingFang TC", sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --mono: "Huhu Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
  accent-color: var(--ink);
  scrollbar-color: var(--ink) var(--paper);
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--ink);
}

::selection { background: var(--ink); color: var(--paper); }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* 中文詞不在換行處切開 */
.nw { white-space: nowrap; }

.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;
}

.mono {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── 版面 ─────────────────────────────────────────── */

.sheet {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 20px 40px;
}

/* 電腦版：頁尾貼在畫面底部；主內容維持由上往下，只是刊名上方留得比手機多一些 */
@media (min-width: 900px) and (min-height: 720px) {
  .sheet--cover { min-height: 100vh; display: flex; flex-direction: column; }
  .sheet--cover .sheet-body { flex: 1; }
  .sheet--cover .masthead { padding: clamp(64px, 8vh, 104px) 0; }
  .sheet--cover .colophon { margin-top: 48px; }
}

.label-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
}
.label-bar a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.label-bar > :last-child { text-transform: none; }

/* 狀態頁左上角回首頁：左箭頭＋刊名 */
.label-bar .back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.label-bar .back:hover { text-decoration: underline; }
.back svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; }

/* 頂端的斜紋工業帶（Off-White 的警示帶），使用者指定保留 */
.rule-heavy {
  height: 9px;
  background: repeating-linear-gradient(45deg, var(--ink) 0 5px, transparent 5px 10px);
}

.masthead {
  margin: 0;
  /* 刊名在斜紋帶與作者列之間上下置中：上下留白相同 */
  padding: clamp(32px, 7vw, 56px) 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(56px, 20vw, 150px);
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  text-align: center;
}
.masthead .q { color: var(--quote); font-weight: 900; }
/* 全形引號的字身有半格空白，左右各收掉半格，置中時才會真正對稱 */
.masthead .q-open { margin-left: -0.5em; }
.masthead .q-close { margin-right: -0.5em; }

.author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 0;
  padding-top: 16px;
  border-top: 1px solid var(--ink);
  text-decoration: none;
}
.author img { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.author .name { display: block; font-family: var(--display); font-weight: 900; font-size: 16px; line-height: 1.3; }
.author .mono { display: block; color: var(--muted); text-transform: none; letter-spacing: 0.02em; }
.author:hover .mono { color: var(--ink); }

/* 「AI x 遊戲開發」：粗體加底線，滑鼠移上去或點一下出現說明框 */
.term {
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: help;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.term:hover, .term[aria-expanded="true"] { text-decoration-thickness: 2.5px; }

.tip {
  position: absolute;
  z-index: 10;
  width: min(260px, calc(100vw - 32px));
  padding: 14px 16px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  font-size: 14px;
  line-height: 1.7;
}
.tip[hidden] { display: none; }
.tip p { margin: 0 0 6px; font-weight: 700; }
.tip ul { margin: 0; padding-left: 1.1em; }

.lede { margin: 20px 0 0; font-size: clamp(15px, 1.7vw, 17px); line-height: 1.85; text-wrap: pretty; }

/* ── 訂閱表單 ─────────────────────────────────────── */

.subscribe { display: flex; flex-wrap: wrap; margin-top: 24px; }

.subscribe input[type="email"] {
  flex: 3 1 220px;
  min-width: 0;
  height: 52px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--ink);
  border-radius: 0;
}
.subscribe input[type="email"]::placeholder { color: var(--muted); }
.subscribe input[type="email"]:focus-visible { outline-offset: -4px; }

.button {
  flex: 1 1 120px;
  height: 52px;
  padding: 0 24px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--paper);
  background: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 140ms ease-out, color 140ms ease-out;
}
.button:hover { background: var(--ink-soft); border-color: var(--ink-soft); color: var(--paper); }
.button:disabled { cursor: progress; background: var(--muted); border-color: var(--muted); color: var(--paper); }

/* ── 規格列 ───────────────────────────────────────── */

.spec { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.spec li {
  display: grid;
  grid-template-columns: 4.2em minmax(0, 1fr);
  align-items: baseline;
  column-gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 14px;
  line-height: 1.7;
}
.spec h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 15px; line-height: 1.7; }
.spec p { margin: 0; }

/* ── 頁尾 ─────────────────────────────────────────── */

.colophon { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 48px; color: var(--muted); }
.colophon a { color: var(--muted); }
.colophon a:hover { color: var(--ink); }

/* ── 狀態頁、過往期數 ─────────────────────────────── */

.notice { padding-top: clamp(36px, 7vw, 64px); max-width: 36em; }
.notice h1 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(32px, 8vw, 52px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.notice p { margin: 0 0 14px; text-wrap: pretty; }
.notice .aside { font-size: 14px; color: var(--muted); }
.notice .actions { margin-top: 28px; }
.notice form { margin: 28px 0 0; }
.notice .button { flex: none; }

.archive { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.archive a {
  display: grid;
  grid-template-columns: 5em minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hair);
  text-decoration: none;
}
.archive .no, .archive .d { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .archive a { grid-template-columns: 4.5em minmax(0, 1fr); }
  .archive .d { grid-column: 2; }
}

/* 機器人陷阱欄位：人看不到，機器人會填 */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
