/* The catalogue is reachable from the overflow menu at all viewport sizes. */
:root {
  --furt-silhouette:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='32' fill='%2333463b'/%3E%3Ccircle cx='32' cy='24' r='10' fill='%23acb6a1'/%3E%3Cpath d='M12 59c0-12 9-21 20-21s20 9 20 21' fill='%23acb6a1'/%3E%3C/svg%3E");
}
.avatar.furt-profile-portrait,.players-portrait.furt-profile-portrait,.furt-profile-portrait[data-photo-edit],.furt-profile-portrait.arena-portrait {
  background:var(--furt-photo,none) center/cover no-repeat, var(--furt-silhouette) center/cover no-repeat #33463b;
  border-radius:50%;
}
[data-photo-edit],.arena-portrait { width:64px; height:64px; padding:0; border:2px solid #a99163; display:inline-block; }
#playersPhotoEditor { margin-top:12px; }
#handPortrait { appearance:none; padding:0; border:0; border-radius:50%; background:transparent; box-shadow:none; }
#handPortrait:focus-visible { outline:2px solid #ffe1a0; outline-offset:2px; }
#tablePhotoNotice:empty { display:none; }
#playersList button.players-portrait { position:relative; appearance:none; width:100%; height:auto; min-height:0; padding:0; border-width:1px; }
#playersList button.players-portrait::after { content:""; position:absolute; inset:50% auto auto 50%; width:44px; height:44px; transform:translate(-50%,-50%); border-radius:50%; }
#playersPhotoNotice:empty,.arena-photo-status:empty { display:none; }
#profilePhotoConfirm { max-width:min(22rem,calc(100% - 2rem)); }
#profilePhotoConfirm h2 { margin:0 0 16px; }
#profilePhotoCrop {
  width:min(23rem,calc(100vw - 1.5rem)); max-height:calc(100dvh - 1.5rem);
  padding:clamp(14px,4vw,24px); overflow:auto; color:#f6efdd;
}
#profilePhotoCrop h2 { margin:0 0 4px; }
#profilePhotoCrop p { color:#e4ddcc; margin:0; }
#profilePhotoCrop .crop-frame {
  position:relative; width:min(100%,15rem,40dvh);
  margin:14px auto; border-radius:50%; box-shadow:0 0 0 2px #d9bb80;
}
#profilePhotoCrop canvas {
  display:block; width:100%; height:auto; aspect-ratio:1; border-radius:50%;
  touch-action:none; cursor:grab;
}
#profilePhotoCrop .crop-guide {
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  display:grid; place-items:center; width:15px; height:15px; pointer-events:none;
  color:rgba(255,243,211,.85); filter:drop-shadow(0 0 1px #332619);
}
#profilePhotoCrop .crop-guide::before, #profilePhotoCrop .crop-guide::after {
  content:""; grid-area:1 / 1; background:currentColor;
}
#profilePhotoCrop .crop-guide::before { width:100%; height:1px; }
#profilePhotoCrop .crop-guide::after { width:1px; height:100%; }
#profilePhotoCrop canvas:active { cursor:grabbing; }
#profilePhotoCrop :focus-visible { outline:2px solid #ffe3a5; outline-offset:3px; }
#profilePhotoCrop .profile-photo-actions button { touch-action:manipulation; }
#profilePhotoCrop input[type=range] { display:block; width:100%; min-height:44px; margin:0 0 6px; padding:0; border:0; box-shadow:none; background:transparent; touch-action:none; accent-color:#e6c67e; }
#profilePhotoCrop input[type=range]:focus-visible { outline:none; }
#profilePhotoCrop input[type=range]:focus-visible::-webkit-slider-thumb { border-radius:50%; box-shadow:0 0 6px 3px #ffe3a5a0; }
#profilePhotoCrop input[type=range]:focus-visible::-moz-range-thumb { border-radius:50%; box-shadow:0 0 6px 3px #ffe3a5a0; }
#tablePhotoAuth { width:min(23rem,calc(100vw - 1.5rem)); max-height:calc(100dvh - 1.5rem); overflow:auto; }
#tablePhotoAuth form, #tablePhotoAuth label { display:grid; gap:6px; }
#tablePhotoAuth form { margin:12px 0; }
#tablePhotoAuth input { font:inherit; width:100%; min-width:0; min-height:44px; padding:8px; }
#tablePhotoAuth button { min-height:44px; }
#tablePhotoAuth [role=status]:empty { display:none; }
.profile-photo-actions { display:flex; gap:12px; }
.profile-photo-actions button { flex:1; min-height:44px; }
#playersTab { display:none }
.top.menu-open #playersTab { display:block }
@media (min-width:531px) and (orientation:portrait), (orientation:landscape) and (min-width:1101px), (orientation:landscape) and (min-height:541px) {
  .top:has(#playersTab) { position:relative; z-index:12 }
  .top #siteMenuButton { display:inline-flex; align-items:center; justify-content:center; order:2; min-width:44px; min-height:44px; }
  .top.menu-open #playersTab { position:absolute; top:calc(100% - 3px); right:max(20px,calc((100vw - 1120px)/2)); padding:12px 24px; background:#1a2b21; border:1px solid #a78a59; border-radius:8px; box-shadow:0 8px 18px #101c18aa }
}
main:has(#playersView:not([hidden])) #onlineNotice { display:none }
#playersView { max-width:780px; margin-inline:auto; padding-bottom:max(20px,env(safe-area-inset-bottom)); color:#e6d6ba }
#playersView h1,#playersView h2,#playersView p { margin:0 }
#playersView h1 { font-size:clamp(1.8rem,4vw,2.65rem) }
#playersView h2 { font-size:1.1rem }
.players-head,.players-filters,.players-pages,#playersView form,.players-invite,.players-actions { display:flex; align-items:center; gap:10px }
.players-head,.players-pages,.players-invite { justify-content:space-between }
.players-head p,.players-caption,.players-meta,#playersCount,#playersNoInvites,#playersEmpty { color:#c5bdac; font-size:.88rem }
.players-panel { margin-top:12px; border:1px solid var(--line,#496350); background:#18271f; border-radius:10px; padding:14px }
#playersView summary { cursor:pointer; font-weight:600 }
#playersView summary:focus-visible,#playersView :is(input,button,select):focus-visible { outline:2px solid #e9c985; outline-offset:2px }
#playersView label { display:grid; gap:3px; min-width:0; font-size:.88rem }
#playersView input,#playersView select { min-width:0; max-width:100%; width:100%; color:#f6e9d5; background:#17261e; border:1px solid #66725f; border-radius:6px; padding:7px 9px; font:inherit }
#playersView button { white-space:normal; overflow-wrap:anywhere }
#playersView form { margin-top:10px; align-items:end }
#playersView form label,.players-filters label:first-child { flex:1 }
.players-filters label:last-child { flex:0 0 8rem }
#playersView .players-caption { margin-top:10px }
#playersView ul { margin:0; padding:0; list-style:none }
#playersView li { padding:11px 0; border-bottom:1px solid #34493a }
#playersView li:last-child { border:0 }
.players-row { display:grid; grid-template-columns:2.7em 35px minmax(0,1fr) auto; align-items:center; gap:8px }
.players-rank { color:#d7bb88; font-variant-numeric:tabular-nums }
.players-portrait { width:35px; aspect-ratio:1; border-radius:50%; border:1px solid #ac9366; background:#274535 url('portraits.webp') no-repeat; background-size:300% 300% }
.players-identity { display:grid; min-width:0 }
.players-identity strong,.players-invite span { overflow-wrap:anywhere }
.players-meta { line-height:1.4 }
.players-actions { flex-wrap:wrap; justify-content:flex-end }
.players-pages { margin-top:12px }
#playersMessage { padding:8px 2px }
#playersEmpty,#playersNoInvites,#playersTransfer { padding-top:8px }
@media(max-width:520px) {
  .players-panel { padding:10px }
  .players-head { align-items:start }
  #playersView input,#playersView select { font-size:16px }
  .players-row { grid-template-columns:2em 30px minmax(0,1fr) auto; gap:5px }
  .players-portrait { width:30px }
  .players-actions { gap:4px }
  .players-row button,.players-invite button { padding:6px; min-height:40px; font-size:.85rem }
  .players-invite { flex-wrap:wrap }
  .players-filters label:last-child { flex-basis:7rem }
}
