@font-face {
    font-family: "FT Kunst Grotesk";
    src: url("/font/FTKunstGroteskTrial-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "FT Kunst Grotesk";
    src: url("/font/FTKunstGroteskTrial-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Apercu Mono Pro";
    src: url("/font/ApercuMonoPro.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
:root {
    --bg: #140400;
    --bg-secondary: #1a0800;
    --bg-tertiary: #2a1000;
    --text: #fffbf5;
    --text-dim: #ebd5c1;
    --text-tertiary: #b8967a;
    --accent: #ff4801;
    --accent-hover: #d93e00;
    --accent-light: #ff7038;
    --border: #5c3a20;
    --border-hover: #4a2a10;
    --success: oklch(72.3% .219 149.579);
    --error: oklch(63.7% .237 25.331);
    --input-bg: transparent;
    --input-bg-focus: #1a0800;
    --modal-bg: #140400;
    --modal-header-bg: #1a0800;
    --modal-footer-bg: #1a0800;
    --z-footer: 10;
    --z-nav: 1000;
    --z-modal: 2000;
    --z-mask: 9999;
    --tracking-base: 0.5px;
    --tracking-wide: 1px;
    --tracking-wider: 2px;
}
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html,
body {
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    font-family: "FT Kunst Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    touch-action: pan-y;
    letter-spacing: var(--tracking-base);
}
body {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg);
    color: var(--text);
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}
::-webkit-scrollbar-corner {
    background: transparent;
}
::-webkit-resizer {
    background: transparent;
}
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
    ::-webkit-scrollbar-track {
        background: transparent;
    }
    ::-webkit-scrollbar-thumb {
        background: rgba(235, 213, 193, 0.2);
        border-radius: 4px;
    }
}
.bg-circle {
    display: none;
}
.main-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    position: relative;
    min-height: 100dvh;
    gap: 2rem;
    padding-bottom: 10vh;
}
.logo-title {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    font-size: clamp(32px, 8vw, 56px);
    font-weight: 700;
    color: var(--text);
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s ease-out, visibility 1.2s;
    text-align: center;
    white-space: nowrap;
    line-height: 1.1;
    letter-spacing: -0.02em;
    -webkit-user-select: none;
    user-select: none;
    width: fit-content;
    will-change: opacity, visibility;
}
.logo-title.show {
    opacity: 1;
    visibility: visible;
}
.logo-title.hide {
    opacity: 0;
    visibility: hidden;
}
.logo-title .txt-emoji {
    display: inline-block;
}
.input-group {
    width: 100%;
    max-width: 440px;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    transform: translateY(-20px);
    will-change: transform, opacity;
    background: transparent;
    padding: 2.5rem 0;
}
.input-group.active {
    display: flex;
    animation: fadeUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
input,
button,
textarea,
select {
    font-family: "FT Kunst Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    -webkit-appearance: none;
    appearance: none;
}
input,
button {
    width: 100%;
    height: 56px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: manipulation;
}
#token-input {
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text);
    text-align: center;
    outline: none;
    font-size: 1.1rem;
    letter-spacing: var(--tracking-wider);
    padding-left: 24px;
    padding-right: 48px;
}
#token-input:focus {
    background: var(--input-bg-focus);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px #ff48014d;
}
#token-input.valid {
    border-color: var(--success);
}
#token-input.invalid {
    border-color: var(--error);
    animation: shake 0.4s ease-in-out;
}
@keyframes btnErrorShake {
    0%, 100% { transform: translateX(0) translateY(0); }
    20% { transform: translateX(-5px) translateY(0); }
    40% { transform: translateX(5px) translateY(0); }
    60% { transform: translateX(-3px) translateY(0); }
    80% { transform: translateX(3px) translateY(0); }
}
#copy-btn,
#node-btn {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    width: 100%;
    height: 0;
    margin-bottom: 0;
    border: none;
    overflow: hidden;
    background: var(--accent-hover);
    color: var(--text);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: var(--tracking-wide);
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 2px 8px #ff48014d;
    will-change: transform, opacity;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#copy-btn.visible,
