:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#17231f;background:#f5f6f8;--green:#235d4d;--muted:#63716c;--line:#e4e8e6;--paper:white;--red:#a84034;font-size:15px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;min-height:44px;border:1px solid var(--line);border-radius:10px;background:white;color:inherit;padding:10px 14px;font-weight:600}button:hover{background:#f0f5f2}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #80ad9b;outline-offset:2px}input,select,textarea{width:100%;border:1px solid #cfd8d3;border-radius:10px;padding:12px;background:#fff;color:#17231f;min-height:44px}textarea{resize:vertical;min-height:95px}label{display:grid;gap:6px;font-weight:600;font-size:14px}h1,h2,h3,p{margin:0}h1{font-size:27px;letter-spacing:-.8px;font-weight:720}h2{font-size:17px;letter-spacing:-.2px}h3{font-size:16px}p{line-height:1.55;overflow-wrap:anywhere}small,.muted{color:var(--muted);font-size:13px;font-weight:400}.primary{background:var(--green);border-color:var(--green);color:white}.primary:hover{background:#19483c}.danger{color:var(--red)}.quiet{border:0;background:transparent;color:var(--green)}.icon{width:22px;height:22px;flex:none;vertical-align:middle}.row{display:flex;align-items:center;gap:10px;min-width:0}.between{justify-content:space-between}.stack{display:grid;gap:14px}.grow{flex:1;min-width:0}.wrap{flex-wrap:wrap}.shell{display:grid;grid-template-columns:226px minmax(0,1fr);min-height:100dvh}.sidebar{position:sticky;top:0;height:100dvh;padding:24px 16px;background:white;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:25px}.brand{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:-.6px;font-size:20px}.brand img{width:35px;height:35px;border-radius:9px}.brand span{color:var(--green)}.side-nav{display:grid;gap:5px}.nav{display:flex;align-items:center;gap:11px;border:0;border-radius:10px;background:transparent;color:var(--muted);text-align:left;padding:12px}.nav.active{background:#e7f0eb;color:var(--green)}.sidebar .bottom-user{margin-top:auto}.avatar{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#e5efe9;color:var(--green);font-weight:700;flex:none}.main{min-width:0}.topbar{height:72px;display:flex;justify-content:space-between;align-items:center;padding:0 28px;background:#fff;border-bottom:1px solid var(--line)}.mobilebrand{display:none}.content{max-width:900px;margin:0 auto;padding:30px 26px 50px;display:grid;gap:18px}.titlebar{display:flex;align-items:center;justify-content:space-between;gap:12px}.titlebar p{margin-top:5px}.panel{border:1px solid var(--line);border-radius:14px;background:white;overflow:hidden}.pad{padding:16px}.sectionhead{display:flex;align-items:center;justify-content:space-between;padding:15px 16px;border-bottom:1px solid var(--line)}.item{padding:14px 16px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line)}.item:last-child{border-bottom:0}.item .end{text-align:right;flex:none}.tag{display:inline-flex;font-size:11px;font-weight:650;line-height:1.6;padding:2px 8px;border-radius:6px;background:#e8f1ec;color:var(--green)}.tag.urgent{color:#98492e;background:#fff0e6}.tag.neutral{color:#65706c;background:#edf0ef}.green{color:var(--green)}.red{color:var(--red)}.price{font-size:18px;font-weight:750;white-space:nowrap;font-variant-numeric:tabular-nums}.notice{display:flex;align-items:center;gap:12px;padding:13px 16px;border:1px solid var(--line);background:white;border-radius:12px}.notice .icon{color:var(--green)}.seg{display:flex;gap:7px;overflow:auto;padding:1px}.seg button{white-space:nowrap;font-size:13px;border-radius:9px}.seg button.active{background:#e5efe9;color:var(--green);border-color:#b9d3c6}.empty{padding:28px;text-align:center;color:var(--muted)}.poll{padding:16px;display:grid;gap:12px}.poll+.poll{border-top:1px solid var(--line)}.option{display:grid;gap:7px;padding:10px 0}.meter{width:100%;height:7px;border:0;border-radius:6px;appearance:none;background:#e9eeeb}.meter::-webkit-progress-bar{background:#e9eeeb;border-radius:6px}.meter::-webkit-progress-value{background:#54836f;border-radius:6px}.meter::-moz-progress-bar{background:#54836f;border-radius:6px}.option button{min-height:40px;text-align:left}.listcard{padding:15px;display:grid;gap:10px;border-bottom:1px solid var(--line)}.listcard:last-child{border-bottom:0}.listcard h3{font-size:17px}.thumb{width:76px;height:68px;background:#edf2ef;border-radius:10px;display:grid;place-items:center;color:#6c897b;flex:none;object-fit:cover}.actions{display:flex;flex-wrap:wrap;gap:7px}.actions button{font-size:13px;min-height:40px}.chat{height: min(55dvh,520px);overflow-y:auto;padding:15px;display:flex;flex-direction:column;gap:12px;background:#f7f9f8}.bubble{background:white;border:1px solid var(--line);border-radius:12px;padding:10px 12px;max-width:83%;align-self:flex-start;overflow-wrap:anywhere}.bubble.mine{align-self:flex-end;background:#e5f0ea;border-color:#d1e4d8}.bubble small{display:block;margin-top:4px}.compose{display:flex;gap:8px;padding:10px;border-top:1px solid var(--line)}.compose input{flex:1;min-width:0}.bottomnav{display:none}.demo{font-size:12px;color:#6d736e;background:#eef1ef;padding:7px 12px;text-align:center}.profile-row{display:flex;align-items:center;gap:10px}.auth{max-width:430px;margin:8vh auto;padding:20px;display:grid;gap:20px}.auth .brand{margin-bottom:8px}.auth .panel{padding:20px}.auth h1{font-size:26px}dialog{padding:0;border:1px solid var(--line);border-radius:18px;width:min(480px,calc(100% - 24px));max-height:85dvh;color:inherit;box-shadow:0 12px 50px #0002}dialog::backdrop{background:#14251d66}.dialogbody{padding:18px;display:grid;gap:16px}.dialoghead{padding:12px 18px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.dialoghead button{padding:7px 12px}.note{font-size:12px;line-height:1.5;color:var(--muted)}#toast{position:fixed;bottom:85px;left:50%;transform:translateX(-50%);z-index:99;background:#23362d;color:white;padding:12px 18px;border-radius:12px;max-width:90%;display:none;box-shadow:0 4px 20px #0002}#toast.show{display:block}.nowrap{white-space:nowrap}.img-preview{max-width:100%;max-height:250px;object-fit:contain;border-radius:12px}.menu-item{width:100%;border:0;border-bottom:1px solid var(--line);border-radius:0;display:flex;align-items:center;gap:12px;text-align:left;padding:14px 16px}.menu-item:last-child{border:0}.menu-item .grow small{display:block;margin-top:3px}.code{font-family:monospace;overflow-wrap:anywhere;background:#eef2ef;padding:12px;border-radius:9px;user-select:all}.twocol{display:grid;grid-template-columns:1fr 1fr;gap:12px}@media(max-width:700px){.shell{display:block}.sidebar{display:none}.topbar{height:60px;padding:0 16px;position:sticky;top:0;z-index:4}.desktop-title{display:none}.mobilebrand{display:block}.content{padding:19px 14px calc(86px + env(safe-area-inset-bottom));gap:14px}.bottomnav{position:fixed;display:grid;grid-template-columns:repeat(5,1fr);bottom:0;left:0;right:0;background:white;border-top:1px solid var(--line);padding:5px 4px calc(5px + env(safe-area-inset-bottom));z-index:5}.bottomnav .nav{flex-direction:column;align-items:center;gap:4px;font-size:11px;min-height:56px;padding:7px 0;border-radius:8px}.bottomnav .nav .icon{width:21px;height:21px}.titlebar h1{font-size:25px}.titlebar p{font-size:13px}.sectionhead,.item{padding:13px}.titlebar button{padding:9px 11px;font-size:13px}.chat{height:43dvh}.twocol{grid-template-columns:1fr}.listcard{padding:13px}.listcard .thumb{width:62px;height:60px}}@media(max-width:360px){.bottomnav .nav{font-size:10px}.content{padding-left:10px;padding-right:10px}.titlebar h1{font-size:23px}} 
.check{width:auto;min-height:0;flex:none}

