:root {
    --white: #FFFFFF;
    --gray-bg: #F5F5F7;
    --gray-line: #E3E3E8;
    --text: #1D1D1F;
    --text-muted: #6E6E73;

    --accent: #60AEBF;
    --accent-text: #2A7484;
    --accent-soft: #E6F3F6;

    --radius: 22px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.07);

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --header-height: 64px;
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 18px;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
}

p {
    margin: 0;
}

a {
    color: var(--accent-text);
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}

.btn:hover {
    transform: scale(1.03);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--accent-text);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #215F6C;
}

.btn-secondary {
    background-color: var(--gray-bg);
    color: var(--text);
}

.btn-secondary:hover {
    background-color: var(--gray-line);
}

.btn-large {
    padding: 18px 40px;
    font-size: 20px;
}

.btn-small {
    padding: 8px 18px;
    font-size: 15px;
}


.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--gray-line);
    transition: box-shadow 0.3s var(--ease);
}

.site-header.scrolled {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.brand {
    font-size: 21px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.credit-link {
    font-size: 15px;
    color: var(--text-muted);
    text-decoration: none;
}

.credit-link:hover {
    color: var(--accent-text);
    text-decoration: underline;
}

.credit-fixed {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 100;
    padding: 6px 14px;
    font-size: 13px;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--gray-line);
    border-radius: 999px;
}


.section {
    padding: 120px 0;
}

.section-gray {
    background-color: var(--gray-bg);
}

.eyebrow {
    font-size: 17px;
    font-weight: 600;
    color: var(--accent-text);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(40px, 5vw, 64px);
    margin-bottom: 16px;
}

.section-lead {
    font-size: 21px;
    color: var(--text-muted);
    max-width: 720px;
    margin-bottom: 48px;
}


.hero {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    text-align: center;
    padding: 48px 0;
    background:
        radial-gradient(ellipse at 50% -10%, var(--accent-soft) 0%, rgba(230, 243, 246, 0) 60%),
        var(--white);
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-inner > :not(.steps) {
    animation: fade-up 0.9s var(--ease) both;
}

.hero-inner > :nth-child(2) { animation-delay: 0.1s; }
.hero-inner > :nth-child(3) { animation-delay: 0.2s; }
.hero-inner > :nth-child(4) { animation-delay: 0.3s; }

.hero-title {
    font-size: clamp(56px, 8vw, 112px);
    font-weight: 700;
    letter-spacing: -0.035em;
    margin-bottom: 24px;
}

.hero-text {
    font-size: clamp(20px, 1.8vw, 26px);
    color: var(--text-muted);
    max-width: 760px;
    margin-bottom: 36px;
}

.steps {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 56px 0 0;
    padding: 0;
}

.step {
    position: relative;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 200px;
    padding: 28px 20px 24px;
    background-color: var(--white);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: fade-up 0.8s var(--ease) 0.45s both;
}

.step:nth-child(2) { animation-delay: 0.6s; }
.step:nth-child(3) { animation-delay: 0.75s; }

.step:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -21px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-muted);
}

.step-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-text);
    margin-bottom: 12px;
}

.step-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.step-title {
    font-size: 22px;
    font-weight: 700;
}

.step-text {
    font-size: 16px;
    color: var(--text-muted);
}


.phone-fit {
    display: flex;
    justify-content: center;
}

.phone {
    width: 464px;
    padding: 12px;
    background-color: var(--text);
    border-radius: 56px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.18);
    transform-origin: top center;
}

.phone-screen {
    display: block;
    width: 440px;
    height: min(760px, calc(100vh - 240px));
    min-height: 420px;
    border: none;
    border-radius: 44px;
    background-color: var(--white);
}

.phone-note {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}


.design-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.design-card,
.compare-block {
    padding: 40px;
    background-color: var(--gray-bg);
    border-radius: 28px;
}

.design-card h3,
.compare-text h3 {
    font-size: 32px;
    margin-bottom: 8px;
}

.design-step {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent-text);
    margin-bottom: 6px;
}

