:root {
  color-scheme: light;
  --page: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f7f7f8;
  --ink: #202123;
  --muted: #73757b;
  --faint: #9b9da2;
  --line: #e5e5e7;
  --accent: #202123;
  --accent-hover: #3b3c3f;
  --green: #16845b;
  --focus: rgba(32, 33, 35, .14);
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
button, textarea { font: inherit; }
.page-shell { width: min(100% - 48px, 720px); margin: 0 auto; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f0f0f1; }
.brand { display: inline-flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 650; letter-spacing: -.02em; }
.brand-mark { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); color: white; font-size: 16px; font-weight: 600; }
.top-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.intro { padding: 66px 0 25px; text-align: center; }
h1, h2, p { margin-top: 0; }
h1 { margin: 0 0 9px; font-size: clamp(27px, 4vw, 34px); line-height: 1.2; font-weight: 600; letter-spacing: -.045em; }
.intro-copy { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.composer { border: 1px solid #d9dadd; border-radius: 18px; background: var(--surface); padding: 13px 13px 10px 17px; box-shadow: 0 2px 6px rgba(0, 0, 0, .035); transition: border-color .18s ease, box-shadow .18s ease; }
.composer:focus-within { border-color: #b8babf; box-shadow: 0 0 0 3px var(--focus); }
textarea { display: block; width: 100%; min-height: 90px; resize: vertical; border: 0; outline: 0; padding: 6px 2px 10px; color: var(--ink); background: transparent; font-size: 14px; line-height: 1.65; }
textarea::placeholder { color: #96989d; }
.composer-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 4px; }
.char-count { color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.submit-button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 9px; padding: 0 13px; color: white; background: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer; transition: background .16s ease, transform .16s ease; }
.submit-button:hover { background: var(--accent-hover); }
.submit-button:active { transform: scale(.98); }
.submit-button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.submit-button:disabled { cursor: wait; opacity: .65; }
.submit-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.form-message { min-height: 0; margin: 0; color: #b42318; font-size: 12px; }
.form-message:not(:empty) { padding: 9px 2px 1px; }
.feed-section { padding: 43px 0 0; }
.feed-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.feed-heading h2 { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 600; letter-spacing: -.015em; }
.post-count { display: inline-grid; place-items: center; min-width: 21px; height: 21px; margin-left: 4px; padding: 0 6px; vertical-align: 1px; border-radius: 7px; background: var(--surface-soft); color: var(--muted); font-size: 10px; font-weight: 500; }
.feed-caption { color: var(--faint); font-size: 11px; }
.feed-list { display: grid; gap: 10px; }
.post-card { position: relative; overflow: hidden; padding: 16px 17px 13px; border: 1px solid #e7e7e9; border-radius: 14px; background: var(--surface); transition: border-color .18s ease, background .18s ease; }
.post-card:hover { border-color: #d2d3d6; background: #fdfdfd; }
.post-card.is-entering { animation: arrive .48s cubic-bezier(.2,.75,.25,1) both; }
.post-body { margin: 0 0 13px; color: #303136; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.post-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid #f0f0f1; color: var(--faint); font-size: 10px; }
.post-author { color: #66686d; font-weight: 500; display: flex; align-items: center; gap: 7px; }
.author-dot { width: 6px; height: 6px; border-radius: 50%; background: #8b8e94; }
.loading-state, .empty-state, .error-state { min-height: 104px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid #e7e7e9; border-radius: 14px; color: var(--muted); font-size: 12px; text-align: center; padding: 20px; }
.empty-state { flex-direction: column; gap: 6px; background: #fdfdfd; }
.empty-icon { width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 2px; border-radius: 50%; background: #f1f1f2; color: #686a70; font-size: 16px; }
.empty-state strong { color: #3c3d41; font-size: 13px; font-weight: 600; }
.empty-state span { color: var(--muted); }
.error-state { flex-direction: column; }
.retry-button { padding: 7px 11px; border: 1px solid #d8d9dc; border-radius: 8px; background: #fff; color: #333438; font-size: 11px; font-weight: 600; cursor: pointer; }
.retry-button:hover { background: var(--surface-soft); }
.loader { width: 14px; height: 14px; border: 1.5px solid #e4e4e6; border-top-color: #77797e; border-radius: 50%; animation: spin .8s linear infinite; }
.footer { padding: 42px 0 28px; color: #a0a1a5; font-size: 11px; line-height: 1.5; text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes arrive { 0% { opacity: 0; transform: translateY(-12px); } 65% { opacity: 1; transform: translateY(2px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (max-width: 560px) {
  html, body { width: 100%; height: 100%; min-height: 0; overflow: hidden; overscroll-behavior: none; }
  html { scroll-behavior: auto; }
  .page-shell {
    width: 100%; height: var(--app-height, 100dvh); min-height: 0; margin: 0;
    display: flex; flex-direction: column; overflow: hidden;
    padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  }
  .topbar { flex: 0 0 51px; height: 51px; }
  .brand { font-size: 13px; }
  .top-note { font-size: 10px; }
  main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  .intro { flex: 0 0 auto; padding: clamp(16px, 3.5dvh, 29px) 0 16px; }
  h1 { font-size: clamp(25px, 7.5vw, 32px); }
  .intro-copy { font-size: 12px; }
  .composer { flex: 0 0 auto; padding: 10px 11px 8px 13px; border-radius: 16px; }
  textarea { min-height: 68px; max-height: 105px; resize: none; font-size: 14px; }
  .submit-button { min-height: 38px; padding: 0 11px; }
  .form-message:not(:empty) { padding-top: 6px; }
  .feed-section { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 20px 0 0; }
  .feed-heading { flex: 0 0 auto; margin-bottom: 10px; }
  .feed-list { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; align-content: start; padding: 0 1px 8px; }
  .post-card { padding: 14px 13px 11px; }
  .post-body { font-size: 13px; }
  .loading-state, .empty-state, .error-state { min-height: 88px; padding: 14px; }
  .footer { flex: 0 0 auto; padding: 12px 0 4px; font-size: 10px; }
}
@media (max-width: 560px) and (max-height: 600px) {
  .topbar { flex-basis: 45px; height: 45px; }
  .intro { padding-top: 12px; padding-bottom: 12px; }
  h1 { font-size: 25px; }
  .feed-section { padding-top: 14px; }
  .footer { padding-top: 7px; }
}
