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

:root {
  color-scheme: light;
  --bg: #f4f4f4;
  --surface: #fff;
  --ink: #111;
  --muted: #595959;
  --line: #e1e1e1;
  --soft: #efefef;
  --success: #15803d;
  --warning: #b45309;
  --danger: #b91c1c;
  --info: #1d4ed8;
  --platform: #1e1b4b;
  --radius: 16px;
  font: 16px/1.55 Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: progress; opacity: .6; }
:focus-visible { outline: 3px solid var(--info); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.65rem); line-height: 1.2; letter-spacing: -.045em; }
h2 { font-size: 1.2rem; line-height: 1.35; }
h3 { font-size: 1rem; }
small, .small { font-size: .83rem; }
.muted { color: var(--muted); }
.num, td { font-variant-numeric: tabular-nums; }
.skip { position: fixed; z-index: 10; top: .6rem; left: .6rem; transform: translateY(-150%); padding: .55rem; background: white; }
.skip:focus { transform: none; }
.top { min-height: 66px; padding: .7rem max(1rem, calc((100vw - 1360px) / 2)); background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.top nav, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.wordmark { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; letter-spacing: -.04em; font-size: 1.24rem; font-weight: 700; }
.mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--ink); color: #fff; border-radius: 10px; font-size: .8rem; letter-spacing: -.06em; }
.btn { border: 1px solid transparent; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem .85rem; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.flat { color: var(--ink); background: transparent; }
.btn.danger { background: var(--danger); }
.btn:hover:not(:disabled) { filter: brightness(.93); }
.workspace { padding: clamp(1rem, 3vw, 2.4rem); min-width: 0; max-width: 1300px; margin-inline: auto; }
.flow { display: grid; gap: 1rem; }
.landing { padding-block: clamp(2rem, 7vw, 5.5rem); max-width: 1180px; }
.hero { border-radius: 24px; color: #fff; background: #161616; padding: clamp(1.5rem, 6vw, 4rem); display: grid; gap: .9rem; overflow: hidden; }
.hero h1 { font-size: clamp(2rem, 6vw, 4rem); }
.hero p { color: #e2e2e2; max-width: 38rem; }
.hero .eyebrow { color: #e2e2e2; font-weight: 600; }
.panel { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); padding: 1.15rem; min-width: 0; }
.panel + .panel { margin-top: 0; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.entry { text-decoration: none; display: grid; gap: .35rem; }
.entry:hover { border-color: var(--ink); }
.entry-mark { color: var(--ink); background: var(--soft); width: fit-content; border-radius: 9px; padding: .25rem .6rem; font-size: .82rem; font-weight: 700; }
.auth { max-width: 480px; padding-block: 3rem; }
form { display: grid; gap: .75rem; }
label { display: grid; gap: .25rem; color: var(--ink); font-weight: 600; font-size: .9rem; }
input, select, textarea { border: 1px solid #c9c9c9; border-radius: 9px; padding: .52rem .65rem; min-height: 44px; min-width: 0; width: 100%; background: #fff; color: var(--ink); }
textarea { min-height: 100px; resize: vertical; }
fieldset { display: grid; gap: .55rem; padding: .75rem; border: 1px solid var(--line); border-radius: 9px; }
label:has(input[type=checkbox]) { display: flex; align-items: center; gap: .5rem; }
input[type=checkbox] { min-height: auto; width: 1.1rem; height: 1.1rem; }
.app-layout { max-width: 1420px; margin-inline: auto; display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: calc(100vh - 67px); }
.app-layout > .workspace { width: 100%; }
.sidebar { padding: 1.2rem .8rem; border-right: 1px solid var(--line); background: var(--surface); }
.sidebar strong { display: block; margin: .5rem .65rem .7rem; }
.sidebar nav, .mobile-tabs { display: grid; gap: .2rem; }
.sidebar a, .mobile-tabs a { display: block; border-radius: 8px; padding: .55rem .65rem; text-decoration: none; font-weight: 500; }
.sidebar a[aria-current=page], .mobile-tabs a[aria-current=page] { color: var(--ink); background: var(--soft); font-weight: 700; }
.sidebar a:hover, .mobile-tabs a:hover { background: var(--soft); }
.platform-bar { min-height: 40px; display: grid; align-items: center; padding-inline: 1rem; background: var(--platform); color: #fff; font-size: .88rem; font-weight: 700; }
.mobile-app { max-width: 550px; margin-inline: auto; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.mobile-app .workspace { padding-inline: 1rem; }
.mobile-tabs { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; z-index: 2; width: min(100%, 550px); bottom: 0; padding: .5rem .35rem calc(.5rem + env(safe-area-inset-bottom)); background: white; border: 1px solid var(--line); border-radius: 13px 13px 0 0; text-align: center; }
.mobile-tabs a { padding-inline: .2rem; font-size: .82rem; }
.staff .btn { min-height: 56px; }
.member-card { background: #111; color: #fff; border-radius: 18px; padding: 1.45rem; overflow: hidden; position: relative; }
.member-card::after { content: ""; border: 1px solid #ffffff36; border-radius: 50%; position: absolute; width: 210px; height: 210px; top: -115px; right: -36px; pointer-events: none; }
.member-card h2 { font-size: 2.45rem; }
.member-card .btn { justify-self: start; }
.panel .metric { font-size: 1.6rem; font-weight: 700; display: block; }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.row a { text-underline-offset: 3px; }
.status { border-left: 4px solid var(--info); border-radius: 8px; padding: .65rem .8rem; background: #eff6ff; }
.status:empty { display: none; }
.status.error { border-color: var(--danger); background: #fef2f2; }
.status.success { border-color: var(--success); background: #f0fdf4; }
.status.warning { border-color: var(--warning); background: #fffbeb; }
.staff .status.error, .staff .status.success { font-size: 1.2rem; font-weight: 700; padding: 1.1rem; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .65rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .85rem; color: var(--muted); }
td { overflow-wrap: anywhere; }
details summary { cursor: pointer; }
details article { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .8rem; font-size: .9rem; }
.ticket { padding: 1rem; border: 1px dashed #9a9a9a; border-radius: 13px; background: var(--surface); }
code { font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .top { flex-wrap: wrap; gap: .3rem; }
  .app-layout { display: block; }
  .sidebar { padding: .5rem .75rem; border-bottom: 1px solid var(--line); }
  .sidebar strong { margin: .2rem; }
  .sidebar nav { display: flex; overflow-x: auto; }
  .sidebar a { white-space: nowrap; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
dialog.panel { width: min(92vw, 460px); color: var(--ink); }
dialog.panel::backdrop { background: #0008; }
.qr { display: block; width: min(100%, 240px); aspect-ratio: 1; margin-inline: auto; }
video { width: 100%; border-radius: 12px; background: #111; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
