/* Edamame Batsu — what the shared shell does not already cover. */

#canvas:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -4px;
  border-radius: 4px;
}

#verdict[data-band="gold"]  { color: var(--gold); text-shadow: 0 0 26px rgba(231,184,75,.45); }
#verdict[data-band="green"] { color: var(--matcha); }
#verdict[data-band="red"]   { color: var(--ember); }

/*
 * The fortune slip. Deliberately shaped like a real omikuji strip — tall,
 * narrow, off-white paper with a red seal — rather than a card or a toast.
 * It is the payoff of the whole interaction, and the shape is most of what
 * makes it read as a fortune rather than a score.
 */
.fortune {
  position: absolute;
  left: 50%;
  bottom: 6%;
  transform: translate(-50%, 12px);
  width: min(78vw, 20rem);
  padding: 1.1rem 1.1rem 1.25rem;
  border-radius: 3px;
  background: linear-gradient(#fdf8ec, #f3e8d2);
  color: #1b1712;
  text-align: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .6);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
  z-index: 3;
}
.fortune[hidden] { display: none; }
.fortune[data-show="true"] { opacity: 1; transform: translate(-50%, 0); }

/* The seal, top-right, like the stamp on a shrine slip. */
.fortune::after {
  content: "樂";
  position: absolute;
  top: .5rem; right: .55rem;
  width: 1.5rem; height: 1.5rem;
  display: grid; place-items: center;
  font-family: var(--font-jp);
  font-size: .8rem;
  color: #fdf8ec;
  background: var(--red);
  border-radius: 2px;
}

.fortune-mark {
  margin: 0;
  font-family: var(--font-jp);
  font-size: 2.6rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .08em;
}
.fortune[data-band="gold"]  .fortune-mark { color: #a8791a; }
.fortune[data-band="green"] .fortune-mark { color: var(--matcha-dark); }
.fortune[data-band="red"]   .fortune-mark { color: var(--red-dark); }

.fortune-name {
  margin: .3rem 0 0;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #6b5d47;
}
.fortune-body {
  margin: .7rem 0 0;
  font-size: .9375rem;
  line-height: 1.5;
  color: #2a231a;
}
/* A rule above the body, the way a printed slip separates the grade from
   the reading. */
.fortune-body::before {
  content: "";
  display: block;
  width: 2.2rem;
  height: 1px;
  margin: 0 auto .7rem;
  background: rgba(43, 35, 26, .3);
}

@media (prefers-reduced-motion: reduce) {
  .fortune { transition: none; }
}

/* Mode switch on the roster panel. */
.mode-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  flex-wrap: wrap;
}
.mode-label {
  font-size: .8125rem;
  color: rgba(242, 231, 211, .55);
  margin-right: .2rem;
}
.mode-btn {
  appearance: none;
  border: 1px solid rgba(242, 231, 211, .2);
  background: transparent;
  color: rgba(242, 231, 211, .7);
  padding: .35rem .8rem;
  border-radius: 999px;
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.mode-btn[aria-pressed="true"] {
  border-color: rgba(231, 184, 75, .55);
  background: rgba(231, 184, 75, .12);
  color: var(--gold);
}
.mode-btn:hover { border-color: rgba(242, 231, 211, .45); color: var(--ink); }