.design-text {
    color: var(--text-muted);
    margin-bottom: 28px;
}

.wireframe {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 240px;
    height: 400px;
    margin: 0 auto;
    padding: 14px;
    overflow: hidden;
    background-color: var(--white);
    border: 6px solid var(--text);
    border-radius: 32px;
}

.wireframe > *,
.wf-section > * {
    flex-shrink: 0;
}

.wf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 6px;
}

.wf-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #D2D2D7;
}

.wf-menu {
    width: 26px;
    height: 26px;
    border: 2px solid #D2D2D7;
    border-radius: 50%;
}

.wf-line {
    height: 12px;
    border-radius: 6px;
    background-color: #D2D2D7;
}

.wf-small {
    width: 40%;
    height: 8px;
}

.wf-title {
    width: 85%;
    height: 16px;
    background-color: #A1A1A6;
}

.wf-short {
    width: 60%;
}

.wf-text {
    width: 90%;
    height: 8px;
}

.wf-image {
    width: 85%;
    height: 120px;
    border: 2px solid #D2D2D7;
    border-radius: 12px;
    background:
        linear-gradient(to top right, transparent calc(50% - 1px), #D2D2D7 50%, transparent calc(50% + 1px)),
        linear-gradient(to top left, transparent calc(50% - 1px), #D2D2D7 50%, transparent calc(50% + 1px));
}

.wf-button {
    width: 85%;
    height: 22px;
    border: 2px solid #A1A1A6;
    border-radius: 11px;
}

.wf-filled {
    background-color: #A1A1A6;
}

.wf-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: calc(100% + 28px);
    margin-top: 12px;
    padding: 16px 14px;
    background-color: var(--gray-bg);
}

.wf-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 85%;
    padding: 8px 8px 12px;
    background-color: var(--white);
    border-radius: 12px;
}

.wf-card-image {
    width: 100%;
    height: 70px;
}

.style-tile {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 28px;
    background-color: var(--white);
    border-radius: var(--radius);
}

.st-colors {
    display: flex;
    gap: 10px;
}

.st-color {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.st-color span {
    display: block;
    height: 56px;
    margin-bottom: 6px;
    border: 1px solid var(--gray-line);
    border-radius: 12px;
}

.st-type {
    display: flex;
    align-items: center;
    gap: 24px;
}

.st-aa {
    font-size: 72px;
    font-weight: 700;
    line-height: 1;
    color: #111111;
}

.st-eyebrow {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-text);
}

.st-heading {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #111111;
    margin: 2px 0 6px;
}

.st-body {
    font-size: 14px;
    color: #6B6B6B;
}

.st-elements {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.st-btn {
    padding: 10px 20px;
    border: 2px solid #111111;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
}

.st-btn-filled {
    border-color: #60AEBF;
    background-color: #60AEBF;
    color: var(--white);
}

.st-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    background-color: var(--gray-bg);
    font-size: 14px;
    font-weight: 700;
}

.st-badge svg {
    width: 16px;
    height: 16px;
}

.st-words {
    font-size: 15px;
    font-style: italic;
    color: var(--text-muted);
}

.compare-block {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: center;
}

.compare-tips {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
}

.compare-tips li {
    margin-bottom: 8px;
}

.compare-labels {
    display: flex;
    justify-content: space-between;
    max-width: 464px;
    margin: 0 auto 12px;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
}

.compare {
    --split: 50%;
    position: relative;
    overflow: hidden;
}

.compare-code {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}

.compare-figma {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    background-color: var(--white);
    clip-path: inset(0 calc(100% - var(--split)) 0 0);
}

.compare-figma img {
    display: block;
    width: 440px;
}

.compare-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--split);
    width: 4px;
    margin-left: -2px;
    background-color: var(--white);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    cursor: ew-resize;
    touch-action: none;
}

.compare-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background-color: var(--white);
    color: var(--accent-text);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s var(--ease);
}

.compare-handle:hover .compare-knob,
.compare-handle.dragging .compare-knob {
    transform: translate(-50%, -50%) scale(1.1);
}

