/* ===== 顏色和字體：想換風格，先改這裡 ===== */
:root {
  --paper: #FAF5EC;     /* 背景：奶白 */
  --card: #FFFFFF;      /* 卡片、輸入框：白 */
  --ink: #1F1D1A;       /* 主文字：墨色（和漫畫線條一樣） */
  --muted: #6E675D;     /* 次要文字 */
  --line: #E8DFD0;      /* 分隔線 */
  --accent: #C8443F;    /* 重點色：紅（按鈕、標題底線、購物車數字） */
  --accent-soft: #F7DDD8; /* 淡紅：滑過、螢光筆底色 */
  --on-accent: #FFFFFF; /* 紅底上的文字：白 */

  --font: "Chiron GoRound TC", "Huninn", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; /* 昭源圓體 Chiron GoRound TC */
  --maxw: 760px;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
body:has(dialog[open]:not(.drawer)) { overflow: hidden; } /* 購物車抽屜由 shop.js 鎖住捲動 */
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, p { margin: 0; }
.muted { color: var(--muted); }

/* ===== 頂部 ===== */
.topbar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 20px 0;
  display: flex;
  align-items: center;
  gap: 20px;
}
.wordmark {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .04em;
  text-decoration: none;
  margin-right: auto;
}
.wordmark span { font-weight: 400; color: var(--muted); margin-left: 4px; }
.nav { display: flex; gap: 18px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.lang-toggle {
  font: inherit;
  font-size: .85rem;
  padding: 2px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.lang-toggle:hover { background: var(--accent-soft); }

/* ===== 主體 ===== */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* 我是誰 */
.hero { padding: 72px 0 40px; text-align: center; }
.avatar {
  width: 128px; height: 128px;
  margin: 0 auto 24px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  object-fit: cover;
  background: var(--card);
}
.hero-title { font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 700; line-height: 1.3; }
.mark { background: linear-gradient(transparent 58%, var(--accent-soft) 58% 92%, transparent 92%); padding: 0 .1em; color: var(--accent); }
.tagline { margin-top: 12px; font-size: 1.15rem; color: var(--muted); }

.socials { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.socials a {
  display: inline-block;
  padding: 4px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-size: .95rem;
  transition: background .15s;
}
.socials a:hover { background: var(--accent-soft); }

/* 區塊通用 */
.section { padding: 64px 0 0; }
.section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  display: inline-block;
  border-bottom: 3px solid var(--accent);
  line-height: 1.4;
}

/* 作品牆 */
.works-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.work {
  font: inherit; color: inherit; text-align: left;
  padding: 0; border: 0; background: none; cursor: pointer; min-width: 0;
}
.work img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  transition: transform .2s ease, box-shadow .2s ease;
}
.work:hover img, .work:focus-visible img { transform: rotate(-1.2deg) translateY(-3px); box-shadow: 4px 4px 0 var(--ink); }
.work:focus-visible { outline: none; }
.work-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: .95rem; }
.work-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-date { color: var(--muted); flex-shrink: 0; }

/* 關於 */
.about p + p { margin-top: 14px; }

/* 活動 */
.events { list-style: none; padding: 0; margin: 0; }
.event { padding: 16px 0; border-top: 1px solid var(--line); }
.event:last-child { border-bottom: 1px solid var(--line); }
.event-date { font-size: .9rem; color: var(--muted); }
.event-name { font-size: 1.15rem; font-weight: 700; }
.event-meta { color: var(--muted); font-size: .95rem; }
.event-link { display: inline-block; margin-top: 4px; font-size: .95rem; }
.past { margin-top: 24px; }
.past summary { cursor: pointer; color: var(--muted); }
.is-past .event-name { font-weight: 400; }

/* 聯絡 */
.contact { text-align: center; padding-bottom: 24px; }
.contact p { color: var(--muted); }
.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 28px;
  background: var(--accent);
  color: var(--on-accent);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  text-decoration: none;
  font-weight: 700;
  transition: transform .1s, box-shadow .1s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.email-plain { margin-top: 12px; font-size: .9rem; }

/* 頁尾 */
.footer { max-width: var(--maxw); margin: 64px auto 0; padding: 24px 20px 40px; text-align: center; color: var(--muted); font-size: .85rem; }

/* ===== 燈箱 ===== */
.lightbox {
  width: min(92vw, 720px);
  max-height: 94vh;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  overflow: auto;
}
.lightbox::backdrop { background: rgba(20, 18, 15, .78); }
.lb-close {
  position: sticky; top: 0; float: right;
  width: 36px; height: 36px;
  font: inherit; font-size: 1.4rem; line-height: 1;
  border: 1.5px solid var(--ink); border-radius: 50%;
  background: var(--paper); cursor: pointer; z-index: 1;
}
.lb-figure { margin: 0; clear: both; }
.lb-figure img { margin: 8px auto 0; max-height: 72vh; width: auto; border-radius: 8px; }
.lb-figure figcaption { margin-top: 12px; display: flex; flex-direction: column; }
.lb-figure figcaption span { color: var(--muted); font-size: .95rem; }
.lb-figure .lb-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lb-figure .lb-links:empty { display: none; }
.lb-figure .lb-link { padding: 6px 14px; border: 2px solid var(--ink, #1D1D1D); border-radius: 999px; background: #fff; color: var(--ink, #1D1D1D); font-weight: 700; font-size: .9rem; text-decoration: none; } /* 作品：在 IG 看影片 */
.lb-figure .lb-link:hover { background: #D9372B; color: #fff; }
.lb-nav { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 12px; }
.lb-nav[hidden] { display: none; }
.lb-nav button {
  font: inherit; font-size: 1.1rem;
  width: 44px; height: 44px;
  border: 1.5px solid var(--ink); border-radius: 50%;
  background: transparent; cursor: pointer;
}
.lb-nav button:hover, .lb-close:hover { background: var(--accent-soft); }

.noscript { text-align: center; padding: 24px; }

/* ===== 手機 ===== */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .hero { padding-top: 48px; }
  .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .section { padding-top: 56px; }
}
