:root {
  color-scheme: light;
  font-family: Roboto, "Noto Sans JP", "Hiragino Sans", system-ui, sans-serif;
  background: #f6f3ef;
  --frame: 700px;
  --ink: #302a25;
  --muted: #766d64;
  --line: #e8dfd5;
  --paper: #fff;
  --surface: #fffcf8;
  --header: #f3e5d6;
  --accent: #92562e;
  --accent-dark: #744423;
  --wash: #f5e9db;
  --focus: #92562e;
  --reaction: #d64550;
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
a { color: var(--accent-dark); }
button, input, textarea, select { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, .terms-copy:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }
.glyph { display: block; width: 24px; height: 24px; flex: none; }
.masthead { position: sticky; top: 0; z-index: 3; background: var(--header); }
.masthead-inner, .feed-tabs { width: min(100%,var(--frame)); margin: 0 auto; }
.masthead-inner { min-height: 56px; padding: 4px 6px 4px 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.app-wordmark { display: flex; align-items: center; gap: 9px; font-size: 1.3125rem; font-weight: 750; line-height: 1.15; letter-spacing: -.025em; white-space: nowrap; }
.app-wordmark img { flex: none; border-radius: 8px; box-shadow: 0 1px 2px #49342228; }
.app-wordmark-number { color: var(--accent-dark); }
.dialog-head h2 { font-size: 1.3125rem; font-weight: 650; line-height: 1.25; }
.header-actions, .dialog-head { display: flex; align-items: center; }
.toolbar-button { width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: var(--ink); background: transparent; }
.toolbar-button:hover { background: #eeddcb; }
.toolbar-menu, .thread-menu { position: relative; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; z-index: 4; top: 100%; right: 0; min-width: 200px; padding: 5px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 18px #302a2525; }
.menu-panel :is(button,a) { display: flex; width: 100%; min-height: 44px; align-items: center; padding: 8px 10px; border: 0; border-radius: 7px; color: var(--ink); background: transparent; text-align: left; text-decoration: none; font-size: .9rem; }
.menu-panel :is(button,a):hover { background: var(--wash); }
.feed-tabs { display: grid; grid-template-columns: 1fr 1.35fr 1.15fr; background: var(--surface); }
.masthead:has(.feed-tabs) { background: linear-gradient(var(--header) 0 56px,var(--surface) 56px 100%); }
.feed-tabs button { min-width: 0; min-height: 50px; padding: 0 4px; border: 0; background: transparent; color: var(--muted); font-size: .83rem; font-weight: 650; }
.feed-tabs button span { display: inline-flex; align-items: center; gap: 7px; min-height: 50px; border-bottom: 3px solid transparent; padding: 3px 1px 0; white-space: nowrap; }
.feed-tabs button[aria-pressed="true"] { color: var(--accent); }
.feed-tabs button[aria-pressed="true"] span { border-color: var(--accent); }
.layout { width: min(100%,var(--frame)); margin: 0 auto; padding: 12px 12px calc(88px + env(safe-area-inset-bottom)); }
.section-head { display: flex; justify-content: space-between; gap: 12px; margin: 5px 0 14px; }
.section-head h1 { font-size: 1.5rem; }
.posts, .comment-list { display: grid; gap: 12px; }
.post-card, .comment, .empty { padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.feed .post-card { cursor: pointer; }
.feed .post-card:hover { border-color: #d5bcaa; }
.post-meta { display: flex; gap: 10px; align-items: center; min-width: 0; }
.ranking-medal, .ranking-number { flex: none; }
.ranking-number { min-inline-size: 32px; color: var(--muted); font-size: .78rem; font-weight: 650; font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap; }
.avatar { width: 40px; height: 40px; flex: none; }
.avatar-stock { background: url('/android-avatars.png') no-repeat 0 0 / 800% 600%; }
.avatar-photo { display: block; object-fit: cover; border-radius: 50%; }
.post-identity { display: grid; gap: 3px; min-width: 0; }
.author { font-size: .875rem; font-weight: 650; overflow-wrap: anywhere; }
.category, .comment-owner { font-size: .75rem; color: var(--muted); }
.open-post, .heart { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; color: var(--muted); background: transparent; }
.open-post .glyph, .heart .glyph { color: var(--accent); }
.open-post { justify-content: center; min-width: 44px; min-height: 44px; margin-left: auto; font-size: .82rem; }
.open-post .glyph { width: 18px; height: 18px; }
.post-body, .comment-body, .post-extra { overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.63; }
.post-body { font-size: 1rem; font-weight: 400; margin: 17px 0 9px; }
.post-extra { font-size: .89rem; color: var(--muted); margin-top: 8px; }
.post-image { display: block; max-width: 100%; max-height: 360px; border-radius: 8px; margin: 10px 0; }
.post-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; color: var(--muted); font-size: .8rem; }
.post-actions .heart { justify-content: flex-start; min-width: 44px; min-height: 38px; font-weight: 650; }
.post-actions .active, .post-actions .active .glyph { color: var(--reaction); }
.post-actions time { margin-left: auto; white-space: nowrap; }
.empty { color: var(--muted); line-height: 1.6; }
.fab { width: 56px; height: 56px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--accent); color: white; box-shadow: 0 3px 7px #302a2537; }
.fab:hover { background: var(--accent-dark); }
#compose { position: fixed; z-index: 2; bottom: calc(18px + env(safe-area-inset-bottom)); right: max(16px,calc((100vw - var(--frame)) / 2 + 16px)); }
.primary, .subtle, .danger, .album-button { min-height: 44px; border-radius: 10px; border: 1px solid transparent; padding: 8px 14px; font-size: .89rem; font-weight: 650; }
.primary { color: white; background: var(--accent); }
.primary:hover { background: var(--accent-dark); }
.subtle, .album-button { color: var(--ink); background: var(--paper); border-color: var(--line); }
.subtle:hover, .album-button:hover { background: var(--wash); }
.danger { color: #9a2926; background: #fff; border-color: #e9c7c2; }
.text-button { padding: 5px 0; border: 0; color: var(--accent-dark); background: transparent; text-decoration: underline; text-underline-offset: .25em; font-size: .87rem; text-align: left; }
.notice { border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; color: var(--accent-dark); background: var(--wash); font-size: .87rem; overflow-wrap: anywhere; }
.notice.error { color: #812f23; background: #f8e7df; }
.feed-end { min-height: 1px; text-align: center; }
#feed-status:not(:empty) { padding: 14px 0; color: var(--muted); font-size: .85rem; }
.more { display: block; margin: 14px auto 0; }
dialog { width: min(600px,calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--paper); box-shadow: 0 12px 45px #34201935; }
dialog::backdrop { background: #25201866; }
.dialog-inner { padding: 16px; }
.dialog-head { min-height: 44px; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.dialog-head h2 { flex: auto; min-width: 0; }
.form { display: grid; gap: 12px; margin-top: 12px; }
.field { display: grid; gap: 4px; font-size: .88rem; font-weight: 650; }
.field input, .field textarea, .field select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.field textarea { min-height: 105px; resize: vertical; line-height: 1.6; }
.compose-attachments { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.album-button { display: inline-grid; place-items: center; width: 44px; min-height: 44px; padding: 0; border-radius: 13px; color: var(--accent); }
.compose-attachments .helper { margin: 0; overflow-wrap: anywhere; }
.helper { color: var(--muted); font-size: .85rem; line-height: 1.6; margin: 6px 0 9px; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.form-actions:empty { display: none; }
.inline-options { display: grid; gap: 9px; margin: 12px 0; }
.terms-copy { max-height: min(48dvh,24rem); overflow: auto; padding: 12px 0; font-size: .9rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.consent-dialog .form-actions { display: grid; }
.consent-dialog .primary { grid-row: 1; min-height: 52px; font-size: 1.05rem; }
.consent-dialog .subtle { min-height: 44px; }
.composer-dialog, .thread-dialog { width: min(100%,var(--frame)); max-width: 100%; height: min(850px,100dvh); max-height: 100dvh; }
.composer-dialog .dialog-inner, .thread-dialog .dialog-inner { padding: 0; display: flex; flex-direction: column; min-height: 100%; }
.composer-dialog .dialog-head, .thread-dialog .dialog-head { position: sticky; z-index: 2; top: 0; min-height: 56px; margin: 0; padding: 4px 8px 4px 16px; background: var(--header); }
.composer-dialog #dialog-body { padding: 12px 16px 20px; display: flex; flex: 1; flex-direction: column; }
.composer-dialog .form { margin: 0; flex: 1; grid-template-rows: auto minmax(180px,1fr) auto auto; }
.composer-dialog .form:has(.category-picker) { grid-template-rows: auto minmax(220px,1fr) auto auto; }
.composer-dialog .form:not(:has(.category-picker)) { grid-template-rows: minmax(180px,1fr) auto auto; }
.composer-dialog label:has(textarea) { display: flex; }
.composer-dialog label:has(textarea) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.composer-dialog textarea { height: 100%; padding: 13px 15px; border-radius: 16px; font-size: 1rem; font-weight: 400; }
.composer-dialog .category-picker { justify-self: start; display: flex; align-items: center; gap: 6px; background: var(--wash); color: var(--accent); padding: 0 12px; border-radius: 14px; min-height: 44px; }
.composer-dialog .category-picker span { white-space: nowrap; }
.composer-dialog .category-picker select { width: auto; padding: 6px 0; border: 0; background: transparent; color: inherit; }
.composer-submit { min-height: 44px; border: 0; border-radius: 9px; padding: 6px 10px; color: var(--accent-dark); background: transparent; font-weight: 650; white-space: nowrap; }
.composer-submit:hover { background: var(--wash); }
.thread-dialog { background: #f6f3ef; }
.thread-dialog #dialog-body { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 12px 12px 0; }
.thread-menu { margin-left: auto; }
.thread-menu > summary { color: var(--accent); }
.comment.author-comment { background: #faf1e5; }
.comment-body { margin: 14px 0 8px; font-size: .9375rem; }
.thread-compose { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; bottom: 0; margin: auto -12px 0; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); }
.thread-input { flex: 1; min-height: 50px; min-width: 0; padding: 10px; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--muted); }
.thread-send { flex: none; width: 50px; height: 50px; }
.setting { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.setting h3 { font-size: 1rem; }
.setting > button { margin: 3px 6px 3px 0; }
.blocked-user { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.code { display: block; overflow-wrap: anywhere; user-select: all; background: var(--wash); border-radius: 6px; padding: 9px; margin: 8px 0; font-family: ui-monospace, monospace; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.brand img { border-radius: 10px; }
.brand span { display: block; font-size: .75rem; color: var(--muted); }
.topic-link { display: inline-flex; align-items: center; text-decoration: none; }
.topic-ad { min-width: 0; padding: 10px 0; }
.ad-label { display: block; color: var(--muted); font-size: .72rem; }
.topic-ad .adsbygoogle { display: block; }
.topic-ad-preview { display: grid; place-items: center; min-height: 90px; border: 1px dashed var(--line); color: var(--muted); font-size: .82rem; }
.footer { display: flex; flex-wrap: wrap; gap: 9px 14px; font-size: .78rem; padding: 14px 1px; }
.footer a { color: var(--muted); text-underline-offset: 3px; }
.legal { width: min(45rem,100%); margin: 0 auto; padding: 26px; line-height: 1.72; }
.legal h2 { margin-top: 1.2em; font-size: 1.1rem; }
.legal p { margin-top: .5em; }
@media (max-width: 700px) {
  .composer-dialog, .thread-dialog { border: 0; border-radius: 0; height: 100dvh; }
}
@media (max-width: 360px) {
  .feed-tabs button { font-size: .73rem; }
  .feed-tabs button span { gap: 3px; }
  .feed-tabs .glyph { width: 18px; height: 18px; }
}
@media (max-width: 300px) {
  .app-wordmark { gap: 7px; font-size: 1.125rem; }
  .app-wordmark img { width: 28px; height: 28px; }
}
