/* Shared Continental controls and screens absent from the reference boards. */
:root {
  --control-radius: 14px;
  --control-height: 54px;
  --field-surface: #0F1124;
  --danger: #FF8A8A;
}

#content, #content > section { min-width: 0; }
#back { width: 44px; height: 44px; padding: 10px; display: grid; place-items: center; }
button, a, input, textarea, select { max-width: 100%; }
button { overflow-wrap: anywhere; }
input, textarea, select { font-size: 1rem; }
.primary, .secondary { min-height: var(--control-height); border-radius: var(--control-radius); }
.secondary { background: #1B1E33; }
.field input, select, textarea { background-color: var(--field-surface); }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%238D91A8' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
option { background: var(--surface); color: var(--text); }
:where(.check-row, .auction-bank-row) input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid #363A52;
  border-radius: 5px;
  background: transparent;
  flex-shrink: 0;
}
:where(.check-row, .auction-bank-row) input[type=checkbox]:checked {
  border-color: var(--primary);
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.detail-row { min-width: 0; align-items: center; border-bottom-color: var(--border); }
.detail-row > span { min-width: 0; overflow-wrap: anywhere; }
.detail-row:last-child { border-bottom: 0; }
.page-title h1 { font-size: 1.5rem; margin-bottom: 8px; }
.page-title p { font-size: 0.875rem; line-height: 1.45; }
.form-card, .create-panel { border-radius: 18px; }
.empty { line-height: 1.5; }
.state-screen { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 12px; }
.state-screen h1 { font-size: 1.5rem; margin: 16px 0 8px; }
.state-screen p { color: var(--text-secondary); font-size: 0.875rem; max-width: 320px; overflow-wrap: anywhere; }
.state-screen .primary { max-width: 320px; }
.state-symbol { box-sizing: border-box; width: 72px; height: 72px; padding: 18px; background: #16213F; color: var(--accent); border-radius: 22px; }
button:disabled { cursor: not-allowed; }
.hub-menu button { border-bottom-color: var(--border); }
.back-chevron { transform: rotate(180deg); }

/* Real CSS radio rings replace platform-dependent text glyphs. */
.language-list { background: #1B1E33; border-radius: 16px; }
.language-option { min-height: 56px; align-items: center; padding: 16px; gap: 12px; text-align: left; font-size: 1rem; }
.language-option[aria-checked=true] { color: var(--text); }
.language-option + .language-option { border-top-color: #262943; }
.language-radio { width: 22px; height: 22px; flex-shrink: 0; border: 2px solid #363A52; border-radius: 50%; display: grid; place-items: center; }
.language-option[aria-checked=true] .language-radio { border-color: var(--accent); }
.language-option[aria-checked=true] .language-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.language-screen .language-list { margin-top: 18px; }

/* Welcome → language → phrase → verification → PIN, without fixed board sizes. */
.welcome-screen { min-height: calc(100dvh - var(--safe-top) - var(--safe-bottom)); padding-bottom: 20px; gap: 10px; }
.welcome-hero { position: relative; min-height: 300px; height: min(56dvh, 470px); gap: 18px; }
.welcome-language-button { position: absolute; top: 16px; left: 16px; padding: 6px 10px; background: #18234A; color: #8BC0FF; border-radius: 999px; min-height: 32px; font-size: 0.8125rem; font-weight: 600; }
.welcome-enter { margin-top: auto; }
.welcome-screen > .secondary { margin-top: 0; }
.welcome-language-overlay { position: absolute; inset: 0 -16px; z-index: 20; display: flex; align-items: flex-end; background: #03040C8C; }
.welcome-language { position: relative; inset: auto; width: 100%; padding: 20px 16px max(28px, var(--safe-bottom)); box-shadow: none; }
.welcome-language h2 { margin-bottom: 6px; }
.welcome-language .security-description { margin: 0 0 14px; color: var(--text-secondary); font-size: 0.875rem; text-align: left; }
.welcome-language .primary { margin-top: 14px; }
.welcome-language .language-option > span:first-child { color: var(--text); }

.security-flow-header { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; flex-shrink: 0; margin-bottom: 16px; text-align: left; }
.security-flow-header .wizard-progress { flex: 1; min-width: 0; width: auto; margin: 0; height: 4px; }
.security-flow-header > span { white-space: nowrap; font-size: 0.8125rem; }
.security-flow-header .icon-button { width: 44px; height: 44px; }
.security-symbol { box-sizing: border-box; width: 96px; height: 96px; padding: 24px; border-radius: 28px; background: #16213F; }
.phrase-screen, .pin-screen, .recovery-screen { min-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 24px); padding-inline: 4px; }
.phrase-screen { display: flex; flex-direction: column; text-align: center; }
.phrase-screen h1 { font-size: 1.5rem; margin: 0 0 8px; }
.phrase-screen .security-description { font-size: 0.875rem; line-height: 1.45; margin: 0 0 16px; }
.phrase-intro > .security-symbol { margin-top: auto; }
.phrase-intro > .primary { margin-top: auto; }
.phrase-words > .security-symbol, .phrase-verifying .security-symbol { display: none; }
.phrase-grid { grid-template-rows: repeat(12, minmax(0,1fr)); padding: 12px 12px 12px 35px; gap: 0 25px; margin: 0 0 12px; background: transparent; border-radius: 0; font-size: 0.875rem; }
.phrase-grid li { padding: 5px 0 5px 6px; }
.phrase-words > .secondary { min-height: 44px; margin: 4px 0; padding: 10px 12px; font-size: 0.875rem; }
.phrase-words > .primary { margin-top: 12px; }
.phrase-check { min-height: inherit; }
.phrase-check .security-flow-header { margin-bottom: 8px; }
.phrase-question { margin-bottom: 16px; }
.phrase-question legend { font-size: 0.8125rem; font-weight: 600; padding: 0 2px; }
.phrase-option span { min-height: 52px; border-radius: 14px; padding-inline: 2px; }
.phrase-check > .primary { margin-top: auto; }
.pin-screen { justify-content: flex-start; }
.security-sheet.pin-intro { display: flex; flex-direction: column; align-items: center; margin: 0; padding: 0; background: transparent; min-height: inherit; }
.pin-intro > .security-symbol { margin-top: auto; }
.pin-intro h1 { font-size: 1.625rem; line-height: 1.3; margin: 0 0 16px; }
.pin-intro > .primary { margin-top: auto; }
.pin-intro .security-description { color: var(--text-secondary); }
.pin-entry { display: flex; flex-direction: column; width: 100%; min-height: inherit; margin: 0 auto; padding: 24px 12px 12px; }
.pin-entry > .security-symbol { display: none; }
.pin-entry h1 { font-size: 1.375rem; line-height: 1.3; margin-bottom: 12px; }
.pin-entry .security-description { font-size: 0.875rem; margin: 0 0 12px; }
.pin-dots { gap: 18px; height: 20px; align-items: center; margin: 12px 0; }
.pin-dot { width: 14px; height: 14px; border: 0; background: #33364D; }
.pin-keypad { margin-top: auto; width: 100%; gap: 16px 22px; }
.pin-key { width: 72px; height: 72px; border-radius: 50%; font-size: 1.875rem; }
.pin-entry > .text-button { align-self: center; margin-top: 4px; }
.recovery-screen .security-sheet { margin: 0; padding: 24px 16px; background: transparent; }
.recovery-screen h1 { font-size: 1.5rem; }

/* Support and operations use the same panels, tabs and message rhythm. */
.support-screen, .staff-screen, .disputes-screen, .auction-disputes-screen { padding-bottom: 16px; }
.support-screen .support-intro { align-items: flex-start; padding: 16px; border-radius: 18px; }
.support-intro p { font-size: 0.875rem; line-height: 1.45; }
.support-screen .segmented { background: transparent; padding: 0; border-radius: 0; gap: 20px; border-bottom: 1px solid var(--border); }
.support-screen .segmented button { flex: 0 1 auto; padding: 12px 0; min-height: 44px; border-radius: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 0.875rem; }
.support-screen .segmented .selected { color: var(--accent); border-bottom-color: var(--accent); }
.support-screen .detail-row { padding: 12px 0; font-size: 0.8125rem; }
.support-screen .reply-form { padding: 16px; background: var(--surface); border-radius: 18px; }
.reply-form .field { margin-top: 0; }
.support-chat { margin: 20px 0; gap: 12px; }
.message { max-width: calc(100% - 25px); padding: 12px 14px; }
.message-author { color: var(--accent); }
.message-body { line-height: 1.5; font-size: 0.875rem; margin: 8px 0; }
.message-time { display: block; font-size: .8125rem; }
.list-item { min-width: 0; min-height: 64px; padding: 14px 16px; }
.list-item > div { flex: 1; min-width: 0; }
.list-item small { font-size: .8125rem; line-height: 1.4; }
.list-chevron { flex-shrink: 0; }
.staff-screen .form-card .detail-row { font-size: 0.8125rem; padding: 12px 0; }
.form-error { overflow-wrap: anywhere; }
#notice { background: #1B1E33; border-color: #303650; font-size: 0.875rem; line-height: 1.45; }

@media (max-width: 350px) {
  .welcome-hero { width: calc(100% + 24px); margin-inline: -12px; }
  .welcome-language-overlay { inset-inline: -12px; }
  .welcome-title { font-size: 1.75rem; }
  .pin-entry { padding-inline: 0; }
  .pin-key { width: 64px; height: 64px; }
  .pin-keypad { gap: 12px 18px; }
  .phrase-grid { padding-left: 28px; gap: 0 18px; font-size: 0.8125rem; }
  .phrase-option span { font-size: .8125rem; }
}
@media (max-height: 700px) {
  .welcome-hero { min-height: 230px; height: 42dvh; }
  .security-symbol { width: 72px; height: 72px; padding: 18px; margin-bottom: 16px; }
  .pin-entry { padding-top: 12px; }
  .pin-key { width: 56px; height: 56px; font-size: 1.625rem; }
  .pin-keypad { gap: 10px 20px; }
  .phrase-grid li { padding-block: 3px; }
}
