/* The You panel, and the marks a local account leaves on the index.
   Same frame, palette and type as the other popovers. */

#you-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: calc(-1 * var(--tool-size) - 1px);
  z-index: 20;
  width: 320px;
  max-width: 90vw;
  max-height: min(72vh, 540px);
  overflow-y: auto;
  padding: 12px;
  background: #f6eee3;
  color: #333;
  outline: 2px solid #8e7456;
  outline-offset: 0.5px;
  font-size: 13px;
}
#you-popover[hidden] { display: none; }

.you-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2d6c1;
}

.you-label { margin-bottom: 5px; font-size: 12px; opacity: 0.6; }
.you-line  { margin: 0; line-height: 1.45; }
.you-match { color: #2E9E57; }

#view-note, #custom-note { opacity: 0.75; }
#custom-note a { color: #fff; text-decoration: underline; }
#custom-note a:hover { opacity: 1; }

.card-invite {
  font-size: 12px;
  line-height: 1.4;
  color: #8e7456;
}
.card:hover .card-invite { color: #f6eee3; }
.card-make h2::after { content: ' +'; opacity: 0.5; }

#you-tour { width: 100%; }

.you-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.you-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 168px;
  overflow-y: auto;
  margin-top: 6px;
}
.you-list:empty { display: none; }

.you-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.you-head .you-label { margin-bottom: 0; }

.you-badge {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #6b573d;
  background: #efe4d4;
  outline: 1.5px solid #8e7456;
  outline-offset: -1.5px;
}
.you-badge-gear { font-size: 15px; line-height: 1; }

.you-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 7px;
  background: #efe4d4;
}
.you-row-score {
  min-width: 20px;
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  line-height: 1;
}
.you-row-note { flex: 1; min-width: 0; font-size: 11px; opacity: 0.65; }
.you-row-note.you-match { color: #2E9E57; opacity: 1; }
.you-row-acts { display: flex; flex: none; gap: 4px; }
.you-row-acts button {
  padding: 3px 8px;
  font-family: inherit;
  font-size: 11px;
  color: #f6eee3;
  background: #8e7456;
  border: 0;
  cursor: pointer;
}
.you-row-acts button:hover { background: #7a6248; }
.you-row-acts button.quiet { color: #6b573d; background: #ded0b7; }
.you-row-acts button.quiet:hover { background: #d2c0a1; }

.you-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }

.you-actions button {
  padding: 5px 10px;
  font-family: inherit;
  font-size: 12px;
  color: #f6eee3;
  background: #8e7456;
  border: 0;
  cursor: pointer;
}
.you-actions button:hover:not(:disabled) { background: #7a6248; }
.you-actions button:disabled { opacity: 0.45; cursor: default; }

.you-actions button.quiet { color: #6b573d; background: #e6dac6; }
.you-actions button.quiet:hover:not(:disabled) { background: #dbcbaf; }

#you-status { min-height: 16px; margin-top: 10px; font-size: 12px; opacity: 0.75; }
#you-status.good { color: #2E9E57; opacity: 1; }
#you-status.bad  { color: #c4442a; opacity: 1; }

#you-button { font-family: 'Playfair Display', serif; font-weight: 700; }

@media (max-width: 720px) {
  #you-popover { left: 0; right: 0; width: auto; max-width: none; }
}

#reset-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: calc(-1 * var(--tool-size) - 1px);
  z-index: 20;
  width: 268px;
  max-width: 90vw;
  padding: 12px;
  background: #f6eee3;
  color: #333;
  outline: 2px solid #8e7456;
  outline-offset: 0.5px;
  font-size: 13px;
}
#reset-popover[hidden] { display: none; }

.how-actions button.quiet { color: #6b573d; background: #e6dac6; }
.how-actions button.quiet:hover { background: #dbcbaf; }

@media (max-width: 720px) {
  #reset-popover { left: 0; right: 0; width: auto; max-width: none; }
}

/* index page */

.index-who {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.index-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
}
.index-dot { opacity: 1; }

.linkish {
  padding: 0;
  font: inherit;
  color: #fff;
  background: none;
  border: 0;
  opacity: 0.75;
  text-decoration: underline;
  cursor: pointer;
}
.linkish:hover { opacity: 1; }

.index-name {
  padding: 3px 8px;
  font-family: inherit;
  font-size: 14px;
  color: #333;
  background: #f6eee3;
  border: 1px solid #8e7456;
}

/* The name and what you've done with the puzzle share the left; the difficulty
   badge keeps the right. A wrapped name grows the row rather than crowding. */
.card { height: auto; min-height: 126px; }
.card-head { flex: 1; min-width: 0; }

.card-marks {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 5px;
  font-family: 'Playfair Display', serif;
  line-height: 1;
}

.card-record   { font-size: 14px; color: #8e7456; }
.card-progress { font-size: 13px; color: #a9a29a; }

/* Never white. The card washes pale on hover, so these warm up rather than
   fading into it — an earlier revision left the score cream on beige. */
.card:hover .card-record   { color: #f0e2cb; }
.card:hover .card-progress { color: #e2d6c1; }

