:root {
    --green-800: #076d5f;
    --green-700: #087f6d;
    --green-600: #009688;
    --green-500: #12b76a;
    --green-100: #dff8ed;
    --green-50: #effbf6;
    --ink-900: #173b35;
    --ink-700: #365b55;
    --ink-500: #6b817d;
    --line: #dceae5;
    --page: #f3f7fb;
    --danger: #df4f55;
    --shadow: 0 16px 44px rgba(31, 67, 62, 0.09);
    --font-min: .875rem;
}

* { box-sizing: border-box; }

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 12% 0%, rgba(18, 183, 106, 0.09), transparent 30rem),
        var(--page);
    color: var(--ink-900);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    line-height: 1.55;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
small { font-size: var(--font-min); }
[hidden], .hidden-input { display: none !important; }

.app-shell {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    width: min(1280px, calc(100% - 36px));
    margin: 20px auto;
    gap: 24px;
}

.app-content { min-width: 0; }

.tool-rail {
    position: sticky;
    top: 20px;
    align-self: start;
    padding: 18px 14px;
    border: 1px solid rgba(220, 234, 229, 0.85);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.rail-nav { display: grid; gap: 14px; }

.rail-item {
    display: grid;
    width: 100%;
    min-height: 92px;
    place-items: center;
    padding: 12px 7px;
    border: 0;
    border-radius: 20px;
    background: #f6f8f8;
    color: #58706c;
    text-align: center;
    text-decoration: none;
    gap: 7px;
    transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.rail-item svg {
    width: 31px;
    height: 31px;
}

.rail-item span {
    font-size: var(--font-min);
    font-weight: 650;
}

.rail-item:hover {
    color: var(--green-700);
    transform: translateY(-2px);
}

.rail-item[aria-current="page"] {
    background: linear-gradient(155deg, #4cc69c, #00a86b);
    box-shadow: 0 12px 24px rgba(0, 168, 107, .22);
    color: #fff;
}

.rail-more { position: relative; }

.rail-menu-popover {
    position: absolute;
    z-index: 100;
    top: 18px;
    left: calc(100% + 12px);
    display: grid;
    width: 340px;
    max-height: calc(100vh - 40px);
    padding: 16px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 22px 65px rgba(22, 52, 47, .18);
    gap: 8px;
}

.rail-menu-title {
    padding: 2px 5px 8px;
    color: var(--ink-700);
    font-size: var(--font-min);
}

.rail-menu-link {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    text-decoration: none;
    gap: 10px;
}

.rail-menu-link:hover,
.rail-menu-link[aria-current="page"] { background: var(--green-50); }

.rail-menu-link svg {
    width: 25px;
    height: 25px;
    color: var(--green-700);
}

.rail-menu-copy { display: grid; min-width: 0; }
.rail-menu-copy strong { font-size: var(--font-min); }
.rail-menu-copy small { color: var(--ink-500); font-size: var(--font-min); }

.workspace {
    display: grid;
    min-width: 0;
    gap: 18px;
}

.compact-intro,
.panel {
    border: 1px solid rgba(220, 234, 229, .95);
    border-radius: 22px;
    background: rgba(255, 255, 255, .95);
    box-shadow: var(--shadow);
}

.compact-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 118px;
    padding: 19px 26px;
    background: linear-gradient(120deg, #fff, #effbf6);
    gap: 24px;
}

.eyebrow {
    margin: 0 0 1px;
    color: var(--green-700);
    font-size: var(--font-min);
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.compact-intro h1,
.converter-header h1 {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    line-height: 1.2;
}

.compact-intro p,
.converter-header p { margin: 5px 0 0; color: var(--ink-500); font-size: var(--font-min); }

.privacy-strip {
    display: flex;
    align-items: center;
    max-width: 475px;
    padding: 9px 12px;
    border: 1px solid rgba(0, 150, 136, .18);
    border-radius: 11px;
    background: rgba(255, 255, 255, .76);
    color: var(--ink-700);
    font-size: var(--font-min);
    gap: 8px;
}

.privacy-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green-500);
    box-shadow: 0 0 0 4px rgba(18, 183, 106, .12);
}

.panel { padding: 24px; }

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 16px;
}

.panel-heading h2,
.panel-heading p { margin: 0; }
.panel-heading h2 { font-size: 1rem; }
.panel-heading p { margin-top: 3px; color: var(--ink-500); font-size: var(--font-min); }
.compact-heading { margin-bottom: 16px; }

.auth-primary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(330px, .78fr);
    gap: 18px;
}