/* V4: compact content and dedicated chat workspace */
:root{font-size:14px}h1{font-size:23px}h2{font-size:16px}h3{font-size:14px}.titlebar p:empty{display:none}.content{gap:12px;padding-top:22px}.titlebar p{font-size:12px}.pad,.sectionhead,.item,.listcard{padding:11px 13px}.price{font-size:17px}.notice{padding:10px 12px}.listcard{gap:8px}.listcard h3{font-size:15px}.actions button{min-height:38px;padding:6px 10px}.poll-filters{gap:6px}.poll-filters button{min-height:38px;padding:6px 12px}.compact-poll{padding:0;display:block}.compact-poll summary{display:flex;align-items:center;gap:12px;padding:13px 15px;cursor:pointer;list-style:none;min-height:64px}.compact-poll summary::-webkit-details-marker{display:none}.compact-poll summary h3{margin-top:5px;line-height:1.4}.compact-poll .expand{color:var(--muted);transition:transform .15s}.compact-poll[open] .expand{transform:rotate(90deg)}.poll-meta{gap:8px}.poll-body{border-top:1px solid var(--line);padding:10px 15px 12px}.poll-body .option{padding:7px 0;gap:4px}.poll-body .option button{min-height:34px;font-size:12px;padding:4px 11px}.poll-body .note{margin-top:8px}.chat-mode{height:100dvh;min-height:0;overflow:hidden}.chat-mode .main{display:flex;flex-direction:column;min-height:0;height:100%;overflow:hidden}.chat-mode .topbar,.chat-mode .demo{flex:none}.chat-mode .content{width:100%;flex:1;min-height:0;display:flex;flex-direction:column;padding:12px 24px 16px;gap:9px;max-width:1100px}.chat-top{flex:none}.chat-top h1{font-size:22px}.chat-top .quiet{padding:4px 7px;min-height:34px;font-size:12px}.chat-top .quiet .icon{width:17px;height:17px}.quick-access{display:flex;gap:7px;overflow-x:auto;padding:4px 1px 6px;scrollbar-width:thin}.quick-tile{display:flex;align-items:center;flex-direction:column;gap:3px;min-width:65px;width:76px;flex:none;padding:6px 4px 5px;border-radius:10px;min-height:61px;background:white;font-size:11px;font-weight:600;line-height:1.2}.quick-tile.selected{background:#e3efe9;border-color:#89ae9e;color:var(--green)}.tile-avatar{width:29px;height:29px;display:grid;place-items:center;background:#e9efec;color:var(--green);border-radius:8px;font-size:12px;font-weight:750}.tile-avatar .icon{width:19px;height:19px}.tile-label{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}.add-tile{border-style:dashed;color:var(--muted)}.chat-panel{display:flex;flex-direction:column;flex:1;min-height:0}.chat-heading{flex:none;min-height:49px;padding:7px 12px;border-bottom:1px solid var(--line);background:#fff}.chat-heading small{display:block;font-size:11px;margin-top:2px}.chat-heading .avatar{width:32px;height:32px;border-radius:9px}.pin-button{font-size:20px;color:var(--green);padding:4px 9px;min-width:39px;min-height:38px}.chat-panel .chat{flex:1;min-height:0;height:auto;max-height:none;gap:8px;padding:10px 12px;overscroll-behavior:contain}.bubble{font-size:15px;max-width:88%;padding:8px 11px;line-height:1.4}.bubble strong{font-size:12px;color:var(--green)}.bubble p{line-height:1.45;white-space:pre-wrap}.bubble small{font-size:10px;text-align:right;margin-top:4px}.compose{flex:none;padding:8px;align-items:center}.compose input{font-size:16px;padding:9px 12px;min-height:44px}.compose button{min-width:46px;padding:9px 12px}.compact-member{gap:7px}.compact-member strong{overflow-wrap:anywhere}.compact-member button{padding:6px 10px}.auth-v4{min-height:100dvh;max-width:400px;margin:0 auto;align-content:center;gap:18px;padding:24px}.auth-v4 .brand{margin:0 0 6px}.auth-intro{display:grid;gap:9px;justify-items:start}.auth-intro h1{font-size:27px;letter-spacing:-.9px}.auth-card,.auth-v4 .panel{padding:20px}.auth-v4 .stack{gap:14px}.auth-v4 input{font-size:16px}.auth-note{text-align:center}.auth-v4 input:disabled{background:#f5f6f5;opacity:1}.auth-v4 .primary{min-height:46px}
@media(max-width:700px){.topbar{height:50px;padding:0 12px}.topbar .brand{font-size:18px}.topbar .brand img{width:31px;height:31px}.topbar button{padding:6px 9px;min-height:38px}.topbar .row{gap:4px}.topbar .icon{width:19px;height:19px}.demo{padding:3px 8px;font-size:10px;line-height:1.4}.content{padding:13px 10px calc(76px + env(safe-area-inset-bottom));gap:10px}.titlebar h1{font-size:22px}.titlebar p{font-size:12px}.bottomnav{padding:3px 3px calc(3px + env(safe-area-inset-bottom))}.bottomnav .nav{min-height:48px;padding:5px 0;gap:3px}.bottomnav .nav .icon{width:19px;height:19px}.chat-mode .main{height:calc(100dvh - 55px - env(safe-area-inset-bottom))}.chat-mode .content{padding:7px 6px 4px;gap:5px}.chat-top{padding:0 4px}.chat-top h1{font-size:20px}.chat-panel{border-radius:10px}.chat-panel .chat{padding:9px}.quick-access{padding-bottom:4px}.quick-tile{width:68px;min-width:68px;min-height:56px;padding:4px 3px}.tile-avatar{width:27px;height:27px}.chat-heading{min-height:44px;padding:5px 9px}.bubble{max-width:90%;font-size:15px}.compose{padding:6px}.compact-poll summary{padding:11px 12px}.poll-body{padding:8px 12px}.auth-v4{padding:22px}.listcard .thumb{width:55px;height:53px}}
.chat-tools{gap:3px}.chat-tools button:last-child{border:1px solid var(--line);background:white;border-radius:8px;width:34px;min-height:34px;padding:5px}.quick-access{scroll-snap-type:x proximity}.quick-tile{scroll-snap-align:start}
.catalog-tabs{display:flex;margin-bottom:10px;gap:6px}.catalog-tabs button{flex:1;font-size:13px;min-height:40px}.catalog-tabs button.selected{background:#235d4d;color:white}.panel.pad label+label{margin-top:10px}#catalog-rows .item{gap:8px}#catalog-rows h3{overflow-wrap:anywhere}.catalog-tabs{flex-wrap:wrap}.poll-body [hidden]{display:none}.poll-meta{flex-wrap:wrap}.quick-access{min-width:0}#choice-fields{display:grid;gap:10px}#choice-fields[hidden]{display:none}.ref-date{display:block;margin-top:3px}.ref-item small{display:block}.ref-item .actions{margin-top:5px;gap:4px}.ref-item .actions button{font-size:12px;padding:6px 8px}.catalog-tabs{overflow-x:auto;white-space:nowrap}.catalog-tabs button{flex:0 0 auto}.bottomnav{grid-auto-columns:1fr}@media(max-width:700px){.bottomnav{display:flex}.bottomnav .nav{flex:1;min-width:0}.ref-item .price{white-space:nowrap}}
/* V8 compact market controls */
.ref-controls{padding:8px 10px;display:grid;gap:7px}.ref-controls .tag{font-size:10px;padding:3px 6px;gap:3px}.ref-controls .tag .icon{width:13px;height:13px}.ref-controls .quiet{min-height:30px;padding:3px 8px;font-size:12px}.ref-controls .note{font-size:11px;line-height:1.4;margin:0}.ref-filter-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px}.ref-filter-grid input,.ref-filter-grid select{min-width:0;min-height:38px;padding:7px 8px;font-size:12px}.ref-item .ref-date{font-size:11px}.ref-item .actions{gap:3px}.ref-item .actions button{min-height:32px;font-size:12px;padding:4px 6px}.dialogbody .stack{gap:10px}.dialogbody label input,.dialogbody label select{min-height:42px}.catalog-tabs{gap:5px;margin-bottom:2px}.catalog-tabs button{min-height:34px;padding:5px 8px;font-size:12px;flex:1 1 40%}@media(min-width:701px){.catalog-tabs button{flex:1}}
.published-mark{display:block;color:var(--green);font-size:11px;font-weight:650;margin-top:3px}.ref-controls{padding:6px 8px;gap:5px}.ref-controls .note{font-size:10px}.ref-item .price{white-space:nowrap}@media(max-width:420px){.ref-item{gap:6px}.ref-item h3{font-size:14px}.ref-item small{font-size:11px}.ref-item .price{font-size:18px}.ref-controls .tag{font-size:10px}}
.evidence{border:1px solid var(--line);border-radius:10px;padding:10px}.evidence summary{cursor:pointer;font-size:13px;font-weight:600}.evidence-fields{display:grid;gap:9px;margin-top:10px}.evidence-fields label{min-width:0;font-size:12px}.evidence-fields input{min-width:0;width:100%}.bottomnav .nav span{white-space:nowrap;font-size:11px}@media(max-width:360px){.bottomnav .nav span{font-size:10px}}

.ref-matches{border:1px solid #dce5e1;border-radius:10px;padding:4px;max-height:148px;overflow:auto}.ref-matches[hidden]{display:none}.ref-matches button{display:flex;width:100%;justify-content:space-between;align-items:center;text-align:left;border:0;background:#fff;padding:8px 10px;min-height:38px;border-radius:6px}.ref-matches button:hover{background:#eef5f1}.ref-matches small{font-size:11px;color:#697570}.ref-periods{display:flex;gap:6px;flex-wrap:wrap}.ref-periods:empty{display:none}.ref-periods .ref-period{font-size:12px;padding:6px 10px;min-height:32px}.ref-periods .active{background:#225d50;color:white;border-color:#225d50}
.market-entry .end{max-width:49%}.market-entry .price{white-space:normal;overflow-wrap:anywhere}.market-entry .note{margin-top:3px}.market-form-actions{grid-template-columns:1fr 1fr}.market-entry{align-items:flex-start}/* V21: notification center */
.notification-bell{position:relative;min-width:42px}.notification-count{position:absolute;top:0;right:0;min-width:17px;height:17px;display:grid;place-items:center;background:#a84034;color:white;border:1px solid white;border-radius:99px;font-size:10px;padding:0 3px}.notification-row{padding:11px 0;border-bottom:1px solid var(--line);display:grid;gap:5px}.notification-row:last-child{border:0}.notification-unread{color:var(--green);font-weight:700;font-size:11px}.notification-row p{white-space:pre-wrap}.notification-target{padding:10px;border-radius:8px;background:#eef4f0}.notification-list{display:grid;gap:3px}.notification-list h2{margin:5px 0}

/* V22 theme and unread counts */
html[data-theme="dark"]{color-scheme:dark;--green:#8bcab1;--muted:#a3b3ab;--line:#35433d;--paper:#202a26;--red:#f19185;color:#e6eee9;background:#151c19}
html[data-theme="dark"] :is(.sidebar,.topbar,.bottomnav,.panel,.notice,.chat-heading,.quick-tile,.bubble,.auth-card,dialog,button,input,select,textarea,.notification-row,.notification-target,.ref-matches,.ref-matches button){background:#202a26;color:#e6eee9;border-color:#35433d}
html[data-theme="dark"] :is(.quiet,.nav){background:transparent;color:#b1c7bb}html[data-theme="dark"] :is(.primary,.nav.active,.seg button.active,.quick-tile.selected,.catalog-tabs button.selected){background:#315b4b;color:#e5f5ed;border-color:#527d6b}html[data-theme="dark"] button:hover{background:#364b41}html[data-theme="dark"] :is(.avatar,.tile-avatar,.tag,.thumb,.code,.demo,.notification-unread){background:#314139;color:#b7deca}html[data-theme="dark"] .tag.urgent{background:#51372b;color:#ffd0ad}html[data-theme="dark"] .chat{background:#151d19}html[data-theme="dark"] .bubble.mine{background:#29463a;border-color:#426554}html[data-theme="dark"] .auth-v4 input:disabled{background:#29322e}html[data-theme="dark"] .meter{background:#394840}html[data-theme="dark"] .meter::-webkit-progress-bar{background:#394840}html[data-theme="dark"] .meter::-webkit-progress-value{background:#81b59c}html[data-theme="dark"] :is(.danger,[style*="var(--red)"]){color:var(--red)}
.nav,.quick-tile{position:relative}.chat-unread,.tile-unread{position:absolute;top:3px;right:4px;min-width:17px;height:17px;border-radius:10px;background:#ba3c37;color:white!important;font-size:10px!important;line-height:17px;text-align:center;padding:0 4px;font-weight:700;z-index:1}.theme-icon{width:22px;font-size:24px;text-align:center;flex:none}

.auth-v4{max-width:460px}.auth-v4 .panel{width:100%}.closed-status{padding:10px 14px;white-space:pre-wrap}.content{max-width:840px}.test-app{max-width:840px;margin:auto;padding:18px;display:grid;gap:12px}.test-app .row{flex-wrap:wrap}.test-app .actions{margin-top:8px}.secret{word-break:break-all;user-select:all} [hidden]{display:none!important}

.live-nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:5;background:var(--paper);border-top:1px solid var(--line);padding:5px 3px calc(5px + env(safe-area-inset-bottom));}.live-nav button{flex:1;justify-content:center;min-width:0;font-size:12px;text-align:center;min-height:48px;padding:5px 2px}.test-app{padding-bottom:90px}.live-content{min-width:0}.live-content .chat{height: min(52dvh,520px);overflow-y:auto}.live-content .quick-access{max-width:100%}.live-content .item{overflow-wrap:anywhere}.live-content .price{overflow-wrap:anywhere}.live-content .row{min-width:0}@media(min-width:701px){.live-nav{max-width:840px;margin:auto;border-radius:12px 12px 0 0}}

.club-shell{min-height:100dvh}.club-header{position:sticky;top:0;z-index:4;justify-content:space-between}.club-header button{min-height:40px;padding:5px 8px}.club-shell .content{padding-bottom:90px}.club-shell .live-nav .nav{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}.club-shell .live-nav .nav span{font-size:11px}.club-shell .live-content .row{min-width:0}.club-shell .live-nav .icon{width:20px;height:20px}.club-shell .ref-item small{overflow-wrap:anywhere}.club-shell .ref-item .end{max-width:45%}.club-shell .menu-item .grow{text-align:left}.club-shell .menu-item.danger{color:var(--red)}

.market-entry{align-items:flex-start}.market-entry .end{max-width:48%}.market-entry .price{white-space:normal;overflow-wrap:anywhere}.market-source{overflow-wrap:anywhere;display:block}.market-form-actions{grid-template-columns:1fr 1fr}
