@font-face {
    font-display: swap;
    font-family: 'Inter Tight';
    font-style: normal;
    font-weight: 400;
    src: url('/assets/fonts/inter-tight-v7-latin-regular.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Inter Tight';
    font-style: normal;
    font-weight: 500;
    src: url('/assets/fonts/inter-tight-v7-latin-500.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Inter Tight';
    font-style: normal;
    font-weight: 700;
    src: url('/assets/fonts/inter-tight-v7-latin-700.woff2') format('woff2');
}

:root {
    --bg-color: #ffffff;
    --text-primary: #000000;
    --text-secondary: #555555;
    --accent-color: #000000;
    --card-bg: rgba(255, 255, 255, 0.8);
    --destructive: #ff0000;
    --border-color: #e0e0e0;
    --border-focus: #000000;
    --success-color: #008000;

    --shadow-soft: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
    --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.08);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --font-stack: 'Inter Tight', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

img {
    pointer-events: none;
    user-drag: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

input,
textarea {
    user-select: text;
    -webkit-user-select: text;
}

body {
    font-family: var(--font-stack);
    background-color: #f8f8f8;
    /* Very light grey for contrast */
    color: var(--text-primary);
    line-height: 1.5;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulseBorder {
    0% {
        border-color: transparent;
    }

    50% {
        border-color: #000;
    }

    100% {
        border-color: transparent;
    }
}

/* Helper Utilities */
.hidden {
    display: none !important;
}

.full-width {
    width: 100%;
}

.text-success {
    color: var(--success-color);
    font-weight: 600;
}

.text-error {
    color: var(--destructive);
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.6);
    z-index: 10;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.logo-area h1 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tagline-container {
    display: inline-flex;
    align-items: stretch;
    border-radius: 6px;
    overflow: hidden;
    vertical-align: middle;
    margin-left: 0.2rem;
    font-size: 0.65rem;
    font-weight: 600;
}

.tagline-pill {
    padding: 1px 5px;
    background: #e5e5e5;
    color: #333;
    display: flex;
    align-items: center;
    letter-spacing: 0;
}

.tagline-pill.update {
    background: #000;
    color: #fff;
    cursor: pointer;
    border: none;
    font-weight: 700;
    transition: background 0.2s;
}

.tagline-pill.update:hover {
    background: #333;
}

.tagline-pill.hidden {
    display: none;
}

.nav-tabs {
    display: flex;
    gap: 0.25rem;
    background: #eee;
    padding: 3px;
    border-radius: 50px;
}

.nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nav-btn.active {
    color: white;
    background: #000;
}

/* Main Layout */
main {
    flex: 1;
    overflow-y: auto;
    position: relative;
    padding: 1rem 1.25rem 2rem 1.25rem;
}

.view-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.view-section.active {
    display: block;
}

/* --- HOME SECTION --- */

/* Top Row Layout */
.home-top-row {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 2rem;
}

/* UPI Info Card */
.upi-info-card {
    flex: 1;
    /* Takes remaining space */
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: border-color 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 0;
    /* Handled by container gap check if mobile needs it later */
}

.upi-info-card.glow-animate {
    animation: pulseBorder 1.5s ease-in-out;
}

.upi-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.payee-name {
    font-weight: 700;
    color: #000;
    margin-bottom: 0.1rem;
}

.upi-id {
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 0.9rem;
    background: #f0f0f0;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    display: inline-block;
}

/* QR Preview Card */
.qr-preview-card {
    display: flex;
    flex-direction: column;
    /* Vertical stack */
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.1s;
    min-width: 140px;
    /* Ensure enough width */
    margin-bottom: 0;
}

.qr-preview-card:active {
    transform: scale(0.98);
}

#preview-qr-container {
    width: 80px;
    /* Slightly larger maybe? */
    height: 80px;
    margin-bottom: 0.5rem;
}

#preview-qr-container svg {
    width: 100% !important;
    height: 100% !important;
}

.qr-preview-text {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.qr-preview-text svg {
    height: 1rem;
    width: 1rem;
}

/* Amount Input */
.amount-entry-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.amount-display-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    font-weight: 700;
    color: #000;
    font-family: var(--font-stack);
}

.currency-symbol {
    color: #888;
    margin-right: 2px;
    font-weight: 400;
    font-family: var(--font-stack);
}

.amount-field-container {
    border: none;
    background: transparent;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    min-width: 1ch;
    text-align: left;
    outline: none;
    letter-spacing: -1px;
    font-family: var(--font-stack);
    padding: 0;
    margin: 0;
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    overflow: visible;
}

.amount-digit {
    display: inline-block;
}

.amount-digit.anim-enter {
    animation: anim-float-down 0.2s ease-out forwards;
}

.amount-digit.anim-exit {
    animation: anim-float-up 0.2s ease-in forwards;
}

.amount-placeholder {
    color: #ddd;
    animation: fade-in 0.2s ease forwards;
}

@keyframes anim-float-down {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes anim-float-up {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--destructive);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
}

.toast.error {
    background-color: var(--destructive);
}

.toast.success {
    background-color: #22c55e;
}

.toast.anim-enter {
    animation: toast-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast.anim-exit {
    animation: toast-out 0.3s ease-in forwards;
}

@keyframes toast-in {
    0% {
        opacity: 0;
        transform: translate(-50%, -100%);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes toast-out {
    0% {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -100%);
    }
}

/* Keypad */
.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    row-gap: 10px;
    column-gap: 5px;
    position: relative;
    margin: auto;
    margin-top: 10px;
    margin-bottom: 10px;
}

.key {
    padding: 17px 0;
    font-size: 25px;
    font-weight: bold;
    text-align: center;
    background-color: #444;
    border-radius: 20px;
    transition: 0.1s ease;
    color: #fff;
    box-shadow: 0px 6px #333;
    border: none;
    font-family: var(--font-stack);
}

.key:active {
    transform: translate(0px, 6px);
    box-shadow: 0px 0px #000;
}

.key:disabled {
    pointer-events: none;
}

#key-backspace {
    font-size: 1.2rem;
    background-color: red;
    box-shadow: 0px 6px #bd0000;
}

#key-backspace:active {
    transform: translate(0px, 6px);
    box-shadow: 0px 0px #000;
}

/* --- SETTINGS SECTION --- */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    border: 1px solid transparent;
}

