:root {
  color-scheme: dark;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --wheel-bg: #1d2129;
  --wheel-panel: #2a2f39;
  --wheel-panel-strong: #252a33;
  --wheel-field: #20252e;
  --wheel-line: rgba(255, 255, 255, 0.09);
  --wheel-line-strong: rgba(255, 255, 255, 0.15);
  --wheel-text: #eef2f8;
  --wheel-muted: #9eabc0;
  --wheel-green: #58c477;
  --wheel-green-soft: rgba(88, 196, 119, 0.18);
  --wheel-gold: #e1b94d;
  --wheel-danger: #ff6f76;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 0;
  min-height: 0;
  height: auto;
  margin: 0;
  background-color: var(--wheel-bg);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.025) 0 4px,
    transparent 4px 10px
  );
  color: var(--wheel-text);
}

body {
  padding: 2px;
  overflow-x: hidden;
  font-size: 12px;
}

button,
input,
select {
  font: inherit;
}

.wheel-app-shell {
  width: 100%;
  min-width: 0;
  background: transparent;
}

.wheel-status-message {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--wheel-line);
  border-radius: 7px;
  background: var(--wheel-panel);
  color: var(--wheel-muted);
  text-align: center;
}

.hide,
.WheelOfDestinyWrapper.hide {
  display: none !important;
}

.WheelOfDestinyWrapper,
.UseFullWidth,
.TableContainer,
.InnerTableContainer,
.TableContentContainer,
.TableContent {
  width: 100%;
  min-width: 0;
}

.WheelOfDestinyWrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.WheelOfDestinyWrapper > br {
  display: none;
}

#WheelOfDestinySelectionBlock,
.WheelOfDestinyWrapper > .TableContainer {
  grid-column: 1;
}

.wheel-top-panel {
  display: grid;
  grid-template-columns: minmax(420px, 3fr) 1px minmax(260px, 2fr);
  gap: 10px;
  align-items: stretch;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--wheel-line);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.018), transparent 52%),
    var(--wheel-panel);
}

.wheel-top-panel > .TableContainer {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.wheel-top-divider {
  width: 1px;
  min-height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(166,176,191,.32), rgba(255,255,255,.02));
}

.wheel-code-panel .CaptionContainer {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.wheel-code-panel .CaptionContainer .Text {
  color: #b9c7da;
  font-size: 11px;
  font-weight: 700;
}

table {
  border-spacing: 0;
  border-collapse: separate;
}

td {
  min-width: 0;
  vertical-align: top;
}

.TableContainer {
  position: relative;
  padding: 11px;
  border: 1px solid var(--wheel-line);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.018), transparent 52%),
    var(--wheel-panel);
  overflow: hidden;
}

.TableContainer.Captionless {
  padding: 12px;
}

.TableScrollbarWrapper,
.TableScrollbarContainer,
.CaptionEdgeLeftTop,
.CaptionEdgeRightTop,
.CaptionBorderTop,
.CaptionVerticalLeft,
.CaptionVerticalRight,
.CaptionBorderBottom,
.CaptionEdgeLeftBottom,
.CaptionEdgeRightBottom,
.BigButtonOver,
.SmallButtonOver {
  display: none !important;
}

.CaptionContainer {
  margin: -11px -11px 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--wheel-line);
  background: var(--wheel-panel-strong);
}

.CaptionInnerContainer,
.CaptionContainer .Text {
  display: block;
}

.CaptionContainer .Text,
.PerksSummaryHeader,
.Bold {
  color: var(--wheel-text);
  font-weight: 800;
}

#VocationSelection {
  width: 100%;
}

#VocationSelection .TableContent > tbody > tr {
  display: grid;
  grid-template-columns: minmax(84px, 0.2fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

#VocationSelection .TableContent > tbody > tr + tr {
  margin-top: 10px;
}

#VocationSelection .CodeExport,
#VocationSelection .CodeImport,
#VocationSelection .ButtonRow {
  display: none !important;
}

.PlannerTopTableLabel,
.LabelV150 {
  color: #b9c7da;
  font-size: 11px;
  font-weight: 700;
}

#VocationList {
  display: grid;
  grid-template-columns: repeat(5, minmax(46px, 52px));
  gap: 6px;
  justify-content: start;
}

#VocationList > .OptionContainer,
#VocationList > .OptionContainer > label,
#VocationList > .OptionContainer > label > .OptionContainer {
  display: contents;
}

