:root {
  color-scheme: light;
  --ink: #222c23;
  --muted: #55645a;
  --paper: #f8f8f2;
  --line: #dce2d6;
  --accent: #397544;
  --panel: #fff;
  font-family: system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none!important;
}

body {
  margin: 0;
}

button,input {
  font: inherit;
}

button,a,label {
  touch-action: manipulation;
}

a {
  color: var(--accent);
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.top {
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 max(24px,calc((100vw - 960px)/2));
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.brand {
  font-weight: 800;
  letter-spacing: -.04em;
  text-decoration: none;
  font-size: 21px;
  color: var(--ink);
}

.brand span {
  font-weight: 450;
  color: var(--muted);
}

#sign-in {
  font-size: 14px;
  text-underline-offset: 4px;
}

main {
  max-width: 1008px;
  padding: 0 24px 64px;
  margin: auto;
}

.intro {
  padding: clamp(48px,9vw,96px) 0 38px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: .17em;
  font-weight: 750;
}

.intro h1 {
  margin: 14px 0;
  font-size: clamp(40px,8vw,76px);
  line-height: 1.1;
  letter-spacing: -.055em;
}

.intro h1 span {
  color: var(--accent);
}

.intro>p:last-child,.count,.upload p {
  margin: 0;
  color: var(--muted);
}

.toolbar,.upload,.preview-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

h2 {
  margin: 0;
  font-size: 20px;
}

.count {
  font-size: 13px;
  margin-top: 4px;
}

.toolbar {
  margin: 0 0 16px;
}

.toolbar input {
  width: min(48%,260px);
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

.upload {
  flex-wrap: wrap;
  background: #eaf1e7;
  padding: 18px;
  margin: 0 0 24px;
  border-radius: 10px;
}

.upload p {
  font-size: 14px;
  margin-top: 6px;
}

.button,.subtle {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 13px;
  background: var(--panel);
  color: var(--ink);
  white-space: nowrap;
}

.button {
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.upload:focus-within .button {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

progress {
  width: 100%;
  accent-color: var(--accent);
}

#notice {
  overflow-wrap: anywhere;
  color: var(--accent);
  margin: 0 0 24px;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 48px 12px;
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.files {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.file {
  display: grid;
  justify-items: start;
  gap: 10px;
  height: 100%;
  min-height: 126px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  padding: 16px;
}

.file:hover {
  border-color: var(--accent);
}

.file strong {
  overflow-wrap: anywhere;
}

.kind {
  background: #eaf1e7;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  padding: 4px 8px;
  border-radius: 5px;
}

.detail {
  font-size: 12px;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
}

dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  width: min(1000px,94vw);
  max-height: 94dvh;
  padding: 0;
  background: var(--panel);
  color: var(--ink);
}

dialog::backdrop {
  background: #0c190fc4;
}

.preview-bar {
  padding: 12px 16px;
}

.preview-bar h2 {
  font-size: 16px;
  overflow-wrap: anywhere;
}

iframe {
  display: block;
  width: 100%;
  height: min(78dvh,760px);
  border: 0;
  background: #eaf1e7;
}
