/*
 * Colors, typography, cards, and page layout. Phones use bottom navigation; wider screens use a
 * sidebar.
 */
:root {
  color-scheme:light;
  --paper:#f8faf4; --paper-2:#eef1e9; --card:#fff;
  --ink:#20271f; --ink-70:#626c60; --gold:#42664b; --gold-dark:#294c32;
  --primary-container:#dcebd7; --on-primary:#fff; --secondary-container:#ede9f5;
  --secondary-ink:#5f5874; --forest:#42664b; --forest-dark:#2d5035;
  --cloth:#ba4139; --cloth-dark:#982f29; --rust:#916536; --rust-dark:#795126;
  --error-container:#ffdad5; --line:#dce2d8; --outline:#7d897b;
  --card-bg:255,255,255; --paper-bg:248,250,244; --sidebar-tint:238,241,233;
  --shadow:0 1px 3px #2335230a; --shadow-lg:0 8px 28px #2335231a;
  --radius-lg:26px; --radius-md:20px; --ease:cubic-bezier(.2,0,0,1);
  --nav-height:80px; --rail:104px;
  font-family:'Roboto','Inter',system-ui,-apple-system,sans-serif;
}
html[data-theme=dark]{
  color-scheme:dark; --paper:#131a14; --paper-2:#20291f; --card:#1c251c;
  --ink:#e3e9de; --ink-70:#b3bdb0; --gold:#acceaa; --gold-dark:#c9eac6;
  --primary-container:#304c35; --on-primary:#19381f; --secondary-container:#302c3c;
  --secondary-ink:#cec4e2; --forest:#acceaa; --forest-dark:#b9dcb5;
  --cloth:#ffb4aa; --cloth-dark:#ffb4aa; --rust:#dfb887; --rust-dark:#f3c99a;
  --error-container:#522923; --line:#394638; --outline:#899685;
  --card-bg:28,37,28; --paper-bg:19,26,20; --shadow:0 1px 4px #0002; --shadow-lg:0 8px 28px #0005;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{scroll-behavior:smooth;scroll-padding-top:88px}
body{margin:0;background:var(--paper);color:var(--ink);font-size:15px;line-height:1.5;min-width:320px;-webkit-font-smoothing:antialiased}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer;touch-action:manipulation;transition:background .18s var(--ease),transform .18s var(--ease);border:0;background:none}
button:active{transform:scale(.98)}
@media(hover:hover) and (pointer:fine){
  button:hover{filter:brightness(.97)}
  .sidebar-tabs button:hover .tab-icon{background:var(--primary-container)}
  .header-pill:hover,.icon-button:hover{background:var(--paper-2)}
  #hamburgerMenu>button:hover{background:var(--primary-container)}
  .post-menu-item:hover{background:var(--paper-2)}
  .user-chip:hover{background:var(--paper-2)}
  .book-suggest-item:hover,.book-suggest-row:hover{background:var(--primary-container)}
}
button:disabled{opacity:.45;cursor:default;transform:none}
a{color:var(--gold);text-underline-offset:3px}
:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
[hidden]{display:none!important}
svg{vertical-align:middle}img{max-width:100%}
h1,h2,h3,p{margin-top:0}h1{font-size:34px;line-height:1.15;letter-spacing:-1.1px;font-weight:700;margin-bottom:22px}
h2{font-size:20px;line-height:1.3;font-weight:600;margin-bottom:16px;letter-spacing:-.35px}h3{font-size:17px;margin-bottom:10px}
p{margin-bottom:14px}small{font-size:12px}.muted,.page-subtitle{color:var(--ink-70);line-height:1.55;font-size:13px}.page-subtitle{font-size:15px;margin-top:-9px;margin-bottom:24px}
.mono{font-family:inherit!important}.mono-icon{line-height:1}.svg-icon{width:22px;height:22px}
#bgLayer{position:fixed;inset:0;background:var(--paper);z-index:-1}
/* Keep a small scroll allowance on short pages so mobile browsers do not shift the bottom navigation. */
.app-shell{min-height:calc(100svh + 20px)}.content-col{margin-left:var(--rail);min-width:0;touch-action:pan-y}
main{width:100%;max-width:840px;margin:auto;padding:16px 28px 112px;position:relative}
/* Keep page spacing inside each section to prevent a jump when a swipe finishes. */
section.tab{display:none}section.tab.active{display:flow-root;animation:screen-in .2s var(--ease)}
@keyframes screen-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--rail);background:var(--paper-2);display:flex;flex-direction:column;align-items:center;padding:20px 6px;z-index:80}
.sidebar-header{margin-bottom:24px}.brand-button{width:56px;height:56px;border-radius:20px;background:var(--primary-container);color:var(--gold)}.brand-button svg{width:30px;height:30px}
.sidebar-tabs{display:flex;flex-direction:column;width:100%;gap:10px}
.sidebar-tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:68px;font-size:12px;font-weight:500;color:var(--ink-70);border-radius:20px;padding:0}
.tab-icon{display:flex;align-items:center;justify-content:center;width:62px;height:32px;border-radius:999px;transition:background .2s}
.tab-icon svg{width:24px;height:24px}.sidebar-tabs button.active{color:var(--gold-dark);font-weight:700}.sidebar-tabs button.active .tab-icon{background:var(--primary-container)}
#sidebarCollapseBtn,#sidebarExpandFab{display:none!important}
header.top{position:sticky;top:0;z-index:75;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:76px;max-width:840px;margin:0 auto;padding:calc(14px + env(safe-area-inset-top,0px)) 28px 14px;background:var(--paper)}
.header-title-area{display:flex;align-items:center;gap:12px;min-width:0;font-size:27px;font-weight:650;letter-spacing:-.7px}
#currentTabTitle{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#currentTabTitle.title-animating{position:relative;display:inline-block;height:1.25em;vertical-align:top;overflow:hidden}
.tab-title-piece{position:absolute;left:0;top:0;white-space:nowrap;transition:transform .22s var(--ease),opacity .22s var(--ease)}
.tab-title-out{transform:translateY(0);opacity:1}
.tab-title-in{transform:translateY(60%);opacity:0}
#currentTabTitle.title-animate-run .tab-title-out{transform:translateY(-60%);opacity:0}
#currentTabTitle.title-animate-run .tab-title-in{transform:translateY(0);opacity:1}
.whoami{display:flex;align-items:center;gap:6px;position:relative}
.header-pill,.icon-button{position:relative;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;color:var(--ink)}
#whoamiName{display:none}#whoamiAvatar>span{width:32px!important;height:32px!important;font-size:16px!important}#whoamiAvatar img{width:100%;height:100%;object-fit:cover}
#hamburgerBtn{font-size:23px}#materialBack{font-size:28px;flex:0 0 42px}body:not(.detail-screen) #materialBack{display:none}
#hamburgerMenu{position:absolute;right:0;top:54px;width:min(300px,85vw);max-height:78dvh;overflow-y:auto;background:var(--card);border-radius:24px;padding:8px;box-shadow:var(--shadow-lg);z-index:170;border:1px solid var(--line)}
#hamburgerMenu>button{display:flex;align-items:center;gap:14px;width:100%;padding:13px 14px;border-radius:16px;text-align:left;min-height:48px;font-weight:500}
.hb-menu-icon{width:26px;display:inline-flex;justify-content:center;color:var(--gold)}
.card{position:relative;background:var(--card);border-radius:var(--radius-lg);padding:24px;margin-bottom:18px;border:1px solid transparent;box-shadow:none}
.card h2{color:var(--ink)}.row{display:flex;gap:10px;flex-wrap:wrap}.row>*{flex:1;min-width:0}
button.primary,button.secondary{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;border-radius:999px;padding:12px 22px;font-weight:600;font-size:14px;line-height:1.3}
button.primary{background:var(--gold);color:var(--on-primary)}button.secondary{background:var(--primary-container);color:var(--gold-dark);border:1px solid transparent}
button.tiny{min-height:40px;font-size:12px;padding:9px 14px}
.card-add-btn{display:flex;align-items:center;justify-content:center;gap:8px;background:var(--gold);color:var(--on-primary);font-size:23px;border-radius:18px;min-width:52px;min-height:52px;margin:18px 0 0 auto;padding:12px 18px;box-shadow:var(--shadow)}
.card-add-btn::after{content:'Kitap ekle';font-size:14px;font-weight:600}#recGroupAddBtn::after,#recPersonalAddBtn::after{content:'Öner'}
.field{margin-bottom:18px}.field label{display:block;margin-bottom:7px;font-weight:500;font-size:13px;color:var(--ink-70)}
input[type=text],input[type=email],input[type=password],input[type=date],textarea,select{width:100%;min-width:0;border:1px solid var(--line)!important;background:var(--paper)!important;color:var(--ink)!important;border-radius:15px!important;padding:14px!important;font-family:inherit!important;font-size:15px!important}
input:focus,textarea:focus,select:focus{outline:2px solid var(--gold);outline-offset:-1px}
textarea{resize:vertical;min-height:100px;line-height:1.6}input[type=checkbox]{accent-color:var(--gold);width:22px;height:22px}input[type=file]{max-width:100%;font-size:13px}input::file-selector-button{border:0;background:var(--primary-container);color:var(--gold-dark);border-radius:999px;padding:12px;margin-right:10px}
.auth-error,.danger{color:var(--cloth-dark)}.auth-error:empty{display:none}
.segmented{display:flex;gap:4px;background:var(--secondary-container);padding:4px;border-radius:999px;margin:4px 0 24px}
.segmented button{flex:1;min-width:0;min-height:43px;padding:9px 10px;border-radius:999px;font-size:13px;font-weight:500;color:var(--secondary-ink)}
.segmented.scrollable{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}
.segmented.scrollable::-webkit-scrollbar{display:none}
.segmented.scrollable button{flex:0 0 auto;white-space:nowrap;padding:9px 16px}
.segmented button.active{background:var(--gold);color:var(--on-primary)}
/* Today: reading check-in and statistics. */
.daily-greeting{font-weight:600;margin:0 0 22px}.daily-greeting>.muted{display:block;font-weight:400}
.daily-checkin{background:var(--primary-container);padding:22px}.daily-checkin h2{font-size:23px;margin:10px 0 18px}.eyebrow{font-size:13px;color:var(--gold-dark)}
.daily-actions{display:flex;gap:10px;margin-bottom:12px}.stamp-btn{display:inline-flex;justify-content:center;align-items:center;border-radius:999px;background:var(--paper-2);color:var(--ink-70);padding:12px;min-width:48px;min-height:44px;font-size:19px;gap:7px}
.daily-actions .stamp-btn{flex:1;min-height:50px;background:var(--paper);font-size:18px}.daily-actions .stamp-btn span{font-size:14px;font-weight:600}.stamp-btn.read.selected{background:var(--gold);color:var(--on-primary)}.stamp-btn.skip.selected{background:var(--error-container);color:var(--cloth-dark)}
.daily-help{font-size:12px;color:var(--gold-dark);margin-top:8px}.daily-help summary{cursor:pointer}.daily-help p{margin:8px 0 0}.daily-checkin [role=status]{font-size:12px}
.daily-stats{display:grid;grid-template-columns:1fr 1fr;gap:14px}.stat-card{background:var(--secondary-container);display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-height:134px;position:relative;padding:18px 20px}
.stat-card strong,.streak-stat{font-size:27px;font-weight:700;letter-spacing:-.6px;line-height:1.3}.stat-card>span:not(.stat-icon){font-size:13px}.stat-card .muted{font-size:11px!important;margin-top:4px}.stat-icon{position:absolute;right:18px;top:18px;font-size:25px;color:var(--secondary-ink)}
.daily-book{display:flex;gap:20px;align-items:center}.daily-book>img,.daily-book-placeholder{width:92px;height:140px;object-fit:cover;border-radius:8px;flex:0 0 92px}.daily-book-placeholder{background:var(--secondary-container);padding:16px 9px;display:flex;align-items:center;text-align:center;font-weight:600;font-size:14px}.daily-book h3{margin:8px 0 3px}.daily-book p{margin-bottom:12px}.common-today h2{font-size:17px}
.destination-row{display:flex;align-items:center;width:100%;gap:16px;padding:18px 20px;border-radius:20px;text-align:left;background:var(--card);min-height:80px}.destination-row>span:nth-child(2){flex:1;min-width:0}.destination-row small{display:block;color:var(--ink-70);margin-top:4px;line-height:1.5}.destination-row b{font-size:15px;font-weight:600}.destination-row>span:last-child:not(:nth-child(2)){font-size:24px;color:var(--ink-70)}.route-icon{display:flex;align-items:center;justify-content:center;color:var(--gold);width:32px;flex:0 0 32px;font-size:26px}.route-icon svg,.destination-row>svg{width:28px;height:28px}
.club-feature{display:flex;align-items:center;gap:18px;width:100%;padding:24px;background:var(--primary-container);border-radius:26px;text-align:left;margin:24px 0 16px}.club-feature>span:first-child{flex:1;min-width:0}.club-feature b{display:block;font-size:20px;margin:4px 0}.club-feature small,.club-feature span span{font-size:13px;color:var(--gold-dark)}.club-feature-illustration{flex:0 0 auto;width:86px;height:74px;pointer-events:none}
.ai-rec-card{background:var(--primary-container);margin:24px 0 16px}
.ai-rec-card h2{margin-bottom:14px}
.ai-rec-list{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.ai-rec-item{display:flex;flex-direction:column;min-width:0}
.ai-rec-item b{font-size:13px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ai-rec-cover{width:100%;aspect-ratio:2/3;border-radius:8px;overflow:hidden;box-shadow:var(--shadow);margin-bottom:8px}
.club-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.hub-item{position:relative;background:var(--secondary-container);border-radius:26px;overflow:hidden;transition:grid-column .01s}
.hub-item.expanded{grid-column:1/-1}
.hub-item-close-btn{position:absolute;top:12px;right:14px;z-index:6;background:var(--card);box-shadow:0 1px 5px rgba(0,0,0,.16);opacity:0;transform:scale(.7);pointer-events:none;transition:opacity .2s var(--ease),transform .25s var(--ease)}
.hub-item.expanded .hub-item-close-btn{opacity:1;transform:scale(1);pointer-events:auto}
.hub-item .destination-row{position:relative;background:transparent;padding:20px;border-radius:0;transition:padding .3s var(--ease)}
.hub-item.expanded .destination-row{padding-top:0;padding-bottom:0;min-height:0}
.hub-item-summary{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:16px;min-height:124px;max-height:300px;opacity:1;overflow:hidden;transition:max-height .3s var(--ease),opacity .2s var(--ease),min-height .3s var(--ease)}
.hub-item.expanded .hub-item-summary{min-height:0;max-height:0;opacity:0}
.hub-item .destination-row .route-icon{width:44px;height:44px;flex-basis:44px;border-radius:50%;background:var(--primary-container)}
.hub-item .destination-row>.hub-chevron{position:absolute;right:20px;top:22px;transition:top .3s var(--ease)}
.hub-item.expanded .destination-row>.hub-chevron{top:14px}
.hub-item .destination-row small{font-size:12px}
.hub-item .destination-row:has(svg.hub-illustration) small{max-width:calc(100% - 54px)}
svg.hub-illustration{position:absolute;right:8px;bottom:8px;width:56px;height:48px;pointer-events:none}
.hub-item .hub-chevron{transition:transform .25s var(--ease),opacity .2s var(--ease)}
.hub-item.expanded .hub-chevron{transform:rotate(90deg);opacity:0;pointer-events:none}
.hub-item-panel{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .38s var(--ease),opacity .25s var(--ease)}
.hub-item.expanded .hub-item-panel{grid-template-rows:1fr;opacity:1}
.hub-item-panel-inner{overflow:hidden;min-height:0}
.hub-item.expanded .hub-item-panel-inner{padding:18px 16px;border-top:1px solid var(--line)}
.hub-item-panel section.tab{display:block!important;animation:none!important}
/* Lay out inner panels side by side. Panel spacing must match GAP in js/app.js. */
.inner-pane-viewport{position:relative;overflow:hidden;touch-action:pan-y}
.inner-pane-track{display:flex;align-items:flex-start}
.inner-pane-track>.inner-pane{flex:0 0 auto;box-sizing:border-box}
.inner-pane-track>.inner-pane:not(:last-child){margin-right:10px}
.inner-pane-track>.inner-pane>.card:last-child{margin-bottom:0}
.settings-list{background:var(--card);border-radius:24px;overflow:hidden;margin:16px 0 28px}.settings-list .destination-row{border-radius:0;border-bottom:1px solid var(--line)}.settings-list .destination-row:last-child{border:0}
#materialMaintenance{border-radius:24px;background:var(--card);padding:20px}#materialMaintenance>summary{cursor:pointer;font-weight:600}#materialMaintenance .card{padding:16px 0;border-bottom:1px solid var(--line);border-radius:0}
/* Feed posts and comments. */
.join-conversation-bar{display:flex;align-items:center;width:100%;background:var(--paper-2);padding:16px 20px;border-radius:999px;margin:4px 0 24px;text-align:left;color:var(--ink-70);min-height:54px;font-size:14px}
.join-conversation-form{background:var(--card);padding:20px;border-radius:24px;margin-bottom:20px}.jc-title-input{margin-bottom:12px}.jc-form-actions{display:flex;align-items:center;gap:8px;margin-top:12px}.jc-form-actions #jcCancelBtn{margin-left:auto}.jc-image-btn{width:46px;height:46px;border-radius:50%;background:var(--primary-container);font-size:24px}
.post-card{background:var(--card);padding:22px;border-radius:24px;margin-bottom:16px;cursor:pointer;border:1px solid transparent}.post-card-head{display:flex;align-items:center;gap:8px;font-size:13px;margin-bottom:16px}.post-card-time{font-size:11px;color:var(--ink-70);white-space:nowrap}.post-menu-btn{margin-left:auto;min-width:40px;min-height:40px;font-size:23px;border-radius:50%;padding:0}
.post-title{font-size:20px;font-weight:650;letter-spacing:-.4px;margin-bottom:8px;line-height:1.35}.post-card-body{font-size:14px;line-height:1.65;overflow-wrap:anywhere}.post-card-body img{border-radius:16px;max-width:100%}.post-card-body .post-image{display:block;width:100%;max-height:360px;object-fit:cover;margin-top:12px}.post-card-body p{margin-bottom:10px}
.post-actions{display:flex;align-items:center;gap:12px;margin-top:18px;flex-wrap:wrap}.post-action-btn{border-radius:999px;min-height:40px;font-size:13px;color:var(--ink-70);padding:8px}.post-vote-row,.post-vote-rail,.post-vote-wrap{display:inline-flex;align-items:center;border-radius:999px;background:var(--primary-container);padding:0 4px;gap:4px}.post-vote-btn{min-width:34px;min-height:38px;font-size:17px;color:var(--gold-dark);padding:4px}.post-vote-btn.active{background:var(--gold);color:var(--on-primary);border-radius:999px}.post-vote-score{font-weight:600;font-size:13px}
.post-reaction-pill{display:flex;align-items:center;gap:4px;margin-left:auto;background:var(--paper-2);border-radius:999px;padding:4px 8px;min-height:40px}.post-reaction-pill button{min-width:30px;min-height:32px}.post-comments-panel{max-height:0;overflow:hidden;opacity:0;transition:max-height .38s var(--ease),opacity .25s var(--ease)}.post-card.expanded .post-comments-panel{max-height:3000px;opacity:1;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}.post-comments-list{display:flex;flex-direction:column;gap:2px}.post-comment-inline-input{flex:1;min-width:0}.post-menu-item{display:block;width:100%;min-height:48px;text-align:left;padding:12px;border-radius:14px}
#pinnedPostBar{position:relative!important;left:auto!important;top:auto!important;width:100%!important;max-width:100%;background:var(--secondary-container);color:var(--secondary-ink);padding:14px 18px;border-radius:18px;margin-bottom:18px;cursor:pointer;overflow:hidden;align-items:center;gap:8px}.pin-preview{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pin-author{font-size:12px;font-weight:600}#pinnedPostBar.hidden{display:none!important}
.social-floating-action{position:fixed;bottom:28px;right:max(28px,calc((100vw - 840px - var(--rail))/2 + 28px));z-index:85}.social-floating-action.hidden{display:none}.social-fab{display:flex;align-items:center;gap:10px;min-height:56px;padding:16px 22px;background:var(--gold);color:var(--on-primary);border-radius:20px;box-shadow:var(--shadow-lg);font-size:23px}.social-fab span{font-size:14px;font-weight:600}
#socialPillBar{position:fixed;bottom:26px;left:50%;z-index:87;background:var(--primary-container);border-radius:999px;padding:4px;gap:4px}#socialPillBar.hidden{opacity:0;pointer-events:none}.social-pill-group{display:flex;align-items:center}.social-pill{min-height:42px;padding:9px 16px;border-radius:999px;font-size:13px}.social-pill.active,.social-pill-group.active{background:var(--gold);color:var(--on-primary);border-radius:999px}.social-pill-divider{height:20px;width:1px;background:var(--line)}
.reaction-bar{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.reaction-pill{border-radius:999px;background:var(--secondary-container);color:var(--secondary-ink);min-height:34px;padding:5px 10px;font-size:13px}.reaction-add-btn{width:38px;height:38px;border-radius:50%;background:var(--paper-2)}
#reactionDrawer{display:none;position:fixed;z-index:500;padding:10px;border-radius:24px;background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow-lg);max-width:calc(100vw - 20px)}
#reactionDrawer .emoji-row{display:flex;gap:3px;align-items:center}.emoji-pick-btn{font-size:24px;min-width:38px;min-height:44px;border-radius:12px;padding:5px}.drawer-custom-input{width:60px!important}.emoji-pick-btn-toggle{min-height:44px}.reaction-add-btn.expanded{background:var(--primary-container)}
.rec-comments-label{font-size:16px;font-weight:600;margin:20px 0 12px}.rec-comment-row{display:flex;gap:12px;align-items:flex-start;padding:15px 0;border-bottom:1px solid var(--line);font-size:14px}.rec-comment-body{flex:1;min-width:0;overflow-wrap:anywhere}.rec-comment-del{min-width:36px;min-height:36px;color:var(--ink-70)}.rec-comment-reply{margin-left:30px;background:var(--secondary-container);padding:14px;border-radius:16px}.rec-comments-toggle{padding:10px 0;color:var(--gold);min-height:42px}.rec-comment-input-row,.rec-reply-form{display:flex;gap:8px;align-items:center;margin-top:12px}.rec-comment-input-row input{flex:1;min-width:0}
.compose-textarea{min-height:180px}.compose-mode-btn.active{background:var(--gold);color:var(--on-primary)}.compose-poll-option-row{display:flex;gap:8px;align-items:center;margin-bottom:10px}.compose-poll-option-remove{min-width:40px;min-height:44px}.poll-question{font-size:19px;font-weight:600;margin-bottom:16px}.poll-option-row{position:relative;overflow:hidden;border:1px solid var(--line);border-radius:16px;padding:14px;margin:10px 0;cursor:pointer}.poll-option-row.voted{border-color:var(--gold)}.poll-option-fill{position:absolute;inset:0 auto 0 0;background:var(--primary-container);z-index:0}.poll-option-content{position:relative;z-index:1;display:flex;justify-content:space-between;align-items:center;gap:10px}.poll-option-right,.poll-option-voters{display:flex;align-items:center;gap:4px}.poll-option-pct{font-size:13px;font-weight:600}.poll-total-votes{font-size:12px;color:var(--ink-70)}.poll-voter-avatar{width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;overflow:hidden;margin-left:-6px;background:var(--paper-2);font-size:9px}.poll-voter-avatar img{width:100%;height:100%;object-fit:cover}
/* Book lists, covers, and details. */
.discover-filters{display:flex;gap:8px;flex-wrap:wrap;overflow:hidden;transition:max-height .2s}.discover-filters-wrap{margin:2px 0 20px}.discover-filter-chip{padding:10px 16px;min-height:42px;white-space:nowrap;font-size:13px;border-radius:999px;background:var(--secondary-container);color:var(--secondary-ink)}.discover-filter-chip.active{background:var(--gold);color:var(--on-primary)}.discover-filters-toggle{width:100%;min-height:36px;color:var(--ink-70)}.discover-filters-toggle-icon{display:inline-flex;transition:transform .2s}.discover-filters-toggle-icon.expanded,.discover-filters-toggle.expanded .discover-filters-toggle-icon{transform:rotate(180deg)}
#discoverFeed{transition:opacity .16s var(--ease)}#discoverFeed.discover-swipe-fade{opacity:0}
.discover-cat-title{font-size:22px;margin:20px 0}.discover-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px 16px}.discover-book-card{cursor:pointer;min-width:0}.discover-book-cover-wrap{aspect-ratio:2/3;background:var(--paper-2);border-radius:12px;overflow:hidden;position:relative}.discover-book-cover-wrap img{width:100%;height:100%;object-fit:cover}.discover-book-title{font-size:14px;line-height:1.35;font-weight:600;margin-top:10px}.discover-book-rating{font-size:12px;color:var(--ink-70);margin-top:4px}.discover-group-badge{position:absolute;top:8px;left:8px;padding:4px 8px;font-size:10px;background:var(--primary-container);color:var(--gold-dark);border-radius:999px}.discover-add-card{border:1px dashed var(--outline);aspect-ratio:2/3;border-radius:12px;color:var(--gold);font-size:32px}
.discover-pager,.bh-pager{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:22px 0;font-size:13px}.discover-pager button{padding:12px 16px;border-radius:999px;background:var(--primary-container);min-height:44px}
#discoverFabPrev,#discoverFabNext{position:fixed;bottom:24px;transform:translateX(-50%);border-radius:50%;width:48px;height:48px;background:var(--primary-container);color:var(--gold-dark);box-shadow:var(--shadow);z-index:81;opacity:0;pointer-events:none}#discoverFabPrev.visible,#discoverFabNext.visible{opacity:1;pointer-events:auto}
.bh-grid-inner{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:20px 14px}.bh-card{position:relative;cursor:pointer;min-width:0}.bh-cover-wrap{width:100%;aspect-ratio:2/3;overflow:hidden;border-radius:10px;background:var(--paper-2)}.bh-cover-wrap img{width:100%;height:100%;object-fit:cover}.bh-title{font-weight:600;font-size:14px;line-height:1.35}.bh-author{font-size:12px;color:var(--ink-70);margin:8px 0 3px}.bh-delete{position:absolute;top:6px;right:6px;width:32px;height:32px;border-radius:50%;background:var(--card);color:var(--ink-70);box-shadow:var(--shadow)}
#tab-mybooks>.card{background:transparent;padding:0}#tab-mybooks .bh-grid-inner{display:flex;flex-direction:column;gap:12px}#tab-mybooks .bh-card{background:var(--card);border-radius:20px;padding:16px;display:grid;grid-template-columns:76px minmax(0,1fr) auto;grid-template-rows:auto auto 1fr;gap:0 16px;min-height:144px;align-items:start}#tab-mybooks .bh-cover-wrap{grid-column:1;grid-row:1/4;width:76px;height:112px}#tab-mybooks .bh-title{grid-column:2;grid-row:1;margin:3px 0 6px;padding-right:10px;font-size:16px}#tab-mybooks .bh-author{grid-column:2;grid-row:2;margin:0}#tab-mybooks .book-state-action{grid-column:2;grid-row:3;justify-self:start;align-self:end;padding:7px 12px;border-radius:999px;background:var(--primary-container);color:var(--gold-dark);font-size:12px;margin-top:12px}#tab-mybooks .bh-delete{position:static;grid-column:3;grid-row:1/4;align-self:center;background:transparent}
.rating-star-row{display:flex;justify-content:space-between;gap:4px;margin:14px 0}.rating-star{min-width:0;flex:1;height:40px;border-radius:10px;background:var(--paper-2);color:var(--ink-70);font-size:14px;font-weight:600;padding:0}.rating-star.filled{background:var(--primary-container);color:var(--gold-dark)}.rating-star.filled:last-child,.rating-star.filled:has(+.rating-star:not(.filled)){background:var(--gold);color:var(--on-primary)}
#bookDiscoverModalBody>div:first-child{display:flow-root;text-align:left!important;margin-bottom:20px;min-height:170px}#coverFixTarget{float:left;margin:0 20px 10px 0!important;border:0!important;border-radius:10px!important;width:110px!important;height:165px!important}#bookDiscoverModalBody h2{font-size:26px;padding-top:8px}#bookDiscoverModalBody .rec-comment-row{clear:both}
/* Shared-book nominations, voting, and reading. */
.phase-steps{display:flex;justify-content:space-between;margin:8px 0 28px;padding:0 8px}.phase-step{position:relative;display:flex;flex:1;flex-direction:column;align-items:center;gap:7px;color:var(--ink-70);font-size:12px}.phase-step:before{content:'';position:absolute;height:2px;top:14px;left:-50%;right:50%;background:var(--line)}.phase-step:first-child:before{display:none}.phase-step>span{position:relative;z-index:1;background:var(--paper);border:2px solid var(--outline);width:29px;height:29px;display:flex;align-items:center;justify-content:center;border-radius:50%;font-size:12px}.phase-step.current>span,.phase-step.complete>span{background:var(--gold);border-color:var(--gold);color:var(--on-primary)}.phase-step.current{font-weight:700;color:var(--gold)}
#quarterlyPickCard{padding:0;background:transparent}#quarterlyPickCard>h2{display:none}.qp-phase-label{font-size:27px;font-weight:650;letter-spacing:-.6px;margin-bottom:8px}.qp-deadline{background:var(--secondary-container);color:var(--secondary-ink);padding:16px 20px;border-radius:20px;margin:14px 0 22px;font-size:14px}
.qp-nom-list{display:flex;flex-direction:column;gap:12px;margin:16px 0}.qp-nom-row{display:flex;align-items:center;gap:14px;background:var(--card);padding:16px;border-radius:20px;cursor:pointer;flex-wrap:wrap}.qp-nom-cover-ph{width:58px;height:86px;border-radius:7px;overflow:hidden;flex:0 0 58px}.qp-nom-cover{width:100%;height:100%;object-fit:cover}.qp-nom-info{flex:1;min-width:110px}.qp-nom-title{font-size:16px;font-weight:600}.qp-nom-meta{font-size:12px;color:var(--ink-70);margin-top:5px}.qp-nom-row.ghost{background:transparent;border:1px dashed var(--outline);min-height:86px}.qp-slot-fill-btn{font-size:28px;color:var(--gold);min-width:44px;min-height:44px}.qp-nom-row.qp-editing{display:block}
.qp-vs-row{display:flex;align-items:stretch;gap:12px;margin-bottom:24px}.qp-vs-card{flex:1;min-width:0;padding:18px 12px;border:1px solid var(--line);border-radius:24px;background:var(--card);text-align:center;cursor:pointer}.qp-vs-card.voted{border-color:var(--gold);background:var(--primary-container)}.qp-vs-cover{width:100px;height:150px;object-fit:cover;border-radius:8px;margin:0 auto 12px}.qp-vs-title{font-size:17px;font-weight:650;line-height:1.35}.qp-vs-author{font-size:12px;color:var(--ink-70);margin-top:6px}.qp-vs-votes{font-size:22px;font-weight:700;margin-top:16px;color:var(--gold-dark)}.qp-vs-mid{align-self:center;font-size:11px;font-weight:600;color:var(--ink-70)}.qp-match-wrap{margin-top:18px}
.qp-bugun-row{display:flex;gap:20px;align-items:center;flex-wrap:wrap}.qp-bugun-cover{width:110px;height:165px;overflow:hidden;border-radius:9px;flex:0 0 110px}.qp-bugun-cover img{width:100%;height:100%;object-fit:cover}.qp-bugun-info{flex:1;min-width:100px}#materialCommonReading{padding:22px;background:var(--card);border-radius:26px}#materialCommonReading .qp-bugun-row{flex-direction:column;text-align:center}#materialCommonReading .qp-bugun-cover{width:154px;height:230px;flex-basis:230px}#materialCommonReading .qp-nom-title{font-size:25px}#materialCommonReading .stamp-btn{width:100%;background:var(--paper-2);color:var(--ink-70)}#materialCommonReading>.muted{text-align:center;font-size:12px;margin:10px 0}
.qp-finish-form{margin-top:22px}.qp-mood-row{display:flex;gap:8px;flex-wrap:wrap}.qp-mood-chip{padding:10px 14px;border-radius:999px;background:var(--secondary-container)}.qp-mood-chip.selected{background:var(--primary-container);color:var(--gold-dark)}.qp-disc-q{padding:16px;background:var(--paper-2);border-radius:18px;margin:14px 0}.qp-disc-q-title{font-weight:600;font-size:16px;margin-bottom:10px}.qp-disc-answer,.qp-chat-msg{display:flex;gap:10px;font-size:14px;padding:12px 0;border-bottom:1px solid var(--line)}.qp-chat-input-row{display:flex;gap:8px;margin-top:14px}
/* Reading records, streaks, and badges. */
.libcard{overflow-x:auto}.weekrep-list{display:flex;flex-direction:column}.weekrep-row{display:flex;gap:14px;align-items:center;padding:16px 6px;border-bottom:1px solid var(--line)}.weekrep-name{width:110px;flex:0 0 110px;font-size:13px}.weekrep-name .uc-name{display:inline-block;max-width:75px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.weekrep-strip,.weekhist-strip{display:flex;align-items:stretch;flex:1;min-width:0}.weekhist-col{flex:1;min-width:0;text-align:center;padding:12px 2px}.weekhist-daylabel{font-size:12px}.weekhist-date{display:block;color:var(--ink-70);font-size:10px;margin-top:5px}.weekhist-fillwrap{position:relative;height:76px;margin-top:10px;display:flex;align-items:flex-end;justify-content:center}
.weekhist-bar{width:78%;max-width:36px;height:26%;min-height:22px;border-radius:14px 14px 8px 8px;background:var(--paper-2);display:flex;align-items:flex-start;justify-content:center;padding-top:7px;transition:height .2s var(--ease)}
.weekhist-icon{font-size:15px;line-height:1;font-weight:700;color:var(--ink-70)}
.wh-read .weekhist-bar{height:100%;background:var(--primary-container)}.wh-read .weekhist-icon{color:var(--gold-dark)}
.wh-penalty .weekhist-bar{height:36%;background:var(--error-container)}.wh-penalty .weekhist-icon{color:var(--cloth-dark)}
.wh-pas .weekhist-bar{height:64%;background:var(--secondary-container)}.wh-pas .weekhist-icon{color:var(--secondary-ink)}
.wh-empty .weekhist-bar{height:22%;background:transparent;border:2px dashed var(--outline)}
.weekhist-col.small .weekhist-daylabel{font-size:10px}.weekhist-col.small .weekhist-date{display:none}.weekhist-col.small .weekhist-fillwrap{height:54px;margin-top:5px}.weekhist-col.small .weekhist-bar{max-width:26px;border-radius:10px 10px 6px 6px;padding-top:5px}.weekhist-col.small .weekhist-icon{font-size:11px}.weekhist-col.small{padding:5px 1px}.weekhist-card{background:var(--paper);border-radius:20px;padding:8px}
.weekgrid{width:100%;border-collapse:collapse;font-size:12px;min-width:400px}.weekgrid th,.weekgrid td{text-align:center;padding:10px 4px;border-bottom:1px solid var(--line)}.weekgrid th{font-weight:500;font-size:11px;color:var(--ink-70)}.weekgrid .name-cell{text-align:left}.stamp-mini{width:26px;height:26px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:13px}.stamp-mini.read{background:var(--primary-container);color:var(--gold-dark)}.stamp-mini.skip{background:var(--error-container);color:var(--cloth-dark)}.stamp-mini.empty{border:1px dashed var(--outline);color:var(--ink-70)}.stamp-mini.notmember{opacity:.3}.stamp-mini.auto{opacity:.75}.stamp-mini.clickable,.day-info-cell{cursor:pointer}
.material-streak-hero{text-align:center;padding:16px 0 28px}.material-medal{display:flex;align-items:center;justify-content:center;width:116px;height:116px;border-radius:36px;background:var(--primary-container);color:var(--gold);font-size:46px;font-weight:700;margin:0 auto 22px;border:8px solid var(--paper-2);outline:2px solid var(--primary-container);transform:rotate(-6deg)}.material-streak-hero h2{font-size:25px;margin-bottom:8px}.milestones{display:flex;justify-content:space-between;gap:8px;margin-top:24px}.milestone{display:flex;align-items:center;flex-direction:column;gap:8px;flex:1}.milestone>span{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border:2px dashed var(--outline);border-radius:14px;color:var(--ink-70);font-weight:600}.milestone.earned>span{background:var(--primary-container);border:2px solid var(--gold);color:var(--gold-dark)}.milestone small{font-size:10px;color:var(--ink-70)}
.streak-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:12px;margin-top:16px}
.streak-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;background:var(--secondary-container);border-radius:20px;padding:16px 10px}
.streak-card>span:first-child{margin-right:0!important}
.streak-card b{font-size:13px;font-weight:600;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.streak-card-days{font-size:11px;font-weight:700;color:var(--secondary-ink);background:var(--card);padding:3px 10px;border-radius:999px}
.streak-card.mine{background:var(--primary-container)}
.streak-card.mine .streak-card-days{background:var(--gold);color:var(--on-primary)}
.member-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 0;border-bottom:1px solid var(--line);flex-wrap:wrap}.member-row:last-child{border:0}.member-row>div:first-child{min-width:0}.member-name{font-size:16px;font-weight:600;overflow-wrap:anywhere}.member-meta{font-size:12px;color:var(--ink-70);margin-top:6px}.user-chip{cursor:pointer;border-radius:8px;display:inline-flex;align-items:center;gap:4px;vertical-align:middle}
.badge-shelf-row{display:flex;align-items:center;gap:16px;border-bottom:1px solid var(--line);padding:18px 0}.badge-shelf-name{width:76px;flex:0 0 76px}.badge-shelf-name .user-chip{flex-direction:column;font-size:11px}.badge-shelf-icons{flex:1;display:flex;justify-content:space-between;gap:8px}.badge-shelf-item{flex:1;max-width:40px;min-width:0}.badge-shelf-coin{position:relative;display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1;border-radius:12px;background:var(--primary-container)!important;font-size:19px;cursor:pointer}.badge-shelf-coin.ghost{background:var(--paper-2)!important;opacity:.4}.badge-shelf-count{position:absolute;bottom:-6px;right:-3px;background:var(--gold)!important;color:var(--on-primary);font-size:10px;font-weight:700;border-radius:999px;min-width:17px;text-align:center}.badge-shelf-count-num{color:var(--on-primary)}.badge-shelf-info{display:none;position:absolute;bottom:120%;white-space:nowrap;padding:6px 10px;border-radius:9px;background:var(--gold)!important;color:var(--on-primary);font-size:11px;z-index:5}.badge-shelf-info.show{display:block}.wobble{animation:screen-in .2s}
/* Badge history names: avatar and name centered in the fixed-width column, so every row lines up and
   the avatar's badge ring stays clear of the scroll container's left edge (which would clip it). */
.badge-shelf-name .user-chip{display:flex;align-items:center;width:100%;min-width:0;text-align:center}
.badge-shelf-name .user-chip>:first-child{margin-right:0!important}
.badge-shelf-name .uc-name{max-width:100%}
/* Room for the counter that sticks out of the last badge, which the scroll container would clip too. */
.badge-shelf-icons{padding-right:6px}
.chip,.role-chip{display:inline-flex;align-items:center;border-radius:999px;padding:4px 10px;font-size:11px;font-weight:500;background:var(--paper-2);color:var(--ink-70)}.chip.ok,.role-chip{background:var(--primary-container);color:var(--gold-dark)}.chip.danger,.chip.banned{background:var(--error-container);color:var(--cloth-dark)}.chip.warn,.chip.pending{background:var(--secondary-container);color:var(--secondary-ink)}.chip.owner{background:var(--gold);color:var(--on-primary)}
/* Gift books and delivery status. */
.receipt{border-radius:22px;background:var(--paper);padding:20px;margin-bottom:16px}.rweek{font-size:14px;font-weight:500;margin-bottom:14px;line-height:1.6}.gift-form{margin-top:16px}.pair-line{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;padding:14px 0;align-items:center;border-bottom:1px solid var(--line)}.giver{color:var(--ink);font-weight:600}.receiver{color:var(--gold-dark);font-weight:600}.arrow{color:var(--ink-70)}.empty-note{font-size:13px;color:var(--ink-70);line-height:1.6}.gift-stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.gift-stats-cell{text-align:center;background:var(--paper-2);padding:16px 8px;border-radius:20px}.gift-stats-name{font-size:13px;font-weight:600;margin:8px 0}.gift-stats-coins{display:flex;gap:10px;justify-content:center}.gift-stats-num,.gift-stats-icon-only{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center}.gift-stats-icon-only,.gift-stats-num.received{background:var(--primary-container);color:var(--gold-dark)}.gift-stats-num.given{background:var(--secondary-container);color:var(--secondary-ink)}.gift-stats-num-text{font-weight:600}
/* On phones, dialogs use the available screen as a detail view. */
.modal-overlay-anim{backdrop-filter:none;overflow:auto;background:rgb(15 24 16 / .42)!important;animation:screen-in .18s}
.modal-overlay-anim>.card{max-width:620px!important;max-height:90dvh!important;overflow-y:auto;padding:60px 28px 28px!important;border-radius:28px;box-shadow:var(--shadow-lg);margin:0!important;width:100%}
.modal-overlay-anim>.card>button:first-child{top:12px!important;right:14px!important;width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--paper-2)!important;font-size:20px!important}
.modal-overlay-anim.closing{opacity:0;transition:opacity .12s}.modal-card-anim.closing{transform:translateY(8px);opacity:0;transition:.12s}
#anchoredPopover{border:1px solid var(--line)!important;background:var(--card)!important;border-radius:20px!important;padding:8px!important;max-width:280px!important;box-shadow:var(--shadow-lg)!important}
#notifModal .card h2{font-size:28px}.notif-row{border-radius:20px!important;background:var(--primary-container);padding:18px!important;margin-bottom:12px;border:0;line-height:1.6}.notif-row:nth-child(even){background:var(--secondary-container)}.notif-row .muted{font-size:11px!important;margin-bottom:6px}
.toast{position:fixed;z-index:700;left:50%;bottom:28px;transform:translateX(-50%);max-width:560px;width:calc(100% - 32px);padding:16px 20px;background:var(--ink);color:var(--paper);border-radius:18px;box-shadow:var(--shadow-lg);font-size:14px;display:flex;align-items:center;justify-content:space-between;gap:12px}.toast button{color:var(--primary-container);font-weight:600;min-height:40px}
.empty-state{padding:40px 18px;text-align:center;color:var(--ink-70);font-size:14px}.empty-state .big{display:block;font-size:32px;margin-bottom:12px}.book-suggest-box{position:relative;z-index:20;border-radius:16px;overflow:hidden;background:var(--card);box-shadow:var(--shadow-lg);max-height:300px;overflow-y:auto}.book-suggest-item,.book-suggest-row{padding:12px;display:flex;align-items:center;gap:12px;cursor:pointer;border-bottom:1px solid var(--line)}.book-suggest-box img{width:36px;height:52px;object-fit:cover;border-radius:5px}.book-suggest-title{font-size:14px;font-weight:600}.book-suggest-author{font-size:12px;color:var(--ink-70)}
.theme-switch{position:relative;display:inline-block;width:50px;height:30px;flex:0 0 50px}.theme-switch input{opacity:0;width:0;height:0}.slider{position:absolute;inset:0;background:var(--paper-2);border:2px solid var(--outline);border-radius:999px}.slider:before{content:'';position:absolute;left:5px;top:5px;width:16px;height:16px;background:var(--outline);border-radius:50%;transition:.18s}.theme-switch input:checked+.slider{background:var(--gold);border-color:var(--gold)}.theme-switch input:checked+.slider:before{transform:translateX(18px);background:var(--on-primary)}.theme-switch input:focus-visible+.slider{outline:3px solid var(--gold);outline-offset:3px}
.card-desc-wrap{margin-bottom:10px}
.guide-section{padding:14px 18px;border:1px solid var(--line);border-radius:18px;margin-bottom:12px}.guide-section summary{font-weight:600;cursor:pointer}.plain{padding-left:20px;font-size:14px;color:var(--ink-70)}.plain li{margin:9px 0}
.auth-wrap{max-width:460px;margin:8vh auto;padding:24px}.center-logo{text-align:center;margin:20px 0 32px}.center-logo-mark{width:80px;height:80px;border-radius:28px;background:var(--primary-container);color:var(--gold);padding:20px;margin:0 auto 18px}.center-logo-mark svg{width:40px;height:40px}.center-logo-word{font-size:32px;letter-spacing:-1px;font-weight:650}.auth-toggle{display:flex;border-radius:999px;background:var(--secondary-container);padding:4px;margin-bottom:28px}.auth-toggle button{flex:1;min-height:44px;border-radius:999px;font-size:14px}.auth-toggle button.active{background:var(--gold);color:var(--on-primary)}.banned-notice{padding:18px;border-radius:18px;background:var(--error-container);color:var(--cloth-dark);margin-bottom:20px}.loading-note{padding:25vh 20px;text-align:center;color:var(--ink-70)}.loading-note:before{content:'';display:block;width:32px;height:32px;border-radius:50%;border:3px solid var(--primary-container);border-top-color:var(--gold);animation:spin .8s linear infinite;margin:0 auto 18px}@keyframes spin{to{transform:rotate(360deg)}}.field-flash-error{outline:3px solid var(--cloth)!important;outline-offset:1px}
@media(min-width:1100px){main{padding-top:26px}.daily-tab h1{font-size:42px}.daily-stats{gap:18px}.club-grid{grid-template-columns:repeat(3,1fr)}.hub-item.expanded{grid-column:1/-1}}
@media(max-width:700px){
 :root{--rail:0px}body{font-size:14px}.content-col{margin-left:0!important;padding-bottom:calc(var(--nav-height) + env(safe-area-inset-bottom,0px))}
 header.top{min-height:70px;padding:calc(12px + env(safe-area-inset-top,0px)) 20px 12px}.header-title-area{font-size:27px;gap:6px}.header-pill{width:38px;height:42px}.whoami{gap:2px}
 main{padding:12px 20px 40px}h1{font-size:31px;margin-bottom:22px}h2{font-size:19px}
 /* Keep bottom navigation on its own rendering layer to prevent flickering during tab swipes. */
 .sidebar{inset:auto 0 0;width:100%;height:calc(var(--nav-height) + env(safe-area-inset-bottom,0px));padding:8px 8px calc(8px + env(safe-area-inset-bottom,0px));background:var(--paper);border-top:1px solid var(--line);z-index:100;transform:translateZ(0);isolation:isolate}.sidebar-header{display:none}.sidebar-tabs{flex-direction:row;gap:0;height:100%;justify-content:space-around}.sidebar-tabs button{flex:1;min-width:0;min-height:60px;font-size:11px;gap:4px}.tab-icon{width:58px;height:32px}.tab-icon svg{width:23px;height:23px}
 .card{padding:20px;border-radius:24px;margin-bottom:16px}.daily-greeting{margin-bottom:20px;font-size:13px}.daily-checkin{padding:20px}.daily-checkin h2{font-size:23px}.daily-stats{gap:12px}.stat-card{padding:17px;min-height:128px}.stat-icon{right:14px;top:16px;font-size:22px}.stat-card strong,.streak-stat{font-size:26px}.daily-book{gap:16px}.daily-book>img,.daily-book-placeholder{width:84px;height:128px;flex-basis:84px}.daily-book h3{font-size:17px}.daily-book .primary{font-size:12px;min-height:42px;padding:10px 16px}
 .destination-row{padding:17px;gap:12px}.club-grid{gap:12px}.hub-item .destination-row{padding:18px}.hub-item-summary{min-height:114px}.hub-item .destination-row>.hub-chevron{right:16px;top:20px}.hub-item.expanded .destination-row>.hub-chevron{top:12px}svg.hub-illustration{width:52px;height:44px;right:8px;bottom:6px}.club-feature{padding:20px}.club-feature-illustration{width:64px;height:56px}
 .post-card{padding:18px}.post-title{font-size:19px}.post-card-head{gap:5px}.post-card-time{font-size:10px}.post-actions{gap:6px}.post-card-body{font-size:14px}
 .social-floating-action{bottom:calc(96px + env(safe-area-inset-bottom,0px));right:20px}.social-fab{min-height:52px;padding:13px 19px;border-radius:18px}
 #socialPillBar{bottom:calc(94px + env(safe-area-inset-bottom,0px))}#discoverFabPrev,#discoverFabNext{bottom:calc(94px + env(safe-area-inset-bottom,0px))}
 .discover-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 10px}.discover-book-cover-wrap{border-radius:9px}.discover-book-title{font-size:12.5px}.discover-book-rating{font-size:10.5px}.discover-filter-chip{padding:9px 13px;font-size:12px}.discover-grid img{object-fit:cover}
 .segmented button{font-size:12px;padding:9px 7px}.bh-grid-inner{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 10px}.bh-title{font-size:12px}.bh-author{font-size:11px}
 #tab-mybooks .bh-card{grid-template-columns:68px minmax(0,1fr) 28px;padding:14px;gap:0 12px;min-height:134px}#tab-mybooks .bh-cover-wrap{width:68px;height:104px}#tab-mybooks .bh-title{font-size:15px}#tab-mybooks .bh-delete{width:28px}
 .weekrep-row{gap:8px}.weekrep-name{width:62px;flex-basis:62px}.weekrep-name .user-chip{display:flex;flex-direction:column;align-items:flex-start}.weekrep-name .uc-name{font-size:10px;max-width:60px}.weekhist-col.small .weekhist-bar{max-width:22px}.weekhist-col.small .weekhist-daylabel{font-size:9px}.weekhist-daylabel{font-size:11px}.weekhist-date{font-size:9px}.weekgrid{min-width:320px}
 .milestones{gap:4px}.milestone>span{width:36px;height:36px}.badge-shelf-row{gap:10px}.badge-shelf-name{width:58px;flex-basis:58px}.badge-shelf-icons{gap:6px}.badge-shelf-coin{font-size:15px}.gift-stats-grid{grid-template-columns:repeat(2,1fr)}
 .receipt{padding:17px}.pair-line{gap:6px;font-size:12px}.qp-nom-row{padding:14px;gap:12px}.qp-vs-row{gap:8px}.qp-vs-card{padding:16px 10px}.qp-vs-cover{width:92px;height:138px}.qp-vs-title{font-size:16px}.qp-nom-title{font-size:15px}
 .modal-overlay-anim{padding:0!important;align-items:stretch!important}.modal-overlay-anim>.card{border-radius:0!important;max-width:100%!important;width:100%!important;max-height:100dvh!important;height:100dvh;padding:72px 20px calc(28px + env(safe-area-inset-bottom,0px))!important;background:var(--paper);overscroll-behavior:contain}.modal-overlay-anim>.card>button:first-child{left:14px;right:auto!important;top:calc(16px + env(safe-area-inset-top,0px))!important}.modal-overlay-anim>.card h2{font-size:25px}
 #bookDiscoverModalBody h2{font-size:24px}.toast{bottom:calc(96px + env(safe-area-inset-bottom,0px));font-size:13px}
}
@media(max-width:360px){main{padding-left:14px;padding-right:14px}header.top{padding-left:14px;padding-right:14px}.header-title-area{font-size:24px}.card{padding:17px}.sidebar-tabs button{font-size:10px}.tab-icon{width:50px}.daily-actions{gap:6px}.daily-actions .stamp-btn{padding:10px}.daily-actions .stamp-btn span{font-size:13px}.milestone>span{width:31px;height:31px}.rating-star-row{gap:2px}.rating-star{font-size:12px}.weekhist-col.small .weekhist-bar{max-width:20px}.qp-vs-cover{width:80px;height:120px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
#timelineFeed{margin-top:0!important}
#tab-gifts>.card:first-of-type{background:transparent;padding:0}#tab-gifts>.card:first-of-type>h2{display:none}#giftsContent>.receipt{background:var(--card)}
#tab-recs>.card{background:transparent;padding:0}#tab-recs .receipt{background:var(--card)}
.post-card-body .post-book-cover{width:70px;height:105px;object-fit:cover;flex:0 0 70px;border-radius:8px}
.post-actions>.reaction-add-btn{width:auto;min-width:48px;padding:8px 12px;white-space:nowrap;margin-left:auto}
.common-selection-link{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-radius:18px;background:var(--primary-container);color:var(--gold-dark);font-size:13px;width:100%;margin-bottom:18px}
.card-add-btn.open::after{content:'Kapat'!important}
#tab-worms>.card:first-child>h2,#tab-mworms>.card:first-child>h2{font-size:15px;color:var(--ink-70)}
.book-average{font-size:22px;font-weight:650;color:var(--gold);margin:12px 0}.book-average small{display:block;font-size:12px;font-weight:400;color:var(--ink-70)}
/* Spacing and alignment for shared page elements. */
.stamp-btns{display:flex;gap:8px}
.poll-option-text{flex:1;min-width:0}
.poll-voter-extra{background:var(--ink-70)!important;color:#fff!important;font-size:8px;font-weight:800}
.join-conversation-plus{font-size:20px;font-weight:400;opacity:.5;flex:0 0 auto}
.rcount{font-size:11px;color:var(--ink-70);margin-left:2px}
.pin-icon{flex:0 0 auto;font-size:16px}
.gift-stats-avatar{margin-bottom:8px}
.total-pages-clickable{cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.post-vote-score.voted-up{color:#ff4500}.post-vote-score.voted-down{color:#7193ff}
@keyframes libBtnPulse{0%{transform:scale(1)}40%{transform:scale(.93);opacity:.7}100%{transform:scale(1);opacity:.55}}
.lib-btn-pulse{animation:libBtnPulse .28s ease-out forwards;pointer-events:none}
@keyframes slideDownOpen{from{opacity:0;max-height:0}to{opacity:1;max-height:1200px}}
.slide-down-anim{animation:slideDownOpen .22s var(--ease);overflow:hidden}
@keyframes reactionBurst{0%{transform:scale(1)}40%{transform:scale(1.6)}100%{transform:scale(1)}}
.reaction-burst{animation:reactionBurst .28s cubic-bezier(.34,1.56,.64,1)}
/* Library cards reuse the Club grid and card layout. */
.daily-checkin-row{display:flex;align-items:center;justify-content:space-between;gap:16px}
.daily-checkin-text{flex:1;min-width:0}
.daily-illustration{flex:0 0 auto;width:116px;height:116px;pointer-events:none}
@media(max-width:420px){.daily-checkin-row{gap:8px}.daily-illustration{width:84px;height:84px}}

/*
 * Clip horizontal overflow without creating a scroll container, so tab swipes do not affect vertical
 * scrolling or fixed navigation.
 */
html, body { overflow-x: clip; }

/*
 * Prevent a cancelled downward tab drag from triggering pull-to-refresh. Keep normal vertical scrolling
 * available.
 */
html, body { overscroll-behavior-y: contain; }

/* Rotating hub card previews: closed cards keep a fixed size whatever the data. */
#materialClubGrid,#materialLibraryGrid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:14px}
.hub-item[data-preview]{--hp-height:378px;background:var(--secondary-container);min-width:0}
.hub-item[data-preview=records],.hub-item[data-preview=bookhistory]{grid-column:1/-1;--hp-height:318px;background:var(--primary-container)}
.hub-item[data-preview=gifts]{background:var(--paper-2)}
.hub-item[data-preview]>.hub-item-toggle{width:100%;height:var(--hp-height);padding:20px;display:block;text-align:left;margin:0}
.hub-item[data-preview] .hub-item-summary{display:flex;gap:0;min-height:0;max-height:none;height:100%;width:100%;overflow:hidden;opacity:1}
.hp-heading{font-size:16px;font-weight:650;padding-right:18px;line-height:1.25;min-height:40px;flex-shrink:0}
.hp-stage{display:block;position:relative;flex:1;width:100%;min-height:0;overflow:hidden}
.hp-frame{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:10px;contain:layout paint}
.hp-copy{display:flex;flex-direction:column;gap:7px;min-width:0;width:100%}.hp-eyebrow{color:var(--ink-70);font-size:10px!important;font-weight:600;letter-spacing:.3px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hp-value{font-size:22px;line-height:1.13;font-weight:600;letter-spacing:-.6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.hp-detail{font-size:11px;line-height:1.4;color:var(--ink-70);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.hp-emblem{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:46px;height:46px;border-radius:16px;background:var(--card);color:var(--secondary-ink);font-size:26px;font-style:normal}
.hp-ok{color:var(--forest)!important}.hp-pass{color:var(--rust)!important}.hp-danger{color:var(--cloth)!important}
.hp-footer{display:flex;align-items:center;justify-content:flex-end;width:100%;gap:6px;flex-shrink:0;min-height:28px;font-size:10px;color:var(--ink-70);border-top:0;padding-top:10px;margin-top:12px}.hp-position{white-space:nowrap;font-variant-numeric:tabular-nums}
.hp-book-cover{display:flex;position:relative;align-items:center;justify-content:center;overflow:hidden;width:48px;height:70px;flex-shrink:0;border-radius:3px 9px 9px 3px;background:var(--secondary-ink);color:var(--paper);border-left:4px solid color-mix(in srgb,var(--ink) 20%,transparent);box-shadow:3px 4px 0 color-mix(in srgb,var(--ink) 10%,transparent);font-size:30px;font-family:Georgia,serif}.hp-book-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.hp-book-title{font-size:17px;line-height:1.18;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.hub-item[data-preview=bookhistory] .hp-frame,.hub-item[data-preview=records] .hp-frame{flex-direction:row;align-items:center;justify-content:flex-start;gap:20px}
.hub-item[data-preview=bookhistory] .hp-book-cover{width:66px;height:100px;font-size:42px}.hub-item[data-preview=bookhistory] .hp-book-title{font-size:24px}.hub-item[data-preview=records] .hp-emblem{width:60px;height:60px;font-size:36px}.hub-item[data-preview=records] .hp-value{font-size:30px}
.hp-stats{display:flex;gap:12px;width:100%;justify-content:space-between}.hp-stat{display:flex;flex-direction:column;align-items:center;flex:1;gap:2px;min-width:0}.hp-stat i{font-style:normal;font-size:23px;line-height:1}.hp-stat b{font-size:26px;line-height:1.1;font-weight:600}.hp-stat small{font-size:10px!important;white-space:nowrap}
.hub-item[data-preview].expanded{grid-column:1/-1}.hub-item[data-preview].expanded>.hub-item-toggle{height:0;padding:0;overflow:hidden;visibility:hidden}.hub-item[data-preview].expanded .hub-item-summary{min-height:0;height:0}
@media(min-width:701px){.hub-item[data-preview]{--hp-height:348px}.hub-item[data-preview=records],.hub-item[data-preview=bookhistory]{--hp-height:318px}.hp-value{font-size:28px}.hp-book-title{font-size:21px}.hp-detail{font-size:12px}}
@media(max-width:360px){.hub-item[data-preview]>.hub-item-toggle{padding:16px}.hp-heading{font-size:14px}.hp-value{font-size:20px}.hp-footer{font-size:9px}.hp-stats{gap:7px}.hp-toolbar{font-size:13px}}
@media(prefers-reduced-motion:reduce){.hub-item[data-preview],.hub-item[data-preview] *{animation:none!important;transition:none!important}}

.hub-item[data-preview]>.hub-item-toggle{touch-action:pan-y;user-select:none;-webkit-user-select:none}

/* Card illustrations, above the title and independent of the preview. */
.hp-illustration{display:flex;align-items:center;height:56px;min-height:56px;margin-bottom:12px;flex-shrink:0;pointer-events:none}
.hub-item[data-preview] .hp-illustration svg.hub-illustration{position:static;width:64px;height:56px;display:block}
.hub-item[data-preview] .destination-row:has(svg.hub-illustration) small{max-width:100%}

/* Personal picks: same cover style; explanations only show when the card is open. */
.ai-rec-disclosure>summary{display:block;cursor:pointer;list-style:none;border-radius:12px}
.ai-rec-disclosure>summary::-webkit-details-marker{display:none}
.ai-rec-disclosure>summary::marker{content:''}
.ai-rec-disclosure>summary:focus-visible{outline:3px solid var(--gold);outline-offset:5px}
.ai-rec-disclosure .ai-rec-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.ai-rec-disclosure .ai-rec-item{gap:6px;align-items:flex-start}
.ai-rec-disclosure .ai-preview-cover{width:66px;height:100px;margin-bottom:6px;font-size:42px}
.ai-rec-disclosure .ai-rec-item b{font-size:14px;line-height:1.25}
.ai-preview-author{font-size:11px;line-height:1.35;color:var(--ink-70);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ai-rec-expanded{margin-top:22px;display:grid;gap:20px}
.ai-rec-explanation h3{font-size:15px;margin:0 0 6px}.ai-rec-explanation p{font-size:13px;line-height:1.6;margin:0 0 6px;color:var(--ink-70);overflow-wrap:anywhere}
.ai-text-action{font-size:11px;line-height:1.4;font-weight:400;color:var(--ink-70);background:transparent;border:0;border-radius:0;box-shadow:none;min-height:36px;padding:8px 0;text-align:left;text-decoration:none}
.ai-text-action:hover{text-decoration:underline}.ai-refresh-action{display:block;margin-top:12px}
@media(max-width:360px){.ai-rec-disclosure .ai-rec-list{gap:10px}.ai-rec-disclosure .ai-preview-cover{width:52px;height:80px;font-size:34px}.ai-rec-disclosure .ai-rec-item b{font-size:13px}}

/* Keep the first card green and give the remaining cards distinct colors. */
:root{--preview-lilac:var(--secondary-container);--preview-peach:#f3e4d6;--preview-blue:#deebf4}
html[data-theme=dark]{--preview-peach:#3d3027;--preview-blue:#24333e}
.hub-item[data-preview=records],.hub-item[data-preview=bookhistory]{background:var(--preview-lilac)}
.hub-item[data-preview=badges],.hub-item[data-preview=mybooks]{background:var(--preview-peach)}
.hub-item[data-preview=gifts],.hub-item[data-preview=recs]{background:var(--preview-blue)}
.ai-card-illustration{display:block;width:64px;height:56px;margin-bottom:12px;pointer-events:none}
.daily-stats .total-days-card{grid-column:1/-1;background:var(--paper-2)}

/* The whole card stays open to the page swipe; previews change with the buttons. */
.hp-controls{position:absolute;top:calc((var(--hp-height) + 74px)/2);left:3px;right:3px;display:flex;justify-content:space-between;pointer-events:none;transform:translateY(-50%);z-index:2}
.hp-controls button{pointer-events:auto;width:32px;height:44px;display:flex;align-items:center;justify-content:center;border-radius:999px;font-size:26px;color:var(--ink-70);background:transparent;padding:0}
.hp-controls button:disabled{opacity:.2;cursor:default}.hub-item.expanded>.hp-controls{display:none}
.hub-item[data-preview] .hp-stage{padding-inline:14px}
.ai-rec-card{position:relative}.ai-card-heading{padding:0 28px 0 0;text-align:left;font-size:inherit;font-weight:inherit;width:100%}
.ai-card-chevron{position:absolute;top:22px;right:22px;font-size:23px;font-weight:400;color:var(--ink-70);transition:transform .2s}
.ai-card-heading[aria-expanded=true] .ai-card-chevron{transform:rotate(90deg)}
.ai-rec-disclosure button.ai-rec-item{text-align:left;padding:0;background:transparent;border-radius:6px;justify-content:flex-start;color:var(--ink);font-weight:400}
.ai-rec-explanation p,.ai-modal-reason{white-space:pre-line;-webkit-line-clamp:unset;overflow:visible;display:block}
.ai-modal-reason{font-size:14px;line-height:1.6;text-align:left;color:var(--ink-70)}
.ai-expanded-pitch{margin-top:10px!important}

/* Expand arrows share size, color and position. */
.ai-card-chevron,.hub-item .destination-row>.hub-chevron{position:absolute;right:20px;top:22px;font-size:15px;font-weight:400;line-height:1.5;color:var(--ink)}
@media(max-width:700px){.ai-card-chevron,.hub-item .destination-row>.hub-chevron{right:16px;top:20px;font-size:14px}}
.daily-stats .total-days-card,.daily-stats .completed-books-card{grid-column:auto;background:var(--secondary-container)}
/* Badge colors: bronze flame, silver star, gold target, blue diamond, purple trophy, orange wolf. */
.badge-art{width:100%;height:100%;display:block;flex-shrink:0;color:var(--badge-accent)}
.badge-art-b3{--badge-accent:#b87942;--badge-light:#ffe0ba;--badge-dark:#6f4525}
.badge-art-b5{--badge-accent:#89969f;--badge-light:#f2f6fa;--badge-dark:#45545f}
.badge-art-b7{--badge-accent:#c99c20;--badge-light:#fff0ac;--badge-dark:#755612}
.badge-art-b14{--badge-accent:#299fc4;--badge-light:#c8f4ff;--badge-dark:#17617c}
.badge-art-b21{--badge-accent:#9952bd;--badge-light:#f2d5ff;--badge-dark:#5c2d77}
.badge-art-b30{--badge-accent:#e08032;--badge-light:#ffdfb9;--badge-dark:#7d411c}
html[data-theme=dark] .badge-art{filter:brightness(1.13)}
.hp-emblem:has(.badge-art){background:transparent;border-radius:0}
.badge-shelf-coin>span:has(.badge-art){display:block;width:100%;height:100%}
.tier-badge-icon:has(.badge-art){background:var(--paper)!important}
.milestone>span:has(.badge-art){background:transparent;overflow:visible;padding:0}
.milestone:not(.earned) .badge-art{opacity:.3;filter:grayscale(1)}
.daily-stats{grid-auto-rows:1fr}

/* Personal goals */
.personal-goals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}
.personal-goal{margin:0!important;min-width:0;padding:20px!important;background:var(--secondary-container)!important}
.personal-goal h2{font-size:17px;margin:10px 0 16px}.personal-goal p{font-size:13px;line-height:1.5}
.goal-symbol{font-size:27px;color:var(--secondary-ink)}.goal-value{display:block;font-size:28px;line-height:1.25}.goal-value small{font-size:12px;font-weight:400}
.goal-form label,.reading-pages-dialog label{display:block;font-size:13px}
.goal-form input,.reading-pages-dialog input{display:block;box-sizing:border-box;width:100%;margin:10px 0 12px;min-height:46px;font-size:18px}
.goal-form button{width:100%;padding:12px 8px;font-size:13px}.goal-error{color:var(--danger,#b3261e)}
.personal-goal progress{width:100%;height:7px;margin:18px 0 4px;accent-color:var(--secondary-ink)}
.goal-history{margin-top:18px}.goal-history-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;font-size:14px}.goal-history-grid p{line-height:1.8}.goal-success{color:var(--forest)}
.reading-pages-dialog{box-sizing:border-box;border:0;border-radius:28px;padding:28px;color:var(--ink);background:var(--card);width:min(420px,calc(100% - 32px));max-height:85dvh;overflow:auto}
.reading-pages-dialog::backdrop{background:rgba(0,0,0,.5)}.reading-pages-dialog h2{font-size:23px;margin-top:0}.reading-pages-dialog .row{justify-content:flex-end;margin-top:22px}
.ai-rec-card.expanded .ai-card-close{opacity:1;transform:scale(1);pointer-events:auto}.ai-card-close[hidden]{display:none!important}.ai-rec-card.expanded .ai-card-chevron{visibility:hidden}
@media(max-width:350px){.personal-goal{padding:14px!important}.personal-goal h2{font-size:15px}}
.goal-form input,.reading-pages-dialog input{appearance:textfield;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:14px;padding:10px 12px;outline-offset:3px}
.goal-form input:focus-visible,.reading-pages-dialog input:focus-visible{outline:2px solid var(--forest)}
.goal-form input::-webkit-inner-spin-button{appearance:none}
.personal-goal .muted{font-size:12px}.goal-form .goal-error:empty{display:none}
.daily-actions .stamp-btn.read:disabled{opacity:1;cursor:default;pointer-events:none}
.previous-page-count{display:block;font-size:14px;font-weight:400;opacity:.55;margin-top:5px}
.goal-history-number{display:block;font-size:30px;line-height:1.15;font-weight:700;margin-top:12px}


/* Hub sections shown directly inside the tab: the original DOM and form handlers are kept. */
.hub-layout-setting{display:flex;align-items:center;gap:14px;padding:18px 0;cursor:pointer;position:relative}
.hub-layout-setting>span:first-child{flex:1}.hub-layout-setting small{display:block;color:var(--ink-70);margin-top:5px}
.hub-layout-setting input{position:absolute;right:0;width:52px;height:32px;opacity:0;cursor:pointer}
.layout-switch{display:block;width:52px;height:32px;border-radius:99px;background:var(--secondary-container);border:2px solid var(--ink-70);position:relative;box-sizing:border-box;flex-shrink:0}
.layout-switch:after{content:'';position:absolute;width:20px;height:20px;top:4px;left:4px;border-radius:50%;background:var(--ink-70);transition:transform .18s}
.hub-layout-setting input:checked+.layout-switch{background:var(--forest);border-color:var(--forest)}
.hub-layout-setting input:checked+.layout-switch:after{transform:translateX(20px);background:var(--paper)}
.hub-layout-setting input:focus-visible+.layout-switch{outline:3px solid var(--secondary-ink);outline-offset:4px}
#hubLayoutSettings{margin-top:26px}#hubLayoutSettings h3{font-size:18px}
.hub-flat>.club-grid{display:block}
.hub-flat .hub-item,.hub-flat .hub-item-panel,.hub-flat .hub-item-panel-inner{display:contents!important}
.hub-flat .hub-item>.hub-item-toggle,.hub-flat .hub-item>.hub-item-close-btn,.hub-flat .hub-item>.hp-controls{display:none!important}
.hub-flat .hub-item-panel-inner>section.tab{display:block!important;animation:none!important;margin:24px 0;min-width:0}
.hub-flat .hub-item-panel-inner>section.tab>.segmented{display:none!important}
.hub-flat .inner-pane-viewport{display:block;height:auto!important;max-height:none!important;overflow:visible!important;touch-action:pan-y!important}
.hub-flat .inner-pane-track{display:grid!important;grid-template-columns:minmax(0,1fr);gap:16px;transform:none!important;width:auto!important;transition:none!important}
.hub-flat .inner-pane{display:contents!important}
.hub-flat .inner-pane .card{margin:0!important;min-width:0}
.hub-flat .ai-card-close,.hub-flat .ai-card-chevron{display:none!important}
.hub-flat .ai-card-heading{cursor:default}
@media(min-width:1000px){.hub-flat .inner-pane-track{grid-template-columns:repeat(2,minmax(0,1fr))}}
.hub-flat .hub-item-panel{opacity:1!important}
.hub-flat .hub-item-panel-inner>section.tab>.card{margin-bottom:16px}
.hub-layout-setting input{z-index:1}.layout-switch{pointer-events:none}


/* Goal edit button: same line and color style as the other icon buttons. */
.personal-goal{position:relative}
.goal-edit-button{position:absolute;top:12px;right:12px;width:40px;height:40px;min-height:40px;padding:0;display:flex;align-items:center;justify-content:center;border-radius:50%;background:transparent;color:var(--secondary-ink)}
.goal-edit-button:hover{background:var(--card)}.goal-edit-button:focus-visible{outline:2px solid var(--secondary-ink);outline-offset:2px}
.goal-edit-button:active{transform:scale(.94)}
.goal-edit-dialog input{background:var(--card);color:var(--ink)}

.goal-remove-button{display:block;margin:18px auto 0;background:transparent;color:var(--ink-70);font-size:14px;padding:10px 16px;border-radius:999px}
.goal-remove-button:hover{background:var(--secondary-container)}


/* App logo and loading screen. */
body{background:var(--paper)}
.brand-button{background:#dcebd7;display:grid;place-items:center}
.brand-button img{display:block;width:44px;height:44px;object-fit:contain}
.center-logo-mark{background:#dcebd7;padding:10px;display:grid;place-items:center}
.center-logo-mark img{display:block;width:60px;height:60px;object-fit:contain}
#loadingScreen{padding:0;background:var(--primary-container);color:var(--ink)}
#loadingScreen:before{display:none}
.startup-content{min-height:100svh;min-height:100dvh}
.startup-mark img{display:block;object-fit:contain}
#loadingScreen .startup-name{color:var(--ink)}
#loadingScreen .startup-status{color:var(--ink-70)}



/* Shared book jackets: one treatment for previews, shelves and book details. */
.material-book-cover{display:block;position:relative;width:100%;height:100%;min-width:0;overflow:hidden;container-type:inline-size;flex-shrink:0;border-radius:3px 11px 11px 3px;background:#CEC4E1;border:0;border-left:4px solid rgba(255,255,255,.35);box-shadow:4px 5px 0 color-mix(in srgb,var(--ink) 12%,transparent);box-sizing:border-box}
.material-book-cover>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:0}
.book-cover-template{display:flex;width:100%;height:100%;box-sizing:border-box;flex-direction:column;justify-content:center;align-items:center;gap:6%;padding:12% 9%;background:var(--cover-paper,#CEC4E1);color:#273129;text-align:center;overflow:hidden}
.book-cover-letter{font:normal 54px/.95 Georgia,serif;font-size:60cqi;flex-shrink:0}
.book-cover-name{font:600 10px/1.2 'Roboto',sans-serif;font-size:clamp(6px,10cqi,15px);overflow-wrap:anywhere;text-wrap:balance;max-width:100%}
.material-book-cover.hp-book-cover{display:block;width:48px;height:70px}
.material-book-cover.ai-preview-cover{width:76px;height:116px}
.material-book-cover.book-cover-detail{width:100px;height:150px;margin:0 auto 16px}
.bh-cover-wrap,.discover-book-cover-wrap,.qp-nom-cover-ph{overflow:visible;border-radius:3px 11px 11px 3px;background:transparent}
.recommendation-cover{display:block;width:58px;height:87px;flex:0 0 auto;cursor:pointer}
.bh-cover-wrap>.material-book-cover,.discover-book-cover-wrap>.material-book-cover{width:100%;height:100%}
/* Settings headings and grouped cards. */
.settings-group{margin:0 0 28px;min-width:0}
.settings-group>h2{font-size:20px;font-weight:600;margin:22px 0 12px}
.settings-group>.settings-surface{background:var(--card);border:0;border-radius:24px;padding:22px;margin:0;box-shadow:none}
#tab-settings .settings-list .destination-row{min-height:76px}
#tab-settings .settings-list .destination-row>span:nth-child(2){flex:1;min-width:0;text-align:left}
#tab-settings .settings-list .destination-row>span:last-child{color:var(--ink-70)}
#materialThemeSettings>.muted{font-size:14px;line-height:1.5}
#tab-settings .notification-setting{display:flex;position:relative;gap:16px;min-height:64px;padding:12px 0;border-bottom:1px solid var(--line)}
#tab-settings .notification-setting:last-child{border-bottom:0;padding-bottom:0}
.notification-setting>label{flex:1;min-width:0;cursor:pointer}
.notification-setting [data-setting-icon]{display:flex;align-items:center;gap:14px;font-size:15px;color:var(--ink)}
.notification-setting .route-icon{display:flex;align-items:center;justify-content:center;width:36px;height:36px;color:var(--gold);flex-shrink:0}
.notification-setting .route-icon svg{width:24px;height:24px}
#tab-settings .notification-setting>input{position:absolute;right:0;width:52px!important;height:36px!important;opacity:0;z-index:1;cursor:pointer;margin:0}
.notification-setting>.layout-switch{position:relative;width:48px;height:28px;flex:0 0 auto;background:var(--line);border:2px solid var(--outline);border-radius:99px;pointer-events:none;box-sizing:border-box}
.notification-setting>.layout-switch:after{content:'';position:absolute;left:4px;top:4px;width:16px;height:16px;border-radius:50%;background:var(--ink-70);transition:transform .18s}
.notification-setting>input:checked+.layout-switch{background:var(--gold);border-color:var(--gold)}
.notification-setting>input:checked+.layout-switch:after{transform:translateX(20px);background:var(--on-primary)}
.notification-setting>input:focus-visible+.layout-switch{outline:3px solid var(--gold);outline-offset:4px}
#tab-rules #rulesDisplay{font-size:15px;line-height:1.85;color:var(--ink);overflow-wrap:anywhere}
#tab-rules textarea{background:var(--paper)!important;border:1px solid var(--line)!important;border-radius:16px!important;padding:16px!important;line-height:1.6;box-sizing:border-box;resize:vertical}
#tab-rules .member-row{padding:16px 0;border-bottom:1px solid var(--line)}
#tab-rules .settings-surface>button{margin-top:8px}
@media(min-width:700px){.material-book-cover.ai-preview-cover{width:88px;height:132px}}
@media(max-width:420px){.settings-group>.settings-surface{padding:18px}.notification-setting [data-setting-icon]{gap:10px;font-size:14px}}
.daily-book>.daily-book-jacket{width:90px;height:136px}
.qp-bugun-cover{overflow:visible;background:transparent;border-radius:3px 11px 11px 3px}
@media(max-width:420px){.daily-book>.daily-book-jacket{width:76px;height:114px}}
/* Reading confirmation: animate the fill, check mark, and label immediately after a tap. */
.daily-actions .stamp-btn{position:relative;overflow:hidden;isolation:isolate;transition:background .3s var(--ease),color .3s var(--ease),transform .16s var(--ease),box-shadow .3s var(--ease)}
.daily-actions .stamp-btn:not(:disabled):active{transform:scale(.95)}
.daily-actions .stamp-btn::before{content:'';position:absolute;inset:0;z-index:-1;background:var(--gold);clip-path:circle(0 at var(--fx-x,50%) var(--fx-y,50%));pointer-events:none}
.daily-actions .stamp-btn.read.selected::before{clip-path:circle(150% at var(--fx-x,50%) var(--fx-y,50%))}
.daily-actions .stamp-btn.read.selected{box-shadow:0 3px 12px color-mix(in srgb,var(--gold) 32%,transparent)}
.daily-actions .stamp-btn.read.selected.just-marked{background:var(--paper)}
.daily-actions .stamp-btn.just-marked{animation:markGlow .9s .2s ease-out both}
.daily-actions .stamp-btn.just-marked::before{animation:markInk .6s cubic-bezier(.2,0,0,1) both}
.mark-check{width:22px;height:22px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.just-marked .mark-check{animation:markCheckPop .55s .1s cubic-bezier(.34,1.56,.64,1) both}
.just-marked .mark-check path{stroke-dasharray:22;animation:markCheckDraw .38s .18s cubic-bezier(.65,0,.35,1) both}
.just-marked .mark-label{animation:markLabelIn .42s .18s cubic-bezier(.2,0,0,1) both}
@keyframes markInk{from{clip-path:circle(0 at var(--fx-x,50%) var(--fx-y,50%))}to{clip-path:circle(var(--fx-r,150%) at var(--fx-x,50%) var(--fx-y,50%))}}
@keyframes markGlow{from{box-shadow:0 0 0 0 color-mix(in srgb,var(--gold) 45%,transparent)}to{box-shadow:0 0 0 14px color-mix(in srgb,var(--gold) 0%,transparent)}}
@keyframes markCheckPop{from{transform:scale(.3) rotate(-25deg)}to{transform:none}}
@keyframes markCheckDraw{from{stroke-dashoffset:22}to{stroke-dashoffset:0}}
@keyframes markLabelIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
/* Animate the reading-status buttons in the admin member list. */
.stamp-btn.pop-read{animation:stampPopRead .5s cubic-bezier(.34,1.56,.64,1);z-index:2}
.stamp-btn.pop-skip{animation:stampPopSkip .45s cubic-bezier(.34,1.56,.64,1);z-index:2}
@keyframes stampPopRead{0%{transform:scale(.9)}45%{transform:scale(1.18);background:var(--gold);color:var(--on-primary)}100%{transform:scale(1);background:var(--gold);color:var(--on-primary)}}
@keyframes stampPopSkip{0%{transform:scale(.9)}35%{transform:scale(1.12) translateX(-2px);background:var(--error-container);color:var(--cloth-dark)}55%{transform:scale(1.08) translateX(3px)}75%{transform:scale(1.03) translateX(-1px)}100%{transform:scale(1);background:var(--error-container);color:var(--cloth-dark)}}
.stamp-btn.pop-read::after{content:'';position:absolute;inset:-0.2em;border-radius:999px;border:.16em solid var(--gold);animation:ringExpand .55s ease-out forwards;pointer-events:none}
.stamp-btn.pop-skip::after{content:'';position:absolute;inset:-0.2em;border-radius:999px;border:.16em solid var(--cloth);animation:ringExpand .5s ease-out forwards;pointer-events:none}
@keyframes ringExpand{0%{transform:scale(.7);opacity:1}100%{transform:scale(2.1);opacity:0}}
.draw-explain{margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}.draw-explain>div>div{padding:3px 0}


/* Optional hub subsections; all inner cards remain in normal vertical flow. */
.hub-subtab-nav{display:flex;gap:4px;padding:5px;margin:0 0 24px;background:var(--secondary-container);border-radius:24px}
.hub-subtab-nav[hidden]{display:none!important}
.hub-subtab-nav>button{flex:1;min-width:0;min-height:48px;padding:10px 8px;border-radius:20px;font:inherit;font-size:14px;font-weight:600;color:var(--ink-70);background:transparent;line-height:1.3}
.hub-subtab-nav>button[aria-selected=true]{background:var(--primary-container);color:var(--gold-dark)}
.hub-subtab-nav>button:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.hub-subtabs .hub-item[hidden],.hub-subtabs #aiRecCard[hidden]{display:none!important}
.hub-subtabs .inner-pane-track{grid-template-columns:minmax(0,1fr)!important}
.hub-subtabs .hub-item-panel-inner>section.tab{margin-top:0}
.hub-layout-group{border-top:1px solid var(--line);margin-top:16px;padding-top:8px}
.hub-layout-group h4{font-size:16px;margin:12px 0 0;color:var(--gold)}
.hub-layout-group .hub-layout-setting{padding:14px 0}
@media(max-width:380px){.hub-subtab-nav>button{font-size:12px;padding-inline:5px}}

.hub-primary-section>.segmented{display:none!important}
.hub-primary-section .inner-pane-track{grid-template-columns:minmax(0,1fr)!important}
.hub-primary-section>.club-feature{margin-bottom:24px}
.sidebar-tabs.many-tabs{overflow-y:auto;min-height:0;scrollbar-width:none}
.sidebar-tabs.many-tabs::-webkit-scrollbar{display:none}
.sidebar-tabs.many-tabs button{flex-shrink:0}
@media(max-width:700px){
 .sidebar-tabs.many-tabs{justify-content:space-between;overflow:hidden;touch-action:manipulation;gap:0}
 .sidebar-tabs.many-tabs button{flex:1 1 0;min-width:0;padding:0 1px;font-size:9px;min-height:56px;gap:3px}
 .sidebar-tabs.many-tabs .tab-icon{width:100%;max-width:42px;height:29px}
 .sidebar-tabs.many-tabs .tab-icon svg{width:20px;height:20px}
 .sidebar-tabs.many-tabs button>span:last-child{max-width:100%;min-height:12px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}
}

/*
 * Record tables and badge shelves can scroll sideways on their own (.libcard), which would take horizontal
 * gestures away from swiping between primary tabs. Keep those gestures for tab navigation.
 */
:is(#tab-mtoday,#tab-week,#tab-mworms,#tab-worms).hub-primary-section .libcard{touch-action:pan-y}


.hub-layout-choice{display:grid;gap:10px;margin-top:20px}
.hub-layout-choice>label{font-weight:600;color:var(--ink)}
.hub-layout-choice>select{width:100%;min-width:0;min-height:48px;padding:12px 36px 12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--paper);color:var(--ink);font:inherit}
.hub-layout-choice>select:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
#tab-bookhistory.hub-primary-section #discoverFeed{touch-action:pan-y}

@media(max-width:350px){.sidebar-tabs.many-tabs button{font-size:8px;padding-inline:0}}


.hub-layout-label{font-weight:600;color:var(--ink)}
.hub-layout-segmented{margin:0;gap:2px}
.hub-layout-segmented button{padding:9px 4px;font-size:12px;line-height:1.25;min-height:44px}
.hub-layout-segmented button:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
@media(max-width:360px){.hub-layout-segmented button{font-size:11px;padding-inline:2px}}


/* Light and dark colors for each selectable palette. Green is the default. */
html[data-palette="blue"]:not([data-theme="dark"]){--paper:#f9f9ff;--paper-2:#eef0f8;--card:#ffffff;--ink:#191c20;--ink-70:#43474e;--gold:#415f91;--gold-dark:#284777;--primary-container:#d6e3ff;--on-primary:#ffffff;--secondary-container:#dde2f9;--secondary-ink:#414659;--line:#d9dfe9;--outline:#74777f;--preview-peach:#eddcf5;--preview-blue:#d6ece5;--forest:#415f91;--forest-dark:#284777;--card-bg:255,255,255;--paper-bg:249,249,255;--sidebar-tint:238,240,248;}
html[data-palette="blue"][data-theme="dark"]{--paper:#111318;--paper-2:#1d2026;--card:#191c22;--ink:#e1e2e9;--ink-70:#c3c6cf;--gold:#aac7ff;--gold-dark:#d6e3ff;--primary-container:#284777;--on-primary:#0a305f;--secondary-container:#414659;--secondary-ink:#dde2f9;--line:#43474e;--outline:#8d9199;--preview-peach:#4d3e55;--preview-blue:#304d45;--forest:#aac7ff;--forest-dark:#d6e3ff;--card-bg:25,28,34;--paper-bg:17,19,24;--sidebar-tint:29,32,38;}
html[data-palette="purple"]:not([data-theme="dark"]){--paper:#fffbfe;--paper-2:#f3edf7;--card:#ffffff;--ink:#1c1b1f;--ink-70:#49454f;--gold:#6750a4;--gold-dark:#4f378b;--primary-container:#eaddff;--on-primary:#ffffff;--secondary-container:#e8def8;--secondary-ink:#4a4458;--line:#cac4d0;--outline:#79747e;--preview-peach:#ffd8e4;--preview-blue:#d8e8f5;--forest:#6750a4;--forest-dark:#4f378b;--card-bg:255,255,255;--paper-bg:255,251,254;--sidebar-tint:243,237,247;}
html[data-palette="purple"][data-theme="dark"]{--paper:#141218;--paper-2:#211f26;--card:#1d1b20;--ink:#e6e0e9;--ink-70:#cac4d0;--gold:#d0bcff;--gold-dark:#eaddff;--primary-container:#4f378b;--on-primary:#381e72;--secondary-container:#4a4458;--secondary-ink:#e8def8;--line:#49454f;--outline:#938f99;--preview-peach:#633b48;--preview-blue:#304958;--forest:#d0bcff;--forest-dark:#eaddff;--card-bg:29,27,32;--paper-bg:20,18,24;--sidebar-tint:33,31,38;}
html[data-palette="rose"]:not([data-theme="dark"]){--paper:#fff8f8;--paper-2:#f9ecef;--card:#ffffff;--ink:#22191d;--ink-70:#514349;--gold:#984061;--gold-dark:#7b294a;--primary-container:#ffd9e3;--on-primary:#ffffff;--secondary-container:#f2dde3;--secondary-ink:#594149;--line:#ddc0ca;--outline:#847379;--preview-peach:#eedff7;--preview-blue:#f6e2cc;--forest:#984061;--forest-dark:#7b294a;--card-bg:255,255,255;--paper-bg:255,248,248;--sidebar-tint:249,236,239;}
html[data-palette="rose"][data-theme="dark"]{--paper:#1a1115;--paper-2:#291d22;--card:#25191e;--ink:#f0dee4;--ink-70:#d7c1c8;--gold:#ffb0ca;--gold-dark:#ffd9e3;--primary-container:#7b294a;--on-primary:#5d1134;--secondary-container:#594149;--secondary-ink:#f2dde3;--line:#514349;--outline:#9e8c93;--preview-peach:#504159;--preview-blue:#534330;--forest:#ffb0ca;--forest-dark:#ffd9e3;--card-bg:37,25,30;--paper-bg:26,17,21;--sidebar-tint:41,29,34;}
html[data-palette="amber"]:not([data-theme="dark"]){--paper:#fff8f2;--paper-2:#f7efe2;--card:#ffffff;--ink:#201b13;--ink-70:#4e4639;--gold:#805610;--gold-dark:#624000;--primary-container:#ffdea6;--on-primary:#ffffff;--secondary-container:#eee0cf;--secondary-ink:#514535;--line:#d9c5a5;--outline:#807666;--preview-peach:#e1e8c4;--preview-blue:#f3dde6;--forest:#805610;--forest-dark:#624000;--card-bg:255,255,255;--paper-bg:255,248,242;--sidebar-tint:247,239,226;}
html[data-palette="amber"][data-theme="dark"]{--paper:#18130b;--paper-2:#272016;--card:#231c12;--ink:#ede1cf;--ink-70:#d1c5b4;--gold:#f4bd62;--gold-dark:#ffdea6;--primary-container:#624000;--on-primary:#442b00;--secondary-container:#514535;--secondary-ink:#eee0cf;--line:#4e4639;--outline:#9a8f7e;--preview-peach:#424c2c;--preview-blue:#57404b;--forest:#f4bd62;--forest-dark:#ffdea6;--card-bg:35,28,18;--paper-bg:24,19,11;--sidebar-tint:39,32,22;}

.palette-choices{gap:2px;padding:5px;margin-bottom:20px}
.palette-choices button{display:flex;flex:1;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:8px 2px;font-size:11px;min-height:68px}
.palette-choices button.active{background:var(--primary-container);color:var(--gold-dark)}
.palette-swatch{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--swatch);color:#fff}
.palette-swatch svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;visibility:hidden}
.palette-choices button.active .palette-swatch svg{visibility:visible}
.palette-choices button:focus-visible{outline:2px solid var(--gold);outline-offset:2px}


/* Language selector. */
.language-setting{margin-bottom:24px}.language-setting h3{margin-top:0}
html[lang="en"] .hub-layout-segmented button{font-size:11px}


/* Theme selector: light, dark, time-based automatic mode, and device setting. */
#materialThemeChoices{gap:2px}
#materialThemeChoices button{min-width:0;flex:1;padding:9px 4px;min-height:48px;font-size:12px;line-height:1.25}
@media(max-width:360px){#materialThemeChoices button{font-size:11px;padding-inline:2px}}


/* Reading note box that replaces the "Read" button after the daily check-in, and reading-note posts. */
.daily-illustration{transition:width .3s var(--ease),opacity .2s var(--ease)}
.daily-checkin.note-open .daily-illustration{width:0;opacity:0}
.daily-checkin.note-open .daily-checkin-row{gap:0}
.reading-note-box{overflow:hidden;margin-bottom:12px;padding:14px;border-radius:20px;background:var(--paper)}
.reading-note-prompt{margin:0 0 10px;font-size:14px;font-weight:600;line-height:1.45}
.reading-note-box textarea{display:block;box-sizing:border-box;min-height:84px;margin:0;background:var(--card)!important}
.reading-note-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
.reading-note-actions button{min-height:42px;padding:10px 18px}
.reading-note-later{border-radius:999px;font-weight:600;font-size:14px;color:var(--gold-dark)}
.reading-note-later:hover{background:var(--primary-container)}
.reading-note-book{font-size:12px;font-weight:600;color:var(--gold-dark);margin:2px 0 6px}
.reading-note-text{margin:6px 0 4px;padding:10px 14px;border-left:3px solid var(--gold);background:var(--primary-container);border-radius:0 14px 14px 0;font-style:italic;line-height:1.6;overflow-wrap:anywhere}

/* @mentions: highlighted names and the suggestion list shown while typing "@". */
.mention{color:var(--gold-dark);font-weight:600}
.mention-suggest{position:fixed;z-index:1000;max-height:240px;overflow-y:auto;background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-lg);padding:6px}
.mention-suggest[hidden]{display:none}
.mention-option{display:flex;flex-direction:column;align-items:flex-start;gap:1px;width:100%;min-height:0;padding:8px 10px;border:0;border-radius:10px;background:none;color:var(--ink);text-align:left;font-size:14px;box-shadow:none}
.mention-option span{font-size:12px;color:var(--ink-70)}
.mention-option.active,.mention-option:hover{background:var(--primary-container)}

/* Feed views: "Kulüp" (member posts) and "Etkinlikler" (automatic club posts). */
.feed-view-switch{margin:0 0 14px}
#socialFeedView.club-view .join-conversation-bar,#socialFeedView.club-view .join-conversation-form{display:none!important}

/*
 * Motion. Everything here animates transform and opacity only, so the browser can run it off the main
 * thread, and nothing but the check-in celebration lasts longer than about a third of a second.
 * The prefers-reduced-motion rule above turns all of it off.
 */
:root{--ease-out:cubic-bezier(.05,.7,.1,1);--ease-in:cubic-bezier(.3,0,.8,.15);--ease-spring:cubic-bezier(.34,1.56,.64,1)}

/* Press feedback: small controls shrink a little more than wide rows and cards. */
button{transition:background .18s var(--ease),color .18s var(--ease),transform .14s var(--ease),box-shadow .18s var(--ease)}
:is(button.primary,button.secondary,.icon-button,.header-pill,.segmented button,.post-action-btn,.post-vote-btn,.social-fab,.hub-subtab-nav button):active{transform:scale(.93)}

/* Screens: a tapped tab slides in from the side it lies on; other changes fade up. */
section.tab.active.anim-from-right{animation:tabFromRight .3s var(--ease-out)}
section.tab.active.anim-from-left{animation:tabFromLeft .3s var(--ease-out)}
section.tab.active.anim-fade{animation:screen-in .24s var(--ease-out)}
@keyframes tabFromRight{from{opacity:0;transform:translateX(26px)}to{opacity:1;transform:none}}
@keyframes tabFromLeft{from{opacity:0;transform:translateX(-26px)}to{opacity:1;transform:none}}
.sidebar-tabs button.active .tab-icon{animation:navPillIn .32s var(--ease-out)}
@keyframes navPillIn{from{clip-path:inset(0 34% round 999px)}to{clip-path:inset(0 0 round 999px)}}

/* Windows: the backdrop fades while the window rises; on phones, where windows fill the screen, it slides up. */
.modal-overlay-anim{animation:overlayIn .22s ease-out}
.modal-overlay-anim>.card,.modal-overlay-anim>.lightbox-img-anim{animation:modalIn .3s var(--ease-out)}
.modal-overlay-anim.closing{animation:overlayOut .17s var(--ease-in) forwards;opacity:1;transition:none}
.modal-overlay-anim.closing>.card,.modal-overlay-anim.closing>.lightbox-img-anim{animation:modalOut .17s var(--ease-in) forwards;transform:none;opacity:1;transition:none}
@keyframes overlayIn{from{opacity:0}to{opacity:1}}
@keyframes overlayOut{to{opacity:0}}
@keyframes modalIn{from{opacity:0;transform:translateY(20px) scale(.94)}to{opacity:1;transform:none}}
@keyframes modalOut{to{opacity:0;transform:translateY(14px) scale(.97)}}
@media(max-width:700px){
 .modal-overlay-anim>.card{animation:sheetIn .34s var(--ease-out)}
 .modal-overlay-anim.closing>.card{animation:sheetOut .17s var(--ease-in) forwards}
 @keyframes sheetIn{from{opacity:0;transform:translateY(9%)}to{opacity:1;transform:none}}
 @keyframes sheetOut{to{opacity:0;transform:translateY(6%)}}
}
dialog[open]{animation:modalIn .28s var(--ease-out)}
dialog[open]::backdrop{animation:overlayIn .22s ease-out}

/* Small surfaces that pop out of a control: menus, the reaction picker, suggestion lists. */
#anchoredPopover{animation:popIn .17s var(--ease-out)}
#anchoredPopover.closing{animation:popOut .12s var(--ease-in) forwards}
@keyframes popIn{from{opacity:0;transform:scale(.9)}to{opacity:1;transform:none}}
@keyframes popOut{to{opacity:0;transform:scale(.94)}}
#reactionDrawer{opacity:0;transform:scale(.8);transition:opacity .14s var(--ease),transform .22s var(--ease-spring)}
#reactionDrawer.open{opacity:1;transform:none}
.mention-suggest:not([hidden]),.join-conversation-form{animation:dropIn .2s var(--ease-out)}
@keyframes dropIn{from{opacity:0;transform:translateY(-8px) scale(.98)}to{opacity:1;transform:none}}

/* Toasts rise from the bottom edge and sink back when dismissed. */
.toast{animation:toastIn .3s var(--ease-out)}
.toast.leaving{animation:toastOut .18s var(--ease-in) forwards}
@keyframes toastIn{from{opacity:0;transform:translateX(-50%) translateY(18px) scale(.96)}to{opacity:1;transform:translateX(-50%)}}
@keyframes toastOut{to{opacity:0;transform:translateX(-50%) translateY(12px) scale(.97)}}

/* Small confirmations: the unread badge appearing, a vote landing, a number changing. */
#hamburgerBadge{animation:badgePop .36s var(--ease-spring)}
@keyframes badgePop{from{transform:scale(0)}to{transform:none}}
.post-vote-btn.just-voted{animation:votePop .34s var(--ease-spring)}
@keyframes votePop{0%{transform:scale(.8)}55%{transform:scale(1.28)}100%{transform:none}}
.post-vote-score.tick{animation:valueTick .26s var(--ease-out)}
.value-changed{animation:valueTick .4s var(--ease-spring)}
@keyframes valueTick{from{opacity:0;transform:translateY(7px) scale(.9)}to{opacity:1;transform:none}}

/* Check-in celebration (celebration.js): overlays that never take taps, and the Today cards joining in. */
.checkin-glow,.checkin-confetti{position:fixed;inset:0;width:100%;height:100%;pointer-events:none}
.checkin-glow{z-index:590}
.checkin-confetti{z-index:600}
.checkin-wave{position:fixed;z-index:591;box-sizing:border-box;border:3px solid var(--gold);border-radius:50%;pointer-events:none;will-change:transform,opacity}
.checkin-celebrating .daily-checkin{animation:checkinCardPulse .55s var(--ease-out)}
.checkin-celebrating .daily-stats>.stat-card{animation:checkinHop .5s var(--ease) backwards}
.checkin-celebrating .daily-stats>.stat-card:nth-child(1){animation-delay:.14s}
.checkin-celebrating .daily-stats>.stat-card:nth-child(2){animation-delay:.21s}
.checkin-celebrating .daily-stats>.stat-card:nth-child(3){animation-delay:.28s}
.checkin-celebrating .daily-stats>.stat-card:nth-child(4){animation-delay:.35s}
@keyframes checkinCardPulse{35%{transform:scale(1.02)}}
@keyframes checkinHop{40%{transform:translateY(-10px) scale(1.03)}}