.compare-knob svg {
    width: 26px;
    height: 26px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.info-card,
.info-topics,
.qr-card {
    padding: 36px;
    background-color: var(--white);
    border-radius: 28px;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.info-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    color: var(--accent-text);
}

.info-card h3,
.info-topics h3,
.qr-card h3 {
    font-size: 26px;
    margin-bottom: 10px;
}

.info-card p,
.qr-card p {
    color: var(--text-muted);
}

.info-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.topic-list li {
    padding: 10px 18px;
    border-radius: 999px;
    background-color: var(--accent-soft);
    color: var(--accent-text);
    font-weight: 600;
}

.qr-card {
    display: flex;
    align-items: center;
    gap: 32px;
}

.qr-code {
    flex-shrink: 0;
    width: 240px;
    height: 240px;
    border-radius: 12px;
}

.mini-figma {
    display: grid;
    grid-template-columns: 1fr 360px;
    overflow: hidden;
    background-color: var(--white);
    border: 1px solid var(--gray-line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.mf-canvas {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 620px;
    padding: 64px 32px;
    background-color: #EDEDF0;
    background-image: radial-gradient(#D6D6DB 1.5px, transparent 1.5px);
    background-size: 20px 20px;
}

.mf-frame-name {
    position: absolute;
    top: 20px;
    left: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.mf-selection {
    position: relative;
    outline: 2px solid #0D99FF;
}

.mf-handle {
    position: absolute;
    z-index: 1;
    width: 10px;
    height: 10px;
    background-color: var(--white);
    border: 2px solid #0D99FF;
}

.mf-handle-tl { top: -6px; left: -6px; }
.mf-handle-tr { top: -6px; right: -6px; }
.mf-handle-bl { bottom: -6px; left: -6px; }
.mf-handle-br { bottom: -6px; right: -6px; }

.mf-card {
    --color: #60AEBF;
    --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --space: 16px;
    --radius: 16px;

    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 320px;
    padding: var(--space);
    border-radius: var(--radius);
    background-color: var(--white);
    font-family: var(--font);
    color: #111111;
    transition: padding 0.3s var(--ease), border-radius 0.3s var(--ease);
}

.mf-card img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
    margin-bottom: 8px;
    border-radius: calc(var(--radius) * 0.6);
    transition: border-radius 0.3s var(--ease);
}

.mf-card h3 {
    font-size: 24px;
}

.mf-price {
    font-weight: 700;
}

.mf-text {
    font-size: 15px;
    color: #6B6B6B;
}

.mf-button {
    margin-top: 10px;
    padding: 12px;
    border-radius: 999px;
    background-color: var(--color);
    color: var(--white);
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s var(--ease);
}

.mf-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    border-left: 1px solid var(--gray-line);
    font-size: 15px;
}

.mf-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.mf-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
}

.mf-label span {
    font-family: var(--font-mono);
    font-weight: 400;
    color: var(--text-muted);
}

.mf-swatches {
    display: flex;
    gap: 10px;
}

.mf-swatch {
    width: 40px;
    height: 40px;
    border: 3px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--gray-line);
    cursor: pointer;
    transition: transform 0.2s var(--ease);
}

.mf-swatch:hover {
    transform: scale(1.1);
}

.mf-swatch.selected {
    box-shadow: 0 0 0 2px var(--text);
}

.mf-fonts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mf-font {
    padding: 10px;
    border: 1px solid var(--gray-line);
    border-radius: 10px;
    background-color: var(--white);
    font-size: 16px;
    color: var(--text);
    cursor: pointer;
}

.mf-font:hover {
    border-color: var(--accent);
}

.mf-font.selected {
    border-color: var(--accent-text);
    background-color: var(--accent-soft);
}

.mf-range {
    width: 100%;
    accent-color: var(--accent-text);
    cursor: pointer;
}

.mf-code {
    margin: 0;
    padding: 16px 18px;
    background-color: var(--gray-bg);
    border-radius: 14px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.mf-code span {
    color: var(--accent-text);
    font-weight: 700;
}

.hw-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.hw-card {
    height: 380px;
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    line-height: inherit;
    text-align: left;
    color: inherit;
    cursor: pointer;
    perspective: 1200px;
}

.hw-inner {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s var(--ease);
}

.hw-card[aria-pressed="true"] .hw-inner {
    transform: rotateY(180deg);
}

.hw-card:hover .hw-side {
    box-shadow: var(--shadow);
}

.hw-side {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 36px;
    border-radius: 28px;
    background-color: var(--gray-bg);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: box-shadow 0.3s var(--ease);
}

.hw-back {
    justify-content: center;
    background-color: var(--accent-text);
    color: var(--white);
    transform: rotateY(180deg);
}

.hw-icon {
    width: 64px;
    height: 64px;
    margin-bottom: auto;
    color: var(--accent-text);
}

.hw-name {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hw-short {
    font-size: 17px;
    font-weight: 600;
    color: var(--accent-text);
    margin-bottom: 10px;
}

.hw-back .hw-short {
    color: var(--accent-soft);
}

.hw-text {
    font-size: 17px;
    color: var(--text-muted);
}

.hw-back .hw-text {
    font-size: 20px;
    color: var(--white);
}

.tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 24px;
    background-color: var(--gray-line);
    border-radius: 999px;
}

.tab {
    padding: 10px 22px;
    border: none;
    border-radius: 999px;
    background: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    background-color: var(--white);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.lab {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: start;
}

.editor {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--gray-line);
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.editor-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-line);
}

.code-tabs {
    display: flex;
    gap: 6px;
}

.code-tab {
    padding: 8px 18px;
    border: none;
    border-radius: 10px;
    background: none;
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
}

.code-tab:hover {
    background-color: var(--gray-bg);
}

.code-tab.active {
    background-color: var(--accent-soft);
    color: var(--accent-text);
}

.code {
    display: block;
    width: 100%;
    height: 420px;
    margin: 0;
    padding: 20px 24px;
    border: none;
    resize: none;
    outline: none;
    font-family: var(--font-mono);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background-color: #FBFBFD;
    tab-size: 2;
    white-space: pre-wrap;
}

.code[hidden] {
    display: none;
}

.code::selection {
    background-color: #CDEAF0;
}

.ideas {
    padding: 20px 24px 24px;
    border-top: 1px solid var(--gray-line);
}

.ideas-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.ideas-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.idea {
    padding: 10px 18px;
    border: 1px solid var(--gray-line);
    border-radius: 999px;
    background-color: var(--white);
    font-family: inherit;
    font-size: 16px;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.idea:hover {
    border-color: var(--accent);
    background-color: var(--accent-soft);
}

.idea.used {
    border-color: var(--accent);
    color: var(--accent-text);
}

.idea.used::before {
    content: "✓ ";
}


.lock-screen {
    display: none;
}

.locked .lock-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(ellipse at 50% -10%, var(--accent-soft) 0%, rgba(230, 243, 246, 0) 60%),
        var(--white);
}

.locked body {
    overflow: hidden;
}

.locked .hero * {
    animation-play-state: paused;
}

.lock-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.lock-box.shake {
    animation: shake 0.4s var(--ease);
}

.lock-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
    color: var(--accent-text);
}

