/* Profile: the player's numbers, charts drawn in SVG, and the passport's map of the world with their pins. Same rules as the app:
   one field colour, white ink, gold only for the best, no shadows, rounded corners or transparency. */

/* The letter at the end of the header, after the timer. */
.top .timer { margin-inline-start: auto; }
.mebtn { flex: none; width: 30px; height: 30px; margin-inline-start: 14px; display: grid; place-items: center; background: var(--field-deep); color: var(--ink);
         outline: 2px solid var(--field-tint); outline-offset: -2px; font: 700 17px/1 var(--display); text-transform: uppercase; }
.mebtn:focus-visible { outline-color: var(--ink); }
.mebtn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.framed .mebtn { width: 28px; height: 28px; }
/* On the site the account's button is the header's one way in: its menu has the profile, and a guest's sign-in too. */
.top .acct:not(:empty) ~ .mebtn { display: none; }
.acct-box .acct-prof { margin-top: 4px; padding: 0; background: none; text-align: start; text-decoration: underline; font: 400 14px/1.35 var(--text); }
/* At 320 px the timer's label would break into three lines beside the letter. */
@media (max-width: 360px) {
  html:not(.framed) .mebtn { margin-inline-start: 8px; width: 28px; height: 28px; }
  html:not(.framed) .timer { gap: 6px; }
  html:not(.framed) .timer b { font-size: 22px; }
}

.prof { max-width: 1080px; margin: 0 auto; }
/* The head of a profile: the face, the name, the username and where the player comes from; under it what to do. */
.phead { display: flex; align-items: center; gap: 14px; margin: 6px 0 12px; }
.av.big { flex: none; width: 76px; height: 76px; font: 700 44px/1 var(--display); outline: 0; }
.av.big.nobody svg { width: 60%; height: 60%; margin-top: 22%; }
.phead-t { min-width: 0; }
.phead-t b { display: block; font: 700 30px/1.05 var(--display); letter-spacing: .02em; overflow-wrap: anywhere; }
.phead-u { display: block; margin-top: 4px; color: var(--ink-soft); font: 600 15px/1.2 var(--text); overflow-wrap: anywhere; }
.phead-t .up { display: block; margin-top: 6px; color: var(--ink-muted); font-size: 11px; }
.pacts { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 14px; }
.pacts .pbtn { flex: 1 1 auto; min-height: 44px; padding-inline: 12px; background: var(--field-deep); }
.pacts .pbtn.main { background: var(--ink); color: var(--field-deep); }
.pacts .pbtn.main:disabled { background: var(--field-tint); color: var(--field-deep); cursor: default; }

.pnote { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 14px; padding: 12px; background: var(--panel); color: var(--on-panel); }
.pnote p { flex: 1 1 200px; margin: 0; font-weight: 600; }
.pbtn { padding: 10px 14px; background: var(--field); color: var(--ink); font: 700 13px/1 var(--label); letter-spacing: .08em; text-transform: uppercase; }
.pbtn.wide { display: block; width: 100%; margin-top: 10px; text-align: start; background: var(--field-deep); }
.pbtn.ghost { background: none; outline: 1.5px solid var(--field-tint); outline-offset: -1.5px; color: var(--ink-soft); }
.pbtn:focus-visible { outline: 2px solid var(--speed); outline-offset: -2px; }

.ptabs { display: flex; gap: 2px; margin: 0 0 14px; background: var(--field-deep); padding: 2px; }
.ptabs button { flex: 1; height: 40px; font: 700 13px/1 var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.ptabs button[aria-selected="true"] { background: var(--ink); color: var(--field-deep); }

.pbig { margin: 0 0 12px; padding: 14px 12px; background: var(--field-deep); }
.pbig b { display: block; font: 700 30px/1.05 var(--display); letter-spacing: .02em; }
.pbig span { display: block; margin-top: 6px; color: var(--ink-muted); font-size: 14px; }
.pbig-s { margin: 0 0 8px; font: 700 22px/1.1 var(--display); letter-spacing: .02em; }

/* The tiles fill their rows: each is its row's share, --k tiles to the row, as profile.js's tilesHTML counted them
   for a phone (--a), from 560 px (--b) and on a computer's own profile (--c). Half a pixel less, so rounding never
   pushes the last of a row to the next; growing takes it back. */
.ptiles { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 16px; }
.pt { --k: var(--a, 2); flex: 1 0 calc((100% - (var(--k) - 1) * 2px) / var(--k) - .5px); min-width: 0; padding: 10px 12px 12px; background: var(--field-deep); }
.pt .up { display: block; color: var(--ink-muted); font-size: 11px; letter-spacing: .08em; line-height: 1.2; }
.pt b { display: block; margin-top: 6px; font: 700 28px/1 var(--display); letter-spacing: .02em; overflow-wrap: anywhere; }
.pt small { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 13px; }
.pt.gold b { color: var(--speed); }

.pcharts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; }
.psec { margin: 0 0 20px; }
.psec h3 { margin: 0 0 8px; color: var(--ink-muted); font-size: 12px; }
.pnote-s { margin: 8px 0 0; color: var(--ink-soft); font-size: 14px; }

