/* BALKANOPOLY — accounts: the account window and its folders, profiles, passport stamps, the new-stamp animation.
   (Split out of the one big base.css in v9.7; files load in the order listed in index.html.) */
/* ---- account: the box on the front page and the account window ---- */
.acct {
  margin: 12px 0 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--light);
}
.gbtn {
  min-height: 44px;
}
.acctov {
  z-index: 140;
  position: fixed;
}
.acctov .modal {
  max-width: 460px;
}
.acchk {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.35;
}
.acchk input {
  margin-top: 3px;
}
.acfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px dashed var(--light);
  font-size: 13px;
  color: var(--muted);
}

/* ---- account II (v7.1): profile, friends, invites ---- */
.acbadge {
  display: inline-block;
  min-width: 17px;
  margin-left: 3px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--bad);
  color: #fff;
  font-size: 12px;
  line-height: 17px;
  text-align: center;
}
.acinv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--paper3);
  border: 1px solid var(--light);
  border-left: 3px solid var(--good);
  border-radius: 4px;
  font-size: 15px;
}
.acinv .rq,
.frow .rq {
  display: flex;
  gap: 6px;
}
.actabs {
  display: flex;
  gap: 4px;
  margin: 4px 0 12px;
  border-bottom: 1px solid var(--light);
}
.actabs button {
  flex: 1;
  padding: 8px 6px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.actabs button.on {
  color: var(--ink);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.acbody {
  max-height: min(62vh, 560px);
  overflow-y: auto;
}
.prof {
  display: flex;
  align-items: center;
  gap: 12px;
}
.prof h3 {
  margin: 0;
}
.prof small {
  color: var(--muted);
}
.prof .big {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: var(--paper2);
  border: 1px solid var(--rule);
}
.ptiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
}
.ptiles div {
  padding: 8px 6px;
  background: var(--paper3);
  border: 1px solid var(--light);
  border-radius: 4px;
  text-align: center;
}
.ptiles b {
  display: block;
  font-size: 19px;
}
.ptiles small {
  color: var(--muted);
  font-size: 12px;
}
.psec {
  margin: 14px 0 6px;
  font-weight: 400;
  font-family: var(--disp);
  border-bottom: 1px dashed var(--light);
}
.pgame {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px dotted var(--light);
  font-size: 14px;
}
.pgame > b {
  min-width: 64px;
}
.pgame.won > b {
  color: var(--good);
}
.pgame small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.frow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dotted var(--light);
}
.frow img,
.frow .acav {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: var(--paper2);
  border: 1px solid var(--light);
}
.frow .linkish,
.frow .fnm {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.linkish {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.hintline.warn {
  color: var(--bad);
}
.profbtn {
  padding-left: 6px;
  padding-right: 6px;
}
@media (max-width: 420px) {
  .ptiles b {
    font-size: 16px;
  }
}
#frAdd {
  flex: 1;
  min-width: 0;
}
/* v9.1 account window: folders on the left (desktop), a scrolling tab row on top (phone) */
.acmodal.hasnav {
  width: min(880px, 96vw);
  max-width: none;
}
.achead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.achead h3 {
  margin: 0;
}
.acwrap {
  display: flex;
  gap: 18px;
  margin-top: 10px;
}
.acmodal.hasnav .actabs {
  flex-direction: column;
  flex: 0 0 160px;
  margin: 0;
  border-bottom: 0;
  border-right: 1px solid var(--light);
  padding-right: 10px;
}
.acmodal.hasnav .actabs button {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  min-height: 42px;
  padding: 8px 10px;
  border-bottom: 0;
  border-left: 3px solid transparent;
  border-radius: 0 4px 4px 0;
}
.acmodal.hasnav .actabs button.on {
  border-left-color: var(--accent);
  background: var(--paper3);
}
.acmodal.hasnav .actabs svg,
.acmodal.hasnav .actabs img {
  width: 18px;
  height: 18px;
  flex: none;
}
.acmodal.hasnav .acbody {
  flex: 1;
  min-width: 0;
  overflow-x: hidden; /* v9.0.2: nothing slides sideways (tilted stamps) */
  height: min(70vh, 640px);
  max-height: none;
  padding-right: 4px;
}
.pfav {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.pfav div {
  flex: 1;
  padding: 8px 10px;
  border: 1px dashed var(--rule);
  border-radius: 4px;
}
.pfav small {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.pfav b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 17px;
}
.pfav b svg,
.cbl svg {
  width: 20px;
  height: 14px;
  flex: none;
  border: 1px solid var(--light);
}
.stfilter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.stfilter button {
  min-height: 36px;
  padding: 6px 14px;
  border: 1.5px solid var(--rule);
  border-radius: 18px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.stfilter button.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fbf4e2;
}
.cbars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cbar {
  display: grid;
  grid-template-columns: 130px 1fr 64px;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.cbl {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cbt {
  height: 14px;
  background: var(--paper2);
  border-radius: 0 4px 4px 0;
  overflow: hidden;
}
.cbt i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}
.cbar b {
  font-family: var(--mono);
  font-weight: 400;
  text-align: right;
}
.lchart {
  width: 100%;
  height: auto;
  display: block;
}
.hgame {
  width: 100%;
  border: 0;
  border-bottom: 1px dotted var(--light);
  background: none;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.hgame:hover {
  background: var(--paper3);
}
.hgame > span {
  flex: 1;
  min-width: 0;
}
.hgo {
  font-style: normal;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}
.hstands {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 8px 0;
}
.hstand {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 8px;
  padding: 5px 8px;
  background: var(--paper3);
  border-radius: 4px;
}
.hstand.me {
  outline: 1.5px solid var(--accent);
}
/* v9.4 passport stamps: inked when earned, faint with "how to get it" when not */
.pphead {
  margin: 2px 0 4px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.pphead b {
  font-size: 20px;
  color: var(--accent);
}
.pstamps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px 8px;
  margin: 8px 0 6px;
  padding: 4px 2px;
}
.pstamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  min-width: 0;
}
.pstamp .stampart {
  display: block;
  transform: rotate(-7deg);
}
.pstamp:nth-child(3n + 2) .stampart {
  transform: rotate(5deg);
}
.pstamp:nth-child(3n) .stampart {
  transform: rotate(-2deg);
}
.pstamp b {
  margin-top: 2px;
  font: 700 12.5px/1.15 var(--mono);
  letter-spacing: 0.03em;
  color: var(--ink);
}
.pstamp small {
  font-size: 12px;
  line-height: 1.25;
  color: var(--muted);
}
.pstamp.got .stampart {
  opacity: 0.92;
  mix-blend-mode: multiply;
}
.pstamp.got small {
  font: 11.5px var(--mono);
}
.pstamp.off .stampart {
  color: #a89a80 !important;
  opacity: 0.38;
}
.pstamp.off b {
  color: var(--muted);
  font-weight: 400;
}
.ppnote {
  margin-top: 4px;
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
}
.pstamps.mini {
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
}
.pstamps.mini b {
  font-size: 11px;
}
@media (max-width: 640px) {
  .acwrap {
    flex-direction: column;
    gap: 6px;
  }
  .acmodal.hasnav .actabs {
    flex-direction: row;
    flex: none;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--light);
    padding: 0 0 2px;
    scrollbar-width: none;
  }
  .acmodal.hasnav .actabs button {
    flex: none;
    min-height: 44px;
    border-left: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    white-space: nowrap;
  }
  .acmodal.hasnav .actabs button.on {
    border-bottom-color: var(--accent);
    background: none;
  }
  .acmodal.hasnav .acbody {
    height: auto;
    max-height: calc(100dvh - 170px);
  }
  /* v9.6.1: long country names wrap to two lines instead of being cut ("North Macec…"); the number column fits its value */
  .cbar {
    grid-template-columns: 112px 1fr auto;
  }
  .cbl {
    white-space: normal;
    line-height: 1.1;
  }
  .pstamps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 4px;
  }
  .pstamp .stampart {
    width: 68px;
    height: 68px;
  }
  .pstamp small {
    font-size: 11px;
  }
}

/* v9.0.2: a short note while the graphs are still filling in */
.acnote {
  margin: 8px 0 4px;
  padding: 8px 10px;
  border: 1px dashed var(--rule);
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
}
.acnote svg {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
}

/* v9.1.1: the 5 stand-in profile pictures fill their circle */
.acav.pic {
  overflow: hidden;
  border-radius: 50%;
}
.acav.pic svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* v9.1.2 owner page: one line per account */
.hstand.ownrow {
  grid-template-columns: 120px 1fr auto;
  align-items: baseline;
}
.hstand.ownrow b {
  font-weight: 400;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .hstand.ownrow {
    grid-template-columns: 1fr auto;
  }
  .hstand.ownrow b {
    grid-column: 1 / -1;
    font-size: 12px;
  }
}

/* ---- v9.4: the new stamp pressed onto the screen after a game ---- */
.stampnew {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(43, 34, 24, 0.55);
  animation: snfade 0.25s ease-out;
}
.snpaper {
  width: min(380px, 100%);
  padding: 18px 20px 16px;
  text-align: center;
  background: var(--paper3);
  border: 1.5px solid var(--ink);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.snhead {
  font: 600 13px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.snspot {
  position: relative;
  height: 210px;
  display: grid;
  place-items: center;
}
.snink {
  opacity: 0;
  transform: rotate(-9deg) scale(1.6);
  animation: sninked 0.22s 0.48s cubic-bezier(0.2, 0.9, 0.3, 1.25) forwards;
}
.snink .stampart {
  mix-blend-mode: multiply;
}
/* the rubber stamp: a wooden handle with a brass collar, pressing down and lifting away */
.snhandle {
  position: absolute;
  left: 50%;
  top: 0;
  width: 120px;
  margin-left: -60px;
  height: 150px;
  pointer-events: none;
  animation: snpress 1.15s cubic-bezier(0.5, 0, 0.3, 1) forwards;
}
.snhandle i {
  position: absolute;
  left: 42px;
  top: 0;
  width: 36px;
  height: 74px;
  border-radius: 18px 18px 8px 8px;
  background: linear-gradient(90deg, #5a3518, #8a5a2e 45%, #6a3f1d);
  box-shadow: inset 0 -6px 0 #b8913f;
}
.snhandle b {
  position: absolute;
  left: 8px;
  top: 74px;
  width: 104px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(#6a3f1d, #4a2a12);
  box-shadow: 0 5px 0 #2b1b0e;
}
@keyframes snpress {
  0% {
    transform: translateY(-160px);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  42% {
    transform: translateY(18px);
  }
  50% {
    transform: translateY(26px) scaleY(0.96);
  }
  68% {
    transform: translateY(14px);
  }
  100% {
    transform: translateY(-190px);
    opacity: 0;
  }
}
@keyframes sninked {
  to {
    opacity: 1;
    transform: rotate(-7deg) scale(1);
  }
}
@keyframes snfade {
  from {
    opacity: 0;
  }
}
.snname {
  font: 26px/1.1 var(--disp);
  margin-top: 4px;
}
.snhow {
  margin: 4px 0 14px;
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
}
.snpaper .row {
  justify-content: center;
  gap: 8px;
}
@media (prefers-reduced-motion: reduce) {
  .snhandle {
    display: none;
  }
  .snink {
    animation: none;
    opacity: 1;
    transform: rotate(-7deg);
  }
}