.lock-title {
    font-size: 48px;
    margin-bottom: 12px;
}

.lock-text {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.lock-label {
    align-self: flex-start;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.lock-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--gray-line);
    border-radius: 14px;
    background-color: var(--gray-bg);
    font-family: inherit;
    font-size: 18px;
    color: var(--text);
}

.lock-input:focus {
    outline: 3px solid var(--accent);
    outline-offset: 0;
    background-color: var(--white);
}

.lock-error {
    min-height: 27px;
    margin: 8px 0 16px;
    font-size: 15px;
    color: #C4314B;
}

.lock-credit {
    position: absolute;
    right: 16px;
    bottom: 16px;
    font-size: 13px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-10px); }
    40%      { transform: translateX(10px); }
    60%      { transform: translateX(-6px); }
    80%      { transform: translateX(6px); }
}

.idle-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(29, 29, 31, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fade-in 0.3s var(--ease);
}

.idle-overlay[hidden] {
    display: none;
}

.idle-box {
    width: 420px;
    padding: 40px;
    text-align: center;
    background-color: var(--white);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
    animation: pop-in 0.35s var(--ease);
}

.idle-box h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.idle-box p {
    color: var(--text-muted);
    margin-bottom: 28px;
}

.idle-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.idle-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.idle-ring circle {
    fill: none;
    stroke-width: 8;
}