/* Charts keep their own left to right: day numbers and distances read the same way in every language. */
.pchart { display: block; width: 100%; height: auto; direction: ltr; overflow: visible; }
.pchart .grid { stroke: var(--field-tint); stroke-width: 1; fill: none; }
.pchart .bar { fill: var(--ink-muted); }
.pchart .bar.hi { fill: var(--ink); }
.pchart .miss { fill: var(--field-tint); }
.pchart .med { stroke: var(--speed); stroke-width: 1.5; stroke-dasharray: 5 4; fill: none; }
.pchart .mt { fill: var(--speed); font: 700 11px/1 var(--label); letter-spacing: .04em; }
.pchart .ax { fill: var(--ink-muted); font: 700 10px/1 var(--label); letter-spacing: .04em; }
.pchart .ct { fill: var(--ink); font: 700 12px/1 var(--display); }

.pconts { display: grid; gap: 6px; }
.pc { display: grid; grid-template-columns: minmax(0, 9em) 1fr 3.2em; align-items: center; gap: 10px; }
.pc span { min-width: 0; }
.pc span b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pc small { display: block; color: var(--ink-muted); font-size: 12px; }
.pc i { display: block; height: 8px; }
.pc svg { display: block; width: 100%; height: 8px; }
[dir="rtl"] .pc svg { transform: scaleX(-1); }
.pc .bg { fill: var(--field-deep); }
.pc .fg { fill: var(--ink-muted); }
.pc.best .fg { fill: var(--speed); }
.pc.worst .fg { fill: var(--field-tint); }
.pc > b { text-align: end; font: 700 18px/1 var(--display); }

.pmap { display: block; width: 100%; height: auto; background: var(--field-deep); direction: ltr; }
.pmap .land { fill: none; stroke: var(--field-tint); stroke-linecap: round; }
.pmap .land.gold { stroke: var(--speed); }
/* A pin: an edge that parts it from the land, its colour inside; profile.js keeps their radii in pixels. The farthest
   are hollow: filled, they would read as the land's dots. */
.pmap .pin.edge { fill: var(--field-deep); }
.pmap .pin.p1 { fill: var(--speed); }
.pmap .pin.p2 { fill: var(--ink); }
.pmap .pin.p3 { fill: var(--ink-muted); }
.pmap .pin.edge.p4 { fill: var(--ink-muted); }
.pmap .pin.pp.p4 { fill: var(--field-deep); }
/* A pin that opens its day: a wide invisible target, and a ring when it has the keyboard's focus. */
.pmap .go { cursor: pointer; outline: none; }
.pmap .pin.hit { fill: none; pointer-events: all; }
.pmap .pin.ring, .pmap .pin.gap { fill: none; }
.pmap .go:focus-visible .pin.ring { fill: var(--ink); }
.pmap .go:focus-visible .pin.gap { fill: var(--field-deep); }
.p1 { background: var(--speed); }
.p2 { background: var(--ink); }
.p3 { background: var(--ink-muted); }
.plegend .p4 { background: var(--field-deep); outline: 1.5px solid var(--ink-muted); outline-offset: -1.5px; }
.plegend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; color: var(--ink-soft); font-size: 13px; }
.plegend span { display: inline-flex; align-items: center; gap: 6px; }
.plegend i { width: 10px; height: 10px; }

.pflags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.pflags span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; background: var(--field-deep); font-size: 14px; }
.pflag { flex: none; font-style: normal; line-height: 1; }
img.pflag { display: inline-block; width: 21px; height: 14px; vertical-align: -2px; box-shadow: 0 0 0 1px var(--field-deep); }
.pflag.code { padding: 2px 3px; background: var(--speed); color: var(--field-deep); font: 700 10px/1 var(--label); letter-spacing: .04em; }
.pstamps { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.pstamp { padding: 7px 10px; outline: 1.5px dashed var(--field-tint); outline-offset: -1.5px; color: var(--ink-muted); font: 700 12px/1.1 var(--label); letter-spacing: .06em; text-transform: uppercase; }
.pstamp.on { outline: 2px solid var(--speed); outline-offset: -2px; color: var(--speed); }

.phist { list-style: none; margin: 0; padding: 0; }
.phist li { margin: 0 0 2px; }
.phist li > * { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; width: 100%; padding: 10px 12px; text-align: start; background: var(--field-deep); }
.phist button { padding-inline-end: 34px !important; }
.phist .up { color: var(--ink-muted); font-size: 11px; }
.phist .w { grid-column: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phist .n { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: end; color: var(--ink-soft); font-size: 14px; white-space: nowrap; }
.phist .n b { font: 700 22px/1 var(--display); color: var(--ink); }
.phist .r { grid-column: 1 / -1; color: var(--ink-muted); font-size: 13px; }
.phist em { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--ink-muted); }

.precs { list-style: none; margin: 0; padding: 0; }
.precs li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--field-tint); }
.precs b { font: 700 20px/1 var(--display); }

