/* 色票對齊 App/daily-pin/src/App.css：舞台與大標取淺色面，視窗內部取深色面。
   原片的 --purple 系（其實已經是舊橘 #d83f05）全部換成 App 現在的橘 #E7450F。 */
@font-face {
  font-family: "Tephra Outline";
  /* Inter 800 靜態實例＋合併重疊輪廓（SIL OFL），只留 Basic Latin。
     描邊字必須用合併過輪廓的檔，否則字形內部的重疊輪廓也會被描出來。 */
  src: url("/assets/fonts/tephra-outline.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: block;
}

:root {
  color-scheme: light;
  --ink: #2e2e31;
  --ink-2: #505057;
  --stage: #e7e7ea;
  --stage-line: #d7d7dc;

  --note: #202020;
  --note-raised: #2a2a2a;
  --note-soft: #303030;
  --note-hover: #383838;
  --note-ink: #dcdcdc;
  --note-ink-2: #b8b8b8;
  --muted: #9c9c9c;
  --line: #404040;
  --line-strong: #5a5a5a;

  --primary: #e7450f;
  --primary-hover: #c83a0a;
  --primary-soft: #48271d;
  --link-dark: #ff7a45;
  --link-light: #c23a0b;
  --accent-soft: rgb(231 69 15 / 0.16);
  --selection: rgb(231 69 15 / 0.35);
  --on-primary: #ffffff;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-window: 10px;

  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Noto Sans TC",
    "Microsoft JhengHei", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-outline: "Tephra Outline", "Arial Black", "Helvetica Neue", sans-serif;

  --nav-h: 60px;
  --gutter: clamp(16px, 4vw, 56px);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--stage);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-width: 320px;
  background: var(--stage);
  color: var(--ink);
  font-family: var(--font-ui);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
canvas {
  display: block;
}

a {
  color: var(--link-light);
}

kbd {
  font-family: var(--font-ui);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm {
  width: 13px;
  height: 13px;
}

.icon--xs {
  width: 12px;
  height: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--note);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

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

/* ── 按鈕：App 的 .button--primary ───────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.button--primary {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 1px 2px rgb(0 0 0 / 0.16);
}

.button--primary:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
}

.button--large {
  height: 52px;
  padding: 0 28px;
  font-size: 17px;
  border-radius: 10px;
}

/* ── 導覽列：跟舞台同色的實心底（不用 backdrop-filter，捲動時不重算模糊） ── */
.nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  background: var(--stage);
  border-bottom: 1px solid transparent;
}

.nav--lined {
  border-bottom-color: var(--stage-line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand__icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.brand__word {
  font-family: var(--font-outline);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── 鍵帽：原片的黑色鍵帽。按下＝面往下 3px、影子淡一半（只動 transform／opacity） ── */
.key {
  position: relative;
  display: inline-grid;
}

.key-shadow {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.45),
    0 8px 18px rgb(0 0 0 / 0.26),
    0 16px 32px rgb(0 0 0 / 0.18);
  will-change: opacity;
}

.key-face {
  position: relative;
  display: grid;
  min-width: 46px;
  height: 46px;
  place-items: center;
  padding: 0 12px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: var(--radius-lg);
  background: #151517;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12);
  color: #f7f7f8;
  font-size: 18px;
  font-weight: 560;
  will-change: transform;
}

.key--wide .key-face {
  min-width: 132px;
  font-size: 16px;
}

.key-face--fn {
  font-size: 17px;
}

.lights {
  display: inline-flex;
  gap: 8px;
}

.lights i {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.lights i:nth-child(1) {
  background: #ff5f57;
}

.lights i:nth-child(2) {
  background: #febc2e;
}

.lights i:nth-child(3) {
  background: #28c840;
}

.checkbox {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--on-primary);
}

.checkbox--on {
  border-color: var(--primary);
  background: var(--primary);
}

.checkbox .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.6;
}