#VocationList input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#VocationList input[type="radio"] + label {
  position: relative;
  display: grid;
  place-items: center;
  justify-items: center;
  width: 52px;
  height: 52px;
  min-width: 46px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(43, 50, 62, 0.86), rgba(31, 37, 47, 0.96));
  color: #e7edf6;
  cursor: pointer;
  font-size: 0;
  font-weight: 800;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

#VocationList input[type="radio"] + label::before {
  width: 34px;
  height: 34px;
  content: "";
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  image-rendering: pixelated;
}

#VocationList input[value="knight"] + label::before { background-image: url("../ui/vocations/knight-male.png"); }
#VocationList input[value="druid"] + label::before { background-image: url("../ui/vocations/druid-female.png"); }
#VocationList input[value="sorcerer"] + label::before { background-image: url("../ui/vocations/sorcerer-male.png"); }
#VocationList input[value="paladin"] + label::before { background-image: url("../ui/vocations/paladin-male.png"); }
#VocationList input[value="monk"] + label::before { background-image: url("../ui/vocations/monk-male.png"); }

#VocationList input[type="radio"] + label:hover {
  transform: translateY(-1px);
  border-color: rgba(88, 196, 112, 0.58);
}

#VocationList input[type="radio"]:checked + label {
  border-color: rgba(236, 190, 77, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 93, 0.28), 0 0 0 1px rgba(236, 190, 77, 0.12);
  background: linear-gradient(145deg, rgba(59, 53, 36, 0.92), rgba(34, 40, 50, 0.96));
}

#VocationList input[type="radio"]:checked + label::after {
  position: absolute;
  inset: 3px;
  content: "";
  border: 1px solid rgba(255, 215, 99, 0.54);
  border-radius: 5px;
  pointer-events: none;
}

.PromotionPointsLimit,
.CodeColumn input,
.GemDropdown {
  min-height: 32px;
  border: 1px solid var(--wheel-line);
  border-radius: 7px;
  outline: 0;
  background: var(--wheel-field);
  color: var(--wheel-text);
}

.PromotionPointsLimit {
  width: 76px;
  margin-left: 5px;
  padding: 5px 8px;
  text-align: center;
}

.PromotionPointsLimit:focus,
.CodeColumn input:focus,
.GemDropdown:focus {
  border-color: rgba(88, 196, 119, 0.78);
  box-shadow: 0 0 0 1px rgba(88, 196, 119, 0.18);
}

.PromotionPointsToolTipContainer {
  display: none;
}

.CodeExport,
.CodeImport {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.CodeImport {
  margin-top: 8px;
  align-items: start;
}

.CodeExport > td,
.CodeImport > td {
  display: block;
}

.CodeColumn > span {
  display: block;
  min-height: 32px;
  padding: 7px 9px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(18, 22, 29, 0.78), rgba(13, 17, 23, 0.92));
  color: #8f9aaa;
  cursor: default;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
}

.CodeColumn input {
  width: 100%;
  padding: 5px 9px;
}