.settings-item:active {
    background: #f5f5f5;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.settings-group {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-soft);
}

.settings-group h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.settings-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.setting-control:last-child {
    margin-bottom: 0;
}

/* Bottom Sheet Handle */
.sheet-handle-bar {
    width: 100%;
    height: 32px;
    /* Increased touch area */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    touch-action: none;
    flex-shrink: 0;
}

.sheet-handle-pill {
    width: 40px;
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 5px;
}

/* Custom Select Component */
.custom-select {
    position: relative;
    flex: 1;
    cursor: pointer;
    font-size: 0.9rem;
    color: #000;
}

.custom-select:focus {
    outline: none;
}

.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 42px;
    padding: 0 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #f9f9f9;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.select-trigger::after {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.custom-select.open .select-trigger {
    border-color: #000;
}

.custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.custom-select.open .custom-options {
    display: block;
}

.custom-option {
    padding: 0.75rem;
    cursor: pointer;
    transition: background 0.1s;
}

.custom-option:hover {
    background: #f0f0f0;
}

.custom-option.selected {
    background: #e6f7ff;
    /* Light blue tint or similar neutral */
    font-weight: 600;
}

/* Logo Presets */
.logo-presets-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    /* Allow wrap for small screens */
}

.btn-preset-logo {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.25rem 0.5rem;
    /* Reduced padding for image */
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
}

.btn-preset-logo img {
    height: 24px;
    width: auto;
    object-fit: contain;
    display: block;
}

.btn-preset-logo:hover {
    border-color: #000;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Logo Layout Refactor */
.logo-preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Space between logo and remove btn */
    gap: 1rem;
    background: #f9f9f9;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.logo-preview-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-preview-left p {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
}

.logo-preview-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    /* Default preview radius */
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-preview-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#btn-remove-logo {
    width: 32px;
    /* Small square button */
    height: 32px;
    color: var(--destructive);
    background: rgba(255, 0, 0, 0.05);
    border-color: transparent;
    padding: 0;
}

#btn-remove-logo:hover {
    background: rgba(255, 0, 0, 0.1);
}

/* Range Slider */
input[type=range] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    cursor: pointer;
    height: 24px;
    /* Touch target */
    margin: 0;
}

input[type=range]:focus {
    outline: none;
}

/* Track */
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 6px;
    border: none;
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 6px;
    border: none;
}

/* Thumb */
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #000;
    /* Black thumb */
    margin-top: -7px;
    /* Center thumb on track (6px/2 - 20px/2) */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
}

input[type=range]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #000;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

select:focus {
    border-color: #000;
    outline: none;
}

.color-preview {
    width: 42px;
    /* Match select height */
    height: 42px;
    border-radius: 10px;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    flex-shrink: 0;
}

/* Buttons */
.logo-import-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

#logo-url-input {
    flex: 1;
    height: 38px;
    /* Fixed height matching button */
    padding: 0 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    background: #f9f9f9;
    min-width: 0;
}

#logo-url-input:focus {
    border-color: #000;
    outline: none;
    background: white;
}

