/* Styles for the authenticated application and its mobile overlays. */
.phone { color: var(--text); }
.phone button, .phone input, .phone select { font: inherit; }
.phone button { cursor: pointer; }
.phone button:disabled { opacity: .5; cursor: default; }
.phone .moments-cover-bg { overflow: hidden; background: none; }
.phone .moments-cover-bg > img, .phone .moments-cover-bg > video { display: block; width: 100%; height: 100%; object-fit: cover; }
.phone .moments-me-avatar { touch-action: pan-y; -webkit-touch-callout: none; user-select: none; }
.phone .contact-avatar { width: 42px; height: 42px; object-fit: cover; }
.phone .friend-cell { height: 66px; touch-action: pan-y; }
.contact-info { min-width: 0; margin-left: 12px; }
.phone .contact-info .friend-name { display: block; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-info small { display: block; margin-top: 4px; color: var(--text2); }
.contact-info em { font-style: normal; color: #fa5151; }
.empty-group, .feed-state { padding: 24px 16px; text-align: center; color: var(--text2); font-size: 14px; }
.feed-empty { width: 32px; height: 1px; margin: 24px auto; background: var(--text3); }
.phone .login-overlay { position: absolute; inset: 0; z-index: 80; display: block; overflow-y: auto; background: var(--cell-bg); padding: 88px 28px 32px; }
.phone .login-card { width: 100%; max-width: 440px; margin: auto; padding: 0; border-radius: 0; background: transparent; color: var(--text); display: flex; flex-direction: column; gap: 24px; }
.phone .login-card h2 { font-size: 25px; font-weight: 500; }
.phone .login-card p { color: var(--text2); font-size: 14px; margin-bottom: 20px; }
.phone .login-card label { display: flex; align-items: center; gap: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.phone .login-card input:not([type=range]) { min-width: 0; flex: 1; width: 100%; background: transparent; color: var(--text); border: 0; border-radius: 0; padding: 8px 0; font-size: 16px; }
.phone .login-close, .phone .preview-close { position: absolute; top: 8px; left: 10px; width: 44px; height: 44px; border: 0; background: transparent; color: inherit; font-size: 30px; }
.slider-wrap { padding: 16px; background: var(--social-bg); border-radius: 6px; text-align: center; color: var(--text2); font-size: 14px; }
.phone .slider-wrap input { display: block; width: 100%; padding: 0; margin-top: 16px; height: 32px; accent-color: #07c160; touch-action: none; }
.phone .green-button { padding: 12px 20px; border: 0; border-radius: 6px; color: white; background: #07c160; font-size: 16px; }
.phone .modal-mask { position: absolute; inset: 0; z-index: 90; background: #0009; display: flex; align-items: flex-end; justify-content: center; padding-top: 16px; }
.phone .user-modal, .phone .action-sheet { width: 100%; max-width: 520px; max-height: 100%; overflow-y: auto; background: var(--cell-bg); color: var(--text); border-radius: 16px 16px 0 0; padding: 24px 24px max(24px, env(safe-area-inset-bottom)); }
.user-modal h3, .action-sheet h3 { font-size: 18px; margin-bottom: 20px; text-align: center; }
.user-modal > label { display: block; font-size: 14px; margin-bottom: 16px; }
.phone .user-modal input:not([type=checkbox]):not([type=file]), .phone .user-modal select, .guest-setting input, .guest-setting select { display: block; width: 100%; margin-top: 8px; padding: 10px 12px; min-height: 42px; border: 1px solid var(--line); border-radius: 6px; background: var(--social-bg); color: var(--text); }
.phone .avatar-picker { display: flex; align-items: center; gap: 16px; position: relative; min-height: 56px; }
.avatar-picker img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.avatar-picker input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.phone .check-label { display: flex; gap: 8px; align-items: center; }
.check-label input { accent-color: #07c160; }
.form-note { color: var(--text2); font-size: 12px; line-height: 1.6; margin-bottom: 16px; }
.form-buttons { display: flex; gap: 12px; }
.form-buttons button { flex: 1; border: 0; border-radius: 6px; padding: 12px; background: var(--press); color: var(--text); }
.action-sheet button { display: block; width: 100%; padding: 16px; background: transparent; border: 0; border-top: 1px solid var(--line); color: var(--text); }
.phone .danger { color: #fa5151; }
.guest-setting { padding: 20px 16px; }
.guest-setting h3 { font-size: 17px; font-weight: 500; }
.guest-setting p { color: var(--text2); font-size: 13px; line-height: 1.6; margin: 12px 0; }
.guest-setting .green-button { width: 100%; margin-top: 16px; }
.settings-section-title { padding: 18px 16px 8px; color: var(--text2); font-size: 13px; }
.settings-profile-row { min-height: 58px; height: 58px; padding-left: 16px; }
.settings-profile-row .cell-title { margin-left: 0; }
.settings-profile-value { max-width: 58%; overflow: hidden; color: var(--text2); text-overflow: ellipsis; white-space: nowrap; }
.settings-profile-avatar { width: 42px; height: 42px; margin-right: 8px; border-radius: 6px; object-fit: cover; }
.settings-editor { padding: 10px 16px 14px; border-top: .5px solid var(--line); background: var(--cell-bg); }
.settings-editor input, .settings-editor textarea { display: block; width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--social-bg); color: var(--text); resize: vertical; }
.settings-editor textarea { min-height: 76px; line-height: 1.5; }
.settings-editor-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.settings-editor-actions button { min-width: 72px; padding: 8px 14px; border: 0; border-radius: 6px; background: var(--press); color: var(--text); }
.settings-editor-actions .green-button { min-width: 72px; padding: 8px 14px; }
.logout-button, .load-more, .feed-state button { display: block; width: 100%; border: 0; padding: 16px; background: var(--cell-bg); color: var(--text); }
.phone .media-preview { position: absolute; color: white; }
.phone .media-preview > img, .phone .media-preview > video { max-width: 100%; max-height: 80%; object-fit: contain; }
.phone .cover-control { position: absolute; right: 20px; bottom: max(28px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; border: 0; border-radius: 6px; background: #ffffff25; color: white; padding: 12px 16px; }
.cover-control svg { display: block; width: 24px; height: 24px; }
.phone .post-img { object-fit: cover; }
.post-video { max-width: 100%; width: 240px; max-height: 360px; background: black; }
.phone .post-content { min-width: 0; }
.phone .pub-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-content: start; }
.phone .pub-grid .pub-img, .phone .pub-grid .pub-add { width: 100%; height: auto; aspect-ratio: 1; }
.pub-img video { width: 100%; height: 100%; object-fit: cover; }
.phone .refresh-indicator { position: absolute; left: 20px; width: 28px; height: 28px; animation: none; }
.phone .refresh-indicator.spinning { animation: spin 1s linear infinite; }
.phone .toast { z-index: 110; max-width: 85%; }
.phone { color-scheme: light; }
.phone.dark { color-scheme: dark; }
@media (prefers-color-scheme: dark) { .phone.auto { color-scheme: dark; } }
.select-field { margin-bottom: 16px; font-size: 14px; }
.phone .select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 46px; padding: 12px; margin-top: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--social-bg); color: var(--text); text-align: left; }
.select-trigger > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-chevron { flex-shrink: 0; width: 8px; height: 8px; margin-right: 3px; border-right: 1.5px solid var(--text2); border-bottom: 1.5px solid var(--text2); transform: rotate(45deg); }
.picker-mask { position: absolute; inset: 0; z-index: 105; background: #0008; display: flex; align-items: flex-end; justify-content: center; }
.picker-panel { width: 100%; max-width: 520px; max-height: min(80dvh,640px); display: flex; flex-direction: column; background: var(--cell-bg); color: var(--text); border-radius: 16px 16px 0 0; overflow: hidden; padding-bottom: env(safe-area-inset-bottom,0px); }
.picker-header { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.picker-header h3 { font-size: 17px; font-weight: 500; }
.picker-header button { width: 40px; height: 40px; background: none; border: 0; color: var(--text2); font-size: 26px; }
.picker-search { padding: 12px 16px; }
.picker-search input { width: 100%; min-width: 0; border: 0; border-radius: 6px; padding: 12px; background: var(--social-bg); color: var(--text); font-size: 16px; }
.picker-options { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.phone .picker-option { display: flex; width: 100%; align-items: center; gap: 12px; padding: 16px 20px; min-height: 56px; border: 0; border-bottom: .5px solid var(--line); background: transparent; color: var(--text); text-align: left; }
.picker-option:active { background: var(--press); }
.picker-option img { width: 40px; height: 40px; border-radius: 5px; object-fit: cover; }
.picker-user { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 5px; }
.picker-user > span { overflow-wrap: anywhere; }
.picker-user small { color: var(--text2); overflow-wrap: anywhere; }
.picker-check { color: #07c160; margin-left: auto; width: 22px; flex-shrink: 0; font-size: 21px; }
.picker-message { padding: 32px 20px; color: var(--text2); text-align: center; font-size: 14px; }
.phone .picker-cancel { flex-shrink: 0; padding: 17px; border: 0; border-top: 8px solid var(--page-bg); background: var(--cell-bg); color: var(--text); }
.phone .post-time-toggle { display: inline; padding: 5px 0; border: 0; background: none; color: var(--text3); font-size: 13px; line-height: 1.5; text-align: left; }
@media (max-height: 640px) { .phone .login-overlay { padding-top: 64px; } .phone .login-card { gap: 16px; } }
.post-video-thumb { position: relative; display: block; width: 240px; max-width: 100%; max-height: 360px; padding: 0; overflow: hidden; border: 0; border-radius: 4px; background: #111; cursor: pointer; }
.post-video-thumb img { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.post-video-thumb::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; transform: translate(-38%,-50%); border-top: 18px solid transparent; border-bottom: 18px solid transparent; border-left: 28px solid rgba(255,255,255,.9); filter: drop-shadow(0 1px 3px rgba(0,0,0,.55)); }

/* Keep every feed video preview within one predictable card size. */
.post-video-thumb { width: min(240px, 100%); height: auto; aspect-ratio: 16 / 9; max-height: none; }
.post-video-thumb img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
