.gem-layout .gem-option { font: inherit; text-decoration: none; cursor: pointer; }
.gem-layout .gem-option:visited { color: #5c756a; }
.gem-layout .gem-option:hover { color: var(--jade-dark); text-decoration: none; }
.gem-layout .gem-option[aria-current="page"],
.gem-layout .gem-option[aria-current="page"]:visited,
.gem-layout .gem-option[aria-current="page"]:hover { color: #fff; background: var(--jade-dark); border-color: var(--jade-dark); box-shadow: none; }
.gem-layout .gem-option:focus-visible { outline: 3px solid color-mix(in srgb, var(--jade) 42%, transparent); outline-offset: 2px; }
.gem-workbench-compare {
  margin: 0 0 20px;
  padding: clamp(16px, 2.4vw, 26px);
  background: #fff;
  border: 1px solid var(--line, #dbe8df);
  border-radius: 20px;
  box-shadow: var(--shadow, 0 8px 28px #173d2710);
}
.gem-workbench-compare { margin-top: 20px; }
.gem-workbench-compare h2 { margin: 0 0 10px; font-size: 1.14rem; }
.gem-workbench-retry { padding: 7px 11px; border: 1px solid #bdd6c4; border-radius: 9px; background: #eef8f0; color: #24623d; font: inherit; cursor: pointer; }
.gem-workbench-compare p { margin: 8px 0 0; line-height: 1.65; overflow-wrap: anywhere; }
.gem-workbench-choices button {
  border: 1px solid #bdd6c4;
  border-radius: 10px;
  background: #eef8f0;
  color: #24623d;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.gem-workbench-hint { margin: 9px 0 0; color: #5b7161; font-size: .88rem; line-height: 1.55; overflow-wrap: anywhere; }
.gem-workbench-choices { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; max-height: 180px; overflow: auto; }
.gem-workbench-choices[hidden] { display: none; }
.gem-workbench-choices button { padding: 7px 10px; text-align: left; font-size: .86rem; }
#workbench-server-choices { position: absolute; z-index: 4; left: 0; right: 0; max-height: 220px; padding: 8px; background: #fff; border: 1px solid #cbded1; border-radius: 10px; box-shadow: 0 10px 24px #173d2720; }
.gem-main .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.gem-main .controls > .field-group { display: flex; flex-direction: column; min-width: 0; }
.gem-main .controls > .field-group > .number-input,
.gem-main .controls > .field-group > .money-input { margin-top: auto; }
.gem-calculation-modules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); column-gap: 14px; margin: 16px 0; }
.gem-calculation-module { display: grid; grid-template-rows: subgrid; grid-row: 1 / span 4; min-width: 0; padding: 16px; border: 1px solid #d3e7d7; border-radius: 14px; background: #f7fcf8; }
.gem-calculation-module:first-child { grid-column: 1; }
.gem-calculation-module:last-child { grid-column: 2; }
.gem-calculation-module > .field-group { display: flex; flex-direction: column; min-width: 0; }
.gem-calculation-module > .field-group > .money-input { margin-top: auto; }
.gem-calculation-module h2 { margin: 0 0 14px; color: #254d35; font-size: 1rem; }
.gem-module-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.gem-module-results .summary-card, .gem-reverse-output { min-width: 0; }
.gem-main .gem-result-line { display: flex; align-items: baseline; min-width: 0; width: 100%; white-space: nowrap; }
.gem-main .gem-result-line strong { flex: 0 0 auto; margin-right: 8px; overflow-wrap: normal; white-space: nowrap; }
.gem-main .gem-result-line span { flex: 0 0 auto; }
.gem-reverse-output { margin-top: 14px; }
.gem-merchant-field { position: relative; z-index: 3; min-width: 0; }
.gem-merchant-money-input { grid-template-columns: minmax(0, 1fr) 112px; }
.gem-merchant-money-input #reverse-currency-trigger { min-width: 0; width: 100%; height: 100%; padding: 0 18px 0 5px; color: var(--jade-dark); background: transparent; border: 0; border-left: 1px solid var(--line); border-radius: 0; font: inherit; font-size: .78rem; text-align: left; white-space: nowrap; cursor: pointer; position: relative; }
.gem-merchant-money-input #reverse-currency-trigger::after { content: "⌄"; position: absolute; right: 6px; top: 50%; transform: translateY(-58%); font-size: 1rem; }
.gem-merchant-money-input #reverse-currency-trigger[aria-expanded="true"] { background: #eaf6ee; }
.gem-currency-options { position: absolute; z-index: 8; top: calc(100% + 6px); right: 0; width: max-content; min-width: 176px; max-width: calc(100vw - 24px); padding: 5px; border: 1px solid #bdd6c4; border-radius: 12px; background: #fff; box-shadow: 0 10px 24px #173d2726; }
.gem-currency-options.is-above { top: auto; bottom: calc(100% + 6px); }
.gem-currency-options[hidden] { display: none; }
.gem-currency-options [role="option"] { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 10px 11px; border: 0; border-radius: 8px; background: transparent; color: #254d35; font: inherit; font-size: .86rem; text-align: left; cursor: pointer; }
.gem-currency-options [role="option"]:hover, .gem-currency-options [role="option"].is-active { background: #eaf6ee; }
.gem-currency-options [role="option"][aria-selected="true"] { color: #19633b; font-weight: 700; }
.gem-currency-options [role="option"][aria-selected="true"]::after { content: "✓"; color: #19633b; font-weight: 800; }
#reverse-result:empty { display: none; }
@media (max-width: 370px) {
  .gem-workbench-compare { border-radius: 16px; padding: 14px; }
}
.gem-workbench-import { flex: 0 0 auto; height: 21px; padding: 0 8px; border: 1px solid #bdd6c4; border-radius: 7px; background: #eef8f0; color: #24623d; font: inherit; font-size: .73rem; font-weight: 700; line-height: 19px; cursor: pointer; }
.gem-workbench-import:hover, .gem-workbench-retry:hover { background: #e1f2e6; }
.gem-gold-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.gem-gold-discount { flex: 0 0 auto; height: 21px; padding: 0 6px; border: 1px solid #bdd6c4; border-radius: 7px; background: #eef8f0; color: #24623d; font: inherit; font-size: .73rem; font-weight: 700; line-height: 19px; cursor: pointer; }
.gem-gold-discount:hover:not(:disabled):not([aria-pressed="true"]) { background: #e1f2e6; }
.gem-gold-discount[aria-pressed="true"] { border-color: #24623d; background: #24623d; color: #fff; }
.gem-gold-discount:disabled { opacity: .48; cursor: not-allowed; }
.gem-gold-discount:focus-visible { outline: 2px solid #24623d; outline-offset: 2px; }
.gem-import-dialog { box-sizing: border-box; width: min(560px, calc(100vw - 24px)); max-width: none; max-height: calc(100vh - 32px); padding: 20px; overflow-y: auto; border: 1px solid #bdd6c4; border-radius: 18px; background: #fff; box-shadow: 0 18px 48px #173d2740; color: #254d35; }
.gem-import-dialog::backdrop { background: #102d1c80; }
.gem-import-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gem-import-heading h2 { margin: 0; font-size: 1.15rem; }
.gem-import-heading button { width: 34px; height: 34px; border: 1px solid #bdd6c4; border-radius: 9px; background: #eef8f0; color: #24623d; font: inherit; font-size: 1.35rem; cursor: pointer; }
.gem-import-description { margin: 8px 0 16px; color: #5b7161; font-size: .88rem; line-height: 1.5; }
.gem-import-dialog > .gem-workbench-hint { margin: 8px 0; }
.gem-import-dialog > .gem-workbench-choices:not(:empty) { margin: 8px 0 12px; }
.gem-server-search-wrap { min-width: 0; position: relative; }
.gem-server-search-wrap label { display: block; margin-bottom: 4px; font-weight: 700; color: #254d35; }
.gem-server-search-wrap input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 38px; padding: 7px 10px; border: 1px solid #cbded1; border-radius: 9px; font: inherit; }
.gem-import-dialog > .gem-workbench-choices:empty { display: none; }
.gem-import-dialog #workbench-server-choices { position: static; margin-top: 8px; box-shadow: none; }
.gem-main .controls .field-group > label, .gem-calculation-module .field-group > label { box-sizing: border-box; min-height: 21px; margin-bottom: 8px; }
.gem-market-label-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px; min-height: 21px; margin-bottom: 8px; }
.gem-market-label-row label { margin: 0; }
.gem-market-actions, .gem-market-statistics { display: flex; align-items: center; gap: 4px; }
.gem-market-actions { margin-left: auto; }
.gem-market-statistic { flex: 0 0 auto; height: 21px; padding: 0 6px; border: 1px solid #bdd6c4; border-radius: 7px; background: #eef8f0; color: #24623d; font: inherit; font-size: .73rem; font-weight: 700; line-height: 19px; cursor: pointer; }
.gem-market-statistic:hover:not(:disabled):not([aria-pressed="true"]) { background: #e1f2e6; }
.gem-market-statistic[aria-pressed="true"] { border-color: #24623d; background: #24623d; color: #fff; }
.gem-market-statistic:disabled { opacity: .48; cursor: not-allowed; }
.gem-market-statistic:focus-visible { outline: 2px solid #24623d; outline-offset: 2px; }
.gem-main .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gem-main .summary-card:nth-child(n) { grid-column: auto; }
.gem-main .gem-shared-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gem-base-listing-card small { display: block; margin-top: 6px; color: #71877e; font-size: .73rem; }
@media (max-width: 860px) {
  .gem-main .gem-shared-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .gem-calculation-modules { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 14px; }
  .gem-calculation-module:first-child,
  .gem-calculation-module:last-child { display: block; grid-column: 1; grid-row: auto; }
  .gem-calculation-module > .field-group { display: block; }
  .gem-calculation-module > .field-group > .money-input { margin-top: 0; }
}
@media (min-width: 1101px) and (max-width: 1240px) {
  .gem-main .gem-price-field { grid-column: auto; }
}
@media (max-width: 560px) {
  .gem-main .controls { grid-template-columns: minmax(0, 1fr); }
  .gem-main .controls > .field-group { display: block; }
  .gem-main .controls > .field-group > .number-input,
  .gem-main .controls > .field-group > .money-input { margin-top: 0; }
  .gem-main .gem-shared-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gem-main .summary-card { padding: 10px; }
  .gem-market-label-row { flex-wrap: wrap; }
}
