:root {
  --bg: #f6efe3;
  --bg-deep: #ead8bb;
  --ink: #18392f;
  --ink-soft: rgba(24, 57, 47, 0.72);
  --panel: rgba(255, 251, 244, 0.82);
  --panel-strong: rgba(255, 250, 243, 0.94);
  --accent: #c86b3c;
  --accent-deep: #a75029;
  --accent-soft: rgba(200, 107, 60, 0.14);
  --gold: #d7a84d;
  --line: rgba(24, 57, 47, 0.12);
  --white: #ffffff;
  --shadow: 0 24px 50px rgba(92, 64, 34, 0.16);
  --shadow-soft: 0 14px 30px rgba(92, 64, 34, 0.1);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans TC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.78), transparent 24%),
    radial-gradient(circle at 85% 8%, rgba(215, 168, 77, 0.24), transparent 18%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

button,
input {
  font: inherit;
}

.site-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  padding: 22px;
}

.sidebar,
.content-area {
  align-self: start;
}

.sidebar {
  position: sticky;
  top: 22px;
}

.brand-panel,
.content-area,
.auth-card,
.gallery-item,
.side-thumb,
.featured-card,
.ghost-button {
  box-shadow: var(--shadow-soft);
}

.brand-panel {
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(160deg, rgba(255, 250, 243, 0.95), rgba(246, 231, 203, 0.86)),
    var(--panel);
}

.brand-tag,
.topbar-kicker,
.hero-eyebrow,
.section-heading p {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-deep);
}

.logo-word {
  margin-top: 10px;
  font-family: "DM Serif Display", serif;
  font-size: clamp(2.9rem, 5vw, 4rem);
  line-height: 0.96;
  color: var(--ink);
}

.brand-copy {
  margin: 16px 0 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.brand-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.side-icon {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(200, 107, 60, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-deep);
  cursor: pointer;
}

.sidebar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.side-thumb,
.gallery-item,
.featured-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(255, 248, 239, 0.82);
  cursor: pointer;
}

.side-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 18px;
}

.content-area {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 36px;
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.72), rgba(252, 245, 234, 0.56));
  backdrop-filter: blur(10px);
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.topbar-copy h1,
.topbar-copy p,
.hero-copy h2,
.hero-copy p,
.section-heading span,
.wall-note {
  margin: 0;
}

.topbar-copy h1 {
  margin-top: 8px;
  max-width: 12ch;
  font-family: "DM Serif Display", serif;
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  line-height: 0.98;
  color: var(--ink);
}

.ghost-button,
.auth-submit {
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.ghost-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-top: 24px;
  padding: 22px;
  border: 1px solid rgba(24, 57, 47, 0.08);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.86), rgba(246, 233, 208, 0.8)),
    var(--panel);
}

.hero-copy h2 {
  margin-top: 10px;
  max-width: 12ch;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.12;
  text-wrap: balance;
}

.hero-text {
  margin-top: 14px;
  max-width: 56ch;
  color: var(--ink-soft);
  line-height: 1.75;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.stat-chip {
  min-width: 120px;
  padding: 14px 16px;
  border: 1px solid rgba(200, 107, 60, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.64);
}

.stat-chip strong,
.stat-chip span {
  display: block;
}

.stat-chip strong {
  font-size: 1.4rem;
  color: var(--accent-deep);
}

.stat-chip span {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.featured-card {
  min-height: 150px;
  border-radius: 22px;
}

.featured-card.is-large {
  grid-column: span 2;
  min-height: 190px;
}

.gallery-section {
  margin-top: 22px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading span {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  grid-auto-flow: dense;
  gap: 14px;
}

.gallery-item {
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.gallery-item.is-wide {
  grid-column: span 2;
  aspect-ratio: 1.6 / 1;
}

.gallery-item.is-tall {
  grid-row: span 2;
  aspect-ratio: 0.84 / 1.5;
}

.gallery-item.is-large {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: 1 / 1;
}

.gallery-item.is-compact {
  aspect-ratio: 0.95 / 0.95;
}

.side-thumb img,
.gallery-item img,
.featured-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.wall-note {
  margin-top: 18px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 700;
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  z-index: 30;
}

.auth-modal.is-hidden {
  display: none;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 31, 22, 0.34);
}

.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
}

.auth-card {
  width: min(100%, 440px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.auth-tab {
  min-height: 72px;
  border: 0;
  background: rgba(200, 107, 60, 0.08);
  color: var(--ink-soft);
  font-size: 1.04rem;
  font-weight: 800;
  cursor: pointer;
}

.auth-tab.is-active {
  background: rgba(255, 251, 244, 0.98);
  color: var(--ink);
}

.auth-panel {
  display: none;
  padding: 28px 26px 26px;
}

.auth-panel.is-active {
  display: block;
}

.auth-panel h1 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  text-align: center;
}

.auth-subtitle {
  margin: 10px 0 22px;
  text-align: center;
  line-height: 1.7;
  color: var(--ink-soft);
}

.provider-list,
.login-form {
  display: grid;
  gap: 14px;
}

.provider-button {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 0 18px;
  border: 1px solid rgba(200, 107, 60, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.provider-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
}

.provider-icon.apple {
  background: #111;
  color: #fff;
}

.provider-icon.google {
  background: linear-gradient(135deg, #4285f4, #34a853 55%, #fbbc05 75%, #ea4335 100%);
  color: #fff;
}

.provider-icon.microsoft {
  background: linear-gradient(90deg, #f35325 0 50%, #81bc06 50% 100%);
  color: #fff;
}

.provider-icon.line {
  background: #06c755;
  color: #fff;
}

.provider-icon.key {
  background: #fbecd8;
  color: var(--accent-deep);
}

.login-form label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
}

.login-form input {
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid rgba(24, 57, 47, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.auth-submit {
  color: var(--white);
  background: linear-gradient(135deg, var(--ink), #295545);
}

.provider-button,
.ghost-button,
.auth-submit,
.auth-tab,
.side-icon,
.side-thumb,
.gallery-item,
.featured-card {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.provider-button:hover,
.ghost-button:hover,
.auth-submit:hover,
.side-icon:hover,
.side-thumb:hover,
.gallery-item:hover,
.featured-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.provider-button:focus-visible,
.auth-tab:focus-visible,
.auth-submit:focus-visible,
.ghost-button:focus-visible,
.side-icon:focus-visible,
.side-thumb:focus-visible,
.gallery-item:focus-visible,
.featured-card:focus-visible,
.login-form input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.login-form input::placeholder {
  color: rgba(24, 57, 47, 0.4);
}

@media (max-width: 1100px) {
  .site-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .sidebar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-shell {
    padding: 12px;
  }

  .content-area,
  .brand-panel {
    border-radius: 24px;
  }

  .topbar,
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .sidebar-grid,
  .featured-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-item.is-wide,
  .gallery-item.is-large,
  .featured-card.is-large {
    grid-column: span 2;
  }

  .gallery-item.is-tall {
    grid-row: span 1;
    aspect-ratio: 1 / 1;
  }
}