.auth-entry-panel { min-width: 0; }

.field-label {
    display: block;
    margin-bottom: 7px;
    color: var(--ink-700);
    font-size: var(--font-min);
    font-weight: 760;
}

.secret-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid var(--green-500);
    border-radius: 12px;
    background: #f9fcfc;
}

.secret-composer:focus-within {
    border-color: var(--green-600);
    box-shadow: 0 0 0 3px rgba(0, 150, 136, .09);
}

.secret-composer input {
    min-width: 0;
    height: 52px;
    padding: 0 15px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink-900);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: var(--font-min);
    font-weight: 700;
}

.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--green-700);
    font-size: var(--font-min);
    font-weight: 760;
    gap: 7px;
}

.ghost-button:hover { background: var(--green-50); }

.button-icon {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.field-help,
.converter-note {
    margin: 7px 0 0;
    color: var(--ink-500);
    font-size: var(--font-min);
}

.action-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 17px;
    gap: 8px;
}

.secondary-actions {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 6px;
}

.local-js-note {
    align-self: flex-end;
    margin-bottom: 2px;
    color: var(--ink-500);
    font-size: var(--font-min);
    white-space: nowrap;
}

.primary-button,
.secondary-button,
.danger-button,
.history-action,
.dashboard-actions button {
    border: 0;
    border-radius: 10px;
    font-weight: 750;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.primary-button {
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--green-600), var(--green-500));
    color: #fff;
}

.secondary-button {
    padding: 7px 10px;
    border-radius: 8px;
    background: var(--green-50);
    color: var(--green-700);
    font-size: var(--font-min);
}

.danger-button {
    padding: 8px 11px;
    background: #fff0f1;
    color: var(--danger);
    font-size: var(--font-min);
}

button:disabled { cursor: not-allowed; opacity: .48; }

.otp-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    align-content: center;
    min-width: 0;
    padding: 25px;
    border-radius: 22px;
    background: linear-gradient(145deg, #124d45, #087565);
    box-shadow: var(--shadow);
    color: #fff;
    gap: 18px;
}

.otp-label { color: rgba(255, 255, 255, .69); font-size: var(--font-min); font-weight: 700; }
.otp-code {
    display: block;
    margin-top: 7px;
    color: #fff;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: clamp(2rem, 5vw, 3.15rem);
    font-weight: 800;
    letter-spacing: .13em;
    line-height: 1.05;
}

.otp-secret-hint {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, .62);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: var(--font-min);
}

.countdown {
    --progress: 360deg;
    position: relative;
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    align-self: center;
    border-radius: 50%;
    background: conic-gradient(#5ce0a2 var(--progress), rgba(255, 255, 255, .14) 0);
}

.countdown::before {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #15574d;
    content: "";
}

.countdown span { position: relative; z-index: 1; font-weight: 850; }

.countdown.is-urgent {
    background: conic-gradient(#ff6b72 var(--progress), rgba(255, 255, 255, .14) 0);
    color: #ffb2b6;
    animation: urgentPulse .75s ease-in-out infinite alternate;
}

.dashboard-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .14);
    gap: 9px;
}

.dashboard-actions button {
    padding: 7px 10px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: var(--font-min);
}

.history-heading { margin-bottom: 15px; }
.history-summary { display: flex; align-items: center; gap: 10px; }
.history-summary small { color: var(--ink-500); }

.history-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 10px;
}

.history-empty {
    grid-column: 1 / -1;
    padding: 28px 12px;
    border: 1px dashed var(--line);
    border-radius: 13px;
    color: var(--ink-500);
    text-align: center;
    font-size: var(--font-min);
}

.history-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fbfefd;
    gap: 9px;
}