.ButtonColumn,
.SmallButtonRow,
.SmallButtonRow > span {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.CodeExport > .ButtonColumn,
.CodeImport > .ButtonColumn {
  display: grid !important;
  grid-template-columns: repeat(2, 34px);
  gap: 7px;
  width: 75px;
  align-content: start;
  justify-content: start;
}

.BigButton,
.SmallButton,
.ButtonEventHook {
  display: contents;
}

.BigButtonText,
.SmallButtonText {
  --wod-button-icon: none;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
  background-color: #252b35;
  background-image:
    var(--wod-button-icon),
    linear-gradient(145deg, rgba(43, 50, 62, 0.86), rgba(31, 37, 47, 0.96)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 4px, transparent 4px 10px);
  background-position: center, center, center;
  background-repeat: no-repeat, no-repeat, repeat;
  background-size: 22px 22px, 100% 100%, auto;
  color: transparent;
  cursor: pointer;
  font-size: 0;
  text-indent: -9999px;
  transition: transform 120ms ease, border-color 120ms ease, filter 120ms ease;
}

#wod-code-copy,
#wod-code-copy-mobile { --wod-button-icon: url("./ui/copy.png"); }
#wod-code-url,
#wod-code-url-mobile { --wod-button-icon: url("./ui/copy-url.png"); }
#wod-code-import,
#wod-code-import-mobile { --wod-button-icon: url("./ui/import.png"); }
#wod-code-reset,
#wod-code-reset-mobile { --wod-button-icon: url("./ui/reset.png"); }
#wod-maxminus-button { --wod-button-icon: url("./ui/remove-max.png"); }
#wod-minus-button { --wod-button-icon: url("./ui/remove-one.png"); }
#wod-plus-button { --wod-button-icon: url("./ui/add-one.png"); }
#wod-maxplus-button { --wod-button-icon: url("./ui/add-max.png"); }
#toolbar-wod-maxminus-button { --wod-button-icon: url("./ui/remove-max.png"); }
#toolbar-wod-minus-button { --wod-button-icon: url("./ui/remove-one.png"); }
#toolbar-wod-plus-button { --wod-button-icon: url("./ui/add-one.png"); }
#toolbar-wod-maxplus-button { --wod-button-icon: url("./ui/add-max.png"); }

.BigButtonText:hover,
.SmallButtonText:hover {
  transform: translateY(-1px);
  border-color: rgba(88, 196, 112, 0.62);
  filter: brightness(1.12);
}

.BigButtonText:active,
.SmallButtonText:active {
  transform: translateY(0);
}

.wheel-floating-tooltip {
  position: fixed;
  z-index: 2147483647;
  max-width: min(330px, calc(100vw - 16px));
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(25, 31, 43, 0.99);
  color: #f4f8ff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  white-space: pre-line;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 80ms ease, transform 80ms ease;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
}

.wheel-floating-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.wheel-help-tooltip {
  width: max-content;
  max-width: min(360px, calc(100vw - 16px));
  font-weight: 500;
  white-space: normal;
}

.wheel-help-tooltip-title {
  display: block;
  margin-bottom: 5px;
  color: var(--wheel-text);
  font-weight: 800;
}

.wheel-help-tooltip-content,
.wheel-help-tooltip-content p {
  margin: 0;
  color: var(--wheel-muted);
}

.wheel-help-tooltip-content {
  line-height: 1.42;
}

.wheel-help-tooltip-content ul,
.wheel-help-tooltip-content ol {
  margin: 5px 0 0;
  padding-left: 18px;
}

.wheel-help-tooltip-content li + li {
  margin-top: 2px;
}

.InvalidCode,
.ColorRed {
  margin-top: 5px;
  color: var(--wheel-danger);
  font-size: 11px;
  font-weight: 700;
}

#WheelOfDestinySelectionBlock,
#WheelOfDestinySelection {
  display: block;
  width: 100%;
  min-width: 0;
}

#WheelOfDestinySelectionBlock > tbody {
  display: block;
  width: 100%;
  min-width: 0;
}

#WheelOfDestinySelection {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  justify-content: center;
  width: 100%;
}

#PerkInformationTables {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  display: block;
  min-width: 0;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 0;
  width: 100%;
  overflow: visible;
}

#PerkInformationTables .wheel-selection-panel .Table5,
#PerkInformationTables .wheel-selection-panel .Table5 > tbody,
#PerkInformationTables .wheel-selection-panel .Table5 > tbody > tr,
#PerkInformationTables .wheel-selection-panel .Table5 > tbody > tr > td,
#PerkInformationTables .InnerTableContainer,
#PerkInformationTables .InnerTableContainer > table,
#PerkInformationTables .InnerTableContainer > table > tbody,
#PerkInformationTables .InnerTableContainer > table > tbody > tr,
#PerkInformationTables .InnerTableContainer > table > tbody > tr > td,
#PerkInformationTables .BoxWrapper,
#wod-selection-box-empty,
#wod-selection-box-bar,
#wod-selection-box-medium,
#wod-selection-box-large,
#wod-selection-box-socket,
#wod-selection-box-medium > *,
#wod-selection-box-large > *,
#wod-selection-box-socket > * {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#PerkInformationTables .wheel-selection-panel table {
  table-layout: fixed;
}

#wod-selection-box-medium,
#wod-selection-box-large,
#wod-selection-box-socket {
  position: relative;
  padding-top: 0;
}

#wod-selection-box-buttons,
#wod-selection-box-medium .SmallButtonRow,
#wod-selection-box-large .SmallButtonRow,
#wod-selection-box-socket .SmallButtonRow {
  position: static;
  z-index: auto;
  width: max-content !important;
  max-width: 100%;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  justify-content: flex-start;
}