.btn-sm,
.btn-primary,
.btn-secondary,
.btn-destructive {
    font-family: inherit;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

label.btn-secondary {
    display: flex;
}

.btn-sm {
    height: 38px;
    /* Fixed height */
    padding: 0 0.75rem;
    font-size: 0.8rem;
    background: #000;
    color: white;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-sm:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-icon {
    width: 100%;
    padding: 0.75rem;
    background: white;
    border: 1px solid #ddd;
    color: #000;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    /* Ensure centering */
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: #f0f0f0;
}

.btn-primary {
    background: #000;
    color: white;
    padding: 0.9rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px);
    opacity: 0.9;
}

.btn-primary:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: #000;
    border: 1px solid #000;
    padding: 0.9rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    width: 100%;
}

.btn-secondary:active:not(:disabled) {
    background: #f0f0f0;
}

.btn-destructive {
    background: transparent;
    color: var(--destructive);
    padding: 0.75rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    width: 100%;
    font-size: 0.9rem;
}

.btn-destructive:active {
    background: rgba(255, 0, 0, 0.05);
}

/* --- BOTTOM SHEETS --- */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.bottom-sheet-overlay.open {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
    padding: 1rem;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    transform: translateX(-50%) translateY(100%);
    /* Start off-screen */
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.bottom-sheet-overlay.open .bottom-sheet {
    transform: translateX(-50%) translateY(0);
    /* Slide up to center */
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.sheet-header h2 {
    font-size: 1.2rem;
    margin: 0;
    flex: 1;
    text-align: center;
}

.btn-close-sheet {
    background: #ddd;
    border: none;
    padding: 0.5rem 0 0.6rem;
    font-size: 1rem;
    cursor: pointer;
    height: 2rem;
    width: 2rem;
    color: #888;
    display: flex;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

/* Tabs */
.sheet-tabs {
    background: #f0f0f0;
    padding: 3px;
    border-radius: 12px;
    display: flex;
    margin-bottom: 1.5rem;
}

.sheet-tab {
    flex: 1;
    padding: 0.6rem;
    border-radius: 9px;
    background: transparent;
    border: none;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.sheet-tab.active {
    background: white;
    color: #000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.sheet-tab-content {
    display: none !important;
}

.sheet-tab-content.active {
    display: block !important;
    animation: fadeIn 0.2s;
}

/* Form */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.4rem;
    display: block;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus {
    border-color: #000;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

/* Scanner */
#scanner-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    background: #000;
    margin-bottom: 1rem;
}

.scan-status {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    height: 1.2em;
}

/* QR Viewer */
.qr-capture-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 25px 15px;
    background-image: url(/assets/qr-bg.webp);
    background-size: cover;
    background-repeat: no-repeat;
    gap: 5px;
    width: 100%;
    overflow: hidden;
    font-family: 'Inter Tight';
    font-weight: normal;
    box-shadow: var(--shadow-soft);
    border-radius: 15px;
}

.qr-header-info {
    gap: 3px;
    display: flex;
    font-size: 10px;
    text-align: center;
    flex-wrap: wrap;
    justify-content: center;
}

.qr-header-info span {
    text-wrap: nowrap;
}

.large-qr-container {
    padding: 10px;
    margin: 10px 10px 0;
    border: 2px solid #000;
    border-radius: 20px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
}

/* Ensure SVG scales */
.large-qr-container svg {
    width: 100%;
    height: auto;
}

.qr-context-text {
    font-size: 1.1rem;
    color: #000;
    line-height: 1.4;
}


.qr-context-text {
    font-size: 14px;
    text-align: center;
}

.qr-amount-large {
    display: block;
    font-family: 'Inter Tight';
    font-size: 40px;
    font-weight: 700;
}

.qr-payee-highlight {
    display: block;
    font-family: 'Inter Tight';
    font-size: 15px;
    font-weight: 700;
    text-wrap: balance;
}

.qr-footer {
    font-size: 9px;
    text-align: center;
    text-wrap: nowrap;
    margin-top: 10px;
}

.sheet-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: black;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Tweaks */
@media (max-width: 360px) {
    main {
        padding: 1rem 0.75rem 2rem 0.75rem;
    }

    .keypad {
        gap: 0.5rem;
    }

    .key {
        padding: 0.85rem;
        font-size: 1.25rem;
    }

    .amount-display-wrapper {
        font-size: 2.25rem;
    }

    .bottom-sheet {
        padding: 1.25rem 1rem 2rem 1rem;
    }

    .share-tool-row #btn-share-tool {
        flex: 1;
    }
}

.share-tool-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.icon-only {
    flex: 0 0 auto;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Settings Link List */
.settings-links-list {
    display: flex;
    flex-direction: column;
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.settings-link-item {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s;
    position: relative;
}

.settings-link-item:last-child {
    border-bottom: none;
}

.settings-link-item:hover {
    background: #f0f0f0;
}

.settings-link-item::after {
    content: '›';
    position: absolute;
    right: 16px;
    color: #999;
    font-size: 1.2rem;
    line-height: 1;
    top: 50%;
    transform: translateY(-50%);
}