@charset "UTF-8";

@font-face {
    font-family: "FramePics Yokelvision";
    src: url("../fonts/Yokelvision.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "FramePics Boldline";
    src: url("../fonts/1FTV-VIP-Boldline.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "FramePics Boldline 2";
    src: url("../fonts/1FTV-VIP-Boldline-2.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #eef3f8;
    --surface: #ffffff;
    --surface-muted: #f6f9fc;
    --text: #172333;
    --muted: #637083;
    --border: #dce5ef;
    --primary: #256fd9;
    --primary-strong: #1858b5;
    --success: #12996a;
    --warning: #dd7b14;
    --danger: #d33242;
    --shadow: 0 10px 28px rgba(28, 48, 76, 0.08);
    --radius: 8px;
    --header-height: 64px;
    --tabbar-height: 72px;
    --font-base: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
    --font-title: "FramePics Yokelvision", var(--font-base);
    --font-heading: "FramePics Boldline", var(--font-base);
    --font-size-title: 24px;
    --font-size-heading: 16px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    width: 100%;
    min-height: 100%;
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    width: 100%;
    min-width: 0;
    min-height: 100%;
    margin: 0;
    color: var(--text);
    font-family: var(--font-base);
    font-size: 15px;
    line-height: 1.45;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.72), rgba(238,243,248,0.92) 260px),
        var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    font: inherit;
}

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

button {
    min-height: 42px;
    border: 0;
    border-radius: var(--radius);
    padding: 9px 16px;
    color: #fff;
    background: var(--primary);
    box-shadow: 0 6px 16px rgba(37, 111, 217, 0.18);
    font-size: var(--font-size-heading);
    font-weight: 650;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

button,
#downloadBtn,
#resultPreview a,
.button-like {
    font-family: var(--font-heading);
    font-size: var(--font-size-heading);
}

button:hover {
    background: var(--primary-strong);
    box-shadow: 0 8px 18px rgba(24, 88, 181, 0.2);
}

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

input[type="number"],
select,
textarea {
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    outline: none;
}

input[type="number"],
select {
    padding: 7px 10px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 111, 217, 0.14);
}

.font-picker-native {
    position: absolute !important;
    width: 1px !important;
    min-width: 0 !important;
    height: 1px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.font-picker {
    position: relative;
    width: 100%;
    min-width: 0;
    font-family: var(--font-base);
}

.font-picker-button {
    width: 100%;
    min-height: 58px;
    padding: 8px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: none;
    font-family: var(--font-base);
    font-size: 15px;
    font-weight: 750;
    text-align: left;
}

.font-picker-button:hover,
.font-picker-button:focus-visible {
    color: var(--text);
    background: #f8fbff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 111, 217, 0.14);
}

.font-picker-current {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.font-picker-current strong,
.font-picker-current em {
    min-width: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.font-picker-current strong {
    color: #2f3d52;
    font-size: 15px;
    line-height: 1.15;
}

.font-picker-current em {
    color: #111827;
    font-size: 20px;
    font-style: normal;
    line-height: 1.1;
}

.font-picker-chevron {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-right: 2px solid #66758a;
    border-bottom: 2px solid #66758a;
    transform: rotate(45deg);
    transition: transform .16s ease;
}

.font-picker.is-open .font-picker-chevron {
    transform: rotate(225deg);
}

.font-picker-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 10040;
    max-height: min(330px, 56vh);
    padding: 7px;
    display: none;
    gap: 5px;
    overflow: auto;
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(210, 222, 236, .95);
    border-radius: 12px;
    box-shadow: 0 18px 42px rgba(18, 37, 63, .18);
}

.font-picker.is-open .font-picker-list {
    display: grid;
}

.font-picker-option {
    width: 100%;
    min-height: 58px;
    padding: 8px 10px;
    display: grid;
    gap: 2px;
    color: var(--text);
    background: transparent;
    border: 0;
    border-radius: 9px;
    box-shadow: none;
    text-align: left;
}

.font-picker-option:hover,
.font-picker-option:focus-visible,
.font-picker-option.is-selected {
    color: var(--primary);
    background: #edf5ff;
    box-shadow: none;
}

.font-picker-option-name,
.font-picker-option-sample {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.font-picker-option-name {
    font-size: 14px;
    line-height: 1.15;
}

.font-picker-option-sample {
    font-size: 22px;
    line-height: 1.1;
}

h3,
h4 {
    margin: 0 0 12px;
    color: #172b44;
    font-weight: 750;
    font-size: var(--font-size-heading);
    line-height: 1.2;
    letter-spacing: 0;
}

h1,
h2,
h3,
h4,
.frame-category-title,
.overview-block-title h2,
.overview-section-heading h2,
.frame-share-header h3,
.trend-header h3,
.overview-use-header h3,
.overview-list-header h3 {
    font-family: var(--font-heading);
}

h3 {
    font-size: var(--font-size-heading);
}

h4 {
    font-size: var(--font-size-heading);
}

hr {
    margin: 18px 0;
    border: 0;
    border-top: 1px solid var(--border);
}

form {
    margin: 0 0 14px;
}

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

.header-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: calc(var(--header-height) + env(safe-area-inset-top));
    padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background:
        linear-gradient(90deg, rgba(255,255,255,.82), rgba(246,250,252,.68)),
        url('../img/header-bg.gif') center / cover;
    border-bottom: 1px solid rgba(214, 225, 238, .9);
    box-shadow: 0 4px 18px rgba(30, 54, 83, .06);
    backdrop-filter: blur(14px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.header-logo {
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    background: #fff;
    object-fit: contain;
    box-shadow: 0 1px 6px rgba(23, 35, 51, .08);
    flex: 0 0 auto;
}

.header-title {
    min-width: 0;
    color: #1f5f9f;
    font-family: var(--font-title);
    font-size: var(--font-size-title);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.convert-guide-trigger {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(245, 158, 11, .38);
    border-radius: 50%;
    color: #a15b06;
    background: linear-gradient(180deg, #fff7e6, #fff);
    box-shadow: 0 7px 18px rgba(161, 91, 6, .12);
}

.convert-guide-trigger span[aria-hidden="true"] {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    line-height: 1;
}

.convert-guide-trigger:hover {
    border-color: rgba(245, 158, 11, .72);
    color: #8a4700;
    transform: translateY(-1px);
}

.header-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.header-menu a,
.header-menu button {
    min-height: 40px;
    border-radius: var(--radius);
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--primary);
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(212, 224, 238, .8);
    font-family: var(--font-heading);
    font-size: var(--font-size-heading);
    font-weight: 700;
    text-decoration: none;
    box-shadow: none;
}

.header-trend {
    color: var(--warning) !important;
    background: #fff7ed !important;
    border-color: #fed7aa !important;
    cursor: pointer;
}

.header-audio-menu {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.header-audio-tools,
.header-audio-toggle {
    color: #0f766e !important;
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
}

.header-audio-menu .header-audio-tools {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.header-audio-toggle {
    min-width: 38px;
    padding-inline: 8px !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-left-width: 0 !important;
    cursor: pointer;
}

.header-audio-tools svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-audio-chevron {
    width: 15px !important;
    height: 15px !important;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .18s ease;
}

.header-audio-menu:hover .header-audio-chevron,
.header-audio-menu:focus-within .header-audio-chevron,
.header-audio-menu.is-open .header-audio-chevron {
    transform: rotate(180deg);
}

.header-audio-submenu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1001;
    width: min(290px, calc(100vw - 32px));
    padding: 8px;
    display: grid;
    gap: 5px;
    background: rgba(255,255,255,.97);
    border: 1px solid rgba(210, 222, 236, .85);
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(22, 39, 66, .18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .18s ease, transform .18s ease;
    backdrop-filter: blur(14px);
}

.header-audio-submenu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -12px;
    height: 12px;
}

.header-audio-menu:hover .header-audio-submenu,
.header-audio-menu:focus-within .header-audio-submenu,
.header-audio-menu.is-open .header-audio-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-audio-submenu a {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    justify-content: flex-start;
    gap: 9px;
    color: #0f766e !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 9px;
    box-shadow: none !important;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    text-align: left;
    text-decoration: none;
}

.header-audio-submenu a:hover,
.header-audio-submenu a:focus-visible {
    color: #047857 !important;
    background: #ecfdf5 !important;
}

.header-audio-submenu svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-usage-alert {
    color: #fff !important;
    background: linear-gradient(180deg, #f04444, #c7192e) !important;
    border-color: rgba(255, 169, 169, .8) !important;
    box-shadow: 0 8px 18px rgba(207, 24, 44, .22), inset 0 1px 0 rgba(255,255,255,.28) !important;
    animation: headerUsagePulse 1.15s ease-in-out infinite;
}

.header-usage-alert span {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #c7192e;
    background: #fff;
    font-family: var(--font-heading);
    line-height: 1;
}

.header-usage-alert.is-hidden {
    display: none !important;
}

@keyframes headerUsagePulse {
    0%, 100% {
        transform: translateY(0);
        filter: brightness(1);
    }
    50% {
        transform: translateY(-3px);
        filter: brightness(1.08);
    }
}

.header-utility-menu {
    position: relative;
}

.header-utility-toggle {
    color: #1f5f9f !important;
    background: #f7fbff !important;
    border-color: #cfe1ff !important;
    cursor: pointer;
}

.header-utility-toggle > svg:first-child,
.header-utility-submenu svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-utility-chevron {
    width: 15px !important;
    height: 15px !important;
    transition: transform .18s ease;
}

.header-utility-menu:hover .header-utility-chevron,
.header-utility-menu:focus-within .header-utility-chevron,
.header-utility-menu.is-open .header-utility-chevron {
    transform: rotate(180deg);
}

.header-utility-submenu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1001;
    width: min(280px, calc(100vw - 32px));
    padding: 8px;
    display: grid;
    gap: 5px;
    background: rgba(255,255,255,.97);
    border: 1px solid rgba(210, 222, 236, .85);
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(22, 39, 66, .18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .18s ease, transform .18s ease;
    backdrop-filter: blur(14px);
}

.header-utility-submenu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -12px;
    height: 12px;
}

.header-utility-menu:hover .header-utility-submenu,
.header-utility-menu:focus-within .header-utility-submenu,
.header-utility-menu.is-open .header-utility-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-utility-submenu a,
.header-utility-submenu button {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    justify-content: flex-start;
    gap: 9px;
    color: #21466f !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 9px;
    box-shadow: none !important;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.header-utility-submenu a:hover,
.header-utility-submenu a:focus-visible,
.header-utility-submenu button:hover,
.header-utility-submenu button:focus-visible {
    color: var(--primary) !important;
    background: #edf5ff !important;
}

.header-backhome {
    margin-left: 0;
}

.header-home-link {
    color: #2367c9 !important;
    background: #f0f7ff !important;
    border-color: #cfe1ff !important;
}

.header-home-link:hover,
.header-home-link:focus-visible {
    background: #e8f2ff !important;
    border-color: #9dc2ff !important;
}

.header-home-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-home-roof {
    stroke: #256fd9;
}

.header-home-body {
    fill: #eaf4ff;
    stroke: #1a75bb;
}

.header-home-door {
    fill: #fff2d7;
    stroke: #f59e0b;
}

.header-home-sun {
    fill: #f59e0b;
    stroke: #f59e0b;
}

.header-account-link {
    color: #1f5f9f !important;
    background: #fff !important;
    border-color: #cfe1ff !important;
}

.header-account-link > svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-account-link.is-logged-in {
    padding: 6px 10px 6px 7px;
    gap: 8px;
}

.header-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #256fd9, #13a67a);
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 800;
}

.header-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.header-account-name {
    max-width: 120px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-quick-logout {
    width: 42px;
    padding: 8px !important;
    color: #c3343f !important;
    background: #fff5f5 !important;
    border-color: #ffd0d5 !important;
    cursor: pointer;
}

.header-quick-logout svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-quick-logout:hover,
.header-quick-logout:focus-visible {
    color: #a82432 !important;
    background: #ffe9ec !important;
    border-color: #ffadb7 !important;
}

.account-modal {
    position: fixed;
    inset: 0;
    z-index: 100130;
    padding: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(12, 23, 38, .48);
}

.account-modal.is-open {
    display: flex;
}

.account-dialog {
    width: min(94vw, 460px);
    max-height: 92vh;
    padding: 18px;
    overflow: auto;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 18px 48px rgba(10, 24, 43, .24);
}

.auth-required-modal {
    position: fixed;
    inset: 0;
    z-index: 100120;
    padding: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(12, 23, 38, .44);
}

.auth-required-modal.is-open {
    display: flex;
}

.auth-required-dialog {
    position: relative;
    width: min(92vw, 420px);
    padding: 28px 24px 24px;
    display: grid;
    justify-items: center;
    gap: 12px;
    border: 1px solid rgba(210, 224, 242, .9);
    border-radius: 18px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 22px 60px rgba(10, 24, 43, .24);
    text-align: center;
}

.auth-required-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    min-height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #65748a;
    background: #f2f6fb;
    box-shadow: none;
}

.auth-required-close svg,
.auth-required-register svg,
.auth-required-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-required-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #256fd9;
    background: #eaf3ff;
}

.auth-required-icon svg {
    width: 30px;
    height: 30px;
}

.auth-required-dialog h3 {
    margin: 2px 0 0;
    color: #172238;
    font-size: 1.25rem;
}

.auth-required-dialog p {
    margin: 0;
    color: #647184;
    line-height: 1.55;
}

.auth-required-register {
    width: auto;
    min-height: 44px;
    margin-top: 2px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

[data-auth-required] {
    cursor: pointer;
}

.file-picker[data-auth-required],
button[data-auth-required],
.overview-frame-card[data-auth-required] {
    box-shadow: inset 0 0 0 1px rgba(37, 111, 217, .05);
}

.account-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.account-header h3 {
    margin-bottom: 3px;
}

.account-header span {
    color: var(--muted);
    font-size: .92rem;
}

.account-close {
    width: 38px;
    min-height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #66758a;
    background: #f3f6fa;
    box-shadow: none;
    font-size: 1.45rem;
}
