/* Sum Friends tile colors from DesignKit/Theme.swift. */
:root {
  --three-face: #ffc9c9;
  --tile-ink: #3a4555;
  --given-face: #eedfca;
  --given-ink: #5e5550;
  --slot-face: #fffdf8;
  --slot-line: #b29a7c;
}
:root[data-theme="dark"] {
  --three-face: #faa5a5;
  --given-face: #504c76;
  --given-ink: #eeedf8;
  --slot-face: #26243c;
  --slot-line: #aaa4c7;
}

/* TileFace and NumberLabel in App/Game/Tiles.swift. All face measurements
   scale with the square, from the offset gloss to the colored bottom ledge. */
.number-tile,
.sum b,
.sum b:last-child {
  --ledge: color-mix(in srgb, var(--tile-fill) 86%, black);
  --cast: color-mix(in srgb, color-mix(in srgb, var(--tile-fill) 60%, black) 25%, transparent);
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  box-sizing: border-box;
  width: var(--tile-size);
  height: var(--tile-size);
  padding: 0;
  border: 0;
  border-radius: 28%;
  background: linear-gradient(color-mix(in srgb, var(--tile-fill) 65%, white), var(--tile-fill));
  box-shadow: 0 calc(var(--tile-size) * .06) 0 var(--ledge),
              0 calc(var(--tile-size) * .12) calc(var(--tile-size) * .12) var(--cast);
  color: var(--tile-ink);
  font: 900 calc(var(--tile-size) * .56)/1 var(--rounded);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.number-tile::before,
.sum b::before {
  content: "";
  position: absolute;
  inset: 15% auto auto 17%;
  width: 42%;
  height: 10%;
  border-radius: 999px;
  background: rgb(255 255 255 / 45%);
  pointer-events: none;
}

.sum b {
  --tile-size: clamp(34px, 4vw, 57px);
  --tile-fill: var(--scene-tile);
}
.sum b:last-child { --tile-fill: var(--scene-result); }
.widget-small .number-tile {
  --tile-size: 23px;
  --tile-fill: var(--three-face);
  color: var(--tile-ink);
}