.history-item strong,
.history-secret,
.history-item time { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item strong { font-size: var(--font-min); }
.history-name.is-empty { color: #a66a13; }
.history-secret { margin-top: 3px; color: var(--ink-500); font-family: "SFMono-Regular", Consolas, monospace; font-size: var(--font-min); }
.history-item time { margin-top: 3px; color: var(--ink-500); font-size: var(--font-min); }
.history-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.history-action {
    position: relative;
    display: inline-grid;
    width: 35px;
    height: 35px;
    padding: 0;
    place-items: center;
    background: var(--green-50);
    color: var(--green-700);
}
.history-action .button-icon { width: 16px; height: 16px; }
.history-action::after {
    position: absolute;
    z-index: 30;
    bottom: calc(100% + 8px);
    left: 50%;
    padding: 6px 9px;
    border-radius: 7px;
    background: #173b35;
    box-shadow: 0 6px 18px rgba(23, 59, 53, .18);
    color: #fff;
    content: attr(data-tooltip);
    font-size: var(--font-min);
    font-weight: 650;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 4px);
    transition: opacity .16s ease, transform .16s ease;
    white-space: nowrap;
}
.history-action:hover::after,
.history-action:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}
.history-action.open { background: #e8f8f3; }
.history-action.share { background: #eef6f4; }
.history-action.edit { background: #f2f5f4; color: var(--ink-700); }
.history-action.delete { background: #fff0f1; color: var(--danger); }

.tool-details { padding: 0; overflow: hidden; }
.tool-details summary { padding: 14px 20px; color: var(--ink-700); cursor: pointer; font-size: var(--font-min); font-weight: 750; }
.details-grid { padding: 0 20px 18px; }
.details-grid p { margin: 0; color: var(--ink-500); font-size: var(--font-min); line-height: 1.75; }
.details-grid p + p { margin-top: 4px; }
.details-grid code { font-family: Consolas, monospace; color: var(--green-700); }
.details-grid a { color: #1769e0; overflow-wrap: anywhere; }
.inline-copy-button { padding: 0; border: 0; background: transparent; color: var(--green-700); font-family: Consolas, monospace; font-size: inherit; cursor: pointer; }
.inline-copy-button:hover { text-decoration: underline; }

.converter-workspace { min-height: calc(100vh - 80px); }
.converter-tool { padding: 32px 36px; }
.converter-header { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.conversion-summary { margin: 17px 0 14px; color: var(--ink-900); font-size: 1rem; font-weight: 800; }

.converter-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.converter-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 145px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #f8fafb;
}

.converter-field:focus-within { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(0, 150, 136, .08); }
.converter-field input,
.converter-field select { height: 58px; border: 0; outline: 0; background: transparent; color: var(--ink-900); }
.converter-field input { min-width: 0; padding: 0 15px; font-size: .92rem; }
.converter-field select { min-width: 0; padding: 0 12px; border-left: 1px solid var(--line); color: var(--ink-700); font-size: var(--font-min); }

.swap-button {
    display: grid;
    width: 44px;
    height: 44px;
    place-self: center;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--green-700);
    font-size: 1.15rem;
}

.converter-error { min-height: 20px; margin: 4px 0 0; color: var(--danger); font-size: var(--font-min); }
.results-heading { display: flex; align-items: baseline; margin: 22px 0 7px; padding-bottom: 7px; border-bottom: 1px solid var(--line); gap: 8px; }
.results-heading h2 { margin: 0; color: var(--ink-700); font-size: var(--font-min); }
.results-heading span { color: var(--ink-500); font-size: var(--font-min); }
.results-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 20px; }

.result-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-width: 0;
    padding: 9px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--ink-900);
    text-align: left;
    gap: 8px;
}

.result-card:hover { color: var(--green-700); }
.result-value { overflow: hidden; font-size: var(--font-min); font-weight: 760; text-overflow: ellipsis; white-space: nowrap; }
.result-unit { color: var(--ink-500); font-size: var(--font-min); white-space: nowrap; }
.converter-note { margin-top: 22px; }

.site-footer {
    display: flex;
    justify-content: center;
    padding: 13px 0 0;
    color: #8a9b98;
    font-size: var(--font-min);
    gap: 14px;
}
.site-footer a { color: var(--green-700); text-decoration: none; }

.modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(12, 36, 32, .58);
    backdrop-filter: blur(8px);
}
.modal.is-open { display: flex; }
.modal-card { width: min(390px, 100%); padding: 23px; border-radius: 20px; background: #fff; box-shadow: 0 24px 70px rgba(12, 36, 32, .28); text-align: center; }
.modal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-top h2 { margin: 0; font-size: .95rem; }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 10px; background: var(--green-50); color: var(--ink-700); font-size: 1.15rem; }
#auth-qr-output img, #auth-qr-output canvas { max-width: 100%; height: auto; margin: auto; }
.history-edit-card { text-align: left; }
.modal-input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #fbfefd; }
.modal-input:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(0, 150, 136, .09); }
.history-edit-secret { margin: 8px 0 17px; color: var(--ink-500); font-family: Consolas, monospace; font-size: var(--font-min); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

.toast-region { position: fixed; z-index: 1200; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { padding: 10px 14px; border-radius: 11px; background: #123f38; box-shadow: var(--shadow); color: #fff; font-size: var(--font-min); opacity: 0; transform: translateY(8px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

.share-page { padding: 28px 18px; }
.share-shell { display: grid; width: min(860px, 100%); margin: 0 auto; gap: 18px; }
.share-intro { min-height: 128px; }
.share-brand { display: inline-flex; align-items: center; margin-bottom: 10px; color: var(--green-700); font-size: var(--font-min); font-weight: 800; text-decoration: none; gap: 8px; }
.share-brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: linear-gradient(145deg, #42c99a, #00a86b); color: #fff; box-shadow: 0 8px 18px rgba(0, 168, 107, .18); }
.share-brand-mark svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.share-card { width: 100%; }
.share-card-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 16px; }
.share-card-heading h2 { margin: 0; font-size: 1rem; }
.share-card-heading p { margin: 4px 0 0; color: var(--ink-500); font-size: var(--font-min); }
.share-live-badge { display: inline-flex; align-items: center; padding: 7px 10px; border-radius: 999px; background: var(--green-50); color: var(--green-700); font-size: var(--font-min); font-weight: 750; white-space: nowrap; gap: 7px; }
.share-live-badge .share-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); box-shadow: 0 0 0 4px rgba(18, 183, 106, .12); }
.share-code-panel { padding: 28px; border-radius: 20px; background: linear-gradient(145deg, #124d45, #087565); box-shadow: var(--shadow); color: #fff; }
.share-code-top { display: grid; grid-template-columns: minmax(0, 1fr) 78px; align-items: center; gap: 22px; }
.share-code-panel .otp-label { color: rgba(255, 255, 255, .72); }
.share-code { display: block; margin: 8px 0; color: #fff; font-family: Consolas, monospace; font-size: clamp(2.6rem, 9vw, 4rem); font-weight: 850; letter-spacing: .13em; line-height: 1.08; cursor: pointer; }
.share-secret { margin: 0; color: rgba(255, 255, 255, .66); font-family: Consolas, monospace; font-size: var(--font-min); }
.share-countdown { --progress: 360deg; position: relative; display: grid; width: 78px; height: 78px; place-items: center; border-radius: 50%; background: conic-gradient(#5ce0a2 var(--progress), rgba(255, 255, 255, .14) 0); color: #fff; }
.share-countdown::before { position: absolute; width: 62px; height: 62px; border-radius: 50%; background: #15574d; content: ""; }
.share-countdown span, .share-countdown small { position: relative; z-index: 1; grid-area: 1 / 1; }
.share-countdown span { margin-top: -12px; font-size: 1.08rem; font-weight: 850; }
.share-countdown small { align-self: end; margin-bottom: 11px; color: rgba(255, 255, 255, .68); }
.share-countdown.is-urgent { background: conic-gradient(#ff6b72 var(--progress), rgba(255, 255, 255, .14) 0); color: #ffb2b6; animation: urgentPulse .75s ease-in-out infinite alternate; }
.share-actions { display: flex; align-items: center; margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); gap: 9px; }
.share-copy { background: #fff; color: var(--green-800); }
.share-back { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, .1); color: #fff; font-size: var(--font-min); font-weight: 750; text-decoration: none; gap: 5px; }
.share-back .button-icon { width: 14px; height: 14px; }
.share-status { min-height: 22px; margin: 12px 0 0; color: rgba(255, 255, 255, .72); font-size: var(--font-min); }
.share-security-note { display: flex; align-items: flex-start; margin-top: 16px; padding: 13px 15px; border: 1px solid rgba(0, 150, 136, .15); border-radius: 12px; background: var(--green-50); color: var(--ink-700); gap: 10px; }
.share-security-note svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; fill: none; stroke: var(--green-700); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.share-security-note p { margin: 0; font-size: var(--font-min); }

@keyframes urgentPulse {
    from { transform: scale(1); filter: drop-shadow(0 0 0 rgba(223, 79, 85, 0)); }
    to { transform: scale(1.08); filter: drop-shadow(0 0 8px rgba(223, 79, 85, .45)); }
}

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 104px minmax(0, 1fr); gap: 16px; }
    .tool-rail { padding: 14px 11px; }
    .rail-item { min-height: 78px; border-radius: 17px; }
    .rail-item svg { width: 27px; height: 27px; }
    .auth-primary-grid { grid-template-columns: 1fr; }
    .details-grid { grid-template-columns: 1fr; }
    .converter-field { grid-template-columns: minmax(0, 1fr) 122px; }
}

@media (max-width: 720px) {
    .app-shell { display: block; width: min(100% - 22px, 1280px); margin: 11px auto; }
    .tool-rail { position: sticky; z-index: 80; top: 8px; margin-bottom: 12px; padding: 8px; border-radius: 16px; }
    .rail-nav { display: flex; overflow-x: auto; gap: 7px; scrollbar-width: none; }
    .rail-nav::-webkit-scrollbar { display: none; }
    .rail-item { flex: 0 0 82px; min-height: 64px; padding: 7px 5px; border-radius: 13px; }
    .rail-item svg { width: 23px; height: 23px; }
    .rail-item span { font-size: var(--font-min); }
    .rail-menu-popover { position: fixed; top: 86px; right: 11px; left: 11px; width: auto; max-height: calc(100vh - 100px); }
    .compact-intro { display: block; min-height: 0; padding: 18px 20px; }
    .privacy-strip { margin-top: 12px; max-width: none; }
    .panel, .converter-tool { padding: 20px; border-radius: 18px; }
    .converter-controls { grid-template-columns: 1fr; }
    .swap-button { transform: rotate(90deg); }
    .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-footer { padding-bottom: 14px; }
}

@media (max-width: 500px) {
    .secret-composer { grid-template-columns: minmax(0, 1fr) 58px; }
    .ghost-button { overflow: hidden; padding: 0; gap: 4px; }
    .ghost-button .load-label { display: none; }
    .action-row { display: grid; grid-template-columns: 1fr; }
    .action-row .primary-button { width: 100%; }
    .local-js-note { margin: -2px 0 0; text-align: left; }
    .secondary-actions { display: grid; grid-template-columns: 1fr 1fr; margin-left: 0; }
    .otp-dashboard { grid-template-columns: minmax(0, 1fr) 66px; padding: 20px; }
    .countdown { width: 66px; height: 66px; }
    .countdown::before { width: 52px; height: 52px; }
    .history-heading { align-items: flex-start; }
    .history-summary { display: grid; justify-items: end; }
    .history-list { grid-template-columns: 1fr; }
    .history-item { grid-template-columns: 1fr; }
    .history-actions { justify-content: flex-end; }
    .converter-field { grid-template-columns: minmax(0, 1fr) 115px; }
    .results-grid { grid-template-columns: 1fr; }
    .share-page { padding: 12px; }
    .share-shell { gap: 12px; }
    .share-card { padding: 20px; }
    .share-card-heading { align-items: flex-start; }
    .share-live-badge { display: none; }
    .share-code-panel { padding: 22px 20px; }
    .share-code-top { grid-template-columns: minmax(0, 1fr) 68px; gap: 12px; }
    .share-code { font-size: clamp(2rem, 12vw, 3rem); letter-spacing: .09em; }
    .share-countdown { width: 68px; height: 68px; }
    .share-countdown::before { width: 54px; height: 54px; }
    .share-countdown small { margin-bottom: 8px; }
    .share-actions { display: flex; }
    .share-copy, .share-back { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
