@font-face {
    font-family: 'DM Mono';
    src: url('/assets/fonts/dm-mono-500.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Spectral';
    src: url('/assets/fonts/spectral-200.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nanum Myeongjo';
    src: url('/assets/fonts/nanum-myeongjo-400.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Jaldi';
    src: url('/assets/fonts/jaldi-400.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Jaldi';
    src: url('/assets/fonts/jaldi-700.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Jim Nightshade';
    src: url('/assets/fonts/jim-nightshade-400.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nanum Myeongjo';
    src: url('/assets/fonts/nanum-myeongjo-700.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Spectral';
    src: url('/assets/fonts/spectral-300.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #26231e;
    --muted: #777267;
    --paper: #f7f5ef;
    --white: #fffefb;
    --line: #dedbd1;
    --accent: #f05b4f;
    --accent-dark: #da4338;
    --radius-lg: 26px;
    --radius-md: 16px;
    --shadow: 0 24px 70px rgba(47, 40, 28, .11);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--paper);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
    font: inherit;
}

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

a {
    color: inherit;
    text-decoration: none;
}

.site-shell {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 86px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Spectral', Georgia, serif;
    font-size: 25px;
    font-weight: 300;
    letter-spacing: -.7px;
}

.brand__mark {
    position: relative;
    width: 27px;
    height: 27px;
}

.brand__mark::before,
.brand__mark::after {
    content: '';
    position: absolute;
    top: 5px;
    width: 14px;
    height: 18px;
    border: 1.7px solid currentColor;
    border-radius: 50% 50% 44% 44%;
    transform: rotate(-37deg);
}

.brand__mark::before {
    left: 3px;
}

.brand__mark::after {
    right: 3px;
    transform: rotate(37deg);
}

.header-note {
    color: var(--muted);
    font-size: 13px;
}

.eyebrow {
    margin: 0 0 16px;
    color: #817c72;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: 70px;
    align-items: end;
    padding: 86px 0 94px;
    border-top: 1px solid var(--line);
}

.hero h1 {
    max-width: 850px;
    margin: 0;
    font-family: 'Spectral', Georgia, serif;
    font-size: clamp(58px, 7.2vw, 100px);
    font-weight: 200;
    line-height: .88;
    letter-spacing: -.065em;
}

.hero h1 em {
    color: var(--accent);
    font-style: italic;
    font-weight: 200;
}

.hero__aside {
    max-width: 390px;
    padding-bottom: 5px;
}

.hero__aside p {
    margin: 0 0 28px;
    color: #656056;
    font-size: 18px;
    line-height: 1.55;
}

.hero__steps {
    display: flex;
    gap: 23px;
    color: #8b867c;
    font-size: 12px;
}

.hero__steps span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.hero__steps b {
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    border: 1px solid #c7c2b7;
    border-radius: 50%;
    color: var(--ink);
    font-size: 10px;
}

.catalog-section {
    padding: 0 0 110px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-heading h2 {
    margin: 0;
    font-family: 'Spectral', Georgia, serif;
    font-size: 38px;
    font-weight: 300;
    letter-spacing: -.04em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

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

.template-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--white);
    transition: transform .25s ease, box-shadow .25s ease;
}

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

.template-card__visual {
    position: relative;
    display: grid;
    min-height: 590px;
    place-items: center;
    overflow: hidden;
    background: #ded9d0;
}

.template-card__visual::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .7;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .5), transparent 35%),
        linear-gradient(145deg, transparent 35%, rgba(72, 61, 46, .08));
}

.template-card__canvas {
    position: relative;
    width: 252px;
    height: 353px;
    filter: drop-shadow(0 26px 30px rgba(38, 30, 18, .18));
}

.template-card__canvas .invitation {
    transform: scale(.7);
    transform-origin: 0 0;
}

.template-card__hover {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 14px;
    color: #fff;
    background: rgba(27, 24, 20, .88);
    font-size: 13px;
    transform: translateY(80px);
    transition: transform .25s ease;
    backdrop-filter: blur(8px);
}

.template-card:hover .template-card__hover {
    transform: translateY(0);
}

.template-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 21px 22px 23px;
}

.template-card__body h3 {
    margin: 0 0 6px;
    font-family: 'Spectral', Georgia, serif;
    font-size: 24px;
    font-weight: 300;
    letter-spacing: -.035em;
}

.template-card__body p {
    max-width: 280px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.tag {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 99px;
    background: #f1efe8;
    color: #777166;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.coming-card {
    display: grid;
    min-height: 690px;
    place-items: center;
    border: 1px dashed #cbc6bb;
    border-radius: var(--radius-lg);
    color: #8b857a;
    text-align: center;
}

.coming-card span {
    display: block;
    margin-bottom: 10px;
    font-family: 'Spectral', Georgia, serif;
    font-size: 34px;
    color: #5a554d;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    padding: 28px 0 34px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

/* Invitation — faithfully adapted from Figma node 1:17 */
.invitation {
    --invite-bg: #f9f5e9;
    --invite-text: #2e1616;
    --invite-accent: #f95e5e;
    position: relative;
    width: 360px;
    height: 504px;
    overflow: hidden;
    color: var(--invite-text);
    background: var(--invite-bg);
    isolation: isolate;
}

.invitation__texture {
    position: absolute;
    z-index: 8;
    inset: 0;
    mix-blend-mode: multiply;
    pointer-events: none;
}

.invitation__texture img {
    display: block;
    width: 100%;
    height: 100%;
}

.invitation figure {
    margin: 0;
}

.invitation__photo {
    position: absolute;
    z-index: 1;
    width: 104px;
    height: 129px;
    overflow: hidden;
    background: #dad5ca;
}

.invitation__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) sepia(.15) contrast(1.03);
}

.invitation__photo--1 { left: 12px; top: 12px; }
.invitation__photo--2 { left: 128px; top: 152px; }
.invitation__photo--3 { right: 12px; top: 293px; }
.invitation__photo--4 { left: 12px; bottom: 12px; }

.invitation__heart {
    position: absolute;
    z-index: 2;
    top: 123px;
    left: 110px;
    width: 132px;
    height: 188px;
    mix-blend-mode: multiply;
    background: var(--invite-accent);
    -webkit-mask: url('/assets/images/decor.svg') center / contain no-repeat;
    mask: url('/assets/images/decor.svg') center / contain no-repeat;
}

.invitation__heart img {
    position: absolute;
    inset: -3.6px -2.8px -4.6px -6.4px;
    width: 141.2px;
    height: 196.2px;
    opacity: 0;
}

.invitation__copy {
    position: absolute;
    z-index: 3;
    font-family: 'DM Mono', monospace;
    font-size: 6.72px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: .403px;
    text-transform: uppercase;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.invitation__intro { left: 12px; top: 151px; width: 104px; }
.invitation__date { left: 244px; top: 195px; width: 98px; }
.invitation__venue { right: 12px; top: 265px; width: 104px; text-align: right; }
.invitation__program { left: 12px; top: 337px; width: 104px; }
.invitation__note { left: 128px; top: 403px; width: 104px; text-align: right; }

.invitation__names,
.invitation__closing {
    position: absolute;
    z-index: 3;
    font-family: 'Spectral', Georgia, serif;
    font-size: 26px;
    font-weight: 200;
    line-height: .95;
    letter-spacing: -1.3px;
    color: var(--invite-text);
    overflow-wrap: anywhere;
    font-feature-settings: "dlig" 1;
    white-space: pre-line;
}

.invitation__names { left: 128px; top: 96px; width: 220px; }
.invitation__closing { left: 128px; top: 463px; width: 220px; }

/* Elegant monogram — faithfully adapted from Figma node 25:35 */
.invitation--monogram {
    background: var(--invite-bg);
}

.monogram__background {
    position: absolute;
    z-index: 0;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.monogram__tint {
    position: absolute;
    z-index: 1;
    inset: 0;
    opacity: .12;
    background: var(--invite-bg);
    mix-blend-mode: multiply;
    pointer-events: none;
}

.monogram__frame {
    position: absolute;
    z-index: 3;
    top: 22.56px;
    left: 22.56px;
    width: 314.88px;
    height: 458.88px;
    opacity: .4;
    background: var(--invite-accent);
    -webkit-mask: url('/assets/images/monogram-frame.svg') center / 100% 100% no-repeat;
    mask: url('/assets/images/monogram-frame.svg') center / 100% 100% no-repeat;
}

.monogram__frame img {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.monogram__label {
    position: absolute;
    z-index: 5;
    left: 50%;
    color: var(--invite-text);
    font-family: 'Khyay', 'Arial Narrow', Arial, sans-serif;
    font-size: 7.6px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 1.216px;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    transform: translateX(-50%);
}

.monogram__label--top { top: 20px; }
.monogram__label--bottom { bottom: 17px; }

.monogram__top-copy {
    position: absolute;
    z-index: 5;
    top: 58px;
    left: 47px;
    width: 266px;
    color: var(--invite-text);
    text-align: center;
}

.monogram__names {
    font-family: 'Nanum Myeongjo', Georgia, serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -1.12px;
    white-space: pre-line;
}

.monogram__intro {
    margin-top: 9px;
    font-family: 'Nanum Myeongjo', Georgia, serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.15px;
    white-space: pre-line;
}

.monogram__ampersands {
    position: absolute;
    z-index: 4;
    left: 84.96px;
    width: 190px;
    height: 130px;
    color: var(--invite-accent);
    font-family: 'LiSong Pro', 'Songti SC', 'Nanum Myeongjo', Georgia, serif;
    font-size: 144px;
    font-weight: 300;
    line-height: .9;
    letter-spacing: -7.2px;
    pointer-events: none;
}

.monogram__ampersands--top { top: 123.92px; }
.monogram__ampersands--bottom { top: 250.08px; }

.monogram__ampersands span {
    position: absolute;
    top: 0;
    display: block;
    white-space: nowrap;
    transform-origin: center center;
}

.monogram__ampersands span:first-child { left: 53.5px; }
.monogram__ampersands span:last-child { left: 136.58px; }
.monogram__ampersands--top span:first-child { transform: translateX(-50%) scaleY(-1); }
.monogram__ampersands--top span:last-child { transform: translateX(-50%) rotate(180deg); }
.monogram__ampersands--bottom span:first-child { transform: translateX(-50%); }
.monogram__ampersands--bottom span:last-child { transform: translateX(-50%) rotate(180deg) scaleY(-1); }

.monogram__initials {
    position: absolute;
    z-index: 6;
    top: 50%;
    left: 50%;
    width: 42px;
    color: var(--invite-text);
    font-family: 'Khyay', 'Arial Narrow', Arial, sans-serif;
    font-size: 32px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 1.28px;
    text-align: center;
    text-transform: uppercase;
    white-space: pre-line;
    transform: translate(-50%, -47%);
}

.monogram__bottom-copy {
    position: absolute;
    z-index: 5;
    right: 47px;
    bottom: 64px;
    left: 47px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    color: var(--invite-text);
    font-family: 'Nanum Myeongjo', Georgia, serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.15px;
    text-align: center;
}

/* Watercolor floral — faithfully adapted from Figma node 38:64 */
.invitation--floral {
    background: var(--invite-bg);
}

.floral__paper,
.floral__frame {
    position: absolute;
    top: 30.53px;
    left: 26.02px;
    width: 307.97px;
    height: 442.95px;
}

.floral__paper {
    z-index: 0;
    background: #f5f5f5;
}

.floral__frame {
    z-index: 1;
    border: 6.05px solid var(--invite-accent);
    pointer-events: none;
}

.floral__flowers {
    position: absolute;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.floral__flowers img {
    position: absolute;
    left: 0;
    display: block;
    width: 100%;
    max-width: none;
}

.floral__flowers--top {
    top: 0;
    left: 0;
    width: 360px;
    height: 136.48px;
}

.floral__flowers--top img {
    top: -.1px;
    height: 183.04%;
}

.floral__flowers--bottom {
    top: 396.26px;
    left: -9.68px;
    width: 378.76px;
    height: 107.74px;
}

.floral__flowers--bottom img {
    top: -131.67%;
    height: 231.67%;
}

.floral__heading,
.floral__names,
.floral__invitation {
    position: absolute;
    z-index: 3;
    left: 50%;
    color: var(--invite-text);
    text-align: center;
    transform: translateX(-50%);
    white-space: pre-line;
}

.floral__heading {
    top: 101.14px;
    width: 428.34px;
    font-family: 'Jim Nightshade', 'Segoe Script', cursive;
    font-size: 27.16px;
    font-weight: 400;
    line-height: 23.94px;
}

.floral__names {
    top: 155.03px;
    width: 300px;
    font-family: 'Jim Nightshade', 'Segoe Script', cursive;
    font-size: 45.49px;
    font-weight: 400;
    line-height: 47.89px;
    text-shadow: 2.4px 3px 3px var(--invite-bg);
}

.floral__invitation {
    top: 317.84px;
    width: 428.34px;
    font-family: 'Jaldi', 'Segoe UI', sans-serif;
    font-size: 10.18px;
    font-weight: 400;
    line-height: 23.94px;
}

/* Editor */
.editor-page {
    height: 100vh;
    overflow: hidden;
    background: #e8e5df;
}

.editor-header {
    position: relative;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 68px;
    padding: 0 20px;
    border-bottom: 1px solid #dedbd4;
    background: rgba(250, 249, 245, .96);
    backdrop-filter: blur(12px);
}

.editor-header .brand {
    font-size: 22px;
}

.editor-header__center {
    color: #6e6960;
    font-size: 12px;
}

.save-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.save-state::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7ca36e;
}

.save-state.is-saving::before {
    background: #d99a46;
    animation: blink 1s ease infinite;
}

.save-state.is-error::before { background: #db5549; }

@keyframes blink { 50% { opacity: .35; } }

.editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid #d5d1c8;
    border-radius: 11px;
    color: #37332c;
    background: #fff;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.button:hover { transform: translateY(-1px); background: #f8f6f1; }
.button:disabled { opacity: .5; cursor: default; transform: none; }
.button--primary { border-color: var(--accent); color: #fff; background: var(--accent); }
.button--primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.button--quiet { border-color: transparent; background: transparent; }
.button--wide { width: 100%; min-height: 45px; }

.editor-layout {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    height: calc(100vh - 68px);
}

.editor-panel {
    position: relative;
    z-index: 10;
    display: flex;
    min-height: 0;
    flex-direction: column;
    border-right: 1px solid #dedbd4;
    background: #faf9f5;
}

.editor-panel__top {
    padding: 24px 24px 16px;
}

.editor-panel__top h1 {
    margin: 0 0 6px;
    font-family: 'Spectral', Georgia, serif;
    font-size: 27px;
    font-weight: 300;
    letter-spacing: -.04em;
}

.editor-panel__top p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.editor-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin: 0 24px 18px;
    padding: 4px;
    border-radius: 12px;
    background: #ece9e2;
}

.editor-tab {
    padding: 9px 4px;
    border: 0;
    border-radius: 9px;
    color: #7b766e;
    background: transparent;
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
}

.editor-tab.is-active {
    color: #302d27;
    background: #fff;
    box-shadow: 0 2px 8px rgba(42, 37, 30, .07);
}

.editor-panel__scroll {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 38px;
}

.tab-pane { display: none; }
.tab-pane.is-active { display: block; }

.field {
    margin-bottom: 18px;
}

.field label,
.field__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 7px;
    color: #5e5a52;
    font-size: 11px;
    font-weight: 650;
}

.field__hint {
    color: #aaa49a;
    font-size: 9px;
    font-weight: 500;
}

.field input[type="text"],
.field textarea {
    width: 100%;
    border: 1px solid #dcd8cf;
    border-radius: 11px;
    outline: none;
    color: #2f2c27;
    background: #fff;
    font-size: 13px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.field input[type="text"] {
    height: 42px;
    padding: 0 12px;
}

.field textarea {
    min-height: 70px;
    padding: 11px 12px;
    line-height: 1.4;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    border-color: #a9a399;
    box-shadow: 0 0 0 3px rgba(95, 86, 73, .07);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.section-rule {
    height: 1px;
    margin: 23px 0;
    background: #e3dfd7;
}

.photos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.photos-grid--single {
    grid-template-columns: 1fr;
}

.photos-grid--single .photo-input {
    aspect-ratio: 5 / 7;
}

.photos-grid--single .photo-input img {
    filter: none;
}

.photos-grid--single .photo-input--wide {
    aspect-ratio: 3 / 2;
}

.photo-input {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 1px solid #d9d5cc;
    border-radius: 13px;
    background: #e7e4dc;
    cursor: pointer;
}

.photo-input img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
    transition: transform .25s ease;
}

.photo-input:hover img { transform: scale(1.025); }

.photo-input input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.photo-input__overlay {
    position: absolute;
    right: 8px;
    bottom: 8px;
    left: 8px;
    padding: 8px 9px;
    border-radius: 8px;
    color: #fff;
    background: rgba(31, 28, 24, .75);
    font-size: 10px;
    text-align: center;
    backdrop-filter: blur(6px);
}

.color-field {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #dcd8cf;
    border-radius: 12px;
    background: #fff;
}

.color-field input[type="color"] {
    width: 34px;
    height: 34px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-field input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(0, 0, 0, .08); border-radius: 50%; }
.color-field span { font-family: 'DM Mono', monospace; color: #6d685f; font-size: 11px; text-transform: uppercase; }

.palette-list {
    display: grid;
    gap: 9px;
    margin-top: 25px;
}

.palette-button {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd9d1;
    border-radius: 12px;
    color: #534f48;
    background: #fff;
    font-size: 11px;
    text-align: left;
    cursor: pointer;
}

.palette-swatches {
    display: flex;
}

.palette-swatches i {
    width: 24px;
    height: 24px;
    border: 2px solid #fff;
    border-radius: 50%;
    margin-left: -6px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
}

.palette-swatches i:first-child { margin-left: 0; }

.editor-stage {
    position: relative;
    display: grid;
    min-width: 0;
    place-items: center;
    overflow: auto;
    padding: 54px;
    background-color: #e8e5df;
    background-image: radial-gradient(rgba(61, 56, 48, .16) .6px, transparent .6px);
    background-size: 13px 13px;
}

.preview-frame {
    position: relative;
    width: 360px;
    height: 504px;
    filter: drop-shadow(0 28px 46px rgba(37, 32, 25, .18));
}

.preview-label {
    position: absolute;
    top: -30px;
    left: 0;
    color: #7c776e;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.stage-zoom {
    position: fixed;
    right: 24px;
    bottom: 22px;
    padding: 8px 10px;
    border: 1px solid #d1cdc4;
    border-radius: 9px;
    color: #777168;
    background: rgba(255, 255, 255, .8);
    font-size: 10px;
    backdrop-filter: blur(8px);
}

.toast {
    position: fixed;
    z-index: 100;
    right: 22px;
    bottom: 22px;
    max-width: 320px;
    padding: 13px 16px;
    border-radius: 12px;
    color: #fff;
    background: rgba(36, 32, 27, .92);
    box-shadow: 0 14px 36px rgba(0, 0, 0, .2);
    font-size: 12px;
    transform: translateY(24px);
    opacity: 0;
    pointer-events: none;
    transition: all .2s ease;
}

.toast.is-visible { transform: translateY(0); opacity: 1; }

.modal-backdrop {
    position: fixed;
    z-index: 90;
    inset: 0;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(30, 27, 23, .42);
    backdrop-filter: blur(5px);
}

.modal-backdrop.is-visible { display: grid; }

.share-modal {
    width: min(440px, 100%);
    padding: 30px;
    border-radius: 22px;
    background: #fffdf9;
    box-shadow: var(--shadow);
}

.share-modal__icon {
    display: grid;
    width: 45px;
    height: 45px;
    margin-bottom: 20px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--accent);
    font-size: 20px;
}

.share-modal h2 {
    margin: 0 0 9px;
    font-family: 'Spectral', Georgia, serif;
    font-size: 29px;
    font-weight: 300;
    letter-spacing: -.04em;
}

.share-modal p {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.share-link {
    display: flex;
    gap: 8px;
}

.share-link input {
    min-width: 0;
    flex: 1;
    height: 42px;
    padding: 0 11px;
    border: 1px solid #dcd7ce;
    border-radius: 10px;
    color: #5f5a52;
    background: #f5f2ec;
    font-size: 11px;
}

.share-modal__close { margin-top: 14px; }

/* Public card */
.public-page {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
    background: #e8e5df;
}

.public-card-stage {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 56px;
    background-image: radial-gradient(rgba(61, 56, 48, .15) .6px, transparent .6px);
    background-size: 13px 13px;
}

.public-card-stage .invitation {
    box-shadow: 0 30px 70px rgba(37, 32, 25, .2);
}

.public-card-copy {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px clamp(38px, 7vw, 110px);
    background: #faf9f5;
}

.public-card-copy__main {
    max-width: 500px;
    margin: auto 0;
    padding: 70px 0;
}

.public-card-copy h1 {
    margin: 0 0 22px;
    font-family: 'Spectral', Georgia, serif;
    font-size: clamp(46px, 6vw, 76px);
    font-weight: 200;
    line-height: .95;
    letter-spacing: -.055em;
    white-space: pre-line;
}

.public-card-copy__date {
    margin-bottom: 34px;
    color: var(--accent-dark);
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.public-card-copy__intro {
    margin: -8px 0 28px;
    color: #6d685f;
    font-family: 'Nanum Myeongjo', Georgia, serif;
    font-size: 18px;
}

.public-card-copy__place {
    padding-top: 24px;
    border-top: 1px solid var(--line);
    color: #646057;
    font-size: 14px;
    line-height: 1.65;
}

.public-card-copy__footer {
    color: #99938a;
    font-size: 11px;
}

.not-found {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 30px;
    text-align: center;
}

.not-found h1 {
    margin: 0 0 12px;
    font-family: 'Spectral', Georgia, serif;
    font-size: 54px;
    font-weight: 200;
}

.not-found p { color: var(--muted); }

@media (max-width: 980px) {
    .hero { grid-template-columns: 1fr; gap: 40px; }
    .hero__aside { max-width: 600px; }
    .catalog-grid { grid-template-columns: 1fr 1fr; }
    .public-page { grid-template-columns: 1fr; }
    .public-card-stage, .public-card-copy { min-height: auto; }
    .public-card-stage { padding: 70px 30px; }
    .public-card-copy { padding: 35px; }
    .public-card-copy__main { padding: 80px 0; }
}

@media (max-width: 760px) {
    .site-shell { width: min(100% - 28px, 600px); }
    .site-header { min-height: 72px; }
    .header-note { display: none; }
    .hero { padding: 58px 0 65px; }
    .hero h1 { font-size: clamp(52px, 17vw, 78px); }
    .hero__aside p { font-size: 16px; }
    .section-heading { align-items: start; flex-direction: column; gap: 8px; }
    .catalog-grid { grid-template-columns: 1fr; }
    .template-card__visual { min-height: 510px; }
    .coming-card { min-height: 240px; }
    .template-card__hover { transform: translateY(0); }
    .editor-page { height: auto; overflow: auto; }
    .editor-header { grid-template-columns: 1fr auto; position: sticky; top: 0; height: 62px; }
    .editor-header__center { display: none; }
    .editor-header .brand__text { display: none; }
    .editor-actions .button--quiet { display: none; }
    .editor-layout { display: flex; height: auto; flex-direction: column-reverse; }
    .editor-panel { min-height: 560px; border: 0; border-top: 1px solid #d8d4cc; }
    .editor-stage { min-height: 610px; padding: 58px 20px 46px; overflow: hidden; }
    .stage-zoom { display: none; }
}

@media (max-width: 430px) {
    .editor-stage { min-height: 540px; }
    .preview-frame {
        width: 324px;
        height: 454px;
    }
    .preview-frame .invitation {
        transform: scale(.9);
        transform-origin: 0 0;
    }
    .public-card-stage { min-height: 550px; padding: 45px 16px; overflow: hidden; }
    .public-card-stage .invitation { transform: scale(.92); }
    .share-link { flex-direction: column; }
}