#PerkInformationTables .wheel-information-source {
  display: none !important;
}

.BoxWrapper {
  color: #d7e0ed;
  line-height: 1.45;
}

#wod-selection-box-empty:not(.hide) {
  display: block;
  min-height: 0;
  padding: 8px 10px;
}

#PerkInformationTables:has(#wod-selection-box-empty:not(.hide)),
#PerkInformationTables:has(#wod-selection-box-empty:not(.hide)) .wheel-selection-panel,
#PerkInformationTables:has(#wod-selection-box-empty:not(.hide)) .Table5,
#PerkInformationTables:has(#wod-selection-box-empty:not(.hide)) .InnerTableContainer,
#PerkInformationTables:has(#wod-selection-box-empty:not(.hide)) .BoxWrapper {
  min-height: 0;
  height: auto;
}

#wod-selection-box-empty:not(.hide) ~ .SkillPercentage,
#wod-selection-box-empty:not(.hide) ~ .SmallButtonRow,
#wod-selection-box-empty:not(.hide) ~ #wod-selection-box-buttons,
#wod-selection-box-empty:not(.hide) ~ .PerkWrapper,
#wod-selection-box-empty:not(.hide) ~ .GemWrapper,
#wod-selection-box-empty:not(.hide) ~ .VesselWrapper {
  display: none !important;
}

.SkillPercentage {
  position: relative;
  height: 14px;
  margin: 0 0 10px;
  border: 1px solid var(--wheel-line);
  border-radius: 5px;
  background: #171c23;
  overflow: hidden;
}

.SkillPercentage .PercentageBar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, #3d9f5d, var(--wheel-green));
}

.SkillPercentage .Text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-bottom: 1px;
  color: #f6fbf8;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.PerkWrapper,
.GemWrapper,
.VesselWrapper {
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--wheel-line);
  border-radius: 6px;
  background: rgba(19, 24, 31, 0.34);
}

.PerkWrapper:first-child,
.GemWrapper:first-child,
.VesselWrapper:first-child {
  margin-top: 0;
}

.PerkWrapper.HasInlinePerkIcon {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 7px;
  align-items: start;
}

.PerkWrapper.HasInlinePerkIcon > .Bold {
  grid-column: 1 / -1;
}

.PerkWrapper.HasInlinePerkIcon > .InlinePerkIcon {
  grid-column: 1;
  grid-row: 2;
  margin-top: 4px;
}

.PerkWrapper.HasInlinePerkIcon > .SkillValue {
  grid-column: 2;
  grid-row: 2;
}

.PerkWrapper.HasInlinePerkIcon.wheel-multi-stat-wrapper > .InlinePerkIcon {
  display: none;
}

.PerkWrapper.HasInlinePerkIcon.wheel-stat-wrapper > .InlinePerkIcon {
  display: none;
}

.PerkWrapper.HasInlinePerkIcon.wheel-multi-stat-wrapper > .SkillValue,
.PerkWrapper.HasInlinePerkIcon.wheel-stat-wrapper > .SkillValue {
  grid-column: 1 / -1;
}

.wheel-stat-line {
  display: flex;
  align-items: center;
  min-height: 18px;
  gap: 5px;
}

.wheel-stat-line + .wheel-stat-line {
  margin-top: 2px;
}

.wheel-stat-line .wheel-summary-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  align-items: center;
  overflow: hidden;
}

.wheel-stat-line .wheel-summary-icon > img {
  display: block;
  width: auto;
  max-width: none;
  height: 16px;
}

.BoxWrapper .PerkWrapper.hide,
.BoxWrapper .GemWrapper.hide,
.BoxWrapper .VesselWrapper.hide,
.BoxWrapper .SkillPercentage.hide {
  display: none !important;
}

.LargePerkIcon,
.SmallPerkIcon,
.MediumPerkIcon,
.ModIcon,
.SupremeMod {
  position: relative;
  display: block;
  overflow: hidden;
  flex: 0 0 auto;
}

.BoxWrapper .SmallPerkIcon {
  width: 16px;
  height: 16px;
}

.BoxWrapper .MediumPerkIcon {
  width: 30px;
  height: 30px;
}

.BoxWrapper .LargePerkIcon {
  width: 34px;
  height: 34px;
}

