.wg {
  max-width: 580px;
  margin: 0 auto;
  padding: 26px 18px 60px;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  color: var(--ink);
}

.wg__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.wg__brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.wg__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
}

.wg__label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}

.wg__help-btn {
  background: var(--panel);
  border: 1.5px solid var(--line);
  color: var(--ink-soft);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color .15s, color .15s;
}

.wg__help-btn:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.wg__stats {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.wg__stats-label {
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.wg__rank {
  font-family: "Space Mono", monospace;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -1px;
  margin-top: 2px;
  padding: 4px 0 2px;
  color: var(--ink);
}

.wg__temp {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-top: 9px;
}

.wg__count {
  font-family: "Space Mono", monospace;
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  text-align: right;
}

.wg__count-label {
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  text-align: right;
}

.wg__input-row {
  position: sticky;
  top: 10px;
  z-index: 5;
  display: flex;
  gap: 9px;
  margin-bottom: 14px;
}

.wg__input {
  flex: 1;
  min-width: 0;
  background: var(--panel);
  border: 2px solid var(--line-strong);
  color: var(--ink);
  border-radius: 14px;
  padding: 15px 17px;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 16px;
  font-weight: 500;
  box-shadow: var(--shadow);
  outline: none;
  transition: border-color .15s;
}

.wg__input:focus {
  border-color: var(--accent);
}

.wg__submit {
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: none;
  border-radius: 14px;
  padding: 0 24px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .1s, filter .15s;
}

.wg__submit:hover {
  filter: brightness(1.08);
}

.wg__submit:active {
  transform: scale(.97);
}

.wg__toast {
  min-height: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin: -4px 2px 14px;
  transition: color .2s;
}

.wg__toast.is-warn {
  color: #D9542B;
  font-weight: 600;
}

.wg__section-label {
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin: 0 2px 7px;
  font-weight: 700;
}

.wg__row {
  position: relative;
  border: 1.5px solid #E8E8E1;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 8px;
  background: #F6F6F1;
}

.wg__row.is-latest,
.wg__row.is-win {
  box-shadow: 0 0 0 2.5px var(--accent);
}

.wg__row-bar {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transition: width .55s cubic-bezier(.2, .7, .2, 1);
}

.wg__row-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  gap: 12px;
}

.wg__row-word {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -.2px;
  color: #2A2113;
}

.wg__row-rank {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 15px;
  color: #2A2113;
}

.wg__divider {
  height: 1.5px;
  background: var(--line);
  margin: 16px 2px 4px;
}

.wg__empty {
  color: var(--ink-soft);
  font-size: 14px;
  text-align: center;
  padding: 26px 12px;
  line-height: 1.6;
}

.wg__actions {
  display: flex;
  gap: 9px;
  margin-top: 20px;
}

.wg__action-btn {
  flex: 1;
  background: var(--panel);
  border: 1.5px solid var(--line);
  color: var(--ink);
  border-radius: 13px;
  padding: 13px;
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: border-color .15s, transform .1s;
}

.wg__action-btn:hover {
  border-color: var(--accent);
}

.wg__action-btn:active {
  transform: scale(.98);
}

.wg__help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 18, 4, .5);
  display: none;
  place-items: center;
  z-index: 100;
  padding: 18px;
}

.wg__help-overlay.is-open {
  display: grid;
}

.wg__help-dialog {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: 22px;
  max-width: 430px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(30, 20, 0, .28);
}

.wg__help-title {
  font-family: "Bricolage Grotesque", sans-serif;
  margin: 0 0 6px;
  font-size: 23px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.4px;
}

.wg__help-text {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 12px 0;
  line-height: 1.6;
}

.wg__help-text strong {
  color: var(--ink);
}

.wg__scale {
  display: flex;
  height: 12px;
  border-radius: 7px;
  overflow: hidden;
  margin: 18px 0 7px;
}

.wg__scale-stop {
  flex: 1;
}

.wg__scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: .04em;
}

.wg__help-close {
  margin-top: 22px;
  width: 100%;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: none;
  border-radius: 13px;
  padding: 14px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.wg__help-close:hover {
  filter: brightness(1.08);
}
