:root {
  color-scheme: dark;
  --bg: #080d1a;
  --surface: #11192b;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f7f8fc;
  --muted: #aeb7c9;
  --orange: #ff861a;
  --orange-soft: rgba(255, 134, 26, 0.13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at 14% 4%, rgba(255, 134, 26, 0.12), transparent 32rem),
    radial-gradient(circle at 88% 12%, rgba(65, 93, 170, 0.18), transparent 34rem),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.guide-header,
main,
footer {
  width: min(1040px, calc(100% - 36px));
  margin-inline: auto;
}
.guide-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 26, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img { border-radius: 12px; }
.brand span { display: grid; gap: 3px; }
.brand strong { font-size: 17px; letter-spacing: 0.03em; }
.brand small { color: var(--muted); font-size: 12px; }
.login-link {
  padding: 10px 16px;
  border: 1px solid rgba(255, 134, 26, 0.42);
  border-radius: 999px;
  color: #ffc183;
  font-weight: 800;
}
main { padding: 62px 0 42px; }
.intro { max-width: 780px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 10px; color: var(--orange); font-size: 12px; font-weight: 900; letter-spacing: 0.16em; }
h1 { margin: 0 0 14px; font-size: clamp(34px, 5vw, 54px); letter-spacing: -0.04em; }
.intro > p:last-child { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.guide-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}
.guide-toolbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 18px 15px 22px;
  border-bottom: 1px solid var(--line);
}
.guide-toolbar > div { display: grid; gap: 4px; }
.guide-toolbar strong { font-size: 17px; }
.guide-toolbar span { color: var(--muted); font-size: 13px; }
.guide-toolbar button {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 0 15px;
  border: 1px solid rgba(255, 134, 26, 0.4);
  border-radius: 12px;
  color: #ffc183;
  background: var(--orange-soft);
  cursor: pointer;
  font-weight: 800;
}
.guide-viewport {
  overflow: auto;
  padding: 18px;
  background: #dfefff;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.guide-viewport img {
  width: 100%;
  height: auto;
  display: block;
  margin-inline: auto;
  border-radius: 14px;
  cursor: zoom-in;
}
.guide-viewport.is-zoomed img { width: 943px; max-width: none; cursor: zoom-out; }
.notice {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 18px;
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 134, 26, 0.28);
  border-radius: 16px;
  background: var(--orange-soft);
}
.notice strong { color: #ffc183; }
.notice p { margin: 0; color: #d5dbe7; line-height: 1.7; }
.actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 26px; }
.back-link,
.primary-action {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 900;
}
.back-link { padding: 0 18px; border: 1px solid var(--line); color: #dce2ee; }
.primary-action { gap: 26px; padding: 0 22px; color: #1b0d02; background: var(--orange); }
footer { min-height: 72px; display: flex; align-items: center; border-top: 1px solid var(--line); color: #7f899c; font-size: 13px; }
.mobile-action { display: none; }
a:focus-visible,
button:focus-visible,
.guide-viewport:focus-visible { outline: 3px solid rgba(255, 134, 26, 0.58); outline-offset: 3px; }

@media (max-width: 600px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .guide-header, main, footer { width: min(calc(100% - 22px), 520px); }
  .guide-header { min-height: 68px; }
  .brand img { width: 36px; height: 36px; }
  .brand strong { font-size: 15px; }
  .login-link { display: none; }
  main { padding: 34px 0 30px; }
  .intro { margin-bottom: 20px; }
  h1 { margin-bottom: 10px; font-size: 34px; }
  .intro > p:last-child { font-size: 14px; line-height: 1.7; }
  .guide-card { border-radius: 18px; }
  .guide-toolbar { min-height: 68px; padding: 12px 13px; }
  .guide-toolbar span { font-size: 12px; }
  .guide-toolbar button { min-height: 40px; padding: 0 12px; font-size: 13px; }
  .guide-viewport { padding: 7px; }
  .guide-viewport img { border-radius: 10px; }
  .notice { grid-template-columns: 1fr; gap: 7px; margin-top: 14px; padding: 15px; font-size: 13px; }
  .actions { display: none; }
  footer { min-height: 64px; }
  .mobile-action {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: block;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(8, 13, 26, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .mobile-action a {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border-radius: 14px;
    color: #1b0d02;
    background: var(--orange);
    font-weight: 900;
  }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