#node-btn.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    height: 56px;
}
#copy-btn:hover,
#node-btn:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px #ff480166;
}
#copy-btn:active,
#node-btn:active {
    transform: translateY(0) scale(0.98);
}
#copy-btn:disabled,
#node-btn:disabled {
    background: var(--border);
    color: var(--text-tertiary);
    cursor: not-allowed;
}
#copy-btn.btn-success,
#node-btn.btn-success {
    background: var(--success);
    color: var(--bg);
}
#copy-btn.btn-error,
#node-btn.btn-error {
    background: var(--error);
    color: var(--text);
    animation: btnErrorShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
.top-nav {
    position: fixed;
    top: calc(0.5rem + env(safe-area-inset-top));
    left: calc(1.5rem + env(safe-area-inset-left));
    right: calc(1.5rem + env(safe-area-inset-right));
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: var(--z-nav);
    padding: 6px 14px;
}
.nav-left {
    display: flex;
    align-items: center;
}
.home-link {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.home-icon {
    height: 80px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    border-radius: 6px;
}
.nav-right {
    display: flex;
    gap: 6px;
}
.nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 1.15rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-btn:hover {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}
.nav-btn:active {
    transform: scale(0.95);
}
.nav-btn i {
    color: inherit;
}
.footer {
    position: fixed;
    bottom: calc(0.5rem + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 20px;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: var(--z-footer);
    white-space: nowrap;
}
.footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
}
.footer a:hover {
    color: var(--accent-hover);
}
.status-dot {
    font-size: 8px;
    color: var(--border-hover);
    transition: color 0.3s ease;
}
.status-dot.online {
    color: var(--success);
    animation: status-breathe 2.5s infinite ease-in-out;
}
.status-dot.offline {
    color: var(--error);
}
@keyframes status-breathe {
    0%, 100% {
        opacity: 0.7;
        transform: scale(0.95);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}
#turnstile-mask {
    position: fixed;
    inset: 0;
    z-index: var(--z-mask);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}
#turnstile-mask.hide {
    opacity: 0;
    pointer-events: none;
}
.d-none,
.nav-btn.d-none,
#input-group.d-none {
    display: none;
}
@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-4px);
    }
    75% {
        transform: translateX(4px);
    }
}
.input-wrapper {
    position: relative;
    width: 100%;
}
.action-btns-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 5;
}
#eye-btn {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-dim);
    z-index: 10;
    font-size: 1.1rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}
