:root { --bg: #fbfaf6; --card: #fff; --text: #1f2a1f; --muted: #5d6b5d; --line: #e3e0d6; --accent: #2f6b3a; --soft: #eef6ef; --warn: #fff6e0; --warnline: #ecd9a4; --bad: #a3271b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #151a15; --card: #1d241d; --text: #e8ede6; --muted: #a3b0a1; --line: #2f382f; --accent: #7cc287; --soft: #1f2e22; --warn: #2e2814; --warnline: #5a4c22; --bad: #f08a7e; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, Segoe UI, sans-serif; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
.who { display: flex; gap: 8px; align-items: center; font-size: .88rem; min-width: 0; }
@media (max-width: 640px) { .brand { font-size: .95rem; } }
.who .ghost { white-space: nowrap; padding: 6px 10px; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
main { max-width: 820px; margin: 0 auto; padding: 18px 16px 60px; }
h1 { margin: .2em 0; font-size: 1.8rem; }
h2 { margin: .2em 0 .4em; font-size: 1.3rem; }
h3 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.lede { font-size: 1.05rem; }
a { color: var(--accent); }
.muted, .hint { color: var(--muted); }
.hint { font-size: .86rem; margin: 2px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; max-width: 560px; }
.note { background: var(--soft); border: 1px solid #b9dcc0; border-radius: 10px; padding: 9px 12px; font-size: .92rem; }
.note.never { background: var(--warn); border-color: var(--warnline); }
label { display: grid; gap: 4px; font-weight: 600; font-size: .94rem; margin: 10px 0; }
input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); width: 100%; max-width: 320px; }
button { font: inherit; cursor: pointer; }
.primary { background: #2f6b3a; color: #fff; border: 0; border-radius: 8px; padding: 10px 16px; font-weight: 600; }
.ghost { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 12px; text-decoration: none; font-size: .92rem; }
.ghost.sm { padding: 5px 10px; font-size: .86rem; white-space: nowrap; }
.link { background: none; border: 0; color: var(--accent); padding: 0; text-decoration: underline; font-size: .9rem; }
.link.del { color: var(--bad); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.err { color: var(--bad); font-size: .92rem; min-height: 1px; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; flex-wrap: wrap; font-size: .8rem; }
.steps li { border: 1px solid var(--line); border-radius: 20px; padding: 2px 10px; color: var(--muted); }
.steps li.done { background: var(--soft); color: var(--accent); border-color: #b9dcc0; }
.steps li.done::before { content: '✓ '; }
.steps li.now { border-color: var(--accent); color: var(--text); font-weight: 600; }
.choices { display: grid; gap: 10px; margin: 12px 0; }
.choice { display: grid; gap: 2px; text-align: left; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.choice:hover { border-color: var(--accent); }
.choice span { color: var(--muted); font-size: .88rem; }
.qr { background: #fff; padding: 8px; width: max-content; border-radius: 8px; }
.qr img, .qr canvas { display: block; }
.codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 24px; padding-left: 18px; font-size: 1.05rem; }
code { overflow-wrap: anywhere; }
.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 12px; }
.msg { background: var(--soft); border: 1px solid #b9dcc0; border-radius: 10px; padding: 8px 12px; font-size: .92rem; }
.msg.bad { background: var(--warn); border-color: var(--warnline); color: var(--text); }
.folder { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 12px 0; }
.folder.mine { border: 2px solid var(--accent); }
.folder.drop { outline: 3px dashed var(--accent); outline-offset: 2px; }
.fh { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.fh > div:first-child { min-width: 0; }
.fa { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; flex-shrink: 0; }
.badge { display: inline-block; background: var(--accent); color: #fff; border-radius: 10px; padding: 0 8px; font-size: .74rem; vertical-align: middle; }
.files { list-style: none; padding: 0; margin: 10px 0 0; border-top: 1px solid var(--line); }
.files li { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.files li:last-child { border-bottom: 0; }
.fn { overflow-wrap: anywhere; font-size: .95rem; }
.fx { white-space: nowrap; }
.empty { color: var(--muted); font-size: .9rem; margin: 8px 0 0; }
details { margin: 16px 0; }
summary { cursor: pointer; font-weight: 600; color: var(--muted); }
details .folder { opacity: .85; }
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text); width: min(440px, calc(100vw - 32px)); padding: 16px; }
dialog::backdrop { background: rgba(0, 0, 0, .35); }
dialog h3 { margin-bottom: 4px; }
.pick-list { display: grid; gap: 8px; margin: 10px 0; }
.pick-list button { text-align: left; }
.sugg { font-size: .74rem; font-weight: 400; opacity: .9; margin-left: 4px; }
@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  .top { padding: 8px 12px; }
  .who span { display: none; }
  .fh { flex-direction: column; }
  .fa { justify-content: flex-start; }
  .files li { grid-template-columns: 1fr auto; }
  .files li .hint { grid-column: 1; }
  .files li .fx { grid-column: 2; grid-row: 1 / 3; }
  .bar > button { flex: 1 1 auto; }
  .codes { grid-template-columns: 1fr 1fr; }
}
@media print { .top, .row, .steps { display: none; } }
