:root {
    --page-bg: #f4f8fa;
    --page-bg-soft: #eef6f8;
    --surface: #ffffff;
    --surface-muted: #f8fbfc;
    --surface-silver: #f1f4f7;
    --line: #dbe5eb;
    --line-strong: #c9d6df;
    --text: #0b2349;
    --text-soft: #345078;
    --muted: #71839d;
    --teal: #00aeb8;
    --teal-light: #25d3c7;
    --teal-dark: #007b94;
    --green: #18b979;
    --green-light: #5ee2aa;
    --green-soft: #e8f8f1;
    --blue: #0d4c91;
    --danger: #d8434f;
    --danger-soft: #fff0f1;
    --warning: #d59b22;
    --warning-soft: #fff8e5;
    --success-soft: #e8f8ef;
    --shadow-sm: 0 6px 18px rgba(20, 59, 91, 0.08);
    --shadow: 0 14px 36px rgba(20, 59, 91, 0.11);
    --shadow-lg: 0 22px 55px rgba(20, 59, 91, 0.14);
    --gloss: linear-gradient(180deg, #2cd8cc 0%, #02b7bd 42%, #00869d 100%);
    --gloss-hover: linear-gradient(180deg, #42e2d5 0%, #08c4c5 42%, #008da4 100%);
    --silver: linear-gradient(180deg, #ffffff 0%, #f7f9fb 48%, #e4e9ee 100%);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius: 14px;
    --radius-sm: 10px;
    --mono: "Libre Franklin", ui-sans-serif, system-ui, sans-serif;
    --sans: "Libre Franklin", ui-sans-serif, system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    color-scheme: light;
    background: var(--page-bg);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: var(--sans);
    background:
        radial-gradient(circle at 10% 5%, rgba(37, 211, 199, 0.08), transparent 28rem),
        radial-gradient(circle at 92% 12%, rgba(13, 76, 145, 0.05), transparent 30rem),
        linear-gradient(180deg, #f8fbfc 0%, #f1f7f9 55%, #f7fafb 100%);
    font-weight: 400;
}

body.modal-open {
    overflow: hidden;
}

button,
input,
select {
    font: inherit;
}

button,
a,
select {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
label:focus-within {
    outline: 3px solid rgba(0, 174, 184, 0.24);
    outline-offset: 2px;
}

button:disabled,
input:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

a {
    color: var(--teal-dark);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    font-weight: 600;
    color: var(--text);
    font-size: clamp(2.2rem, 4.6vw, 4.4rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

h2 {
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text);
    font-size: clamp(1.3rem, 2vw, 1.82rem);
    line-height: 1.18;
    letter-spacing: -0.025em;
}

h3 {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text);
    font-size: 1.05rem;
}

p {
    line-height: 1.65;
}

strong {
    font-weight: 600;
}

svg {
    display: block;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.mono {
    font-family: var(--mono);
}

.muted,
.small-note {
    color: var(--muted);
}

.site-shell {
    width: 100%;
    min-height: 100vh;
}

/* Header */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    width: 100%;
    min-height: 104px;
    padding: 14px clamp(22px, 4vw, 68px);
    border-bottom: 1px solid rgba(201, 214, 223, 0.78);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 6px 25px rgba(20, 59, 91, 0.08);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 14px;
    color: var(--text);
    text-decoration: none;
}

.brand-logo {
    width: 45px;
    height: 65px;
    overflow: visible;
    filter: drop-shadow(0 7px 10px rgba(24, 185, 121, 0.16));
}

.logo-face-light { fill: #31db9b; }
.logo-face-mid { fill: #09a96e; }
.logo-face-dark { fill: #19c786; }
.logo-face-deep { fill: #078c5c; }
.logo-line { fill: rgba(255, 255, 255, 0.38); }

.brand-copy strong,
.brand-copy small {
    display: block;
    white-space: nowrap;
}

.brand-copy strong {
    font-size: 1.28rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.brand-copy small {
    margin-top: 4px;
    color: #079b68;
    font-size: 1rem;
    font-weight: 500;
}

.topbar-controls {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.header-links {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f5f8fa);
    box-shadow: var(--shadow-sm);
}

.header-links a {
    padding: 11px 15px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.header-links a:hover {
    color: var(--teal-dark);
    background: #ffffff;
    box-shadow: 0 5px 14px rgba(20, 59, 91, 0.08);
}

.node-control {
    position: relative;
    min-width: 250px;
}

.node-select-label {
    display: block;
    margin: 0 0 5px 3px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1;
}

.node-select-shell {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 250px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: inset 0 1px 0 #ffffff, 0 6px 16px rgba(20, 59, 91, 0.07);
}

.node-select-shell .status-dot {
    position: absolute;
    left: 13px;
    z-index: 1;
}

.node-select-shell select {
    width: 100%;
    min-height: 43px;
    padding: 0 36px 0 35px;
    border: 0;
    border-radius: inherit;
    color: var(--text);
    background: transparent;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
}

.custom-node-row {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 120;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 8px;
    width: min(460px, 80vw);
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow-lg);
}

.network-pill {
    display: inline-flex;
    max-width: 200px;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface-muted);
    font-size: 0.76rem;
    line-height: 1.25;
}

.status-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--warning);
    box-shadow: 0 0 0 4px rgba(213, 155, 34, 0.12);
}

.network-pill.online .status-dot,
body:has(.network-pill.online) .node-select-shell .status-dot {
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(24, 185, 121, 0.12);
}

.network-pill.offline .status-dot,
body:has(.network-pill.offline) .node-select-shell .status-dot {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(216, 67, 79, 0.1);
}

.language-control {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 5px 0 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.language-icon {
    color: var(--blue);
    font-size: 1.25rem;
    font-weight: 500;
}

.language-control select {
    min-height: 43px;
    padding: 0 26px 0 4px;
    border: 0;
    color: var(--text);
    background: transparent;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

/* Shared content */
main {
    width: min(1280px, calc(100% - 34px));
    margin-right: auto;
    margin-left: auto;
}

.card,
.auth-card {
    border: 1px solid rgba(219, 229, 235, 0.95);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
}

.eyebrow,
.card-label {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--teal-dark);
    font-size: 0.76rem;
    font-weight: 550;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Landing page */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    padding: 50px 0 76px;
}

.hero-copy {
    grid-column: 1 / -1;
    max-width: 990px;
    margin: 0 auto 4px;
    text-align: center;
}

.hero-copy h1 {
    font-size: clamp(2.5rem, 5vw, 4.65rem);
}

.hero-copy > p {
    max-width: 900px;
    margin: 0 auto 16px;
    color: var(--text-soft);
    font-size: clamp(1rem, 1.4vw, 1.17rem);
}

.knowledge-link-line {
    color: var(--muted) !important;
    font-size: 0.96rem !important;
}

.knowledge-link-line a {
    font-weight: 500;
}

.connection-overview {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.connection-overview span {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
}

.connection-overview strong {
    margin-right: 4px;
    color: var(--text);
}

.auth-stack {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    align-items: start;
}

.auth-card {
    position: relative;
    min-height: 470px;
    padding: clamp(28px, 4vw, 56px);
}

.auth-card-initial,
.open-wallet-card {
    text-align: center;
}

.auth-card-initial {
    display: flex;
    min-height: 350px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.open-wallet-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.open-wallet-card > h2 {
    text-align: center;
}

.auth-card-icon {
    display: grid;
    width: 86px;
    height: 86px;
    margin: 0 auto 24px;
    place-items: center;
    border: 1px solid rgba(0, 174, 184, 0.16);
    border-radius: 50%;
    background: linear-gradient(145deg, #eefcf8, #e6f5f8);
    box-shadow: inset 0 1px 0 #ffffff;
}

.auth-card-icon svg {
    width: 47px;
    height: 47px;
    fill: none;
    stroke: var(--green);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.open-icon svg {
    stroke: var(--blue);
}

.auth-card h2 {
    margin-bottom: 30px;
    font-size: clamp(1.65rem, 2.7vw, 2.35rem);
}

.auth-card-initial .button {
    margin-top: 18px;
}

.open-method-label {
    margin: 0 0 8px;
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
}

.tab-list {
    display: flex;
}

.open-method-tabs {
    width: 100%;
    margin-bottom: 20px;
    overflow: visible;
    filter: drop-shadow(0 6px 8px rgba(20, 59, 91, 0.10));
}

.tab-button {
    position: relative;
    display: inline-flex;
    flex: 1 1 50%;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 24px;
    border: 1px solid #c7d2dc;
    color: var(--text-soft);
    background: var(--silver);
    cursor: pointer;
    transition: filter 0.18s ease, transform 0.18s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 4px 10px rgba(20, 59, 91, 0.06);
}

.tab-button:first-child {
    z-index: 2;
    border-radius: 14px 0 0 14px;
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 100%, 0 100%);
    padding-right: 40px;
}

.tab-button:last-child {
    margin-left: -18px;
    border-radius: 0 14px 14px 0;
    clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%);
    padding-left: 42px;
}

.tab-button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.tab-button.active {
    z-index: 3;
    border-color: #008fa2;
    color: #ffffff;
    background: var(--gloss);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.42), inset 0 -3px 0 rgba(0, 64, 84, 0.22), 0 8px 16px rgba(0, 137, 157, 0.16);
    text-shadow: 0 1px 1px rgba(0, 53, 71, 0.28);
}

.tab-button:hover {
    filter: brightness(1.025);
}

.tab-button:active {
    transform: translateY(1px);
}

.tab-panel {
    display: none;
    text-align: left;
}

.tab-panel.active {
    display: block;
}

.home-seo-copy {
    grid-column: 1 / -1;
    max-width: 1050px;
    margin: 24px auto 0;
    padding: clamp(28px, 4vw, 46px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow-sm);
}

.home-seo-copy h2 {
    margin: 34px 0 12px;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.home-seo-copy h2:first-child {
    margin-top: 0;
}

.home-seo-copy p {
    margin-bottom: 15px;
    color: var(--text-soft);
}


.auth-card,
.auth-card p,
.auth-card .field-label,
.auth-card .open-method-label,
.auth-card .button,
.auth-card .tab-button,
.auth-card input,
.auth-card input::placeholder,
.auth-card .muted,
.auth-card .password-strength {
    font-size: 1rem;
    font-weight: 400;
}

.auth-card .button,
.auth-card .tab-button,
.auth-card .field-label,
.auth-card .open-method-label {
    font-size: 1rem;
    font-weight: 500;
}

.auth-card .input-with-suffix span {
    font-size: 1rem;
    font-weight: 500;
}

.auth-card-description {
    max-width: 470px;
    margin-right: auto;
    margin-left: auto;
    color: var(--text-soft);
    line-height: 1.65;
}

/* Forms and buttons */
.field-label {
    display: block;
    margin: 0 0 7px;
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 500;
}

input,
select {
    color: var(--text);
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="file"],
input:not([type]) {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgba(20, 59, 91, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input::placeholder {
    color: #a0aec0;
}

input:focus {
    border-color: rgba(0, 174, 184, 0.74);
    box-shadow: 0 0 0 4px rgba(0, 174, 184, 0.09);
}

.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.button:hover:not(:disabled) {
    filter: brightness(1.035);
    transform: translateY(-1px);
}

.button:active:not(:disabled) {
    transform: translateY(1px);
}

.button.primary {
    border-color: #008ba0;
    color: #ffffff;
    background: var(--gloss);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.34), inset 0 -3px 0 rgba(0, 63, 83, 0.18), 0 8px 18px rgba(0, 137, 157, 0.18);
    text-shadow: 0 1px 1px rgba(0, 54, 73, 0.28);
}

.button.primary:hover:not(:disabled) {
    background: var(--gloss-hover);
}

.button.secondary {
    border-color: var(--line-strong);
    color: var(--text);
    background: var(--silver);
    box-shadow: inset 0 1px 0 #ffffff, 0 5px 12px rgba(20, 59, 91, 0.07);
}

.button.full {
    width: 100%;
}

.auth-card .button.primary {
    width: min(100%, 330px);
    margin-right: auto;
    margin-left: auto;
}

.button.compact {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.82rem;
}

.input-action-row,
.secret-field,
.input-with-suffix {
    position: relative;
    display: flex;
    align-items: stretch;
}

.input-action-row input,
.secret-field input,
.input-with-suffix input {
    min-width: 0;
    flex: 1 1 auto;
}

.input-action-row input,
.secret-field input {
    padding-right: 50px;
}

.has-copy-action input {
    padding-right: 92px;
}

.icon-button,
.eye-button,
.field-copy-button {
    display: inline-grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--blue);
    background: linear-gradient(180deg, #ffffff, #f1f5f8);
    box-shadow: inset 0 1px 0 #ffffff, 0 5px 12px rgba(20, 59, 91, 0.06);
    cursor: pointer;
    text-decoration: none;
}

.icon-button:hover,
.eye-button:hover,
.field-copy-button:hover {
    border-color: #b9cbd6;
    color: var(--teal-dark);
    background: #ffffff;
}

.input-action-row > .icon-button {
    flex: 0 0 auto;
    height: 48px;
    margin-left: 8px;
}

.secret-field .eye-button,
.secret-field .field-copy-button {
    position: absolute;
    top: 50%;
    width: 36px;
    height: 36px;
    border: 0;
    box-shadow: none;
    transform: translateY(-50%);
}

.secret-field .eye-button {
    right: 5px;
}

.secret-field .field-copy-button {
    right: 43px;
}

.input-with-suffix span {
    display: inline-flex;
    min-width: 60px;
    align-items: center;
    justify-content: center;
    margin-left: -1px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 0 10px 10px 0;
    color: var(--text-soft);
    background: var(--surface-silver);
    font-size: 0.85rem;
    font-weight: 500;
}

.input-with-suffix input {
    border-radius: 10px 0 0 10px;
}

.form-grid {
    display: grid;
    gap: 14px;
}

.form-grid.two {
    grid-template-columns: 1fr 1fr;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0;
    color: var(--text-soft);
    font-size: 0.87rem;
    line-height: 1.5;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--teal);
}

.file-drop {
    display: grid;
    min-height: 122px;
    margin: 8px 0 14px;
    padding: 18px;
    place-items: center;
    border: 1.5px dashed #a9c6d0;
    border-radius: 13px;
    color: var(--muted);
    background: #f8fbfc;
    text-align: center;
    cursor: pointer;
}

.file-drop.dragging {
    border-color: var(--teal);
    background: #eefbfb;
}

.file-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.keystore-box {
    margin-top: 22px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-muted);
}

.progress {
    width: 100%;
    height: 8px;
    margin-top: 12px;
    accent-color: var(--teal);
}

.password-strength {
    min-height: 20px;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.78rem;
}

.password-invalid {
    border-color: var(--danger) !important;
    background: #fff9fa !important;
}

.password-valid {
    border-color: var(--green) !important;
    background: #fbfffd !important;
}

.password-strength.weak {
    color: var(--danger);
}

.password-strength.strong {
    color: var(--green);
}

.generated-reset-button {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text-soft);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    font-size: 1.55rem;
    cursor: pointer;
}

#generatedWalletPanel {
    text-align: left;
}

#generatedWalletPanel .field-label {
    margin-top: 12px;
}

/* Messages */
.message {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.86rem;
    line-height: 1.45;
}

.message.error {
    border-color: #f0c7cc;
    color: #9c2935;
    background: var(--danger-soft);
}

.message.warning {
    border-color: #eedda7;
    color: #8a6213;
    background: var(--warning-soft);
}

.message.success {
    border-color: #bde8d0;
    color: #16764e;
    background: var(--success-soft);
}

/* Open wallet dashboard */
.wallet-view {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
    padding: 26px 0 66px;
}

.wallet-header,
.history-card {
    grid-column: 1 / -1;
}

.dashboard-grid,
.content-grid {
    display: contents;
}

.wallet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 132px;
    padding: 24px 28px;
}

.wallet-header h2 {
    margin: 0 0 7px;
    font-size: 1rem;
    letter-spacing: 0;
}

.wallet-header .eyebrow {
    margin-bottom: 7px;
    color: var(--green);
}

.address-line {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.address-line code {
    max-width: min(760px, 65vw);
    overflow: hidden;
    color: var(--text);
    font-size: clamp(1rem, 1.55vw, 1.34rem);
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wallet-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wallet-action-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
}

.wallet-action-icon svg,
#walletPrivateInfoButton svg,
#walletQrButton svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.danger-icon {
    color: var(--danger);
}

.wallet-view > .card,
.wallet-view section.card {
    min-width: 0;
}

.balance-card,
.tokens-card,
.send-card {
    min-height: 340px;
    padding: 24px;
}

.card-heading-row,
.section-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}


.balance-card .card-label,
.tokens-card .card-label,
.send-card .card-label,
.history-card .card-label {
    color: var(--muted);
    font-size: 0.95rem;
    letter-spacing: 0;
    text-transform: none;
}

.balance-value {
    margin-top: 36px;
    color: var(--text);
    font-size: clamp(1.8rem, 3.15vw, 2.84rem);
    font-weight: 550;
    letter-spacing: -0.045em;
}

.balance-value small {
    font-size: 0.56em;
    letter-spacing: 0;
}

.usd-value {
    margin: 5px 0 14px;
    color: var(--text-soft);
    font-size: 1.05rem;
    font-weight: 500;
}

.network-details,
.fee-preview {
    display: grid;
    gap: 0;
    margin-top: 26px;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #fbfdfe;
}

.network-details > div,
.fee-preview > div {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 13px;
    border-bottom: 1px solid var(--line);
}

.network-details > div:last-child,
.fee-preview > div:last-child {
    border-bottom: 0;
}

.network-details span,
.fee-preview span {
    color: var(--muted);
    font-size: 0.78rem;
}

.network-details strong,
.fee-preview strong {
    min-width: 0;
    color: var(--text);
    font-size: 0.84rem;
    text-align: right;
    overflow-wrap: anywhere;
}

.network-details strong:last-child {
    white-space: nowrap;
}

.network-details strong > span,
.fee-preview strong > span {
    color: inherit;
    font-size: inherit;
}

.tokens-card h2,
.send-card h2,
.history-card h2 {
    margin-bottom: 20px;
    font-size: 1.28rem;
}

.loading-line,
.empty-state {
    display: grid;
    min-height: 150px;
    place-items: center;
    color: var(--muted);
    text-align: center;
}

.token-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.token-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfdfe;
}

.token-identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.token-badge {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: var(--teal-dark);
    background: #e8f8f6;
    font-weight: 850;
}

.token-identity > div,
.token-amount {
    min-width: 0;
}

.token-identity strong,
.token-identity small,
.token-amount strong,
.token-amount small {
    display: block;
}

.token-identity small,
.token-amount small {
    color: var(--muted);
    font-size: 0.74rem;
}

.token-amount {
    text-align: right;
}

.token-actions {
    display: flex;
    gap: 7px;
}

.token-explorer-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--blue);
    background: #ffffff;
    text-decoration: none;
}

.send-card .field-label {
    margin-top: 12px;
}

.amount-grid,
.gas-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.max-button,
.recommended-button {
    min-width: 92px;
}

#prepareTransactionButton {
    margin-top: 18px;
}