.LargePerkIcon > img,
.SmallPerkIcon > img,
.MediumPerkIcon > img,
.ModIcon > img,
.SupremeMod > img {
  display: block;
  max-width: none;
  height: auto;
}

.BoxWrapper .SmallPerkIcon > img {
  height: 16px;
}

.BoxWrapper .MediumPerkIcon > img {
  height: 30px;
}

.BoxWrapper .LargePerkIcon > img {
  height: 34px;
}

.SkillValue,
.LargePerkValue,
.VesselValue,
.ModEffectValue {
  margin-top: 4px;
  color: #b8c7da;
}

.TextCenter {
  text-align: center;
}

.LargePerkName {
  margin-top: 5px;
  color: var(--wheel-gold);
  font-weight: 800;
  text-align: center;
}

.SmallButtonRow {
  margin-top: 10px;
  justify-content: center;
}

.GemDropdownWrapper {
  margin-top: 6px;
}

.GemDropdown {
  width: 100%;
  padding: 5px 8px;
}

.ModEffectWrapper {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  margin: 5px 0 8px;
}

.ModEffectWrapper:has(.ModEffectValue:empty) {
  display: none;
}

.ModEffectIconWrapper > div,
.TextCenter > div {
  margin-inline: auto;
}

.ModEffectIconWrapper > div,
.GemWrapper .ModIcon {
  position: relative;
  display: block;
  overflow: hidden;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
}

.ModEffectIconWrapper > div > img,
.GemWrapper .ModIcon > img {
  display: block;
  width: auto;
  max-width: none;
  height: 30px;
}

.GemWrapper .SupremeMod {
  width: 35px;
  height: 35px;
}

.GemWrapper .SupremeMod > img {
  height: 35px;
}

#WheelOfDestiny {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  display: grid;
  place-items: start center;
  min-width: 0;
  width: 100%;
  padding: 44px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

#wod-canvas {
  display: block;
  width: min(100%, 522px);
  height: auto;
  max-width: 522px;
  image-rendering: auto;
}

#PerksSummary {
  display: table-row;
}

.wheel-summary-source {
  display: none !important;
}

.wheel-summary-launcher {
  position: absolute;
  top: 0;
  right: 4px;
  z-index: 12;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.wheel-selection-toolbar {
  position: absolute;
  top: 0;
  left: 4px;
  right: 46px;
  z-index: 11;
  display: none;
  gap: 8px;
  align-items: center;
  min-height: 34px;
}

.wheel-selection-toolbar.visible {
  display: flex;
}

.wheel-selection-toolbar .SmallButtonRow {
  position: static !important;
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  margin: 0;
  padding: 0;
}

.wheel-toolbar-bar {
  position: relative;
  width: min(240px, 44vw);
  flex: 0 1 240px;
  height: 14px;
  margin: 0;
  border: 1px solid var(--wheel-line);
  border-radius: 5px;
  background: #171c23;
  overflow: hidden;
}

.wheel-toolbar-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, #3d9f5d, var(--wheel-green));
}

.wheel-toolbar-bar-text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-bottom: 1px;
  color: #f6fbf8;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.wheel-selection-toolbar .wheel-toolbar-buttons,
.wheel-selection-toolbar .wheel-toolbar-buttons > span {
  width: max-content !important;
  max-width: none !important;
  display: flex;
  gap: 5px;
  flex: 0 0 auto;
  justify-content: flex-start;
}

.wheel-selection-toolbar .SmallButtonText:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  border-color: rgba(148, 163, 184, 0.16);
  filter: grayscale(1) brightness(0.62);
}

.wheel-selection-toolbar .SmallButtonText:disabled:hover,
.wheel-selection-toolbar .SmallButtonText:disabled:active {
  transform: none;
  border-color: rgba(148, 163, 184, 0.16);
  filter: grayscale(1) brightness(0.62);
}

.wheel-selection-toolbar .wheel-toolbar-bar.hide {
  display: none !important;
}

.wheel-summary-panel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(43, 50, 62, 0.86), rgba(31, 37, 47, 0.96)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 4px, transparent 4px 10px);
  color: var(--wheel-text);
  font: inherit;
  font-size: 0;
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, filter 120ms ease;
}

.wheel-summary-panel-button img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  image-rendering: pixelated;
}

