/* V2Y v3.5.3 UI Polish: shared presentation for forum, resources, admin and accounts. */
.v353-polish {
  --v353-radius:14px; --v353-compact-radius:10px;
  --v353-field-h:44px; --v353-space:clamp(14px,1.8vw,24px);
  --v353-ring:0 0 0 3px color-mix(in srgb,var(--accent) 28%,transparent);
  text-rendering:optimizeLegibility;
}
.v353-polish :where(.main,.main>*,.app-layout,.panel,.thread-card,.feed-row,.feed-row-content,.post,.post-body,.post-actions,.thread-toolbar,.chat-panel,.conversations,.v33-card,.v34-pro-grid,.v35-updater,.profile-hero) {min-width:0;}
.v353-polish :where(.main h1,.main h2,.main h3,.main a,.post-body,.thread-title,.profile-identity-text,.chat-bubble,.v33-card) {overflow-wrap:anywhere;}
.v353-polish .main {width:100%;min-width:0;max-width:100%;}
.v353-polish :where(.panel,.thread-card,.cat-card,.v33-card,.rail-panel,.v31-pulse-widget) {border-radius:var(--v353-radius);}
.v353-polish :is(.panel,.form-grid,.v34-stack,.v34-filters) > :first-child {margin-top:0;}
.v353-polish :is(.panel,.form-grid,.v34-stack,.v34-filters) > :last-child {margin-bottom:0;}
.v353-polish :where(button,.primary-btn,.secondary-btn,.small-link,.icon-btn,summary) {touch-action:manipulation;}
.v353-polish :where(button,.primary-btn,.secondary-btn) {min-height:var(--v353-field-h);max-width:100%;font:inherit;font-weight:600;border-radius:var(--v353-compact-radius);}
.v353-polish :where(input:not([type=checkbox]):not([type=radio]),select,textarea) {max-width:100%;font-size:16px;}
.v353-polish :where(input,select,textarea,button) {scroll-margin-block:24px;}
.v353-polish :where(button,a,input,textarea,select,summary):focus-visible {outline:2px solid var(--accent);outline-offset:3px;box-shadow:var(--v353-ring);}
.v353-polish :where(a,button,summary) {text-underline-offset:3px;}
.v353-polish :where(.form-grid,.v34-stack,.v34-filters,.v313-filters,.search-controls,.chat-form) {max-width:100%;min-width:0;}
.v353-polish :where(.form-grid,.v34-stack,.v34-filters,.v313-filters) > * {min-width:0;}
.v353-polish :where(.form-grid,.v34-stack,.v34-filters,.v313-filters) :is(input,textarea,select) {box-sizing:border-box;max-width:100%;}
.v353-polish textarea {resize:vertical;min-height:100px;line-height:1.55;}
.v353-polish :where(input[type=file],input[type=url],input[type=email],input[type=password]) {width:100%;}
.v353-polish :where(input[type=checkbox],input[type=radio]) {min-height:initial!important;min-width:initial!important;width:auto!important;vertical-align:middle;}
.v353-polish :where(.checkbox,label:has(input[type=checkbox])) {line-height:1.5;}
.v353-polish :where(pre,code) {max-inline-size:100%;}
.v353-polish pre {overflow-x:auto;tab-size:2;}
.v353-polish :where(.post-body img,.post-body video,.v33-card img,.v34-gallery img,.profile-cover img) {max-width:100%;height:auto;object-fit:contain;}
.v353-polish :where(.thread-card,.feed-row,.v33-card,.v34-review-card,.v34-version,.v30-inline-actions) {overflow-wrap:anywhere;}
.v353-polish :where(table,.v29-permissions-table) {display:block;max-inline-size:100%;overflow-x:auto;scrollbar-width:thin;}
.v353-polish :where(.tabs,.feed-tabs,.mod-tabs,.v313-tabs,.v31-pulse-filters) {overscroll-behavior-inline:contain;scrollbar-width:thin;}
.v353-polish .main :where(.muted,.mini) {line-height:1.55;}
.v353-polish .main :where(.eyebrow) {font-size:12px;letter-spacing:0;color:var(--muted);}
.v353-polish .main :where(.empty) {padding:clamp(20px,3vw,36px);line-height:1.6;}
.v353-polish .v353-inline-actions {display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.v353-polish .v353-auth-gate {max-width:580px;margin:clamp(18px,3vw,48px) auto;padding:clamp(20px,4vw,38px);}
.v353-polish .v353-auth-gate h1 {margin-block:0 8px;}
.v353-polish .v353-auth-gate p {color:var(--muted);margin-bottom:22px;}
/* Compact composer with a discoverable secondary tool group and native details fallback. */
.v353-polish .v353-editor-tools {display:flex;align-items:center;flex-wrap:wrap;gap:6px;border:1px solid var(--line);border-radius:12px;padding:6px;background:var(--panel2);margin-block:5px 2px;}
.v353-polish .v353-editor-tools>button {min-height:38px;min-width:40px;flex:0 0 auto;padding:6px 10px;}
.v353-polish .v353-editor-more {position:relative;min-width:0;}
.v353-polish .v353-editor-more>summary {display:flex;align-items:center;min-height:38px;padding:6px 10px;cursor:pointer;border-radius:9px;border:1px solid transparent;color:var(--ink);font-size:12px;list-style:none;user-select:none;}
.v353-polish .v353-editor-more>summary::-webkit-details-marker {display:none;}
.v353-polish .v353-editor-more>summary::after {content:'⌄';margin-inline-start:7px;}
.v353-polish .v353-editor-more[open]>summary {border-color:var(--line);background:var(--panel);}
.v353-polish .v353-editor-more-items {display:flex;flex-wrap:wrap;gap:6px;position:absolute;z-index:11;left:0;top:calc(100% + 5px);width:min(280px,calc(100vw - 48px));border:1px solid var(--line);border-radius:12px;background:var(--panel);box-shadow:0 10px 22px rgba(0,0,0,.15);padding:9px;}
.v353-polish .v353-editor-more-items>button {min-height:42px;flex:1 1 90px;}
.v353-polish .v353-preview-btn {margin-inline-start:auto;}
.v353-polish .v353-editor-help {border:0;background:transparent;margin:0 0 12px;}
.v353-polish .v353-editor-help>summary {font-size:12px;color:var(--muted);padding-block:8px;cursor:pointer;}
.v353-polish .v353-editor-help>p {margin:3px 0 8px;padding:10px 12px;background:var(--panel2);border-radius:10px;}
.v353-polish .v353-text-counter {font-size:11px;color:var(--muted);text-align:end;min-height:16px;margin-top:-4px;}
.v353-polish .v353-text-counter.is-close {color:var(--ink);font-weight:650;}
.v353-polish .v353-file-note {font-size:12px;color:var(--muted);margin:4px 0 10px;overflow-wrap:anywhere;}
/* Privacy & media configuration is available, but no longer occupies the entire profile. */
.v353-polish .v353-settings-fold {border:1px solid var(--line);border-radius:var(--v353-radius);background:var(--panel);margin:13px 0;min-width:0;}
.v353-polish .v353-settings-fold>summary {display:flex;flex-direction:column;gap:1px;position:relative;cursor:pointer;padding:16px 45px 16px 18px;list-style:none;min-height:65px;}
.v353-polish .v353-settings-fold>summary::-webkit-details-marker {display:none;}
.v353-polish .v353-settings-fold>summary>span {font-weight:650;font-size:14px;color:var(--ink);}
.v353-polish .v353-settings-fold>summary>small {font-size:12px;color:var(--muted);}
.v353-polish .v353-settings-fold>summary::after {content:'⌄';position:absolute;right:18px;top:20px;font-size:20px;color:var(--muted);}
.v353-polish .v353-settings-fold[open]>summary::after {transform:rotate(180deg);}
.v353-polish .v353-settings-fold[open]>summary {border-bottom:1px solid var(--line);}
.v353-polish .v353-settings-fold>section {margin:0;border:0;border-radius:0;box-shadow:none;background:transparent;}
/* Moderation actions stay accessible inside a compact disclosure. */
.v353-polish .v353-action-menu {position:relative;min-width:0;}
.v353-polish .v353-action-menu>summary {list-style:none;display:flex;align-items:center;min-height:44px;padding:8px 13px;border:1px solid var(--line);border-radius:10px;font-size:12px;color:var(--muted);cursor:pointer;}
.v353-polish .v353-action-menu>summary::-webkit-details-marker {display:none;}
.v353-polish .v353-action-menu>summary::after {content:'⌄';margin-inline-start:9px;}
.v353-polish .v353-action-menu[open]>summary {color:var(--ink);background:var(--panel2);}
.v353-polish .v353-action-menu-body {display:flex;gap:7px;flex-wrap:wrap;padding:8px 2px;}
.v353-polish .v353-action-menu-body .inline-form {display:flex;gap:7px;flex-wrap:wrap;}
/* Conversations should never force a fixed-width overflow on phones. */
.v353-polish .messages-layout {gap:12px;min-width:0;}
.v353-polish .conversations {overflow-x:hidden;}
.v353-polish .conversation-item {overflow-wrap:anywhere;}
.v353-polish .chat-messages {overscroll-behavior:contain;min-width:0;}
.v353-polish .chat-bubble {max-width:min(85%,600px);overflow-wrap:anywhere;}
.v353-polish .chat-form {min-width:0;}
.v353-polish .chat-form textarea {width:100%;min-width:0;}
/* Admin pages, legacy forms and tables receive the same spacing and sizing. */
.v353-polish :where(.v30-acl-grid,.v35-stats,.v33-card-grid,.v34-pro-grid,.profile-media-grid,.v35-collections) {max-width:100%;min-width:0;}
.v353-polish :where(.v30-acl-grid,.v35-stats,.v33-card-grid,.v34-pro-grid,.profile-media-grid,.v35-collections)>* {min-width:0;}
.v353-polish .v35-updater input[type=file] {width:100%;}
.v353-polish :where(.v35-updater,.v34-moderation) form {max-width:100%;}
.v353-polish .v35-updater :where(details,summary) {overflow-wrap:anywhere;}
.v353-polish .v35-updater code {word-break:break-all;}
@media (max-width:1180px) {
  .v353-polish .app-layout {grid-template-columns:minmax(0,1fr);}
}
@media (max-width:760px) {
  .v353-polish :where(.v30-acl-grid,.profile-media-grid) {grid-template-columns:minmax(0,1fr);}
  .v353-polish :where(.thread-toolbar,.post-actions) {display:flex;flex-wrap:wrap;align-items:center;}
  .v353-polish .messages-layout {display:grid;grid-template-columns:minmax(0,1fr);}
  .v353-polish .conversations {max-height:240px;overflow-y:auto;}
  .v353-polish .v353-editor-tools {gap:4px;}
  .v353-polish .v353-editor-tools>button {padding:5px 8px;}
  .v353-polish .v353-preview-btn {font-size:12px;}
  .v353-polish .main :where(.panel,.empty) {padding:clamp(14px,3vw,18px);}
}
@media (max-width:390px) {
  .v353-polish .v353-editor-more-items {left:auto;right:0;}
  .v353-polish .v353-inline-actions>a {flex:1 1 120px;justify-content:center;}
  .v353-polish .v353-editor-tools {padding:5px;}
  .v353-polish .v353-editor-tools>button {min-width:36px;}
  .v353-polish .v353-settings-fold>summary {padding-inline:13px 36px;}
  .v353-polish .v353-settings-fold>summary::after {right:11px;}
}
@media (prefers-reduced-motion:reduce) {
  .v353-polish *, .v353-polish *::before,.v353-polish *::after {scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important;}
}