.transaction-result {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #bde8d0;
    border-radius: 12px;
    background: var(--success-soft);
}

.transaction-result code,
.transaction-result a,
.transaction-result strong {
    display: block;
}

.transaction-result code {
    margin: 8px 0;
    overflow-wrap: anywhere;
}

.history-card {
    padding: 24px;
}

.history-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.history-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.history-table th,
.history-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--text-soft);
    text-align: left;
    vertical-align: middle;
}

.history-table th {
    color: var(--text);
    background: #f7fafc;
    font-size: 0.75rem;
    font-weight: 550;
}

.history-table tr:last-child td {
    border-bottom: 0;
}

.history-table a {
    font-weight: 500;
    text-decoration: none;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
}

.small-note {
    margin: 16px 0 0;
    font-size: 0.76rem;
}

/* Footer */
footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 24px;
    padding: 26px 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-sm);
}

.footer-copy {
    max-width: 900px;
}

.footer-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.footer-copy p + p {
    margin-top: 5px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a {
    padding: 9px 12px;
    border-radius: 9px;
    color: var(--text-soft);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--teal-dark);
    background: #edf8f8;
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    padding: 20px;
    place-items: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 24, 47, 0.5);
    backdrop-filter: blur(5px);
}

.modal-card {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 32px 85px rgba(5, 24, 47, 0.28);
}

