/* Phone layout: browsing and posting first, without the desktop side columns. */
@media(max-width:700px){
 .preview-bar{display:none}
 .topbar{height:calc(64px + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) 16px 0;gap:10px}
 .brand-name{font-size:14px}.brand-mark{width:34px;height:36px}.top-actions{gap:4px}.top-actions #notifications{display:grid;place-items:center;min-width:40px;min-height:44px;overflow:visible}
 #auth-entry{min-height:44px;font-size:14px;padding:10px 12px}
 .app-shell{padding:18px 12px calc(100px + env(safe-area-inset-bottom,0px))}
 .page-head{margin:0 4px 16px}.page-head .eyebrow,.date-stamp{display:none}h1{font-size:25px;letter-spacing:0}.page-subtitle{font-size:14px;line-height:1.7;margin-top:5px}
 .feature-banner{padding:15px 16px;min-height:0;gap:8px;border-radius:12px;margin-bottom:14px}.feature-banner h2{font-size:17px;max-width:230px}.banner-number{font-size:34px;letter-spacing:-1px;width:52px;flex-shrink:0}.banner-number small{font-size:11px}.feature-link{min-height:36px;margin-top:4px;font-size:14px}
 .quick-compose{padding:8px 12px;gap:10px;margin-bottom:18px}.quick-compose>button:not(.anon-shortcut){font-size:15px;min-height:44px}.quick-compose .anon-shortcut{display:none}
 .tabs{gap:23px;overflow-x:auto}.tabs button{min-height:44px;font-size:15px;padding-bottom:12px}.tabs .tab-extra{font-size:13px}
 .chips{margin-right:0;padding-right:0}.chip{font-size:14px;min-height:38px;padding:8px 12px}
 .post-card{padding:16px;border-radius:12px}.post-author{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:start;gap:8px}.post-author>div{min-width:0}.author-name{font-size:14px;line-height:1.7;overflow-wrap:anywhere}.author-meta{font-size:12px}.post-type{font-size:12px;max-width:100%}.post-author>.post-type{grid-column:3;grid-row:1;align-self:start;margin-left:0;white-space:nowrap}.company-line>.post-type{align-self:flex-start;flex-shrink:0;white-space:nowrap}.post-title{font-size:18px;line-height:1.6;margin-top:4px}.post-excerpt{font-size:16px}.post-actions button{min-height:44px;font-size:14px}.post-actions svg{width:19px;height:19px}
 .mobile-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:6px 6px calc(6px + env(safe-area-inset-bottom,0px));min-height:68px;z-index:40}
 .mobile-nav button{min-width:0;min-height:48px;font-size:12px;gap:4px;justify-content:center;touch-action:manipulation}.mobile-nav .mobile-compose{justify-self:center;width:48px;height:48px;border-radius:14px}.mobile-nav svg{width:23px;height:23px}
 dialog,#auth-dialog,#detail-dialog:has(.markdown-body){width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;padding:calc(18px + env(safe-area-inset-top,0px)) 18px calc(24px + env(safe-area-inset-bottom,0px));overflow-y:auto;overscroll-behavior:contain}
 .modal-header,.detail-header{gap:12px;align-items:flex-start}.modal-header h2{font-size:22px;line-height:1.5}.icon-button{min-width:44px;min-height:44px}.detail-title{font-size:24px;line-height:1.55;margin-top:12px;overflow-wrap:anywhere}
 .detail-body,.markdown-body,.reply p{font-size:16px;line-height:1.85}.markdown-body pre,.markdown-body table{max-width:100%;overflow-x:auto;display:block}.reply-actions button{min-height:44px;font-size:14px}
 .compose-types{gap:6px;flex-wrap:wrap}.compose-types button{min-height:42px;font-size:14px}.identity-box{align-items:flex-start}.identity-box>div{min-width:0}.identity-box strong{line-height:1.7;overflow-wrap:anywhere}.identity-box p{font-size:13px;line-height:1.7}.identity-box .switch{flex-shrink:0;margin-top:4px}
 .extra-grid{grid-template-columns:1fr}.form-input,input,select,textarea{font-size:16px}.form-input,select{min-height:46px}#post-body{min-height:220px}.compose-footer{align-items:stretch;flex-direction:column;gap:14px}.compose-footer>span{max-width:none;font-size:13px}.compose-footer .primary{width:100%;font-size:16px;min-height:48px}
 .filter-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.filter-row select{width:100%;min-width:0;font-size:14px}.section-search input{font-size:16px}.archive-note{font-size:14px}.company-grid{grid-template-columns:1fr}.company-card h3{font-size:18px}.company-card p{font-size:15px}
 .account-card{padding:18px}.account-heading h2{font-size:20px;line-height:1.6;overflow-wrap:anywhere}.account-actions{align-items:stretch}.account-actions button{min-height:44px}.level-card{padding:15px}.auth-privacy,.auth-help{font-size:14px}.content-gate-button{flex-wrap:wrap;justify-content:center}.content-gate-button>span{flex-basis:100%;text-align:center;padding:0}.install-banner{margin:10px 12px 0;border:1px solid #dce2fc;border-radius:12px;padding:10px;gap:8px}.install-banner span{font-size:12px}.install-banner .icon-button{min-width:32px}
}