.pswitch { display: flex; align-items: flex-start; gap: 12px; padding: 12px; background: var(--field-deep); cursor: pointer; }
.pswitch input { flex: none; appearance: none; -webkit-appearance: none; width: 44px; height: 24px; margin: 0; position: relative; background: var(--field); outline: 2px solid var(--field-tint); outline-offset: -2px; cursor: pointer; }
.pswitch input::after { content: ""; position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; background: var(--ink-muted); transition: transform .15s var(--ease); }
.pswitch input:checked { background: var(--ink); outline-color: var(--ink); }
.pswitch input:checked::after { transform: translateX(20px); background: var(--field-deep); }
[dir="rtl"] .pswitch input::after { left: auto; right: 4px; }
[dir="rtl"] .pswitch input:checked::after { transform: translateX(-20px); }
.pswitch input:focus-visible { outline-color: var(--speed); }
.pswitch input:disabled { cursor: wait; }
.pswitch.held { cursor: default; }
.pswitch.held input, .pswitch.held b { opacity: .45; cursor: default; }
.pswitch b { display: block; font-weight: 700; }
.pswitch small { display: block; margin-top: 4px; color: var(--ink-muted); font-size: 13px; line-height: 1.35; }

.pswitch + .pswitch { margin-top: 2px; }

/* The own zone: a dial with the time there and a dot at eight, where the day's result comes; under it the zones maply
   knows, each with its time now, the chosen one in white. */