.idle-ring-bg {
    stroke: var(--gray-bg);
}

/* 327 ist der Umfang des Kreises (2 · π · 52) */
.idle-ring-bar {
    stroke: var(--accent);
    stroke-linecap: round;
    stroke-dasharray: 327;
    stroke-dashoffset: 0;
}

.idle-ring-bar.running {
    animation: ring-countdown 10s linear forwards;
}

.idle-number {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}


.game {
    padding: 40px;
    animation: fade-in 0.4s var(--ease);
    background-color: var(--gray-bg);
    border-radius: 28px;
}

.game-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
}

.game-title {
    font-size: 32px;
    margin-bottom: 6px;
}

.game-subtitle {
    color: var(--text-muted);
}

.level-dots {
    display: flex;
    gap: 8px;
}

.level-dot {
    width: 44px;
    height: 44px;
    border: 2px solid var(--gray-line);
    border-radius: 50%;
    background-color: var(--white);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.level-dot:hover {
    border-color: var(--accent);
}

.level-dot.done {
    background-color: var(--accent-soft);
    border-color: var(--accent-soft);
    color: var(--accent-text);
}

.level-dot.active {
    background-color: var(--accent-text);
    border-color: var(--accent-text);
    color: var(--white);
}

.game-body {
    display: grid;
    grid-template-columns: 560px 1fr;
    gap: 40px;
}

.game-left {
    min-width: 0;
}

.garden {
    position: relative;
    height: 380px;
    background-color: #E4F2DF;
    background-image: radial-gradient(#D3E8CC 2px, transparent 2px);
    background-size: 24px 24px;
    border-radius: var(--radius);
    overflow: hidden;
}

.garden-layer {
    position: absolute;
    inset: 0;
    display: flex;
    padding: 16px;
}

.garden-item {
    width: 84px;
    height: 84px;
    flex-shrink: 0;
}

.garden-item svg {
    display: block;
    width: 100%;
    height: 100%;
}

.dog.happy svg {
    animation: wiggle 0.6s ease-in-out 2;
}

.game-code {
    margin: 20px 0 0;
    padding: 20px 24px;
    background-color: var(--white);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 17px;
    line-height: 1.6;
    overflow-x: auto;
}

.game-code span {
    color: var(--accent-text);
    font-weight: 700;
}

.game-task {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
}

.control {
    margin-bottom: 20px;
}

.control-label {
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.control-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.option {
    padding: 9px 16px;
    border: 1px solid var(--gray-line);
    border-radius: 10px;
    background-color: var(--white);
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.option:hover {
    border-color: var(--accent);
}

.option.selected {
    background-color: var(--accent-text);
    border-color: var(--accent-text);
    color: var(--white);
}

.game-help {
    margin-top: 28px;
}

.game .btn-secondary {
    background-color: var(--white);
}

.game .btn-secondary:hover {
    background-color: var(--gray-line);
}

.game-tip {
    margin-top: 12px;
    padding: 14px 18px;
    background-color: var(--white);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    font-size: 16px;
}

.game-tip[hidden],
.game-success[hidden] {
    display: none;
}

.game-success {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding: 20px 24px;
    background-color: var(--accent-soft);
    border-radius: var(--radius);
    animation: pop-in 0.35s var(--ease);
}

.game-success-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-text);
}

.box-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 380px;
    background-color: var(--white);
    border-radius: var(--radius);
}

.box-parent {
    position: relative;
    width: 400px;
    height: 300px;
    border: 2px dashed var(--gray-line);
    border-radius: 6px;
}

.box-real,
.box-ghost {
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: content-box;
    border-style: solid;
}

.box-real {
    border-color: #E3A94B;
    background-color: #B9D7A8;
    box-shadow: 0 0 0 var(--margin-size, 0) rgba(249, 204, 157, 0.75);
    transition: margin 0.4s var(--ease), padding 0.4s var(--ease),
        border-width 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.box-ghost {
    border-color: rgba(29, 29, 31, 0.12);
    outline: 2px dashed var(--text);
    pointer-events: none;
}

.box-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 80px;
    font-size: 16px;
    font-weight: 600;
}

.box-real .box-content {
    background-color: #A7D3DE;
}

.box-ghost .box-content {
    outline: 1px dashed rgba(29, 29, 31, 0.4);
}

.box-real.happy {
    animation: wiggle 0.6s ease-in-out 2;
}

.box-legend {
    display: flex;
    gap: 20px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--text-muted);
}

