/* v14 refinements */
.local-date{white-space:nowrap}
.news{margin:18px 0 26px;padding-bottom:18px;border-bottom:1px solid rgba(217,168,58,.18)}
.news:last-child{border-bottom:0}
.news strong:first-child{display:block;margin-bottom:10px;color:#fff;font-size:18px}
.single-thesis-results{border-top:0!important;margin-top:10px!important;padding-top:0!important}
.friend-league-table th:nth-child(1),.friend-league-table td:nth-child(1){width:72px;text-align:center}

/* Header must always stay clickable above mobile board content */
.topbar{z-index:5000!important}

/* keep desktop board squares equal and keep search inside the square */
.board-editor .square.entity{aspect-ratio:1 / 1!important;width:100%;min-width:0}
.board-editor .square.entity .search{position:absolute;left:12px;right:12px;bottom:12px;width:auto!important;max-width:none!important;box-sizing:border-box;z-index:4}
.board-editor .square.entity:not(.smm-active-square){padding-bottom:12px!important}
.board-editor .square.entity:not(.smm-active-square):not(.has-selection) .entityPhoto{margin-bottom:auto}
.board-editor .square.entity:not(.smm-active-square):not(.has-selection) .entityName{display:none!important}
.board-editor .square.entity:not(.smm-active-square):not(.has-selection) .search{display:block}
.board-editor .square.entity.has-selection .search{display:none!important}

/* desktop only: keep real player photos and fallback photos visually aligned */
@media(min-width:1025px){
  .board-editor .square.entity .entityPhoto{flex:0 0 104px!important;height:104px!important;min-height:104px!important;max-height:104px!important;margin:8px 0 10px!important}
  .board-editor .square.entity.has-selection .entityPhoto{flex-basis:101px!important;height:101px!important;min-height:101px!important;max-height:101px!important}
  .board-editor .square.entity .entityPhoto img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center top!important}
}

