:root {
  --teal: #58b7c5;
  --teal-dark: #3699aa;
  --ink: #343434;
  --muted: #929292;
  --line: #dedede;
  --paper: #fff;
  --ground: #f5f5f5;
  --reader: #202020;
  --coral: #ef7d84;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, sans-serif;
  color: var(--ink);
  background: var(--ground);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-size: 14px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.wordmark { color: #292929; font-size: 27px; font-weight: 900; font-style: italic; letter-spacing: -2px; line-height: 1; }
.wordmark small { margin-left: 5px; color: var(--teal); font-size: 11px; font-style: normal; letter-spacing: 0; vertical-align: top; }
.topbar { min-height: 82px; padding: 18px 3.5%; display: flex; align-items: center; gap: 30px; background: var(--paper); border-bottom: 3px solid var(--teal); }
.search-box { width: 340px; height: 40px; margin-left: auto; display: flex; align-items: center; gap: 9px; padding: 0 9px 0 14px; border: 1px solid #d6e5e7; border-radius: 24px; background: #f5f9f9; color: var(--teal); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-box input::placeholder { color: #8b9b9d; }
.search-box button, .reader-search button { padding: 3px; border: 0; background: transparent; color: var(--teal); }
.top-random { display: flex; align-items: center; gap: 7px; color: var(--teal-dark); font-size: 12px; }
.icon-nav { min-height: 48px; padding: 8px 3.5%; display: flex; align-items: center; justify-content: space-between; background: var(--paper); border-bottom: 1px solid #ececec; }
.icon-nav-main, .reader-icon-nav { display: flex; align-items: center; gap: 22px; }
.icon-nav a, .icon-nav button, .reader-icon-nav a, .reader-icon-nav button { padding: 1px; border: 0; background: transparent; color: var(--teal); }
.icon-nav a:hover, .icon-nav button:hover { color: var(--teal-dark); }
.beta-label { color: #a6a6a6; font-size: 9px; letter-spacing: 1.6px; }
.page-shell { padding: 28px 3.5% 60px; }
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; }
.home-top > *, .featured-authors { min-width: 0; }
.home-top h1, .home-top h2 { margin: 0 0 13px; font-size: 23px; font-weight: 400; letter-spacing: 1px; }
.author-scroller { width: 100%; min-width: 0; max-width: 100%; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.author-scroller::-webkit-scrollbar { display: none; }
.author-card { flex: 0 0 calc((100% - 24px) / 3); min-width: 0; background: var(--paper); border: 1px solid var(--line); scroll-snap-align: start; overflow: hidden; }
.author-banner-link { display: block; height: 88px; background: #d8edef; }
.author-banner { width: 100%; height: 88px; display: block; object-fit: cover; }
.author-card-body { position: relative; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; padding: 0 11px 13px; }
.author-avatar { grid-column: 1; grid-row: 1; width: 54px; height: 54px; margin-top: -25px; border: 3px solid white; border-radius: 50%; object-fit: cover; background: white; }
.author-numbers { grid-column: 2; grid-row: 1; display: flex; gap: 16px; padding-top: 7px; font-size: 11px; white-space: nowrap; }
.author-numbers span { display: flex; flex-direction: column; }
.author-numbers strong { font-size: 15px; }
.follow-button { align-self: start; padding: 4px 13px; border: 1px solid var(--teal); border-radius: 18px; background: white; color: var(--teal-dark); font-size: 11px; white-space: nowrap; }
.follow-button.following { background: var(--teal); color: white; }
.author-card-body > .follow-button { grid-column: 3; grid-row: 1; margin-top: 8px; }
.author-card-name { grid-column: 1 / 3; grid-row: 2; margin-top: 6px; color: var(--teal-dark); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.author-handle { grid-column: 1 / 4; color: #999; font-size: 10px; }
.author-handle time { float: right; }
.author-bio { grid-column: 1 / 4; height: 42px; margin: 9px 0 0; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12px; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 0 0; }
.carousel-controls > button { border: 0; background: transparent; color: var(--teal); font-size: 30px; line-height: 1; }
.carousel-dots { display: flex; gap: 8px; }
.carousel-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #dedede; }
.carousel-dots button.active { background: #aaa7d2; }
.notice-card { min-height: 220px; padding: 25px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; border: 1px solid #55b7c8; background: linear-gradient(135deg, #36a8c3, #72d2d5); color: white; }
.notice-kicker { font-size: 10px; letter-spacing: 2px; opacity: .85; }
.notice-card > strong { font-size: 23px; line-height: 1.45; }
.notice-mark { font-size: 34px; font-weight: 900; font-style: italic; letter-spacing: -2px; }
.notice-card p { margin: 0; font-size: 11px; }
.content-tabs { margin-top: 42px; display: flex; gap: 30px; border-bottom: 1px solid var(--line); }
.content-tabs a { padding: 8px 0 12px; font-size: 22px; }
.content-tabs a.active { color: var(--teal-dark); border-bottom: 2px solid var(--teal); }
.search-summary { padding: 20px 0 0; color: #777; }
.post-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.post-card { min-width: 0; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.post-media { position: relative; display: block; aspect-ratio: 1.08 / 1; overflow: hidden; background: #ececec; }
.post-media > img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top; transition: transform .2s ease; }
.post-card:hover .post-media > img { transform: scale(1.012); }
.post-title-overlay { position: absolute; right: 0; bottom: 0; left: 0; max-height: 74px; padding: 8px 10px; overflow: hidden; background: rgba(20, 20, 20, .72); color: white; font-size: 13px; line-height: 1.35; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.post-title-overlay::after { content: ""; position: absolute; bottom: -7px; left: 16px; border-width: 7px 7px 0 0; border-style: solid; border-color: rgba(20, 20, 20, .72) transparent transparent transparent; }
.post-meta { padding: 10px 11px 12px; }
.post-author-line { display: flex; align-items: center; gap: 8px; }
.mini-avatar { width: 32px; height: 32px; border: 1px solid #eee; border-radius: 50%; object-fit: cover; }
.post-author-text { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.post-author-text .author-name { overflow: hidden; color: var(--teal-dark); font-weight: 700; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.post-author-text > span { color: #999; font-size: 9px; }
.x-link { color: #22a7d3; font-size: 20px; font-weight: 700; }
.post-stats { margin-top: 6px; display: flex; align-items: center; gap: 12px; color: #969696; font-size: 10px; }
.post-stats time { margin-right: auto; }
.tag-row { min-height: 28px; margin-top: 9px; display: flex; flex-wrap: wrap; gap: 5px; }
.tag { padding: 2px 10px; border: 1px solid var(--teal); border-radius: 15px; color: var(--teal-dark); font-size: 10px; line-height: 1.5; }
.tag-empty { border-color: #d5d5d5; color: #aaa; }
.pagination { margin: 36px 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.pagination a, .page-current { min-width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: white; }
.pagination a:hover, .page-current { border-color: var(--teal); color: var(--teal-dark); }
.page-current { background: var(--teal); color: white; }
.page-gap { padding: 0 4px; color: #aaa; }
.empty-state { margin-top: 25px; padding: 60px 20px; border: 1px solid var(--line); background: white; text-align: center; color: #888; }
.site-footer { padding: 25px 3.5% 85px; color: #999; font-size: 11px; text-align: center; }
.mobile-nav { display: none; }

/* Author page */
.author-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; }
.profile-card { align-self: start; position: sticky; top: 18px; border: 1px solid var(--line); background: white; }
.profile-banner { width: 100%; height: 132px; display: block; object-fit: cover; background: #d8edef; }
.profile-body { position: relative; padding: 0 14px 18px; }
.profile-avatar { width: 66px; height: 66px; margin-top: -32px; border: 3px solid white; border-radius: 50%; object-fit: cover; background: white; }
.profile-numbers { position: absolute; top: 8px; left: 96px; display: flex; gap: 24px; }
.profile-numbers span { display: flex; flex-direction: column; font-size: 11px; }
.profile-numbers strong { font-size: 16px; }
.profile-body > .follow-button { position: absolute; top: 12px; right: 12px; }
.profile-body h2 { margin: 8px 0 0; color: var(--teal-dark); font-size: 17px; }
.profile-handle { color: #999; font-size: 11px; }
.profile-bio { margin: 13px 0; overflow-wrap: anywhere; font-size: 12px; white-space: pre-line; }
.related-links { padding-top: 14px; border-top: 1px solid #e5e5e5; }
.related-links h3, .reader-navigation h2, .reader-share h2 { margin: 0 0 10px; color: #888; font-size: 11px; font-weight: 400; }
.related-links a { display: flex; align-items: center; gap: 6px; margin: 8px 0; overflow: hidden; color: var(--teal-dark); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.related-links .icon { width: 15px; height: 15px; }
.profile-share { margin-top: 16px; padding-top: 14px; display: flex; align-items: center; gap: 10px; border-top: 1px solid #e5e5e5; }
.profile-share span { margin-right: auto; font-size: 11px; }
.profile-share a { padding: 5px 8px; background: var(--teal); color: white; font-size: 10px; }
.author-content { min-width: 0; }
.author-content-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.author-content-head h1 { margin: 0; font-size: 23px; font-weight: 400; }
.sort-tabs { display: flex; flex: 0 0 auto; }
.sort-tabs a { padding: 8px 12px; background: var(--teal); border-right: 1px solid rgba(255,255,255,.35); color: white; font-size: 11px; }
.sort-tabs a.active { background: var(--teal-dark); }
.sort-tabs a:first-child { border-radius: 3px 0 0 3px; }
.sort-tabs a:last-child { border: 0; border-radius: 0 3px 3px 0; }
.author-post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Manga reader */
.reader-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; min-height: 100vh; background: var(--reader); }
.reader-main { min-width: 0; padding: 25px 0 70px; background: var(--reader); color: #bbb; }
.reader-position { margin-bottom: 18px; color: #ddd; font-size: 11px; font-weight: 700; text-align: center; }
.reader-images { width: min(650px, 90%); margin: 0 auto; background: white; }
.reader-images img { width: 100%; display: block; margin: 0 auto; background: white; }
.reader-reactions { padding: 35px 15px; text-align: center; font-size: 12px; }
.reader-reactions p { color: #888; }
.reader-reactions a { margin: 0 12px; color: #999; }
.reader-side { height: 100vh; position: sticky; top: 0; overflow-y: auto; background: #fafafa; color: var(--ink); }
.reader-side-top { min-height: 60px; padding: 14px 18px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid #e5e5e5; background: white; }
.reader-side-top .wordmark { font-size: 24px; }
.reader-search { height: 32px; margin-left: auto; display: flex; align-items: center; border: 1px solid #dce8e9; border-radius: 18px; background: #f5f9f9; }
.reader-search input { width: 90px; padding: 0 5px 0 10px; border: 0; outline: 0; background: transparent; font-size: 10px; }
.reader-search .icon { width: 18px; height: 18px; }
.reader-icon-nav { padding: 11px 18px; justify-content: space-between; background: white; border-bottom: 1px solid #e5e5e5; }
.reader-icon-nav .icon { width: 19px; height: 19px; }
.reader-detail { position: relative; padding: 17px 17px 15px; border-bottom: 1px solid #e5e5e5; }
.reader-author { display: flex; align-items: center; gap: 10px; padding-right: 28px; }
.reader-author img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.reader-author span { display: flex; flex-direction: column; }
.reader-author strong { color: var(--teal-dark); font-size: 13px; }
.reader-author small { color: #999; font-size: 10px; }
.reader-detail > .x-link { position: absolute; top: 20px; right: 17px; }
.reader-detail h1 { margin: 17px 0 8px; overflow-wrap: anywhere; font-size: 14px; font-weight: 400; line-height: 1.5; white-space: pre-line; }
.full-text { margin: 5px 0 12px; color: #777; font-size: 11px; }
.full-text summary { color: var(--teal-dark); cursor: pointer; }
.full-text div { margin-top: 8px; white-space: pre-line; }
.reader-date { display: block; color: #999; font-size: 11px; }
.reader-stats { margin-top: 12px; display: flex; gap: 20px; color: #999; font-size: 12px; }
.reader-navigation, .reader-share { padding: 17px; border-bottom: 1px solid #e5e5e5; }
.reader-nav-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.reader-nav-grid a, .reader-nav-grid span { min-width: 0; height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 3px; background: var(--teal); color: white; font-size: 14px; }
.reader-nav-grid small { margin-top: 2px; font-size: 8px; white-space: nowrap; }
.reader-nav-grid .disabled { opacity: .3; cursor: default; }
.share-buttons { display: flex; gap: 7px; }
.share-buttons a, .share-buttons button { min-width: 44px; height: 38px; padding: 0 10px; display: grid; place-items: center; border: 0; color: white; font-size: 16px; font-weight: 700; }
.share-x { background: #24292d; }
.share-facebook { background: #3b5998; }
.share-line { background: #00b900; font-size: 10px !important; }
.share-copy { background: var(--teal); font-size: 10px !important; }
.reader-mobile-nav { display: none; }

/* Local history and follows */
.panel-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.35); }
.local-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1001; width: min(360px, 92vw); background: white; box-shadow: -8px 0 30px rgba(0,0,0,.14); }
.local-panel-head { padding: 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.local-panel-head h2 { margin: 0; font-size: 18px; font-weight: 400; }
.plain-icon { border: 0; background: transparent; color: #888; font-size: 28px; }
.local-panel-content { padding: 12px 18px; }
.local-empty { padding: 35px 0; color: #999; text-align: center; }
.local-entry { padding: 10px 0; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #eee; }
.local-entry img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.local-entry span { display: flex; flex-direction: column; }
.local-entry small { color: #999; }
.local-note { margin: 15px 0; color: #aaa; font-size: 10px; }

@media (max-width: 1200px) {
  .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .author-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 25px; }
  .author-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .author-card { flex-basis: calc((100% - 12px) / 2); }
  .author-content-head { flex-direction: column; }
  .sort-tabs { align-self: flex-end; }
}
@media (max-width: 900px) {
  .home-top { grid-template-columns: 1fr; }
  .notice-section { display: none; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .author-layout { grid-template-columns: 1fr; }
  .profile-card { position: static; }
  .profile-card { display: grid; grid-template-columns: 280px 1fr; }
  .profile-banner { height: 100%; min-height: 300px; }
  .author-post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reader-layout { grid-template-columns: minmax(0, 1fr) 330px; }
}
@media (max-width: 700px) {
  body { font-size: 13px; }
  .topbar { min-height: 60px; padding: 13px 14px; gap: 12px; border-bottom-width: 2px; }
  .wordmark { font-size: 23px; }
  .search-box { width: auto; min-width: 0; flex: 1; height: 36px; }
  .search-box > .icon { display: none; }
  .top-random span, .icon-nav, .beta-label { display: none; }
  .page-shell { padding: 22px 12px 75px; }
  .home-top h1, .home-top h2 { font-size: 20px; }
  .author-card { flex-basis: 88%; max-width: 88%; }
  .content-tabs { margin-top: 25px; gap: 20px; overflow-x: auto; }
  .content-tabs a { font-size: 17px; white-space: nowrap; }
  .post-grid, .author-post-grid { grid-template-columns: 1fr; gap: 14px; }
  .post-media { aspect-ratio: 1.15 / 1; }
  .post-title-overlay { font-size: 14px; }
  .post-meta { padding: 12px; }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 100; display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px 0 calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid #ddd; background: rgba(255,255,255,.97); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; color: var(--teal); font-size: 9px; }
  .mobile-nav .icon { width: 21px; height: 21px; }
  .profile-card { display: block; }
  .profile-banner { height: 130px; min-height: 0; }
  .author-content-head h1 { font-size: 20px; }
  .sort-tabs { width: 100%; align-self: auto; overflow-x: auto; }
  .sort-tabs a { flex: 1; padding: 8px; text-align: center; white-space: nowrap; }
  .reader-layout { display: block; }
  .reader-main { padding: 14px 0 30px; }
  .reader-images { width: 100%; }
  .reader-position { margin-bottom: 10px; }
  .reader-side { height: auto; position: static; overflow: visible; padding-bottom: 75px; }
  .reader-side-top { display: none; }
  .reader-icon-nav { display: none; }
  .reader-detail { padding: 20px 16px; }
  .reader-detail h1 { font-size: 16px; }
  .reader-navigation { padding: 18px 16px; }
  .reader-share { padding: 18px 16px; }
  .reader-mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 100; display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: env(safe-area-inset-bottom); background: white; border-top: 1px solid #ddd; }
  .reader-mobile-nav a, .reader-mobile-nav span { padding: 14px 4px; color: var(--teal-dark); text-align: center; font-size: 11px; }
  .reader-mobile-nav span { color: #bbb; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
