:root { color-scheme: light; --background: #fafaf8; --surface: #fff; --ink: #171717; --muted: #6b6b6b; --line: #dedede; --soft: #f6f6f4; --success: #18794e; --success-soft: #e9f7ef; --success-line: #b9e2cb; --danger: #b42318; --button-text: #fff; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--background); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
main { width: min(100% - 32px, 620px); margin: 0 auto; padding: 40px 0; }
.brand { display: inline-block; margin-bottom: 32px; color: var(--ink); font-size: 20px; font-weight: 750; letter-spacing: -.03em; text-decoration: none; }
h1 { margin: 0 0 12px; overflow-wrap: anywhere; font-size: clamp(30px, 7vw, 44px); line-height: 1.08; letter-spacing: -.045em; }
p { margin: 0; }
.muted { color: var(--muted); }
.card { position: relative; margin-top: 32px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 12px 40px rgba(0,0,0,.04); }
.dropzone { display: grid; min-height: 260px; place-items: center; padding: 32px; border: 2px dashed #c8c8c4; border-radius: 14px; background: var(--soft); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.dragging { border-color: var(--ink); background: var(--surface); }
.dropzone.hidden { display: none; }
.dropzone.busy { cursor: wait; }
.dropzone > span { width: 100%; min-width: 0; }
.dropzone strong { display: block; margin-bottom: 6px; overflow-wrap: anywhere; font-size: 19px; }
#drop-hint { font-variant-numeric: tabular-nums; }
progress { display: none; width: min(100%, 360px); height: 8px; margin: 20px auto 0; overflow: hidden; border: 0; border-radius: 999px; background: var(--line); accent-color: var(--ink); }
progress.visible { display: block; }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--ink); transition: width .25s ease-out; }
progress::-moz-progress-bar { background: var(--ink); transition: width .25s ease-out; }
input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
button, .button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 0 20px; border: 1px solid var(--ink); border-radius: 9px; background: var(--ink); color: var(--button-text); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { opacity: .86; }
.secondary { border-color: var(--line); background: var(--surface); color: var(--ink); }
.danger { color: var(--danger); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.card > .actions:first-child { margin-top: 0; }
.actions > * { flex: 1 1 180px; }
.actions form button { width: 100%; }
.share-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; }
.action-separator { color: var(--muted); }
.upload-status { position: absolute; top: 0; left: 28px; display: flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--success-line); border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 13px; font-weight: 650; line-height: 1.3; transform: translateY(-50%); white-space: nowrap; }
.upload-status-mark { color: var(--success); }
.file { overflow-wrap: anywhere; font-size: 22px; font-weight: 750; }
.meta { margin-top: 7px; color: var(--muted); }
.result { display: none; }
.result.visible { display: block; }
.text-action { min-height: 0; margin: 16px 0 0; padding: 0; border: 0; background: transparent; color: var(--muted); font-weight: 400; text-decoration: underline; }
.upload-another, .upload-cancel { display: none; }
.upload-another.visible { display: block; }
.upload-cancel.visible { display: flex; margin-right: auto; margin-left: auto; }
.linkbox { display: flex; gap: 8px; margin-top: 22px; }
.linkbox input { min-width: 0; min-height: 46px; flex: 1; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); color: var(--ink); font: inherit; }
.error { color: var(--danger); }
.error:not(:empty) { margin-top: 16px; }
.login-action { margin-top: 32px; }
.account { margin-top: 20px; font-size: 14px; }
.account a { color: inherit; }
.terminal { margin: 32px 0 0; padding: 20px; overflow-x: auto; border: 1px solid #333; border-radius: 12px; background: #0c0c0c; color: #d9f7d6; font: 15px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
.terminal-line { display: block; visibility: hidden; animation: terminal-line-show 0s linear forwards; }
.terminal-line-1 { visibility: visible; margin-bottom: 12px; animation: none; }
.terminal-line-2 { animation-delay: .34s; }
.terminal-line-3 { animation-delay: .51s; }
.terminal-line-4 { animation-delay: .84s; }
.terminal-line-5 { margin-top: 12px; animation-delay: 1.32s; }
@keyframes terminal-line-show { to { visibility: visible; } }
dialog { position: fixed; inset: 120px auto auto 50%; width: min(calc(100% - 32px), 440px); max-height: calc(100vh - 152px); margin: 0; padding: 0; overflow-y: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 80px rgba(0,0,0,.3); transform: translateX(-50%); }
dialog::backdrop { background: rgba(0,0,0,.55); }
.dialog-content { padding: 24px; }
.dialog-title { margin: 0 0 8px; font-size: 24px; line-height: 1.2; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.delete-confirm { border-color: var(--danger); background: var(--danger); color: var(--button-text); }
@media (prefers-reduced-motion: reduce) {
  .terminal-line { visibility: visible; animation: none; }
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --background: #151514; --surface: #20201e; --ink: #f2f2ef; --muted: #aaa9a4; --line: #3b3b37; --soft: #292927; --success: #75d39e; --success-soft: #1c392a; --success-line: #315d44; --danger: #ff8a80; --button-text: #171717; }
  .dropzone { border-color: #55554f; }
  .card { box-shadow: 0 12px 40px rgba(0,0,0,.18); }
}
@media (max-width: 520px) {
  main { padding-top: 32px; }
  .brand { margin-bottom: 28px; }
  .card { padding: 20px; }
  .upload-status { left: 20px; }
  .linkbox { flex-direction: column; }
  .share-actions { grid-template-columns: 1fr; }
  .action-separator { text-align: center; }
  dialog { top: 150px; max-height: calc(100vh - 182px); }
}
@media (max-width: 390px) {
  .dialog-actions { flex-direction: column; }
  .dialog-actions button { width: 100%; }
}
