﻿:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #eef3f7;
  --line: #d9e2ec;
  --text: #1f2937;
  --muted: #738195;
  --accent: #1f6feb;
  --accent-soft: #e8f1ff;
  --shadow: 0 18px 48px rgba(31, 41, 55, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft JhengHei", "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.site-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(20px, 5vw, 64px) 18px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--muted);
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

h2 {
  font-size: 20px;
  line-height: 1.35;
}

.header-meta {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 14px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 18px;
  padding: 0 clamp(20px, 5vw, 64px) 40px;
}

.gallery {
  display: grid;
  gap: 10px;
  align-content: start;
}

.gallery-card {
  width: 100%;
  border: 1px solid var(--line);
  border-left: 5px solid transparent;
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 7px;
  padding: 16px;
  text-align: left;
  box-shadow: 0 4px 18px rgba(31, 41, 55, 0.05);
}

.gallery-card:hover,
.gallery-card.is-active {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.gallery-card .date {
  font-size: 13px;
  font-weight: 800;
}

.gallery-card .title {
  color: var(--muted);
  font-size: 14px;
}

.gallery-card .hint {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.viewer {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}


.viewer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.home-button {
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 12px;
  background: var(--surface);
  cursor: pointer;
  white-space: nowrap;
}

.home-button:hover,
.open-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.open-link {
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  padding: 9px 12px;
  text-decoration: none;
  white-space: nowrap;
  background: var(--surface);
}

.image-frame {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #f9fbfd;
}

.image-frame img {
  width: min(100%, 980px);
  max-height: calc(100vh - 210px);
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: white;
}

.empty-state {
  color: var(--muted);
}

@media (max-width: 860px) {
  .site-header,
  .viewer-header {
    align-items: start;
    flex-direction: column;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

  .image-frame {
    min-height: 360px;
  }
}

