:root {
  --bg: #f6f7f9; --card: #fff; --text: #1d2330; --muted: #6b7280;
  --line: #e3e6eb; --accent: #0e8f6f; --accent-weak: #e3f5ef; --ok: #0e8f6f; --over: #d9534f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c; --card: #1d2128; --text: #e7e9ee; --muted: #9aa3b2;
    --line: #2e343e; --accent: #3fcf9f; --accent-weak: #183a30; --ok: #3fcf9f; --over: #ff7b7b;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  padding: 0 16px 64px;
}
a { color: var(--accent); }
header.top {
  max-width: 760px; margin: 0 auto 24px; padding: 14px 0;
  display: flex; gap: 16px; align-items: center; border-bottom: 1px solid var(--line);
}
header.top .logo { font-weight: 700; color: var(--text); text-decoration: none; margin-right: auto; }
header.top nav a { color: var(--muted); text-decoration: none; font-size: 14px; margin-left: 14px; }
main { max-width: 760px; margin: 0 auto; }
h1 { font-size: 26px; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; margin-bottom: 16px;
}
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
textarea, select, input {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; outline: none;
}
textarea { min-height: 260px; padding: 14px; resize: vertical; line-height: 1.7; }
select, input { padding: 9px 10px; }
textarea:focus, select:focus, input:focus { border-color: var(--accent); }
button {
  font: inherit; font-size: 14px; font-weight: 600; border: 0; border-radius: 9px; cursor: pointer;
  padding: 8px 12px; background: var(--accent-weak); color: var(--accent); white-space: nowrap;
}
button.done { color: var(--ok); }
.tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tools .right { margin-left: auto; }

.limit { display: grid; grid-template-columns: 1fr 120px; gap: 8px; margin-bottom: 12px; }
.bar { height: 8px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.bar.over i { background: var(--over); }
.status { display: flex; justify-content: space-between; font-size: 14px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.status b.over { color: var(--over); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat.main { background: var(--accent-weak); }
.stat.main .v { color: var(--accent); }

table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 6px; border-top: 1px solid var(--line); text-align: left; }
th { font-size: 13px; color: var(--muted); background: var(--bg); }
td.n { text-align: right; }
.empty { color: var(--muted); font-size: 14px; }
.note { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

.guide h2 { font-size: 19px; margin: 0 0 10px; }
.guide h3 { font-size: 16px; margin: 22px 0 6px; }
.guide p, .guide li { margin: 0 0 8px; }
.guide ul { padding-left: 20px; }
.guide table { margin: 8px 0 12px; }
.faq dt { font-weight: 700; margin-top: 14px; }
.faq dd { margin: 4px 0 0; }

.ad { margin: 0 0 16px; min-height: 100px; overflow: hidden; }
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }

footer { max-width: 760px; margin: 24px auto 0; text-align: center; color: var(--muted); font-size: 13px; }
footer a { color: var(--muted); }
.doc { line-height: 1.75; }
.doc h2 { font-size: 17px; margin-top: 28px; }