.box-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-margin { background-color: rgba(249, 204, 157, 0.75); }
.legend-border { background-color: #E3A94B; }
.legend-padding { background-color: #B9D7A8; }
.legend-content { background-color: #A7D3DE; }

.selector-scene {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    gap: 14px;
    min-height: 300px;
    padding: 24px;
    background-color: var(--white);
    border-radius: var(--radius);
}

.selector-scene * {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 12px 16px;
    border: 2px solid var(--gray-line);
    border-radius: 14px;
    background-color: var(--white);
    font: 15px/1.3 var(--font-mono);
    color: var(--text);
    transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.selector-scene *::before {
    content: attr(data-label);
    color: var(--text-muted);
}

.selector-scene article,
.selector-scene section {
    background-color: var(--gray-bg);
}

.selector-scene .target {
    border-style: dashed;
    border-color: var(--accent-text);
}

.selector-scene .hit {
    border-style: solid;
    border-color: var(--accent);
    background-color: var(--accent-soft);
    box-shadow: 0 0 0 4px rgba(96, 174, 191, 0.35), 0 0 24px rgba(96, 174, 191, 0.6);
    animation: glow 1.2s ease-in-out infinite alternate;
}

.selector-scene .hit::before {
    color: var(--accent-text);
}

.selector-html {
    font-size: 15px;
}

.selector-form {
    margin-bottom: 20px;
}

.selector-input-row {
    display: flex;
    gap: 8px;
}

.selector-input {
    flex: 1;
    min-width: 0;
    padding: 10px 16px;
    border: 1px solid var(--gray-line);
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--text);
    background-color: var(--white);
}

.selector-input:focus {
    outline: 3px solid var(--accent);
    outline-offset: 0;
}

.selector-feedback {
    min-height: 27px;
    margin-top: 12px;
    font-size: 16px;
    color: var(--text-muted);
}

@keyframes glow {
    from { box-shadow: 0 0 0 4px rgba(96, 174, 191, 0.35), 0 0 12px rgba(96, 174, 191, 0.4); }
    to   { box-shadow: 0 0 0 4px rgba(96, 174, 191, 0.35), 0 0 28px rgba(96, 174, 191, 0.8); }
}

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0); }
    25%      { transform: rotate(-8deg); }
    75%      { transform: rotate(8deg); }
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes pop-in {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes ring-countdown {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: 327; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal,
    .step {
        opacity: 1;
        transform: none;
    }
}


@media (max-width: 1100px) {
    .game-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1000px) {
    .lab,
    .design-cards,
    .compare-block,
    .info-grid,
    .info-bottom,
    .mini-figma,
    .hw-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .container,
    .header-inner {
        padding: 0 20px;
    }

    .header-actions {
        gap: 12px;
    }

    .header-actions .credit-link {
        font-size: 13px;
    }

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .step:not(:last-child)::after {
        content: "↓";
        right: auto;
        top: auto;
        bottom: -26px;
        left: 50%;
        transform: translateX(-50%);
    }
}