@media(max-width:700px){
 .detail-title,.post-page .detail-title{font-size:1.25rem;font-weight:600;line-height:1.55;letter-spacing:0}
 .detail-body,.post-page .detail-body,.markdown-body{font-size:1.0625rem;line-height:1.75}
 .reply p{font-size:1rem;line-height:1.75}
 .compact-post .post-title{font-size:1.0625rem;line-height:1.6}
 .post-excerpt,.compact-post .post-excerpt{font-size:1rem;line-height:1.75}
}

/* One daily question with its discussion entry, no duplicate inbox bell. */
.topbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:18px}.topbar .header-daily{justify-self:center;max-width:100%;white-space:normal;overflow-wrap:anywhere;background:transparent;color:#303744;font-size:17px;line-height:1.4;padding:8px 4px;box-shadow:none}.topbar .top-actions{justify-self:end;margin-left:0}.topbar .timezone{display:none}.topbar #daily-comments{display:grid;place-items:center;width:44px;height:44px;color:#697285}.topbar #daily-comments svg{width:25px;height:25px}
@media(max-width:700px){.topbar{grid-template-columns:auto minmax(0,1fr) auto;gap:10px}.topbar .header-daily{font-size:15px;font-weight:600}.topbar .brand-name{display:none}.topbar .brand-mark{width:32px}.topbar .top-actions{gap:0}}


/* Detail pages share a single, compact navigation row. */
.post-topline{display:flex;align-items:center;gap:10px;position:sticky;top:90px;z-index:19;background:#fff;margin:-30px -30px 24px;padding:12px 20px;border-bottom:1px solid var(--line)}
.post-topline>.icon-button{flex-shrink:0;width:40px;min-width:40px;height:44px}
.post-topline .post-byline{margin:0;gap:10px;min-width:0;flex:1}
.post-topline .post-byline-identity{gap:6px 8px}.post-topline .user-avatar{width:36px;height:36px;min-width:36px}
.post-category{font-size:12px;color:var(--muted);margin-bottom:10px}.post-date{margin:12px 0 22px}
.company-heading.company-detail-header{display:flex;align-items:center;gap:10px;padding:12px 0;margin:0 0 20px;min-width:0}
.company-detail-header>.icon-button{flex-shrink:0}.company-detail-header h1{flex:1;min-width:0;font-size:22px;line-height:1.35;overflow-wrap:anywhere}.company-detail-header .follow-button{flex-shrink:0;margin-left:auto;white-space:nowrap}
@media(max-width:760px){
 body.post-active .topbar,body.company-active .topbar,body.post-active .mobile-nav{display:none!important}
 body.post-active .app-shell{padding:0 0 calc(100px + env(safe-area-inset-bottom,0px))}
 body.post-active .post-page{border:0;border-radius:0;padding:0 18px 130px;min-height:100dvh}
 .post-topline{top:0;margin:0 -18px 22px;padding:calc(10px + env(safe-area-inset-top,0px)) 12px 10px;gap:6px}
 .post-topline .post-byline-identity .member-nickname{font-size:16px}
 body.company-active .app-shell{padding-top:0}
 .company-heading.company-detail-header{position:sticky;top:0;z-index:19;background:var(--bg);padding:calc(10px + env(safe-area-inset-top,0px)) 0 12px}
 .company-detail-header h1{font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.company-detail-header .company-monogram{width:32px;height:32px}
}

.post-loader{min-height:60dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;background:#fff;border-radius:14px}
.post-loader-logo{display:block;width:72px;height:72px;border-radius:18px}
.post-loader-dots{display:flex;align-items:center;gap:8px;height:12px}
.post-loader-dots span{display:block;width:5px;height:5px;border-radius:50%;background:#111;opacity:0;animation:post-dot-wave 2s ease-in-out infinite;animation-delay:calc(var(--dot)*.15s)}
@keyframes post-dot-wave{0%,65%,100%{opacity:0}28%,38%{opacity:1}}
@media(prefers-reduced-motion:reduce){.post-loader-dots span{animation:none;opacity:.45}}

/* Desktop: one navigation column and a central daily check-in. */
.desktop-checkin{display:none}
@media(min-width:761px){
 .rightbar,.topbar .top-search,.topbar .header-daily,.topbar .top-actions{display:none!important}
 .app-shell{grid-template-columns:200px minmax(0,820px);max-width:1120px;gap:36px;margin:0 auto;padding:32px 24px}
 .topbar{display:grid;grid-template-columns:200px minmax(0,820px);justify-content:center;gap:36px;padding:16px 24px;height:auto;min-height:88px}
 .topbar .brand{min-width:0}
 .desktop-checkin{display:flex;position:relative;align-items:center;gap:12px;width:100%;margin:0}
 .desktop-checkin-label{font-size:15px;font-weight:600;white-space:nowrap;color:#606a7b}
 .desktop-checkin input{flex:1;min-width:0;padding:14px 18px;border:1px solid #e3e7ef;border-radius:14px;background:#f6f7fa;color:#273044;font:inherit;font-size:16px;outline:none}
 .desktop-checkin input::placeholder{color:#929baa}
 .desktop-checkin input:focus{border-color:#8292ee;background:#fff}
 .desktop-checkin .primary{padding:13px 20px;white-space:nowrap;border-radius:12px}
 .desktop-checkin .primary:disabled{background:#eaf4ee;color:#39785b;opacity:1;cursor:default}
 .desktop-checkin .plain-link{white-space:nowrap;margin:0;font-size:14px}
 .desktop-checkin-error{position:absolute;top:100%;left:76px;color:#bf3545;font-size:12px}
 .sidebar .sidebar-bottom{margin-top:32px}
}

.desktop-checkin [hidden]{display:none!important}

#notifications-dialog .notification-header{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:8px;margin-bottom:18px}
#notifications-dialog .notification-header h2{margin:0;text-align:center;font-size:18px;line-height:1.4;font-weight:600;letter-spacing:0}
#notifications-dialog .notification-back{width:44px;height:44px;padding:10px;color:#303642;border:0;background:transparent;box-shadow:none}
#notifications-dialog .notification-back svg{width:24px;height:24px}
#notifications-dialog .notification-toolbar[hidden]{display:none}
@media(max-width:760px){#notifications-dialog{padding:calc(10px + env(safe-area-inset-top,0px)) 16px calc(20px + env(safe-area-inset-bottom,0px))}#notifications-dialog .notification-header{position:sticky;top:0;background:#fff;z-index:2;padding:4px 0 10px;margin-bottom:6px}}

.registration-choices{display:grid;gap:14px;margin:22px 0}
.registration-choices>button{padding:20px;text-align:left;border:1px solid #dfe4ed;border-radius:14px;background:#f8f9fc}
.registration-choices strong,.registration-choices span{display:block}
.registration-choices strong{font-size:18px;color:#283349;margin-bottom:8px}
.registration-choices span{font-size:14px;line-height:1.6;color:#7b8597}
.registration-choices>button:hover{border-color:#677de1;background:#f0f3ff}
.registration-group{padding:0;border:0;margin:20px 0}
.registration-group legend{font-size:18px;font-weight:600;margin-bottom:20px}
.registration-group-yes{display:flex;align-items:center;gap:18px}
.registration-group label{display:flex;gap:10px;align-items:center;white-space:nowrap;font-size:16px}
.registration-group input[type=radio]{width:18px;height:18px;accent-color:#3e5ce7}
.registration-group-yes .form-input{min-width:0;flex:1;margin:0}
.registration-group-yes .form-input:disabled{background:#f2f3f6}
.registration-group-no{margin-top:22px;min-height:44px}
.sidebar-auth-entry{margin-top:22px;width:100%;padding:13px;border:1px solid #dfe4ed;border-radius:12px;color:#3e5ce7;font-weight:600}
.sidebar-auth-entry[hidden]{display:none}

.profile-email-edit{margin-top:24px;padding-top:20px;border-top:1px solid var(--line,#e5e7eb)}.profile-email-value{overflow-wrap:anywhere;margin:8px 0 16px}

#auth-dialog .auth-modal-header{justify-content:flex-start;align-items:center;gap:12px}#auth-dialog .auth-modal-header>[data-auth-action="close"]{flex:0 0 38px;margin:0}

/* Tactile channel tiles, scoped to the phone community directory. */
@media(max-width:700px){
 .channel-directory{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;background:none;border:0;border-radius:0;overflow:visible;padding:3px 3px 12px}
 .channel-directory .channel-row{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:18px;aspect-ratio:1;padding:22px 20px;border:1px solid #e4e8f3;border-radius:24px;background:#fff;box-shadow:0 5px 16px #26376b06;min-width:0;min-height:150px;transition:transform .16s cubic-bezier(.2,.8,.2,1),box-shadow .16s;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
 .channel-directory .channel-all,.channel-directory .channel-chevron{display:none}
 .channel-directory .channel-symbol{width:52px;height:52px;border-radius:17px;background:#eaf0ff;color:#4365d8;box-shadow:inset 0 1px 0 #ffffffb3}
 .channel-directory .channel-symbol svg{width:28px;height:28px;stroke-width:1.8}
 .channel-directory .channel-name{font-size:1.125rem;line-height:1.35;font-weight:650;letter-spacing:.025em;color:#242d42}
 .channel-directory [data-topic="面经分享"] .channel-symbol{background:#f0ebff;color:#7958cf}
 .channel-directory [data-topic="公司情报"] .channel-symbol{background:#e3f4f1;color:#20856f}
 .channel-directory [data-topic="在日生活"] .channel-symbol{background:#fff1df;color:#bd7a20}
 .channel-directory [data-topic="招聘信息"] .channel-symbol{background:#e6efff;color:#3861cb}
 .channel-directory .channel-row:active{transform:scale(1.035);box-shadow:0 9px 24px #26376b15;z-index:1}
 .channel-directory .channel-row:focus-visible{outline:2px solid var(--blue);outline-offset:4px}
 .channel-directory .channel-unread{position:absolute;top:16px;right:16px;min-width:24px;height:24px;padding:0 7px;font-size:13px;background:#e43d4f;box-shadow:0 2px 5px #e43d4f1a}
}
.post-unread-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#e43d4f;vertical-align:middle;margin:0 7px 2px 0;flex-shrink:0}
.post-unread-dot[hidden]{display:none}
@media(prefers-reduced-motion:reduce){.channel-directory .channel-row{transition:none}}

/* The former desktop check-in space now holds search. */
@media(min-width:761px){.topbar .top-search{display:flex!important}}
@media(max-width:760px){.topbar .top-search{display:none}}