.board-title-spaced{margin-top:24px!important;margin-bottom:18px!important}
.autosave-status{display:inline-block;margin-left:10px;color:var(--muted);font-size:13px;font-weight:800}
.autosave-status.is-saving{color:var(--gold2)}
.autosave-status.is-saved{color:var(--green)}
.autosave-status.is-error{color:var(--red)}
.admin-action-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:12px}
.admin-action-row form{margin:0}
.admin-action-row .btn{height:44px}
.score-row.grid.three{align-items:start!important}
.score-row > label{margin:0!important;display:flex!important;flex-direction:column!important;justify-content:flex-start!important;height:100%}
.score-row input,.score-row select,.score-row .admin-entity-search{height:44px!important}
.admin-entity-picker{position:relative;min-height:66px}
.admin-entity-picker input.admin-entity-search{margin-bottom:6px}
.admin-entity-label{display:block;color:var(--gold2);font-size:12px;font-weight:900;min-height:16px}
.admin-entity-results{position:absolute;left:0;right:0;top:50px;z-index:40;background:#080808;border:1px solid var(--gold);border-radius:14px;max-height:260px;overflow:auto;box-shadow:0 18px 42px rgba(0,0,0,.55)}
.admin-entity-results button{display:block;width:100%;background:transparent;border:0;color:#fff;text-align:left;padding:9px 10px;cursor:pointer}
.admin-entity-results button:hover{background:rgba(217,168,58,.14)}
.admin-entity-results small{color:var(--gold2);font-weight:900;margin-left:6px}

/* most picked board badges */
.most-picked-board .pick-percent,.most-picked-board .score{width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;border-radius:999px!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:13px!important;font-weight:950!important;line-height:1!important;padding:0!important}
.most-picked-board .pick-percent{left:-12px!important;right:auto!important;top:auto!important;bottom:-24px!important}
.most-picked-board .score{right:-12px!important;bottom:-12px!important}
.most-picked-board .entityName,.most-picked-board .drop-content{padding-bottom:18px!important}

@media(min-width:1025px){
  .board-editor .square.entity:not(.has-selection){min-height:180px!important}
  .board-editor .square.entity:not(.has-selection) .search{font-size:13px;padding:9px 10px}
}

@media(max-width:1024px){
  .board-editor.smm-mobile-ready .square.smm-active-square{width:min(86vw,320px)!important;max-width:320px!important;margin-top:6px!important;z-index:1!important}
  .mobile-readonly-focus-board.smm-mobile-ready .square.smm-active-square{width:min(86vw,320px)!important;max-width:320px!important;margin-top:6px!important;z-index:1!important}
  .profile-board .mobile-readonly-focus-board.smm-mobile-ready .square.smm-active-square{width:min(82vw,300px)!important;max-width:300px!important}
  .mobile-board-picker{width:min(100%,340px)!important}
  .profile-board .mobile-board-picker{width:min(100%,300px)!important}

  .board-editor.smm-mobile-ready .square.smm-active-square.entity:not(.has-selection)::after{display:none!important;content:none!important}
  .board-editor.smm-mobile-ready .square.smm-active-square.entity:not(.has-selection) .entityPhoto{display:none!important}
  .board-editor.smm-mobile-ready .square.smm-active-square.entity:not(.has-selection) .entityName{display:none!important}

  .board-editor.smm-mobile-ready .square.smm-active-square .results button{display:grid!important;grid-template-columns:42px auto 1fr!important;gap:10px!important;align-items:center!important;min-height:52px!important}
  .board-editor.smm-mobile-ready .square.smm-active-square .results button img{grid-column:1;width:42px!important;height:42px!important;border-radius:999px!important}
  .board-editor.smm-mobile-ready .square.smm-active-square .results button span{grid-column:2 / 4;display:grid!important;grid-template-columns:auto 1fr!important;gap:8px!important;align-items:center!important;min-width:0}
  .board-editor.smm-mobile-ready .square.smm-active-square .results button span small{position:static!important;display:inline-flex!important;grid-column:1!important;max-width:none!important;color:var(--gold2)!important;font-size:12px!important;background:rgba(217,168,58,.14);border:1px solid rgba(217,168,58,.35);border-radius:999px;padding:3px 7px;line-height:1!important;white-space:nowrap!important}
  .board-editor.smm-mobile-ready .square.smm-active-square .results button span{font-size:14px!important;white-space:normal!important}

  .most-picked-board .pick-percent,.most-picked-board .score{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;font-size:12px!important}
  .most-picked-board .score{bottom:-12px!important}
}

/* Live polish: profile/settings, complete player photos, support button */
.support-link{order:-1}
.support-link::before{content:"💛";margin-right:6px}
.language-switcher{order:-2;display:inline-flex;gap:6px;align-items:center;margin-right:4px}
.language-switcher form{margin:0}
.flag-btn{width:40px;height:40px;border-radius:999px!important;border:1px solid rgba(217,168,58,.35)!important;background:rgba(255,255,255,.06)!important;display:inline-flex;align-items:center;justify-content:center;font-size:20px!important;line-height:1;filter:saturate(.85);opacity:.8}
.flag-btn:hover,.flag-btn.is-active{border-color:var(--gold)!important;background:rgba(217,168,58,.18)!important;opacity:1;filter:saturate(1.08);box-shadow:0 0 0 2px rgba(217,168,58,.12)}
.small{font-size:13px}
.settings-card{max-width:720px}
.settings-section{margin:18px 0;padding:18px;border:1px solid rgba(217,168,58,.22);border-radius:20px;background:rgba(0,0,0,.18)}
.settings-section h2{margin:0 0 12px;color:var(--gold2)}
.checkline{display:flex!important;gap:12px;align-items:flex-start;color:var(--text);margin:12px 0}
.checkline input{width:auto;margin-top:4px;accent-color:var(--gold)}
.danger-zone{border-color:rgba(217,75,75,.45);background:rgba(217,75,75,.08)}
.settings-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:18px}
.auth-card .muted{margin-top:-6px}
.profile-page{max-width:1100px;margin-left:auto;margin-right:auto}
.profile-hero{position:relative;display:flex;gap:22px;align-items:center;padding:20px;border-radius:24px;background:linear-gradient(135deg,rgba(217,168,58,.16),rgba(255,255,255,.04));border:1px solid rgba(217,168,58,.26)}
.profile-hero-copy h1{margin:4px 0 10px;font-size:clamp(34px,5vw,62px);color:var(--gold2);line-height:.95}
.profile-meta{display:flex;gap:8px;flex-wrap:wrap}
.profile-team-avatar{width:116px;height:116px;object-fit:contain;border-radius:26px;background:rgba(0,0,0,.35);padding:12px;border:1px solid rgba(255,255,255,.12)}
.profile-settings-gear{position:absolute;right:18px;top:18px;width:42px;height:42px;display:flex;align-items:center;justify-content:center;border-radius:999px;background:rgba(0,0,0,.45);border:1px solid rgba(217,168,58,.45);color:var(--gold2);text-decoration:none;font-size:22px}
.profile-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:18px 0}
.profile-actions form{margin:0}
.profile-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}
.stat-card{border:1px solid rgba(217,168,58,.25);border-radius:18px;background:rgba(0,0,0,.24);padding:14px}
.stat-card span{display:block;color:var(--muted);font-size:13px}
.stat-card strong{display:block;color:var(--gold2);font-size:28px;margin-top:6px}
.profile-owner-panel{display:flex;justify-content:space-between;gap:18px;align-items:center;margin:18px 0;padding:18px;border-radius:20px;border:1px solid rgba(53,179,106,.34);background:rgba(53,179,106,.08)}
.profile-owner-panel h2{margin:0 0 6px;color:var(--gold2)}
.profile-owner-panel p{margin:0 0 6px}
.profile-section{margin-top:26px}
.section-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-end;flex-wrap:wrap;margin-bottom:14px}
.section-head h2,.profile-section h2{margin:0 0 8px;color:var(--gold2)}
.profile-week-select{min-width:220px;margin:0}
.profile-week-select label{margin:0}
.profile-board-summary{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;flex-wrap:wrap;margin-bottom:12px}
.profile-board-summary h3{margin:0;color:var(--gold2)}
.profile-score-breakdown{display:flex;gap:10px;flex-wrap:wrap}
.profile-score-breakdown span{border:1px solid rgba(217,168,58,.26);background:rgba(0,0,0,.22);border-radius:999px;padding:8px 12px;color:var(--muted)}
.profile-score-breakdown strong{color:var(--gold2)}
.empty-state{border:1px dashed rgba(217,168,58,.35);border-radius:20px;padding:18px;background:rgba(0,0,0,.18)}
.empty-state h3{margin:0 0 6px;color:var(--gold2)}
.week-history-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px}
.week-history-card{display:block;text-decoration:none;color:var(--text);border:1px solid rgba(217,168,58,.22);border-radius:16px;padding:12px;background:rgba(0,0,0,.18)}
.week-history-card:hover,.week-history-card.is-active{border-color:var(--gold);background:rgba(217,168,58,.1)}
.week-history-card strong{display:block;color:var(--gold2);margin-bottom:4px}
.week-history-card span{display:block;color:var(--muted);font-size:13px;line-height:1.4}
.lock-groups{display:grid;gap:16px}
.lock-group{border:1px solid rgba(217,168,58,.18);border-radius:20px;padding:14px;background:rgba(0,0,0,.16)}
.lock-group h3{margin:0 0 12px;color:var(--gold2)}
.rich-lock-card{display:grid;grid-template-columns:58px 1fr;gap:10px;align-items:center}
.rich-lock-card img{width:58px;height:58px;object-fit:contain;border-radius:14px;background:rgba(0,0,0,.42);border:1px solid rgba(255,255,255,.12)}
.rich-lock-card small{display:block}
.entityMeta{color:var(--muted);font-size:12px;font-weight:800;line-height:1.25;margin-top:-4px}
.entityPhoto{background:radial-gradient(circle at top,rgba(255,255,255,.08),rgba(0,0,0,.85))!important}
.entityPhoto img,.board-editor .square.entity .entityPhoto img,.profile-board .entityPhoto img,.public-board .entityPhoto img{object-fit:contain!important;object-position:center center!important}

@media(max-width:820px){
  .profile-hero{align-items:flex-start;flex-direction:column}
  .profile-team-avatar{width:96px;height:96px}
  .profile-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .profile-owner-panel{align-items:flex-start;flex-direction:column}
  .section-head{align-items:stretch;flex-direction:column}
  .profile-week-select{min-width:0;width:100%}
  .profile-board-summary{align-items:stretch;flex-direction:column}
  .profile-score-breakdown{display:grid;grid-template-columns:1fr}
}

@media(max-width:520px){
  .settings-card,.profile-page{border-radius:18px}
  .settings-actions{flex-direction:column;align-items:stretch}
  .settings-actions .btn,.settings-actions .danger{width:100%}
  .profile-stats{grid-template-columns:1fr}
}