.pclock { flex: none; width: 44px; height: 44px; }
.pclock .f { fill: var(--field); stroke: var(--field-tint); stroke-width: 1.5; }
.pclock .rv { fill: var(--ink-soft); }
.pclock .h, .pclock .m { stroke: var(--ink); stroke-linecap: square; }
.pclock .h { stroke-width: 3; }
.pclock .m { stroke-width: 2; }
.pclock .c { fill: var(--ink); }
.pzone-now { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 68px; padding: 12px; background: var(--field-deep); color: var(--ink); text-align: start; }
.pzone-now:focus-visible { outline: 2px solid var(--speed); outline-offset: -2px; }
.pzone-t { flex: 1; min-width: 0; }
.pzone-t .up { display: block; color: var(--ink-muted); font-size: 11px; letter-spacing: .08em; }
.pzone-t b { display: block; margin-top: 4px; font: 700 22px/1.05 var(--display); letter-spacing: .02em; overflow-wrap: anywhere; }
.pzone-t small { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 13px; font-variant-numeric: tabular-nums; }
.pzone-go { flex: none; width: 9px; height: 9px; margin: -4px 6px 0; border: solid var(--ink-muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s var(--ease); }
.pzone-now[aria-expanded="true"] .pzone-go { margin-top: 4px; transform: rotate(-135deg); }
.pzone .pbtn.wide { margin-top: 2px; }
.pzone-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 2px; margin-top: 2px; }
html.desk .pzone-list { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.pzone-list[hidden] { display: none; }
/* A name too long to share its line with the time, "Central Europe" at 320 px, puts the time under it, not breaks a word. */
.pzone-o { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 44px; padding: 10px 12px; background: var(--field-deep); cursor: pointer; }
.pzone-o input { position: absolute; width: 1px; height: 1px; margin: 0; clip-path: inset(50%); }
.pzone-o span { min-width: 0; font-weight: 600; }
.pzone-o time { flex: none; margin-inline-start: auto; color: var(--ink-soft); font: 700 15px/1 var(--display); letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.pzone-o.on { background: var(--ink); color: var(--field-deep); }
.pzone-o.on time { color: var(--field-deep); }
.pzone-o:has(input:focus-visible) { outline: 2px solid var(--speed); outline-offset: -2px; }
.pzone-o:has(input:disabled) { cursor: wait; }
.pzone-note { margin: 8px 0 14px; color: var(--ink-muted); font-size: 13px; line-height: 1.35; }
/* The head of the own profile says the zone: a small dial, the time there and its name. */
.phead-z { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 2px 0; background: none; color: var(--ink-soft); font: 600 14px/1.2 var(--text); text-align: start; font-variant-numeric: tabular-nums; }
.phead-z .pclock { width: 22px; height: 22px; }
.phead-z .pclock .f { stroke-width: 2.5; }
.phead-z .pclock .h { stroke-width: 4; }
.phead-z .pclock .m { stroke-width: 3; }
.phead-z time { color: var(--ink); }
.phead-z:focus-visible { outline: 2px solid var(--speed); outline-offset: 2px; }

/* The editor of the own profile: the photo, the name and the username, each with what it means under it. Inputs are
   17 px so a phone does not zoom into them. */
.pedit { max-width: 520px; }
.pedit-intro { margin: 0 0 16px; font-weight: 600; }
.pedit-ph { display: flex; align-items: center; gap: 14px; }
.pedit-ph .av.big { width: 96px; height: 96px; font-size: 54px; }
.pedit-phb { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pedit-phb .pbtn { min-height: 44px; background: var(--field-deep); text-align: start; }
.pedit-phb .pbtn.ghost { background: none; }
.pfield { display: block; margin: 20px 0 6px; }
.pfield .up { color: var(--ink-muted); font-size: 11px; letter-spacing: .08em; }
.pin-t { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 0; background: var(--panel); color: var(--on-panel); font: 400 17px/1.2 var(--text); }
.pin-t::placeholder { color: var(--field-tint); }
.pin-t:focus-visible { outline: 2px solid var(--speed); outline-offset: -2px; }
.pat { display: flex; background: var(--panel); }
.pat i { flex: none; display: grid; place-items: center; padding-left: 12px; color: var(--on-panel); font: 700 17px/1 var(--text); font-style: normal; }
.pat .pin-t { padding-left: 2px; }
.pstat { min-height: 1.35em; margin: 6px 0 0; font-weight: 600; font-size: 14px; }
.pstat.taken, .pstat.form { color: var(--ink); }
.pstat.ok { color: var(--ink-soft); }
.pedit .pacts { margin: 24px 0 0; }
.pedit .pnote-s { overflow-wrap: anywhere; }

/* The photo cut square: the box is the square that is kept, dragged and zoomed under a finger or the mouse. */
.pcrop { max-width: 420px; }
.pcrop-box { width: 100%; max-width: 100%; aspect-ratio: 1; background: var(--field-deep); outline: 2px solid var(--ink); outline-offset: -2px;
             touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.pcrop-box:active { cursor: grabbing; }
.pcrop-box:focus-visible { outline-color: var(--speed); }
.pcrop-box canvas { display: block; width: 100%; height: 100%; }
.pcrop input[type="range"] { display: block; width: 100%; margin: 14px 0 0; accent-color: var(--ink); }
.pcrop .pacts { margin: 16px 0 0; }

/* The month's season ends the tiles, and its note follows them. */
.ptiles.pseason { margin-bottom: 0; }
.pseason-n { margin: 8px 0 16px; }

@media (min-width: 560px) {
  .pt { --k: var(--b, 4); }
}
/* Charts are drawn a phone wide and scale with their column: two columns keep their text near its size. The third,
   the continents, takes the row the passport's map would otherwise leave half empty. */
@media (min-width: 700px) {
  .pcharts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psec.wide, .pcharts .psec:nth-child(3):not(.wide) { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .pmap.world { max-height: 400px; }
  .pbig b { font-size: 36px; }
}
/* A computer: the profile is a page of the shell (desktop.css) and takes its width, up to --page. The numbers
   stand up to eight to a row from 1280, the charts three abreast so their text stays near its size, the passport's
   map under them across the page, the history in two columns. */
.desk .prof { max-width: none; }
.desk .prof .pcharts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.desk .prof .pcharts .psec:nth-child(3):not(.wide) { grid-column: auto; }
.desk .prof .pswitch small { max-width: 90ch; }
.desk .prof .phist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.desk .prof .phist li { margin: 0; }
@media (min-width: 1280px) {
  .desk .prof .pt { --k: var(--c, 4); }
}
@media (prefers-reduced-motion: reduce) { .pswitch input::after { transition: none; } }

/* A name the server sent with a username opens that player's profile. */
[data-u] { cursor: pointer; }
.rk .w[data-u], .lb.all [data-u] { text-decoration: underline dotted var(--field-tint); text-underline-offset: 3px; }
[data-u]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* A player who hid themselves: a plain figure where a photo or a letter would be (profile.js, anonAv). */
.av.nobody { background: var(--field-tint); color: var(--ink-soft); }
.av.nobody svg { width: 72%; height: 72%; margin-top: 18%; }
