:root {
  color-scheme: light;
  --ink: #17231d;
  --muted: #68736d;
  --line: #dce3de;
  --paper: #f4f7f4;
  --card: #ffffff;
  --accent: #087cf0;
  --accent-2: #e4f1ff;
  --brand-orange: #ff8200;
  --danger: #a23b32;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
.shell { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 80px; }
.topbar { height: 84px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; overflow: hidden; border-radius: 10px; background: var(--accent-2); }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.account { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.account img { width: 30px; height: 30px; border-radius: 50%; }
.account form { margin: 0; }
.account a { text-decoration: none; }
.admin-menu { position: relative; }
.admin-menu summary { list-style: none; user-select: none; }
.admin-menu summary::-webkit-details-marker { display: none; }
.admin-menu nav { position: absolute; z-index: 20; top: calc(100% + 9px); right: 0; min-width: 140px; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 0 14px 34px rgba(23,35,29,.12); }
.admin-menu nav a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); white-space: nowrap; }
.admin-menu nav a:hover, .admin-menu nav a[aria-current="page"] { background: var(--accent-2); }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 72px 0 40px; }
.hero-guest { min-height: calc(100vh - 85px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; max-width: 760px; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; max-width: 820px; font-family: Georgia, "Noto Serif TC", serif; font-size: clamp(44px, 7vw, 82px); font-weight: 500; line-height: .98; letter-spacing: -.05em; }
.hero:not(.hero-guest) h1 { font-size: clamp(42px, 6vw, 68px); }
.lede { max-width: 640px; margin: 24px 0 30px; color: var(--muted); font-size: 18px; line-height: 1.7; }
.quota-card { min-width: 180px; padding: 20px; background: var(--accent-2); border-radius: 18px; }
.quota-card span, .quota-card small { display: block; color: var(--muted); font-size: 12px; }
.quota-card strong { display: block; margin: 10px 0 3px; font: 600 28px Georgia, serif; }
.primary-button, .secondary-button { display: inline-flex; min-height: 48px; padding: 0 20px; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 12px; cursor: pointer; text-decoration: none; font-weight: 750; }
.primary-button { color: #fff; background: var(--accent); }
.primary-button:hover { background: #006bd7; }
.secondary-button { min-height: 38px; border: 1px solid var(--line); color: var(--ink); background: #fff; }
.google-button .google-icon { display: grid; place-items: center; width: 28px; height: 28px; padding: 2px; background: #fff; border-radius: 50%; }
.google-button .google-icon img { display: block; width: 24px; height: 24px; }
.download-form { padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 50px rgba(30,55,42,.06); }
.download-form label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 750; }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.input-row input { min-width: 0; padding: 0 16px; border: 1px solid #bdc8c0; border-radius: 12px; background: #fbfcfb; outline: none; }
.input-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(21,95,61,.1); }
.form-help { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.history { margin-top: 58px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 18px; }
h2 { margin: 0; font: 500 30px Georgia, serif; }
.link-button { padding: 4px; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.job-list { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.job { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px; }
.job + .job { border-top: 1px solid var(--line); }
.platform-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #eef2ef; font-weight: 800; }
.job-main { min-width: 0; }
.job-title { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.job-main a { display: block; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.job-main small { display: block; margin-top: 5px; color: var(--muted); }
.status { padding: 3px 8px; border-radius: 999px; background: #edf0ee; color: var(--muted); font-size: 11px; }
.status-completed { color: var(--accent); background: var(--accent-2); }
.status-failed { color: var(--danger); background: #f8e8e6; }
.status-running { color: #7a5511; background: #f7edcf; }
.job-error { margin: 7px 0 0; color: var(--danger); font-size: 12px; }
.notice { margin: 0 0 18px; padding: 14px 16px; border-radius: 12px; background: #eef1ef; }
.notice.success { color: var(--accent); background: var(--accent-2); }
.notice.error, .notice.warning { color: var(--danger); background: #f8e8e6; }
.empty { padding: 40px; border: 1px dashed #bdc8c0; border-radius: 16px; color: var(--muted); text-align: center; }
.admin-hero { padding-bottom: 28px; }
.admin-hero h1 { font-size: clamp(42px, 6vw, 68px); }
.muted-line { color: var(--muted); font-size: 13px; }
.plan-form { display: flex; gap: 8px; }
.plan-form select { padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pagination a { min-width: 38px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--card); text-align: center; text-decoration: none; }
.pagination a[aria-current="page"] { border-color: var(--accent); color: #fff; background: var(--accent); }
.landing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 28px; }
.landing-grid article { min-height: 210px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.landing-grid h2 { margin-bottom: 18px; }
.landing-grid p:last-child, .maintenance-card p { color: var(--muted); line-height: 1.65; }
.landing-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 28px 0; padding: 36px; border-radius: 22px; color: #fff; background: linear-gradient(120deg, #087cf0, #0a64c7 68%, #ff8200 160%); }
.landing-cta .eyebrow { color: #fff; opacity: .8; }
.site-footer { padding: 34px 0; color: var(--muted); font-size: 12px; text-align: center; }
.maintenance-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 26px; padding: 24px; border: 1px solid #efd6d2; border-radius: 18px; background: #fffafa; }
.maintenance-card h2 { margin-bottom: 10px; }
.maintenance-card p { max-width: 720px; margin: 0 0 8px; }
.maintenance-card small { color: var(--muted); }
.danger-button { min-height: 42px; padding: 0 18px; border: 0; border-radius: 11px; color: #fff; background: var(--danger); cursor: pointer; font-weight: 750; white-space: nowrap; }

@media (max-width: 700px) {
  .shell { width: min(100% - 24px, 1040px); }
  .topbar { height: 70px; }
  .account > span { display: none; }
  .hero { align-items: stretch; flex-direction: column; padding-top: 48px; }
  .hero-guest { min-height: calc(100vh - 72px); }
  .quota-card { width: 100%; }
  .input-row { grid-template-columns: 1fr; }
  .input-row input { height: 52px; }
  .job { grid-template-columns: 42px minmax(0, 1fr); }
  .job-action { grid-column: 2; }
  .landing-grid { grid-template-columns: 1fr; }
  .landing-cta, .maintenance-card { align-items: stretch; flex-direction: column; }
}