#eye-btn:hover {
    color: var(--text);
}
#eye-btn.revealed {
    color: var(--text);
}
#config-btn {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    width: 100%;
    height: 0;
    margin-bottom: 0;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: var(--tracking-wide);
    will-change: transform, opacity;
    gap: 8px;
}
#config-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    height: 56px;
    display: flex;
}
#config-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
#config-btn:active {
    transform: scale(0.98);
}
#config-btn::before {
    content: "\f1de";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.1rem;
}
#copy-btn::before,
#node-btn::before {
    content: "\f0c1";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.1rem;
}
#copy-btn.btn-success::before,
#node-btn.btn-success::before {
    content: "\f00c";
}
#copy-btn.btn-error::before,
#node-btn.btn-error::before {
    content: "\f071";
}
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 4, 0, 0.9);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal {
    background: var(--modal-bg);
    width: calc(100% - 32px);
    max-width: 560px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transform: scale(0.98) translateY(10px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 85dvh;
    overflow: hidden;
    padding: 0;
}
.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--modal-header-bg);
}
.modal-header h3 {
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
}
.close-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.close-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.close-btn:active {
    transform: scale(0.95);
}
.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.config-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.config-card:hover,
.config-card:focus-within {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}
.config-card .section-title {
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.config-card .section-title:not(:first-child) {
    margin-top: 8px;
}
.modal-footer {
    padding: 18px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    background: var(--modal-footer-bg);
}
.section-title {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 6px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.section-title i {
    margin-right: 8px;
    color: var(--accent);
}
.field {
    width: 100%;
    flex-shrink: 0;
}
.field input,
.field select,
.textarea-wrapper textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0 16px;
    border-radius: 12px;
    outline: none;
    font-family: "FT Kunst Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}
.field select {
    background: var(--input-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ebd5c1' 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") no-repeat right 16px center;
    background-size: 16px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.field select option {
    background: var(--bg-secondary);
    color: var(--text);
}
.field input:focus,
.field select:focus,
.textarea-wrapper textarea:focus {
    background-color: var(--input-bg-focus);
    border-color: var(--accent);
}
.field input,
.field select {
    height: 56px;
    margin-top: 8px;
}
.textarea-wrapper {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0;
    margin-bottom: 0;
    margin-top: 8px;
    display: flex;
    transition: border-color 0.3s ease;
    flex-shrink: 0;
}
.textarea-wrapper:focus-within {
    background-color: var(--input-bg-focus);
    border-color: var(--accent);
}
.textarea-wrapper textarea {
    border: none;
    padding: 16px;
    min-height: 56px;
    height: 56px;
    resize: none;
    overflow: hidden;
    background: transparent;
    line-height: 24px;
}
.path-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    width: 100%;
}
.path-field {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 0;
    height: 56px;
    min-height: 56px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    flex-shrink: 0;
}
.path-field:focus-within {
    background-color: var(--input-bg-focus);
    border-color: var(--accent);
}
.path-field span {
    padding: 0 16px;
    color: var(--text);
    background: transparent;
    height: 100%;
    display: flex;
    align-items: center;
    border-right: 1px solid var(--border);
    font-size: 0.95rem;
    font-family: "FT Kunst Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 50%;
    flex-shrink: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
}
.path-field input {
    border: none;
    background: transparent;
    margin: 0;
    height: 100%;
    border-radius: 0;
    flex: 1;
    padding: 0 16px;
    min-width: 0;
    color: var(--text);
    outline: none;
    font-size: 1rem;
    box-sizing: border-box;
}
.path-field input:focus {
    border: none;
    background: transparent;
}
.path-preview {
    padding: 0 4px;
    font-size: 0.85rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}
.path-preview strong {
    color: var(--text);
    font-weight: 500;
}
.switch-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--border);
    padding: 0 16px;
    height: 56px;
    min-height: 56px;
    border-radius: 8px;
    margin-top: 8px;
    box-sizing: border-box;
    flex-shrink: 0;
}
.switch-label {
    color: var(--text);
    font-size: 1rem;
    flex: 1;
    margin-right: 12px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-hover);
    border: 2px solid var(--text-tertiary);
    box-sizing: border-box;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text);
    transition: transform 0.3s ease, width 0.3s ease;
    z-index: 2;
}
.slider:after {
    position: absolute;
    content: "";
    width: 12px;
    height: 12px;
    top: 6px;
    right: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ebd5c1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.4s ease;
    z-index: 1;
}
input:checked + .slider {
    background-color: var(--accent-hover);
    border-color: var(--accent);
}
input:checked + .slider:before {
    transform: translateX(24px);
}
input:checked + .slider:after {
    right: auto;
    left: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
}
.switch:active .slider:before {
    width: 28px;
}
.switch:active input:checked + .slider:before {
    transform: translateX(16px);
}
.slider.round {
    border-radius: 8px;
}
.slider.round:before {
    border-radius: 4px;
}
#save-config {
    width: max-content;
    min-width: 140px;
    padding: 0 32px;
    height: 48px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: var(--accent-hover);
    box-shadow: 0 2px 8px #ff48014d;
    color: var(--text);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: var(--tracking-wide);
    white-space: nowrap;
}
#save-config::before {
    content: "\f0c7";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}
#save-config:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px #ff480166;
}
#save-config:active {
    transform: translateY(0) scale(0.98);
}
#save-config.btn-loading {
    background: var(--border-hover);
    pointer-events: none;
    border-color: transparent;
}
#save-config.btn-loading::before {
    content: "\f110";
    animation: spin-icon 1s linear infinite;
}
#save-config.btn-success {
    background: var(--success);
    color: var(--bg);
}
#save-config.btn-success::before {
    content: "\f00c";
}
#save-config.btn-error {
    background: var(--error);
    animation: btnErrorShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
