/* Sayabee touch template - common (all three pages). Ported from sayabee-original.html (final effective rules). */
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{background:#e9edf1}
html.r-cats{background:#fffcf8}
body{max-width:414px;margin:0 auto;padding:0;background:#fff;color:#30343b;font-family:system-ui,-apple-system,'Microsoft YaHei',sans-serif;min-height:100vh}
.sb-vh{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.page{display:block}
#page-home,#page-topic{min-height:100vh;padding-bottom:calc(54px + 16px + 24px + env(safe-area-inset-bottom))}
#page-cats{min-height:100vh}
#page-cats a{text-decoration:none}

/* ---- bottom floating capsule ---- */
.capsule{position:fixed;left:50%;bottom:calc(16px + env(safe-area-inset-bottom));transform:translateX(-50%);width:auto;height:54px;border-radius:27px;background:#fff;box-shadow:0 6px 24px rgba(0,0,0,.18),0 1px 4px rgba(0,0,0,.08);display:flex;align-items:center;justify-content:space-around;padding:0 26px;gap:28px;z-index:1000;transition:transform .3s ease,opacity .3s ease}
.capsule.hide{transform:translate(-50%,calc(100% + 40px));opacity:0}
.capsule a{flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;height:100%;color:#8a919c;font-size:11px;text-decoration:none}
.capsule a svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.capsule a.active{color:#FB4E23;font-weight:600}
.capsule[data-r="cats"] a{color:#a43712}
.capsule[data-r="topic"]{padding:0 18px}

/* ---- shared orange nav (home / cats / topic) ---- */
.page .synced-nav{height:60px;display:flex;align-items:center;padding:0 12px;background:#FB4E23;color:#fff}
.page .synced-nav .logo{flex:1;display:flex;align-items:center}
.page .synced-nav .logo img{height:52px;width:auto;max-width:60vw;object-fit:contain;display:block}
.page .synced-nav .right{display:flex;gap:10px;align-items:center}
.page .synced-nav .ic-btn{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;color:#fff;background:none}
.page .synced-nav .ic-btn svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
#page-home a,#page-topic a{text-decoration:none;color:inherit}
#page-cats .synced-nav{position:fixed;top:0;left:50%;transform:translateX(-50%);width:min(100%,414px);z-index:100}

/* ---- shared search row ---- */
.page .forum-search-toggle{border:0;padding:0;background:none;cursor:pointer}
.page .forum-search-form{display:flex;align-items:center;gap:8px;padding:6px 16px 8px;background:#FB4E23;margin:0}
.page .forum-search-form[hidden]{display:none}
.page .forum-search-input{height:36px;width:0;flex:1;min-width:0;padding:7px 10px;border:1px solid #80bdff;box-shadow:0 0 0 1px #007bff24;border-radius:4px;background:#fff;color:#343a40;font-size:14px;outline:none;-webkit-appearance:none;appearance:none}
.page .forum-search-input::placeholder{color:#89919c}
.page .forum-search-submit{height:36px;width:56px;padding:0;flex:none;border:0;border-radius:6px;background:#fff;color:#C93614;font-size:14px;cursor:pointer}
.page .forum-search-submit:hover{background:#fff7f3}
.page .forum-search-toggle:focus-visible,.page .forum-search-submit:focus-visible{outline:2px solid #80bdff;outline-offset:2px}

/* ---- shared brand strip (one link, two rows of 5) ---- */
.page .shared-brand-banner{display:flex;flex-direction:column;align-items:center;gap:2.8px;width:100%;border:0;margin:0;padding:12px 8px 8px;background:#fff;cursor:pointer}
.page .brand-banner-row{display:flex;align-items:center;justify-content:center;gap:8px;max-width:100%}
.page .brand-banner-item{display:inline-flex;align-items:center;justify-content:center;flex:none;background:#000;box-shadow:0 3px 10px #0003;padding:2px 6px;border-radius:999px;overflow:hidden}
.page .brand-banner-item img{display:block;height:16px;width:auto;object-fit:contain}
.page .shared-brand-banner:focus-visible{outline:2px solid #FB4E23;outline-offset:-2px}
.page .shared-brand-banner:active{opacity:.85}
@media(max-width:380px){.page .brand-banner-row{gap:4px}.page .brand-banner-item{padding:2px 4px}}
@media(max-width:330px){.page .brand-banner-item img{height:14px}}

/* ---- footer line ---- */
.page .foot{text-align:center;color:#999;font-size:13px}

.page .forum-search-input{font-size:16px}
.capsule .sb-extra{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;height:100%;padding:0;border:0;background:none;color:#FB4E23;font:600 11px system-ui,sans-serif;cursor:pointer}.capsule .sb-extra svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8}.capsule .bee-x svg{fill:currentColor;stroke:none}