.wheel-summary-panel-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.wheel-summary-panel-button:hover,
.wheel-summary-panel-button:focus-visible {
  border-color: rgba(88, 196, 119, 0.72);
  filter: brightness(1.08);
  transform: translateY(-1px);
  outline: none;
}

.wheel-summary-panel-button:active {
  transform: translateY(0);
}

.wheel-summary-panel .InnerTableContainer,
.wheel-summary-panel .InnerTableContainer > table,
.wheel-summary-panel .InnerTableContainer > table > tbody,
.wheel-summary-panel .InnerTableContainer > table > tbody > tr,
.wheel-summary-panel .InnerTableContainer > table > tbody > tr > td {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.wheel-summary-panel .InnerTableContainer > table {
  table-layout: fixed;
}

.wheel-perk-summary-host {
  width: 100%;
}

.wheel-perk-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.wheel-perk-summary-card {
  min-width: 0;
}

.wheel-perk-summary-card > table {
  width: 100%;
}

.PerksSummaryHeader {
  margin-bottom: 5px;
}

.PerkTableMarginTop,
.PerkTableMarginTopOnMobile {
  margin-top: 0;
}

#PerksSummary .TableContentContainer {
  min-height: 44px;
  padding: 6px;
  border: 1px solid var(--wheel-line);
  border-radius: 6px;
  background: rgba(19, 24, 31, 0.32);
}

#PerksSummary .TableContent > tbody > tr,
#PerksSummary .TableContent > tr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#PerksSummary .TableContent > tbody > tr:last-child,
#PerksSummary .TableContent > tr:last-child {
  border-bottom: 0;
}

#PerksSummary .TableContent td {
  width: auto;
  padding: 4px 6px;
  border-bottom: 0;
}

#PerksSummary .TableContent > tbody > tr > td:last-child,
#PerksSummary .TableContent > tr > td:last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  white-space: nowrap;
}

#PerksSummary .wheel-summary-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

#PerksSummary .wheel-summary-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  align-items: center;
  overflow: hidden;
}

#PerksSummary .wheel-summary-icon > img {
  display: block;
  width: auto;
  max-width: none;
  height: 18px;
}

#PerksSummary .wheel-summary-image-icon {
  justify-content: center;
}

#PerksSummary .wheel-summary-image-icon > img,
#PerksSummary .ModAugIcon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

#PerksSummary .PerkTooltipContainer,
#PerksSummary .HelperDivIndicator {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

#PerksSummary .PerkTooltipContainer {
  position: static;
}

#PerksSummary .HelperDivIndicator {
  cursor: help;
}

#PerksSummary .HelperDivIndicator img {
  display: block;
  width: 14px;
  height: 14px;
}

#wod-summary-note {
  grid-column: 1 / -1;
  margin-top: 4px;
  color: var(--wheel-muted);
  font-size: 10px;
}

@media (max-width: 620px) {
  #WheelOfDestinySelectionBlock,
  .WheelOfDestinyWrapper > .TableContainer {
    grid-column: 1;
  }

  #WheelOfDestinySelection {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  #WheelOfDestiny {
    grid-row: 1;
  }

  #PerkInformationTables {
    grid-column: 1;
    grid-row: 2;
    display: block;
    height: auto;
    min-height: 0;
    max-height: none;
    padding-right: 0;
    overflow: visible;
  }

  .wheel-top-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .wheel-top-divider {
    width: 100%;
    height: 1px;
    min-height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,.02), rgba(166,176,191,.32), rgba(255,255,255,.02));
  }

  #VocationSelection .TableContent > tbody {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    align-items: end;
  }

  #VocationSelection .TableContent > tbody > tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin: 0 !important;
  }

  #VocationSelection .TableContent > tbody > tr:first-child {
    min-width: 0;
  }

  #VocationSelection .TableContent > tbody > tr:nth-child(2) {
    width: max-content;
    align-self: end;
  }

  #VocationList {
    grid-template-columns: repeat(5, minmax(42px, 48px));
  }

  #VocationList input[type="radio"] + label {
    width: 48px;
    height: 48px;
  }

  #VocationList input[type="radio"] + label::before {
    width: 31px;
    height: 31px;
  }

  .PromotionPointsLimit {
    width: 68px;
    min-height: 30px;
  }

  .wheel-summary-launcher {
    top: 0;
    right: 4px;
  }
}

