:root {
  color-scheme: light;
  --brand-50: #e9f7f2;
  --brand-100: #d0eee3;
  --brand-500: #16846f;
  --brand-600: #0d705e;
  --brand-700: #075747;
  --ink-950: #14251f;
  --ink-700: #45564e;
  --ink-500: #75867d;
  --ink-200: #e8eeea;
  --ink-100: #f2f5f2;
  --white: #fff;
  --danger-50: #fff0ee;
  --danger-600: #b33d32;
  --shadow: 0 18px 50px rgba(22, 64, 49, .08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ink-100);
  color: var(--ink-950);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
[hidden] { display: none !important; }
.topbar, .main { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 17px; font-weight: 800; letter-spacing: -.04em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-500); color: var(--white); font-size: 20px; font-weight: 500; }
.topnav { display: flex; align-items: center; gap: 24px; }
.topnav a { color: var(--ink-700); font-size: 13px; font-weight: 600; text-decoration: none; }
.topnav a:hover { color: var(--brand-600); }
.account { position: relative; color: var(--ink-700); font-size: 13px; font-weight: 700; }
.account summary { cursor: pointer; }
.account-menu { position: absolute; z-index: 2; top: 30px; right: 0; display: grid; gap: 8px; width: min(340px, calc(100vw - 32px)); padding: 14px; border-radius: 12px; background: var(--white); box-shadow: var(--shadow); }
.token-result { display: flex; align-items: center; gap: 6px; min-width: 0; }
.token-result code { overflow: auto; padding: 8px; background: var(--ink-100); font-size: 10px; }
.auth-view { width: min(430px, calc(100% - 32px)); margin: 70px auto; padding: 32px; }
.auth-view h1 { margin-bottom: 8px; font-size: 36px; }
.auth-description { color: var(--ink-700); font-size: 13px; }
.auth-switch { display: flex; gap: 20px; margin: 26px 0 22px; }
.auth-switch button { padding: 8px 0; border: 0; background: none; color: var(--ink-500); font-weight: 800; }
.auth-switch button.active { color: var(--brand-600); box-shadow: 0 3px 0 var(--brand-500); }
.auth-form { display: grid; gap: 18px; }
.auth-form .button { margin-top: 6px; }
.auth-notice { margin: 16px 0 0; color: var(--danger-600); font-size: 13px; }
.main { padding: 38px 0 90px; }
.intro { margin: 0 0 36px; }
.eyebrow { margin: 0 0 12px; color: var(--brand-600); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(34px, 5vw, 55px); line-height: 1.12; letter-spacing: -.065em; }
.intro > p:last-child { margin-bottom: 0; color: var(--ink-700); font-size: 15px; }
.surface { background: var(--white); border-radius: 20px; box-shadow: var(--shadow); }
.publish { padding: 30px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading > div { display: flex; align-items: center; gap: 12px; }
.section-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.035em; }
.step { color: var(--brand-500); font-size: 13px; font-weight: 800; }
.section-note { color: var(--ink-500); font-size: 12px; }
.publish-form { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(220px, 1.2fr) auto; align-items: end; gap: 16px; margin-top: 27px; }
.visibility-option { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; color: var(--ink-700); font-size: 12px; cursor: pointer; }
.visibility-option input { accent-color: var(--brand-500); }
.visibility-hint { grid-column: 1 / -1; margin: -8px 0 0; color: var(--ink-500); font-size: 11px; }
.field { display: grid; gap: 9px; font-size: 13px; font-weight: 700; }
.field input, .domain-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  background: var(--ink-100);
  color: var(--ink-950);
  outline: none;
}
.field input::placeholder, .domain-form input::placeholder { color: var(--ink-500); }
.field input:focus, .domain-form input:focus, .file-field:focus-within { box-shadow: 0 0 0 3px var(--brand-100); }
.file-field {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 11px;
  min-height: 52px;
  padding: 8px 14px;
  border-radius: 11px;
  background: var(--brand-50);
  cursor: pointer;
}
.file-field input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; background: var(--brand-100); color: var(--brand-700); font-size: 20px; }
.file-title { overflow: hidden; color: var(--brand-700); font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.file-hint { color: var(--ink-500); font-size: 11px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px; font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.button:focus-visible, .topnav a:focus-visible, .project-url:focus-visible, summary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-100); }
.button-primary { min-height: 52px; padding: 0 23px; background: var(--brand-500); color: var(--white); }
.button-primary:hover { background: var(--brand-600); }
.button-soft { background: var(--brand-50); color: var(--brand-700); }
.button-soft:hover { background: var(--brand-100); }
.button-quiet { background: transparent; color: var(--ink-700); }
.button-quiet:hover { background: var(--ink-200); }
.button-danger { background: var(--danger-50); color: var(--danger-600); }
.button-danger:hover { background: #ffe1dc; }
.button-small { min-height: 34px; padding: 0 11px; font-size: 12px; }
.notice { margin: 20px 0 0; padding: 16px 20px; border-radius: 13px; background: var(--brand-50); color: var(--brand-700); font-size: 13px; font-weight: 650; }
.notice.error { background: var(--danger-50); color: var(--danger-600); }
.notice a { font-weight: 800; }
.project-section { margin-top: 58px; }
.list-heading { margin-bottom: 20px; }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 4px; padding: 0 6px; border-radius: 7px; background: var(--brand-100); color: var(--brand-700); font-size: 12px; vertical-align: middle; }
.projects { display: grid; gap: 30px; }
.project-cards { display: grid; gap: 12px; }
.group-title { margin: 0 0 12px; color: var(--ink-700); font-size: 13px; }
.group-title span { color: var(--ink-500); font-weight: 600; }
.empty { padding: 38px; border-radius: 16px; background: var(--white); color: var(--ink-500); text-align: center; }
.project { padding: 21px 24px; background: var(--white); border-radius: 15px; box-shadow: 0 8px 26px rgba(22, 64, 49, .045); }
.project-main { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.project-info { min-width: 0; }
.project-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 5px; font-size: 16px; letter-spacing: -.025em; }
.project-id { color: var(--ink-500); font-size: 11px; font-weight: 600; letter-spacing: 0; }
.visibility-badge { padding: 3px 7px; border-radius: 5px; background: var(--ink-100); color: var(--ink-700); font-size: 10px; letter-spacing: 0; }
.project-url { color: var(--brand-600); font-size: 13px; font-weight: 650; overflow-wrap: anywhere; text-decoration: none; }
.project-url:hover { text-decoration: underline; }
.project-meta { margin: 9px 0 0; color: var(--ink-500); font-size: 11px; }
.project-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.upload-action { position: relative; overflow: hidden; cursor: pointer; }
.upload-action input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-action:focus-within { box-shadow: 0 0 0 3px var(--brand-100); }
.domain-details { margin-top: 16px; padding-top: 14px; }
.domain-details summary { width: fit-content; color: var(--ink-700); font-size: 12px; font-weight: 700; cursor: pointer; }
.domain-content { margin-top: 17px; }
.domain-list { display: grid; gap: 9px; margin-bottom: 14px; }
.domain-item { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12px; }
.domain-item a { color: var(--brand-700); font-weight: 700; text-decoration: none; }
.domain-item small { color: var(--ink-500); }
.status { padding: 3px 8px; border-radius: 6px; background: var(--brand-100); color: var(--brand-700); font-size: 11px; font-weight: 800; }
.status.failed { background: var(--danger-50); color: var(--danger-600); }
.status.pending, .status.removing { background: #fff4df; color: #8d6216; }
.domain-form { display: flex; gap: 9px; }
.domain-form input { min-height: 40px; flex: 1; font-size: 12px; }
.domain-hint { margin: 10px 0 0; color: var(--ink-500); font-size: 11px; }
@media (max-width: 760px) {
  .topbar, .main { width: min(100% - 32px, 1120px); }
  .topbar { padding: 20px 0; }
  .main { padding-top: 30px; }
  .topnav { gap: 13px; }
  .topnav a { font-size: 11px; }
  .auth-view { margin-top: 35px; padding: 24px; }
  .publish { padding: 22px; }
  .publish-form { grid-template-columns: 1fr; }
  .section-note { display: none; }
  .project-main { align-items: flex-start; flex-direction: column; }
  .project-actions { width: 100%; }
  .domain-form { flex-direction: column; }
}
