:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; min-height: 100%;
  background: #14100c;
  color: #e7ddcf;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  -webkit-tap-highlight-color: transparent;
}
a { color: #e0a95a; }
b { color: #f2e9dc; }

#app { max-width: 720px; margin: 0 auto; padding: 0 14px 40px; }

.topbar {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 20px 2px 10px;
}
.brand { font-weight: 700; font-size: 20px; color: #f2e0be; letter-spacing: 0.01em; }
.brand-sub { font-size: 12px; color: #9a8468; }

.screen.hidden { display: none; }

.intro-card, .progress-card, .summary-card {
  background: linear-gradient(180deg, rgba(224,169,90,0.07), rgba(20,16,12,0.4));
  border: 1px solid rgba(224,169,90,0.16);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 16px;
}
.intro-card p { font-size: 14px; line-height: 1.65; color: #d8cbb5; margin: 0 0 12px; }
.intro-card p.fine { font-size: 12px; color: #9a8468; }

.lbl {
  display: block; font-size: 11px; color: #9a8468;
  text-transform: uppercase; letter-spacing: 0.06em; margin: 14px 0 6px;
}
.row { display: flex; gap: 8px; }
input[type="text"] {
  flex: 1; font-family: inherit; font-size: 14px;
  padding: 10px 11px; border: 1px solid rgba(224,169,90,0.25);
  border-radius: 8px; background: #1b1611; color: #f2e9dc;
}
input[type="text"]:focus { outline: 2px solid #e0a95a; outline-offset: 1px; }
button {
  font-family: inherit; font-size: 14px; padding: 10px 16px;
  border: 1px solid #e0a95a; background: #e0a95a; color: #241a0c;
  border-radius: 8px; cursor: pointer; font-weight: 700;
}
button:hover:not(:disabled) { filter: brightness(1.08); }
button:disabled { opacity: 0.45; cursor: default; }
button.ghost {
  background: transparent; color: #e7ddcf; border-color: rgba(224,169,90,0.3);
  font-weight: 400;
}
button.ghost:hover:not(:disabled) { border-color: #e0a95a; }
button.small { padding: 6px 10px; font-size: 12px; }

.msg { min-height: 16px; font-size: 12px; margin: 10px 0 0; color: #9a8468; }
.msg.err { color: #e08a5a; }

.progress-card .status { font-size: 14px; color: #f2e9dc; margin-bottom: 10px; }
.progress-card .substat { font-size: 12px; color: #9a8468; margin-top: 8px; }
.meter { height: 6px; border-radius: 3px; background: rgba(224,169,90,0.12); overflow: hidden; }
.meter i { display: block; height: 100%; background: #e0a95a; transition: width 0.35s ease; }

.summary-card .sumhead { font-size: 15px; font-weight: 700; color: #f2e0be; margin-bottom: 6px; }
.summary-card .sumbody { font-size: 13px; line-height: 1.6; color: #d8cbb5; }
.summary-card .actions { margin-top: 12px; }
.summary-card a.sharebtn { text-decoration: none; display: inline-block; }

.search-card {
  background: linear-gradient(180deg, rgba(224,169,90,0.07), rgba(20,16,12,0.4));
  border: 1px solid rgba(224,169,90,0.16);
  border-radius: 14px;
  padding: 16px 18px 18px;
  margin-bottom: 16px;
}
.search-card .fine { font-size: 12px; color: #9a8468; margin: 8px 0 0; line-height: 1.5; }
.search-results { margin-top: 14px; border-top: 1px solid rgba(224,169,90,0.14); padding-top: 10px; }
.search-results .feed { border-top: none; }
mark { background: rgba(224,169,90,0.35); color: #f2e9dc; border-radius: 3px; padding: 0 1px; }

.feedhead {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: #9a8468; padding: 4px 4px 8px;
}

.feed { list-style: none; margin: 0; padding: 0; }
.post {
  display: flex; gap: 12px; padding: 14px 4px;
  border-bottom: 1px solid rgba(224,169,90,0.1);
}
.post .av {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background-color: #333; background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
}
.post .body { min-width: 0; flex: 1; }
.post .head { font-size: 13px; margin-bottom: 4px; }
.post .head .who { text-decoration: none; font-weight: 700; }
.post .head .who:hover { text-decoration: underline; }
.post .head .handle { color: #9a8468; }
.post .head .tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;
  color: #e0a95a; border: 1px solid rgba(224,169,90,0.3); border-radius: 4px;
  padding: 1px 5px; margin-left: 2px;
}
.post .head .when { color: #6f6250; font-size: 11px; float: right; }
.post .text {
  font-size: 14px; line-height: 1.55; color: #e7ddcf; white-space: pre-wrap;
  word-wrap: break-word; margin-bottom: 6px;
}
.post .images { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.post .images img {
  max-width: 140px; max-height: 140px; border-radius: 8px; object-fit: cover;
  border: 1px solid rgba(224,169,90,0.15);
}
.post .permalink { font-size: 11px; text-decoration: none; color: #9a8468; }
.post .permalink:hover { color: #e0a95a; }

.feedmore { text-align: center; padding: 18px 0 6px; }
.startover { text-align: center; padding: 6px 0 0; }

footer {
  margin-top: 2.5rem; color: #7a6a54; font-size: 12px;
  border-top: 1px solid rgba(224,169,90,0.12); padding-top: 1rem; line-height: 1.6;
}
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .post .head .when { float: none; display: block; margin-top: 2px; }
}