#save-config.btn-error::before {
    content: "\f071";
}
@keyframes spin-icon {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#service-error-box {
    display: none;
    width: 100%;
    max-width: 400px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
    color: var(--error);
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: fadeUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    will-change: transform, opacity;
}
#service-error-box.visible {
    display: flex;
}
#service-error-box i {
    font-size: 2.5rem;
    margin-bottom: 4px;
    opacity: 0.9;
}
#service-error-box p {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
}
.inline-copy-btn {
    width: auto;
    height: 100%;
    padding: 0 16px;
    background: transparent;
    color: var(--accent);
    border: none;
    border-left: 1px solid var(--border);
    border-radius: 0;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    min-width: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.inline-copy-btn:hover {
    color: var(--text);
    background: var(--bg-secondary);
}
.inline-copy-btn:active {
    background: var(--border-hover);
}
.inline-copy-btn:disabled {
    cursor: default;
    background: transparent;
}
.inline-copy-btn.success {
    color: var(--success);
    pointer-events: none;
}
.inline-copy-btn.error {
    color: var(--error);
}
.switch-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.switch-field.no-margin {
    margin-top: 0;
}
.field-desc {
    color: var(--text-dim);
    font-size: 0.85rem;
}
.field-desc.switch-desc {
    padding: 0 6px;
}
.field-desc.input-desc {
    margin-top: 8px;
    margin-left: 5px;
}
.config-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.config-group.d-none {
    display: none;
}
.accent-link {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}
.accent-link:hover {
    opacity: 0.8;
}
.external-link-icon {
    font-size: 0.85em;
    margin-left: 0px;
    margin-right: 0px;
}
.version-display {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 8px;
    margin-bottom: -4px;
    opacity: 0.7;
    font-family: "Apercu Mono Pro", ui-monospace, SFMono-Regular, monospace;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
    transition: opacity 0.3s ease, color 0.3s ease;
}
.version-display:hover {
    opacity: 1;
    color: var(--accent);
}
.modal-sm {
    max-width: 360px;
}
.info-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem 0.5rem;
    gap: 1.25rem;
}
.info-icon {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: contain;
    background: transparent;
    border: 1px solid var(--border);
}
.info-version {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    font-family: "Apercu Mono Pro", ui-monospace, SFMono-Regular, monospace;
}
.btn-danger {
    background: var(--bg-secondary);
    color: var(--error);
    border-color: var(--border);
    padding: 0 32px;
    width: auto;
}
.btn-neutral.btn-danger:hover {
    background: var(--error);
    color: var(--text);
    border-color: var(--error);
}
.btn-neutral.btn-danger:active {
    transform: scale(0.98);
}
@media (max-width: 480px) {
    .main-wrapper {
        gap: 1.5rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        padding-bottom: 8vh;
    }
    .grid-switches {
        grid-template-columns: 1fr;
    }
    .input-group {
        padding: 1.75rem 0;
        max-width: 100%;
    }
    .top-nav {
        top: calc(0.75rem + env(safe-area-inset-top));
        left: calc(0.75rem + env(safe-area-inset-left));
        right: calc(0.75rem + env(safe-area-inset-right));
        padding: 5px 12px;
    }
    .home-icon {
        height: 50px;
    }
    .modal {
        width: 100%;
        max-width: 100%;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
        transform: translateY(100%);
    }
    .modal-overlay {
        align-items: flex-end;
    }
    .modal-overlay.active .modal {
        border-radius: 16px 16px 0 0;
        max-height: 92dvh;
        transform: translateY(0);
    }
    .modal-header {
        padding: 16px 20px;
    }
    .modal-body {
        padding: 16px 20px;
        gap: 14px;
    }
    .modal-footer {
        padding: 14px 20px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }
    .section-title {
        font-size: 0.9rem;
    }
    .path-field span {
        display: none;
    }
    input, select, .path-field, .switch-field, .textarea-wrapper textarea {
        height: 50px;
        min-height: 50px;
    }
    .logo-title {
        font-size: clamp(28px, 7vw, 42px);
        height: auto;
        min-height: 48px;
    }
    .footer {
        bottom: calc(0.75rem + env(safe-area-inset-bottom));
        padding: 6px 14px;
        font-size: 0.78rem;
        gap: 8px;
        max-width: calc(100% - 1.5rem);
    }
    .nav-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
    #service-error-box {
        max-width: 100%;
    }
}
@media (min-width: 481px) and (max-width: 768px) {
    .main-wrapper {
        gap: 2.5rem;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .input-group {
        max-width: 420px;
        padding: 2rem 0;
    }
    .modal {
        width: calc(100% - 24px);
        max-width: 520px;
    }
}
@media (min-width: 769px) {
    .main-wrapper {
        gap: 3rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        padding-bottom: 12vh;
    }
    .input-group {
        padding: 2.5rem 0;
    }
}
@media (max-height: 600px) and (orientation: landscape) {
    .main-wrapper {
        gap: 1rem;
        padding-bottom: 6vh;
    }
    .logo-title {
        font-size: clamp(24px, 5vw, 36px);
        height: auto;
        min-height: 36px;
    }
    .input-group {
        padding: 1.5rem 0;
        gap: 1rem;
    }
}
.input-error-msg {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 8px;
    margin-left: 6px;
    display: none;
    align-items: center;
    gap: 6px;
}
.input-error-msg.active {
    display: flex;
    animation: fadeUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.input-error-msg i {
    font-size: 0.9rem;
}
.field input.input-invalid {
    border-color: var(--error);
}
.field input.input-invalid:focus {
    background-color: var(--input-bg-focus);
}
.grid-switches {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.slider-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 8px;
}
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    font-size: 0.95rem;
}
.slider-input {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    margin: 8px 0;
}
.slider-input:focus {
    outline: none;
}
.slider-input::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: var(--border-hover);
    border-radius: 3px;
}
.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text);
    margin-top: -7px;
}
.slider-input::-moz-range-track {
    width: 100%;
    height: 6px;
    background: var(--border-hover);
    border-radius: 3px;
}
.slider-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text);
    border: none;
}
.modal-btn-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    width: 100%;
}
.btn-neutral {
    width: 100%;
    height: 48px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
}
.btn-neutral:hover {
    background: var(--bg-secondary);
    border-color: var(--text-dim);
}
.btn-neutral:active {
    transform: scale(0.98);
}
.btn-neutral.btn-success {
    background: var(--success);
    border-color: var(--success);
    color: var(--bg);
}
#uuid-out {
    text-align: center;
}
#splash-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background-color: var(--bg);
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
@media (display-mode: standalone) {
    #splash-screen {
        display: flex;
    }
}
#splash-screen::before {
    content: "";
    position: absolute;
    width: clamp(80px, 20vw, 120px);
    height: clamp(80px, 20vw, 120px);
    border-radius: 12px;
    border: 2px solid var(--border);
    animation: splash-ripple 2.5s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
    z-index: 0;
    will-change: transform, opacity;
}
.splash-icon {
    width: clamp(80px, 20vw, 120px);
    height: auto;
    max-height: clamp(80px, 20vw, 120px);
    object-fit: contain;
    border-radius: 12px;
    position: relative;
    z-index: 1;
    will-change: transform, opacity;
    animation: splash-focus-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
               splash-float-subtle 2.5s ease-in-out 0.8s infinite alternate;
}
#splash-screen.splash-exit .splash-icon {
    animation: splash-sink-out 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
