.gem-page { min-width: 0; color: var(--ink); }
.gem-page [hidden] { display: none; }
.gem-page .workspace-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.gem-fee { color: var(--jade-dark); background: #e8f3f2; border: 1px solid #c8dfdc; padding: 8px 12px; height: auto; border-radius: 4px; white-space: nowrap; }
.gem-settings { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.3fr) minmax(230px, 1.2fr) minmax(110px, .55fr); gap: 18px; padding: 24px 0 16px; border-bottom: 1px solid var(--line); }
.gem-settings .fieldset { min-width: 0; margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
.gem-settings .fieldset-legend { padding: 0; font-size: 13px; font-weight: 600; }
.gem-settings :is(.input, .select) { width: 100%; min-width: 0; height: 42px; font-size: 14px; }
.gem-settings .select { padding: 0 10px; border: 1px solid #c9d5de; border-radius: 4px; background: var(--surface, #fff); color: var(--ink); font-family: inherit; }
.gem-settings [aria-invalid="true"] { border-color: var(--danger); }
.gem-modes { display: flex; gap: 4px; margin-top: 20px; border-bottom: 1px solid var(--line); }
.gem-modes .tab { min-width: 100px; height: 40px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 14px; }
.gem-modes .tab-active { color: var(--jade-dark); border-bottom: 2px solid var(--jade); font-weight: 700; }
.gem-server-field { position: relative; }
.gem-server-options { position: absolute; z-index: 20; top: 70px; left: 0; right: 0; width: 100%; max-height: 260px; overflow-y: auto; padding: 4px; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 6px 20px rgb(0 0 0 / 10%); }
.gem-server-options[hidden] { display: none; }
.gem-server-options li { display: block; padding: 10px 8px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; cursor: pointer; border-radius: 3px; }
.gem-server-options li:is(:hover, .active) { background: #e8f3f2; color: var(--jade-dark); }
.gem-server-options [aria-selected="true"] { font-weight: 700; }
.gem-server-match { color: var(--ink-soft); font-size: 12px; }
.gem-server-match:empty { display: none; }
.gem-preference-line { grid-column: 2 / -1; align-self: end; min-height: 42px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); overflow-wrap: anywhere; }
.gem-quote-line { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; min-height: 32px; font-size: 12px; color: var(--ink-soft); }
.gem-quote-line span { overflow-wrap: anywhere; }
.gem-quote-line button { flex: none; width: 32px; height: 32px; min-height: 32px; padding: 6px; }
.gem-validation { color: var(--danger); font-size: 13px; margin: 14px 0; }
.gem-results { padding-top: 22px; }
.gem-results .member-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.gem-results h2 { font-size: 17px; margin: 0; }
.gem-results [data-gem-count] { color: var(--ink-soft); font-size: 12px; }
.gem-table-wrap { overflow-x: auto; width: 100%; border-top: 2px solid var(--jade); background: var(--surface, #fff); }
.gem-table { width: 100%; min-width: 1080px; font-size: 13px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.gem-table :is(th, td) { padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: right; }
.gem-table th { background: #f0f5f5; font-size: 12px; color: var(--ink-soft); }
.gem-table :is(th, td):first-child { text-align: left; }
.gem-table td:first-child { position: sticky; left: 0; background: var(--surface, #fff); }
.gem-table th:first-child { position: sticky; left: 0; background: #f0f5f5; }
.gem-table :is(th, td):last-child { text-align: left; }
.gem-table td:nth-child(7) { color: var(--jade-dark); font-weight: 700; }
.gem-table td:last-child { font-size: 12px; color: var(--ink-soft); }
.gem-table tr[data-extra="true"] td:first-child { color: var(--vermilion); }
.gem-note, .gem-rules { font-size: 12px; line-height: 1.8; color: var(--ink-soft); }
.gem-note { margin: 12px 0 20px; }
.gem-rules { border-top: 1px solid var(--line); padding-top: 15px; }
.gem-rules summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.gem-rules a { color: var(--jade-dark); text-decoration: underline; }
.gem-hammer-cost { display: flex; align-items: center; gap: 6px; }
.gem-settings-hammer { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gem-hammer-cost .input { width: 140px; min-width: 0; height: 34px; padding: 0 8px; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.gem-hammer-cost .input[aria-invalid="true"] { border-color: var(--danger); }
.gem-hammer-cost .btn { flex: none; width: 28px; height: 34px; min-height: 34px; padding: 5px; }
.gem-hammer-table :is(th, td) { padding: 10px 12px; }
.gem-hammer-table tbody th { background: var(--surface, #fff); color: var(--ink); font-weight: 400; }
.gem-hammer-table :is(td:nth-child(4), td:nth-child(5)) { font-weight: 700; color: var(--jade-dark); }
.gem-hammer-table td:nth-child(7) { color: var(--ink); font-weight: 400; }
.gem-hammer-table tr[data-outcome="盈利"] :is(td:nth-child(6), td:nth-child(7), td:last-child) { color: var(--jade-dark); }
.gem-hammer-table tr[data-outcome="亏损"] :is(td:nth-child(6), td:nth-child(7), td:last-child), .gem-hammer-table tr[data-outcome="无保本空间"] :is(td:nth-child(4), td:nth-child(5), td:last-child) { color: var(--danger); }
[data-hammer-status] { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 560px) { .gem-modes .tab { flex: 1; min-width: 0; padding: 0 8px; } }
@media (max-width: 1200px) { .gem-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gem-settings { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 18px; } .gem-preference-line { grid-column: 1; min-height: 20px; } .gem-preference-line:has([data-gem-preference]:empty) { display: none; } .gem-table :is(th, td) { padding: 11px 13px; } }
