@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Manrope:wght@400;500;600;700&family=Noto+Sans+TC:wght@400;500;600;700&family=Noto+Serif+TC:wght@600;700&display=swap");

:root {
  color-scheme: dark;
  --ink: #f7f3ea;
  --muted: #9daac1;
  --navy: #020611;
  --navy-2: #071326;
  --sapphire: #2e75d3;
  --sapphire-bright: #6ba6ff;
  --cyan: #78c6df;
  --violet: #7356aa;
  --gold: #d6b15a;
  --gold-bright: #f1d68f;
  --pink: #d94b77;
  --glass: rgba(5, 14, 31, 0.86);
  --line: rgba(119, 159, 211, 0.28);
  --line-gold: rgba(214, 177, 90, 0.38);
  --font-display: "Cormorant Garamond", "Noto Serif TC", Georgia, serif;
  --font-ui: "Manrope", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-raised: 0 14px 36px rgba(0, 0, 0, 0.42);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: var(--font-ui);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: #00040d;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 2%, rgba(35, 89, 164, 0.28), transparent 28rem),
    radial-gradient(circle at 92% 12%, rgba(203, 156, 65, 0.09), transparent 24rem),
    linear-gradient(180deg, #040814 0%, #01050d 62%, #030916 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input { font: inherit; }
button { color: inherit; }

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.site-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(78px + var(--safe-bottom));
  overflow: hidden;
  background: rgba(1, 6, 15, 0.58);
  box-shadow: 0 0 72px rgba(14, 54, 113, 0.18);
}

.language-control {
  position: fixed;
  z-index: 70;
  left: calc(50% + min(340px, 44vw));
  bottom: calc(18px + var(--safe-bottom));
  transform: translateX(-100%);
}

.language-button {
  width: 48px;
  height: 48px;
  padding: 8px;
  border: 1px solid rgba(214, 177, 90, 0.72);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(18, 47, 87, 0.98), rgba(5, 12, 27, 0.98));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 0 4px rgba(214, 177, 90, .06), inset 0 1px rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.language-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.language-menu {
  position: absolute;
  right: 0;
  bottom: 55px;
  width: 168px;
  padding: 7px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 4px;
  background: rgba(5, 13, 29, 0.97);
  box-shadow: var(--shadow-raised);
  backdrop-filter: blur(18px);
}

.language-menu[hidden] { display: none; }

.language-option {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.language-option:hover,
.language-option:focus-visible,
.language-option[aria-checked="true"] {
  color: var(--gold-bright);
  background: rgba(214, 177, 90, 0.11);
}

.dialog {
  width: min(88vw, 380px);
  padding: 0;
  border: 1px solid var(--line-gold);
  border-radius: 22px;
  color: var(--ink);
  background: linear-gradient(155deg, rgba(12, 31, 60, 0.99), rgba(3, 8, 20, 0.99));
  box-shadow: 0 28px 84px rgba(0, 0, 0, 0.74), 0 0 0 1px rgba(255,255,255,.025);
}

.dialog::backdrop {
  background: rgba(0, 2, 9, 0.76);
  backdrop-filter: blur(8px);
}

.dialog-inner { padding: 24px; }
.dialog h2 { margin: 0 34px 10px 0; font-family: var(--font-display); font-size: 28px; line-height: 1.05; }
.dialog p { margin: 0; color: #c9d4ed; line-height: 1.6; }
.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  cursor: pointer;
}

.dialog-action {
  width: 100%;
  margin-top: 20px;
  padding: 12px 16px;
  border: 1px solid rgba(214, 177, 90, 0.64);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #1d5796, #153666);
  box-shadow: 0 10px 28px rgba(8, 30, 69, 0.42), inset 0 1px rgba(255,255,255,.1);
  cursor: pointer;
}

.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: calc(76px + var(--safe-bottom));
  max-width: calc(100vw - 32px);
  padding: 11px 16px;
  border: 1px solid var(--line-gold);
  border-radius: 999px;
  opacity: 0;
  color: #effcff;
  background: rgba(5, 17, 36, 0.96);
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  transform: translate(-50%, 14px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.placeholder-page {
  position: relative;
  min-height: 100vh;
  padding: 92px 22px 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.section-brand {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}
.section-brand-seal {
  width: 48px;
  height: 48px;
  padding: 3px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-gold);
  border-radius: 50%;
  background: rgba(8, 19, 39, .82);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.section-brand-seal img { width: 100%; height: 100%; object-fit: contain; }
.section-brand strong { display: block; color: var(--gold-bright); font-family: var(--font-display); font-size: 24px; line-height: .9; }
.section-brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.placeholder-panel {
  width: min(100%, 440px);
  padding: 34px 24px;
  border: 1px solid var(--line-gold);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(13,34,66,.88), rgba(4,10,23,.94));
  box-shadow: var(--shadow-raised), inset 0 1px rgba(255,255,255,.07);
}
.placeholder-panel h1 { margin: 0 0 12px; color: var(--gold-bright); font-family: var(--font-display); font-size: 34px; line-height: 1; }
.placeholder-panel p { margin: 0; color: var(--muted); line-height: 1.65; }

@media (min-width: 761px) {
  .site-shell { border-inline: 1px solid rgba(80, 144, 220, .12); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