#splash-screen.splash-exit::before {
    animation: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#splash-screen.splash-exit {
    transition: visibility 0.6s, opacity 0.6s;
    opacity: 0;
    pointer-events: none;
}
@keyframes splash-focus-in {
    0% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes splash-float-subtle {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}
@keyframes splash-ripple {
    0% { transform: scale(0.9); opacity: 1; border-width: 2px; }
    100% { transform: scale(1.8); opacity: 0; border-width: 0; }
}
@keyframes splash-sink-out {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.8) translateY(20px); opacity: 0; }
}
.textarea-wrapper textarea.word-break-all {
    word-break: break-all;
    height: auto;
}
.textarea-wrapper textarea.cfg-textarea {
    field-sizing: content;
    height: auto;
    min-height: 56px;
    max-height: 272px;
    resize: none;
    overflow-y: auto;
    box-sizing: border-box;
}
.page-404 {
    height: 100vh;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.container-404 {
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}
.code-404 {
    font-size: clamp(6rem, 20vw, 12rem);
    font-weight: 900;
    line-height: 1;
    color: var(--text);
    opacity: 0;
    animation: fadeUp .8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.message-404 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dim);
    opacity: 0;
    animation: fadeUp .8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards;
}
.desc-404 {
    max-width: 400px;
    margin: 0 auto 2rem;
    color: var(--text-tertiary);
    line-height: 1.6;
    opacity: 0;
    animation: fadeUp .8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s forwards;
}

@media (max-height: 450px) {
    .footer {
        display: none;
    }
    .top-nav {
        position: absolute;
    }
    .logo-title {
        display: none;
    }
    .main-wrapper {
        padding-top: calc(1rem + env(safe-area-inset-top, 0px));
        justify-content: flex-start;
    }
}