@media (max-width: 840px) and (min-width: 621px) {
  .wheel-top-panel {
    grid-template-columns: minmax(360px, 3fr) 1px minmax(230px, 2fr);
  }

  #VocationList {
    grid-template-columns: repeat(5, minmax(38px, 46px));
  }

  #VocationList input[type="radio"] + label {
    width: 46px;
    height: 46px;
  }

  #VocationList input[type="radio"] + label::before {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 610px) {
  body {
    padding: 0;
  }

  .TableContainer {
    border-radius: 7px;
  }

  #VocationList {
    grid-template-columns: repeat(5, minmax(40px, 1fr));
    overflow-x: auto;
    padding-bottom: 3px;
  }

  #VocationList input[type="radio"] + label {
    min-width: 40px;
    width: auto;
    height: 44px;
  }

  #VocationList input[type="radio"] + label::before {
    width: 28px;
    height: 28px;
  }

  .wheel-code-panel .InnerTableContainer > table > tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: start;
  }

  .wheel-code-panel .CodeExport,
  .wheel-code-panel .CodeImport {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(32px, auto) 34px;
    gap: 7px;
    align-content: start;
    margin-top: 0;
  }

  .ButtonColumn {
    justify-content: flex-start;
  }

  .wheel-code-panel .CodeExport > .ButtonColumn,
  .wheel-code-panel .CodeImport > .ButtonColumn {
    grid-template-columns: repeat(2, 34px);
    width: auto;
  }

  .ButtonColumn .BigButtonText {
    flex: 0 0 34px;
  }

  #wod-summary-note {
    width: 100%;
  }

  .wheel-selection-toolbar {
    right: 44px;
  }
}

/* The website reuses the planner logic but keeps the fansite's gold identity. */
html[data-wheel-surface="site"] {
  --wheel-bg: transparent;
  --wheel-panel: rgba(8, 15, 23, 0.9);
  --wheel-panel-strong: rgba(10, 18, 27, 0.96);
  --wheel-field: rgba(4, 10, 15, 0.94);
  --wheel-line: rgba(216, 179, 88, 0.28);
  --wheel-line-strong: rgba(216, 179, 88, 0.52);
  --wheel-text: #e9dfc8;
  --wheel-muted: #a69c88;
  --wheel-green: #d8b358;
  --wheel-green-soft: rgba(216, 179, 88, 0.18);
  --wheel-gold: #f0cf79;
}

html[data-wheel-surface="site"],
html[data-wheel-surface="site"] body {
  background-color: transparent;
  background-image: none;
  color: var(--wheel-text);
  font-family: Georgia, "Times New Roman", serif;
}

html[data-wheel-surface="site"] .wheel-top-panel,
html[data-wheel-surface="site"] .TableContainer {
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(216, 179, 88, 0.045), transparent 48%),
    var(--wheel-panel);
}

html[data-wheel-surface="site"] .CaptionContainer .Text,
html[data-wheel-surface="site"] .wheel-code-panel .CaptionContainer .Text,
html[data-wheel-surface="site"] .Bold,
html[data-wheel-surface="site"] .LargePerkName {
  color: #f1d990;
}

html[data-wheel-surface="site"] input:not([type="button"]):not([type="radio"]),
html[data-wheel-surface="site"] select,
html[data-wheel-surface="site"] .CodeColumn > span {
  border-radius: 0;
  border-color: rgba(216, 179, 88, 0.34);
  background: var(--wheel-field);
}

html[data-wheel-surface="site"] #VocationList input[type="radio"] + label,
html[data-wheel-surface="site"] .BigButtonText,
html[data-wheel-surface="site"] .SmallButtonText,
html[data-wheel-surface="site"] .wheel-summary-panel-button {
  border-radius: 0;
}

html[data-wheel-surface="site"] #VocationList input[type="radio"]:checked + label,
html[data-wheel-surface="site"] #VocationList input[type="radio"] + label:hover,
html[data-wheel-surface="site"] .wheel-summary-panel-button:hover {
  border-color: #e2bd5e;
  box-shadow: inset 0 0 0 1px rgba(255, 228, 145, 0.18);
}

html[data-wheel-surface="site"] .PercentageBar,
html[data-wheel-surface="site"] .wheel-toolbar-bar-fill {
  background: linear-gradient(90deg, #8f6b21, #e3bd5b);
}