.private-data-modal-card {
    width: min(760px, 100%);
}

.modal-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text-soft);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    font-size: 1.35rem;
    cursor: pointer;
}

.modal-section {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-muted);
}

.receive-address {
    min-width: 0;
    flex: 1 1 auto;
    padding: 13px;
    overflow-wrap: anywhere;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: var(--text);
    background: #ffffff;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.confirm-list {
    margin: 18px 0 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.confirm-list > div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.confirm-list > div:last-child {
    border-bottom: 0;
}

.confirm-list dt {
    color: var(--muted);
}

.confirm-list dd {
    min-width: 0;
    margin: 0;
    color: var(--text);
    font-weight: 500;
    text-align: right;
    overflow-wrap: anywhere;
}

.fee-preview.two-columns {
    grid-template-columns: 1fr 1fr;
}

.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 500;
    max-width: min(420px, calc(100vw - 44px));
    padding: 13px 17px;
    border: 1px solid #9edfcc;
    border-radius: 12px;
    color: #0c6647;
    background: #effcf7;
    box-shadow: var(--shadow-lg);
    font-size: 0.86rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1220px) {
    .topbar {
        flex-wrap: wrap;
        min-height: auto;
        padding-top: 13px;
        padding-bottom: 13px;
    }

    .topbar-controls {
        flex: 1 1 720px;
    }

    .network-pill {
        display: none;
    }

    .wallet-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .send-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 920px) {
    .topbar {
        position: relative;
        align-items: flex-start;
    }

    .topbar-controls {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 10px;
    }

    .node-control {
        min-width: 0;
    }

    .node-select-shell {
        min-width: 0;
    }

    .header-links {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: center;
    }

    .language-control {
        align-self: end;
    }

    .hero,
    .auth-stack {
        grid-template-columns: 1fr;
    }

    .auth-card {
        min-height: 0;
    }

    .wallet-view {
        grid-template-columns: 1fr;
    }

    .balance-card,
    .tokens-card,
    .send-card,
    .history-card,
    .wallet-header {
        grid-column: 1;
    }

    .wallet-header {
        align-items: flex-start;
    }

    footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .topbar {
        padding: 12px 16px;
    }

    .brand-logo {
        width: 34px;
        height: 50px;
    }

    .brand-copy strong {
        font-size: 1rem;
    }

    .brand-copy small {
        font-size: 0.82rem;
    }

    .topbar-controls {
        grid-template-columns: 1fr auto;
        width: 100%;
    }

    .node-select-label {
        font-size: 0.66rem;
    }

    .header-links {
        width: 100%;
        overflow-x: auto;
    }

    .header-links a {
        flex: 1 0 auto;
        padding: 9px 11px;
        font-size: 0.78rem;
        text-align: center;
    }

    .language-control {
        padding-left: 6px;
    }

    main {
        width: min(100% - 20px, 1280px);
    }

    .hero {
        gap: 18px;
        padding: 30px 0 48px;
    }

    .hero-copy .eyebrow,
    .hero-copy > p,
    .hero-copy .knowledge-link-line,
    .connection-overview {
        display: none;
    }

    .hero-copy {
        margin-bottom: -2px;
        text-align: left;
    }

    .hero-copy h1 {
        margin-bottom: 4px;
        font-size: 2.1rem;
    }

    .auth-stack {
        gap: 16px;
    }

    .auth-card {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .auth-card-initial {
        min-height: 270px;
    }

    .auth-card-icon {
        width: 68px;
        height: 68px;
        margin-bottom: 18px;
    }

    .auth-card-icon svg {
        width: 38px;
        height: 38px;
    }

    .auth-card h2 {
        font-size: 1.55rem;
    }

    .tab-button {
        min-height: 52px;
        padding: 0 12px;
        font-size: 0.85rem;
    }

    .tab-button svg {
        width: 20px;
        height: 20px;
    }

    .tab-button:first-child {
        padding-right: 24px;
    }

    .tab-button:last-child {
        padding-left: 24px;
        margin-left: -14px;
    }

    .form-grid.two,
    .amount-grid,
    .gas-grid,
    .fee-preview.two-columns {
        grid-template-columns: 1fr;
    }

    .max-button,
    .recommended-button {
        width: 100%;
    }

    .home-seo-copy {
        padding: 22px 18px;
    }

    .wallet-view {
        gap: 14px;
        padding-top: 14px;
    }

    .wallet-header,
    .balance-card,
    .tokens-card,
    .send-card,
    .history-card {
        padding: 18px;
        border-radius: 16px;
    }

    .wallet-header {
        flex-direction: column;
    }

    .wallet-actions {
        align-self: stretch;
        justify-content: flex-end;
    }

    .address-line code {
        max-width: calc(100vw - 190px);
        font-size: 0.88rem;
    }

    .balance-card,
    .tokens-card,
    .send-card {
        min-height: 0;
    }

    .balance-value {
        margin-top: 18px;
    }

    .network-details > div,
    .fee-preview > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .network-details strong,
    .fee-preview strong {
        text-align: left;
    }

    footer {
        margin-bottom: 10px;
        padding: 20px 18px;
    }

    .footer-links {
        width: 100%;
    }

    .footer-links a {
        flex: 1 1 50%;
        text-align: center;
    }

    .modal {
        padding: 10px;
    }

    .modal-card {
        max-height: calc(100vh - 20px);
        padding: 24px 18px;
        border-radius: 16px;
    }

    .confirm-list > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .confirm-list dd {
        text-align: left;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .button {
        width: 100%;
    }
}

/* Decorative dashboard details */
.clipboard-helper {
    position: fixed !important;
    left: -9999px !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.balance-card {
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: "";
    position: absolute;
    top: 82px;
    left: 28px;
    width: 76px;
    height: 76px;
    border: 1px solid rgba(24, 185, 121, 0.14);
    border-radius: 50%;
    background: linear-gradient(145deg, #ecfbf5, #e3f5f5);
}

.balance-card::after {
    content: "";
    position: absolute;
    top: 100px;
    left: 50px;
    width: 32px;
    height: 40px;
    background: linear-gradient(135deg, #47e3aa, #079d69);
    clip-path: polygon(50% 0, 100% 50%, 50% 40%, 0 50%, 50% 0, 50% 40%, 100% 50%, 50% 100%, 0 50%, 50% 60%);
    filter: drop-shadow(0 5px 6px rgba(24, 185, 121, 0.18));
}

.balance-card .balance-value,
.balance-card .usd-value {
    margin-left: 96px;
}

#tokensEmpty::before {
    content: "";
    position: relative;
    top: 20px;
    display: block;
    width: 76px;
    height: 76px;
    margin: 0 auto 42px;
    border: 1px solid rgba(24, 185, 121, 0.14);
    border-radius: 50%;
    background:
        url('/files/img/etc-tokens-pictogram.png?v=1.7.3') center / 50px 48px no-repeat,
        linear-gradient(145deg, #ecfbf5, #e3f5f5);
}

#tokensEmpty:not(.hidden) {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 640px) {
    .balance-card::before {
        top: 72px;
        left: 18px;
        width: 62px;
        height: 62px;
    }

    #tokensEmpty::before {
        top: 0;
        width: 62px;
        height: 62px;
        margin: 0 auto 42px;
        background:
            url('/files/img/etc-tokens-pictogram.png?v=1.7.3') center / 41px 39px no-repeat,
            linear-gradient(145deg, #ecfbf5, #e3f5f5);
    }

    .balance-card::after {
        top: 87px;
        left: 36px;
        width: 27px;
        height: 33px;
    }

    .balance-card .balance-value,
    .balance-card .usd-value {
        margin-left: 76px;
    }
}

.balance-value {
    font-size: clamp(1.62rem, 2.7vw, 2.39rem);
    white-space: nowrap;
}

/* Version 1.5.1: landing-page layout matched to visual variant 2 */
.topbar-controls {
    gap: 22px;
}

.language-control {
    gap: 9px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.language-icon {
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    color: var(--blue);
    fill: currentColor;
}

.language-control select {
    min-height: 44px;
    padding: 0 28px 0 0;
    color: var(--text);
    background-color: transparent;
    font-size: 1rem;
    font-weight: 500;
}

.hero {
    gap: 26px;
    padding-top: 46px;
}

.auth-stack {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    gap: 58px;
}

.auth-card {
    min-height: 545px;
    padding: clamp(34px, 4vw, 58px);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(20, 59, 91, 0.12);
}

.auth-card-initial {
    min-height: 425px;
    justify-content: flex-start;
    padding-top: 2px;
}

.auth-card-icon {
    width: 90px;
    height: 90px;
    margin-bottom: 28px;
}

.auth-card-icon svg {
    width: 49px;
    height: 49px;
}

.auth-card h2 {
    margin-bottom: 22px;
    font-size: clamp(1.8rem, 2.7vw, 2.35rem);
}

.auth-card-description {
    max-width: 520px;
    margin: 0 auto;
    color: var(--text-soft);
    font-size: 1.02rem;
    line-height: 1.65;
    text-align: center;
}

.auth-divider {
    display: grid;
    width: min(100%, 470px);
    grid-template-columns: 1fr 28px 1fr;
    align-items: center;
    gap: 14px;
    margin: 40px auto 24px;
}

.auth-divider span {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong));
}

.auth-divider span:last-child {
    background: linear-gradient(90deg, var(--line-strong), transparent);
}

.auth-divider svg {
    width: 22px;
    height: 34px;
    margin: 0 auto;
    fill: #dce5eb;
}

.auth-card-initial .button {
    margin-top: 14px;
}

.open-wallet-card {
    min-height: 545px;
    padding-top: 43px;
}

.open-wallet-card .auth-card-icon {
    margin-bottom: 28px;
}

.open-wallet-card > h2 {
    margin-bottom: 24px;
}

.open-method-label {
    margin-bottom: 9px;
    font-size: 0.96rem;
}

.open-method-tabs {
    margin-bottom: 24px;
}

.tab-button {
    min-height: 62px;
    font-size: 1rem;
}

.tab-button svg {
    width: 27px;
    height: 27px;
}

.open-wallet-card .tab-panel .button.primary {
    margin-top: 24px;
}

.post-auth-copy {
    grid-column: 1 / -1;
    width: min(100%, 1080px);
    max-width: 1080px;
    margin: 8px auto 0;
    padding: 38px 42px;
    border: 1px solid rgba(219, 229, 235, 0.95);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.post-auth-copy h1 {
    margin-bottom: 16px;
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.post-auth-copy > p {
    max-width: 900px;
}

footer {
    align-items: center;
}

.footer-links {
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 1220px) {
    .auth-stack {
        gap: 28px;
    }

    .topbar-controls {
        gap: 14px;
    }
}

@media (max-width: 920px) {
    .auth-stack {
        grid-template-columns: 1fr;
        max-width: 720px;
    }

    .auth-card,
    .open-wallet-card {
        min-height: 0;
    }

    .auth-card-initial {
        min-height: 390px;
    }

    .language-control {
        align-self: center;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .language-icon {
        width: 22px;
        height: 22px;
    }

    .language-control select {
        min-height: 40px;
        max-width: 112px;
        font-size: 0.88rem;
    }

    .auth-card-initial {
        min-height: 330px;
    }

    .auth-card-description {
        font-size: 0.94rem;
    }

    .auth-divider {
        margin-top: 28px;
    }

    .post-auth-copy {
        padding: 28px 20px;
        text-align: left;
    }

    .post-auth-copy h1 {
        font-size: 2rem;
    }

    .footer-links a {
        flex: 1 1 calc(50% - 8px);
    }
}



.home-feature-strip {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    align-items: stretch;
    width: 100%;
    max-width: 1180px;
    margin: 8px auto 6px;
}

.home-feature-item {
    display: grid;
    grid-template-columns: 92px 1fr;
    align-items: center;
    gap: 18px;
    padding: 6px 28px 4px 0;
}

.home-feature-item + .home-feature-item {
    padding-left: 28px;
    border-left: 1px solid rgba(201, 214, 223, 0.88);
}

.home-feature-icon {
    display: grid;
    width: 80px;
    height: 80px;
    place-items: center;
    border-radius: 50%;
    color: #10a79e;
    background: #e6f7f4;
}

.home-feature-icon svg {
    width: 42px;
    height: 42px;
}

.home-feature-copy h3 {
    margin: 0 0 6px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.home-feature-copy p {
    margin: 0;
    color: var(--text-soft);
    font-size: clamp(1rem, 1.4vw, 1.17rem);
    line-height: 1.5;
}

/* Authentication typography and homepage feature strip */
.auth-card {
    font-weight: 400;
}

.auth-card :where(p, label, button, input, select, span, strong, small, .field-label, .muted, .password-strength, .file-drop, .open-method-label, .tab-button) {
    font-weight: 400;
}

.auth-card h2 {
    font-weight: 500;
}

.auth-card h3 {
    font-size: 1.12rem;
    font-weight: 500;
}

.auth-card .generated-reset-button {
    font-size: 1.55rem;
}


/* Landing layout, in-wallet node selector and full-width footer */
.post-auth-copy,
.home-seo-copy {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.post-auth-copy {
    padding: 22px 0 0;
}

.home-seo-copy {
    padding: 22px 0 0;
}

.wallet-header > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
}

.wallet-node-control {
    flex: 0 1 320px;
    min-width: 250px;
}

.wallet-node-control .node-select-shell {
    min-width: 0;
}

.wallet-node-control .custom-node-row {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
}

footer {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 26px clamp(22px, 4vw, 68px);
    border-right: 0;
    border-left: 0;
    border-radius: 0;
}

@media (max-width: 1220px) {
    .wallet-header {
        flex-wrap: wrap;
    }

    .wallet-node-control {
        flex: 1 1 300px;
    }
}

@media (max-width: 920px) {
    .topbar-controls {
        display: flex;
        width: auto;
        flex: 0 0 auto;
    }

    .wallet-node-control {
        width: min(100%, 420px);
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .wallet-node-control {
        width: 100%;
    }

    .wallet-node-control .custom-node-row {
        right: 0;
        left: auto;
        width: min(100%, calc(100vw - 56px));
        transform: none;
    }

    footer {
        padding: 20px 18px;
    }
}

.post-auth-copy .connection-overview span {
    padding: 0 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
}


@media (max-width: 920px) {
    .home-feature-strip {
        grid-template-columns: 1fr;
        gap: 18px;
        max-width: 720px;
        margin-top: 4px;
    }

    .home-feature-item,
    .home-feature-item + .home-feature-item {
        padding: 0;
        border-left: 0;
    }
}

@media (max-width: 640px) {
    .home-feature-item {
        grid-template-columns: 72px 1fr;
        gap: 14px;
    }

    .home-feature-icon {
        width: 64px;
        height: 64px;
    }

    .home-feature-icon svg {
        width: 34px;
        height: 34px;
    }

    .home-feature-copy h3 {
        font-size: 0.96rem;
    }
}


/* Version 1.5.6: compact header, language flags and dashboard title cleanup */
.topbar {
    min-height: 94px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.brand-logo {
    width: 41px;
    height: 58px;
}

.header-plain-links {
    display: inline-flex;
    align-items: center;
    gap: 26px;
}

.header-plain-links a {
    color: var(--text-soft);
    font-size: 0.94rem;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
}

.header-plain-links a:hover {
    color: var(--teal-dark);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.language-control {
    gap: 7px;
}

.language-flag {
    display: inline-block;
    flex: 0 0 auto;
    font-size: 1.35rem;
    line-height: 1;
}

.language-control select {
    padding-right: 14px;
    font-weight: 400;
}

/* Keep circular containers unchanged and enlarge only their pictograms. */
.auth-card-icon svg {
    width: 73px;
    height: 73px;
}

.home-feature-icon svg {
    width: 63px;
    height: 63px;
}

.balance-card::after {
    top: 90px;
    left: 42px;
    width: 48px;
    height: 60px;
}


.wallet-header h2 {
    margin-bottom: 3px;
    color: var(--muted);
}

.tokens-card .section-heading-row,
.history-card .section-heading-row {
    align-items: center;
}

@media (max-width: 1040px) {
    .topbar {
        flex-wrap: wrap;
    }

    .topbar-controls {
        flex-wrap: wrap;
    }

    .header-plain-links {
        order: 1;
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 640px) {
    .topbar {
        min-height: 84px;
    }

    .brand-logo {
        width: 36px;
        height: 52px;
    }

    .header-plain-links {
        gap: 16px;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .header-plain-links a {
        font-size: 0.82rem;
    }

    .language-flag {
        font-size: 1.2rem;
    }

    .home-feature-icon svg {
        width: 51px;
        height: 51px;
    }

    .auth-card-icon svg {
        width: 57px;
        height: 57px;
    }

    .balance-card::after {
        top: 78px;
        left: 29px;
        width: 41px;
        height: 50px;
    }
}


/* Adjusted pictograms and authentication width */
.auth-stack {
    max-width: 1220px;
}

/* Circular containers retain their current dimensions; only pictograms are reduced by 20%. */
.auth-card-icon svg {
    width: 58px;
    height: 58px;
}

.home-feature-icon svg {
    width: 50px;
    height: 50px;
}

.balance-card::after {
    top: 96px;
    left: 47px;
    width: 38px;
    height: 48px;
}


@media (max-width: 640px) {
    .auth-card-icon svg {
        width: 46px;
        height: 46px;
    }

    .home-feature-icon svg {
        width: 41px;
        height: 41px;
    }

    .balance-card::after {
        top: 83px;
        left: 33px;
        width: 33px;
        height: 40px;
    }
}


/* Version 1.5.8: compact authentication cards and finalized feature copy */
@media (min-width: 921px) {
    .auth-card {
        min-height: 410px;
        padding: 18px clamp(30px, 3.2vw, 46px);
    }

    .auth-card-initial {
        min-height: 374px;
        padding-top: 0;
    }

    .open-wallet-card {
        min-height: 410px;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .auth-card-icon,
    .open-wallet-card .auth-card-icon {
        margin-bottom: 14px;
    }

    .auth-card h2,
    .open-wallet-card > h2 {
        margin-bottom: 12px;
    }

    .open-method-label {
        margin-bottom: 6px;
    }

    .open-method-tabs {
        margin-bottom: 12px;
    }

    .open-wallet-card .tab-panel .button.primary {
        margin-top: 12px;
    }

    .auth-divider {
        margin-top: 20px;
        margin-bottom: 12px;
    }

    .auth-card-initial .button {
        margin-top: 6px;
    }
}


/* Version 1.5.9: language flags, balanced card height and centered action buttons */
@media (min-width: 921px) {
    .auth-card {
        min-height: 451px;
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .auth-card-initial {
        min-height: 411px;
        padding-top: 2px;
    }

    .open-wallet-card {
        min-height: 451px;
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .auth-card-icon,
    .open-wallet-card .auth-card-icon {
        margin-bottom: 17px;
    }

    .auth-card h2,
    .open-wallet-card > h2 {
        margin-bottom: 15px;
    }

    .open-method-tabs {
        margin-bottom: 15px;
    }

    .auth-divider {
        margin-top: 24px;
        margin-bottom: 15px;
    }

    .open-wallet-card .tab-panel .button.primary,
    .auth-card-initial .button {
        margin-top: 9px;
    }
}

/* Center regular action buttons without changing utility icon controls. */
.auth-card .button,
.wallet-view .button.full,
.modal-actions,
.token-modal-actions,
.history-pagination {
    justify-content: center;
}

.auth-card .button,
.wallet-view .button.full {
    margin-right: auto;
    margin-left: auto;
}

.modal-actions,
.token-modal-actions {
    justify-content: center;
}


/* Final alignment refinements for version 1.5.9. */
.language-control {
    padding-left: 10px;
}

/* Full-size action buttons are centered inside their cards. */
.button.full:not(.max-button):not(.recommended-button) {
    width: min(100%, 330px);
    margin-right: auto;
    margin-left: auto;
}

.max-button,
.recommended-button {
    justify-self: center;
}

.modal-actions {
    justify-content: center;
}

/* Version 1.6.1: balanced 22px spacing in both wallet-opening forms. */
@media (min-width: 921px) {
    .open-wallet-card .open-method-tabs {
        margin-bottom: 22px;
    }

    .open-wallet-card #tab-private .button.primary,
    .open-wallet-card #tab-keystore .button.primary {
        margin-top: 22px;
    }
}


/* Version 1.6.2: equal initial heights for create and open wallet cards. */
@media (min-width: 921px) {
    .create-wallet-card #createInitial {
        min-height: 401px;
    }
}


/* Version 1.6.3: two-row responsive header and compact mobile wallet address block. */
.wallet-header {
    position: relative;
    padding-right: 156px;
}

.wallet-actions {
    position: absolute;
    top: 20px;
    right: 20px;
}

.wallet-header > div:first-child {
    min-width: 0;
}

.address-line code {
    min-width: 0;
    flex: 1 1 auto;
}

@media (max-width: 1040px) {
    .topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 16px;
        row-gap: 8px;
        flex-wrap: nowrap;
    }

    .topbar-controls {
        display: contents;
    }

    .brand {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    .language-control {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .header-plain-links {
        grid-column: 1 / -1;
        grid-row: 2;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 16px;
        justify-content: stretch;
        overflow: visible;
    }

    .header-plain-links a {
        min-width: 0;
        text-align: center;
        white-space: normal;
    }
}

@media (max-width: 920px) {
    .wallet-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 14px;
        min-height: 0;
        padding: 18px 140px 18px 20px;
    }

    .wallet-node-control {
        width: 100%;
        max-width: 430px;
    }
}

@media (max-width: 640px) {
    .topbar {
        min-height: 0;
        padding: 10px 14px 11px;
        column-gap: 8px;
        row-gap: 7px;
    }

    .brand {
        gap: 8px;
    }

    .brand-logo {
        width: 30px;
        height: 44px;
    }

    .brand-copy strong {
        font-size: 0.92rem;
        line-height: 1.05;
    }

    .brand-copy small {
        margin-top: 2px;
        font-size: 0.76rem;
    }

    .language-control {
        max-width: 122px;
        padding: 0 3px 0 5px;
    }

    .language-control select {
        min-width: 0;
        width: 116px;
        max-width: 116px;
        min-height: 38px;
        padding-right: 8px;
        padding-left: 2px;
        font-size: 0.78rem;
    }

    .header-plain-links {
        gap: 10px;
    }

    .header-plain-links a {
        padding: 2px 0;
        font-size: 0.78rem;
        line-height: 1.25;
    }

    .wallet-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        min-height: 0;
        padding: 12px 12px 14px;
    }

    .wallet-actions {
        top: 10px;
        right: 10px;
        gap: 7px;
    }

    .wallet-action-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .wallet-action-icon svg {
        width: 18px;
        height: 18px;
    }

    .wallet-header > div:first-child {
        padding-top: 44px;
    }

    .wallet-header h2 {
        margin: 0 0 2px;
        font-size: 0.86rem;
        line-height: 1.15;
    }

    .address-line {
        width: 100%;
        gap: 5px;
    }

    .address-line code {
        max-width: none;
        min-width: 0;
        flex: 1 1 auto;
        font-size: 0.94rem;
    }

    .address-line .icon-button {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
        border-radius: 9px;
    }

    .wallet-node-control {
        width: 100%;
        max-width: none;
    }

    .wallet-node-control .node-select-label {
        margin-bottom: 3px;
        font-size: 0.65rem;
    }

    .wallet-node-control .node-select-shell,
    .wallet-node-control .node-select-shell select {
        min-height: 40px;
    }
}

@media (max-width: 360px) {
    .topbar {
        padding-right: 10px;
        padding-left: 10px;
    }

    .brand-logo {
        width: 27px;
        height: 40px;
    }

    .brand-copy strong {
        font-size: 0.84rem;
    }

    .brand-copy small {
        font-size: 0.7rem;
    }

    .language-control select {
        width: 108px;
        max-width: 108px;
        font-size: 0.74rem;
    }
}


/* Version 1.6.4: keep address utility buttons next to the wallet address. */
.address-line {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    gap: 8px;
}

.address-line code {
    flex: 0 1 auto;
    max-width: calc(100% - 132px);
}

.address-line .icon-button {
    flex: 0 0 auto;
}


/* Version 1.6.6: uploaded ETC artwork for the header and balance icon. */
.brand-logo {
    object-fit: contain;
}

.balance-card::after {
    top: 94px;
    left: 48px;
    width: 38px;
    height: 52px;
    background: url('/files/img/etc-logo.svg?v=1.7.3') center / contain no-repeat;
    clip-path: none;
    filter: drop-shadow(0 5px 6px rgba(24, 185, 121, 0.18));
}

@media (max-width: 640px) {
    .balance-card::after {
        top: 76px;
        left: 38px;
        width: 32px;
        height: 44px;
    }
}

/* Version 1.6.8: ETC tokens empty-state text spacing adjusted. */

/* Version 1.6.9: desktop ETC tokens pictogram lowered to align with Available balance. */


/* Version 1.7.0: browser-independent SVG flags in the language menu. */
.language-control {
    position: relative;
    display: inline-flex;
    max-width: none;
    padding: 0;
}

.language-menu {
    position: relative;
}

.language-menu summary {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    gap: 8px;
    padding: 0 8px 0 10px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 400;
    list-style: none;
    white-space: nowrap;
    cursor: pointer;
}

.language-menu summary::-webkit-details-marker {
    display: none;
}

.language-flag-image,
.language-menu-options img {
    display: block;
    width: 24px;
    height: 15px;
    flex: 0 0 auto;
    border: 1px solid rgba(11, 35, 73, 0.14);
    border-radius: 2px;
    object-fit: cover;
}

.language-menu-arrow {
    width: 7px;
    height: 7px;
    margin-left: 1px;
    border-right: 1.5px solid var(--text-soft);
    border-bottom: 1.5px solid var(--text-soft);
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.16s ease;
}

.language-menu[open] .language-menu-arrow {
    transform: translateY(2px) rotate(225deg);
}

.language-menu-options {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 160;
    display: grid;
    min-width: 146px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
}

.language-menu-options a {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 36px;
    padding: 6px 8px;
    border-radius: 7px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
}

.language-menu-options a:hover,
.language-menu-options a:focus-visible,
.language-menu-options a[aria-current="page"] {
    color: var(--teal-dark);
    background: var(--surface-muted);
}

@media (max-width: 640px) {
    .language-control {
        max-width: none;
        padding: 0;
    }

    .language-menu summary {
        min-height: 38px;
        gap: 6px;
        padding: 0 5px;
        font-size: 0.78rem;
    }

    .language-flag-image,
    .language-menu-options img {
        width: 21px;
        height: 13px;
    }

    .language-menu-options {
        min-width: 132px;
    }

    .language-menu-options a {
        font-size: 0.82rem;
    }
}

@media (max-width: 360px) {
    .language-menu summary {
        font-size: 0.74rem;
    }
}

/* Version 1.7.1: two-decimal ETC balance display and token-list spacing. */

/* Version 1.7.2: balance font reduced by 10% and USD value color matched to section label gray. */


/* Version 1.7.3: wallet address QR modal. */
.wallet-qr-modal-card {
    width: min(440px, calc(100vw - 32px));
    text-align: center;
}

.wallet-qr-code {
    display: grid;
    margin: 24px auto 0;
    place-items: center;
}

.wallet-qr-code svg {
    display: block;
    width: min(280px, 76vw);
    height: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.wallet-qr-address {
    display: block;
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfdfe;
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}
