:root {
    --color-primary: #ff6b6b;
    --color-primary-dark: #e95555;
    --color-secondary: #4ecdc4;
    --color-secondary-dark: #32aaa2;

    --color-bg: #fff8f2;
    --color-card: #ffffff;
    --color-text: #252525;
    --color-muted: #6b6b6b;
    --color-border: #eadfd6;

    --color-success-bg: #ddf8e8;
    --color-success-border: #9be0b6;
    --color-error-bg: #ffe2e2;
    --color-error-border: #ffabab;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --shadow-soft: 0 12px 35px rgba(80, 45, 20, 0.08);
    --shadow-button: 0 8px 18px rgba(255, 107, 107, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 107, 107, 0.14), transparent 30%),
        radial-gradient(circle at top right, rgba(78, 205, 196, 0.16), transparent 30%),
        var(--color-bg);
    color: var(--color-text);
    line-height: 1.55;
}

body::before {
    content: "";
    display: block;
    height: 6px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

body.menu-open {
    overflow: hidden;
}

.container {
    width: min(100% - 28px, 960px);
    margin: 28px auto;
    padding: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(234, 223, 214, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

h1,
h2,
h3 {
    line-height: 1.18;
    margin-top: 0;
    color: var(--color-text);
}

h1 {
    font-size: clamp(2rem, 7vw, 3.2rem);
    letter-spacing: -0.04em;
    margin-bottom: 16px;
}

h2 {
    font-size: clamp(1.35rem, 4vw, 2rem);
    letter-spacing: -0.025em;
}

h3 {
    font-size: 1.15rem;
}

p {
    margin-top: 0;
    color: var(--color-muted);
}

a {
    color: var(--color-primary-dark);
    font-weight: 650;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 750;
    color: var(--color-text);
}

input,
textarea,
select {
    width: 100%;
    min-height: 48px;
    padding: 13px 14px;
    margin-bottom: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--color-text);
    font: inherit;
    font-size: 16px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.16);
}

input[readonly],
input:disabled {
    background: #f8f3ef;
    color: var(--color-muted);
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    box-shadow: var(--shadow-button);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

button:hover,
.button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

button:active,
.button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.button.secondary,
button.secondary {
    background: var(--color-secondary);
    box-shadow: 0 8px 18px rgba(78, 205, 196, 0.25);
}

.button.secondary:hover,
button.secondary:hover {
    background: var(--color-secondary-dark);
}

.error,
.success {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    font-weight: 650;
}

.error {
    background: var(--color-error-bg);
    border: 1px solid var(--color-error-border);
    color: #9d2222;
}

.success {
    background: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
    color: #23663b;
}

/* Almindelig gammel nav - bruges kun på sider uden topbar */
.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--color-border);
}

.nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 13px;
    background: #fff4ee;
    color: var(--color-primary-dark);
    text-decoration: none;
    border: 1px solid rgba(255, 107, 107, 0.18);
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 800;
}

.nav a:hover {
    background: #ffe8df;
}

.card {
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    background: var(--color-card);
    box-shadow: 0 8px 24px rgba(80, 45, 20, 0.045);
}

.card .card {
    background: #fffaf6;
    box-shadow: none;
}

img.profile {
    width: 112px;
    height: 112px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 8px 24px rgba(80, 45, 20, 0.14);
}

img.cover {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

img.wish-image {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

form[style*="display:inline"] {
    display: inline-flex !important;
    margin-right: 8px;
    margin-bottom: 8px;
}

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

/* Topbar + burgermenu */
.app-shell {
    width: min(100% - 28px, 960px);
    margin: 18px auto 0;
    position: relative;
    z-index: 120;
}

.topbar {
    position: sticky;
    top: 10px;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(234, 223, 214, 0.9);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(80, 45, 20, 0.10);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 900;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    border-radius: 50%;
    font-size: 1.05rem;
    flex: 0 0 auto;
}

.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 50%;
    box-shadow: none;
    background: var(--color-primary);
    flex: 0 0 auto;
}

.menu-toggle:hover {
    background: var(--color-primary-dark);
}

.menu-toggle-lines {
    display: grid;
    gap: 4px;
}

.menu-toggle-lines span {
    display: block;
    width: 19px;
    height: 2px;
    background: #fff;
    border-radius: 99px;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.menu-backdrop {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* Desktop-menu i topbar */
.topbar .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}

.topbar .nav a {
    min-height: 36px;
    padding: 8px 12px;
    white-space: nowrap;
}

.app-shell + .container {
    margin-top: 18px;
}

/* Mobil grundlayout */
@media (max-width: 700px) {
    body::before {
        height: 5px;
    }

    .container {
        width: min(100% - 18px, 960px);
        margin: 12px auto;
        padding: 18px;
        border-radius: 20px;
    }

    body:not(.menu-open) main .nav,
    main.container > .nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    main.container > .nav a {
        width: 100%;
        min-height: 42px;
        padding: 10px 8px;
        font-size: 0.88rem;
        text-align: center;
    }

    .card {
        padding: 16px;
        border-radius: 18px;
    }

    button,
    .button {
        width: 100%;
        margin-bottom: 8px;
    }

    form[style*="display:inline"] {
        display: block !important;
        width: 100%;
        margin-right: 0;
    }

    form[style*="display:inline"] button {
        width: 100%;
    }

    img.profile {
        width: 96px;
        height: 96px;
    }

    img.wish-image {
        max-width: 100%;
    }

    input[type="text"][readonly] {
        font-size: 0.9rem;
    }
}

/* Mobil topbar + slide-in burgermenu */
@media (max-width: 760px) {
    .app-shell {
        width: min(100% - 18px, 960px);
        margin-top: 10px;
        z-index: 120;
    }

    .topbar {
        top: 8px;
        z-index: 120;
        padding: 10px 10px 10px 12px;
        border-radius: 24px;
    }

    .brand {
        font-size: 1.05rem;
    }

    .menu-toggle {
        display: inline-flex;
        position: relative;
        z-index: 140;
    }

    .topbar .nav {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 130;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 10px;
        width: min(82vw, 340px);
        height: 100vh;
        height: 100dvh;
        margin: 0;
        padding: 88px 18px 18px;
        background: #fff;
        border: 0;
        border-left: 1px solid var(--color-border);
        box-shadow: -20px 0 50px rgba(80, 45, 20, 0.18);
        transform: translateX(110%);
        transition: transform 0.22s ease;
        overflow-y: auto;
        border-radius: 0;
    }

    .topbar .nav a {
        width: 100%;
        justify-content: flex-start;
        min-height: 50px;
        padding: 13px 14px;
        font-size: 1rem;
        background: #fff8f2;
        border-radius: 16px;
    }

    body.menu-open .topbar .nav {
        transform: translateX(0);
    }

    .menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 90;
        display: block;
        background: rgba(37, 37, 37, 0.32);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    body.menu-open .menu-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    body.menu-open .menu-toggle {
        background: var(--color-primary-dark);
    }

    body.menu-open .menu-toggle-lines span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    body.menu-open .menu-toggle-lines span:nth-child(2) {
        opacity: 0;
    }

    body.menu-open .menu-toggle-lines span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

/* Meget små telefoner */
@media (max-width: 390px) {
    .container {
        padding: 14px;
    }

    h1 {
        font-size: 2rem;
    }

    main.container > .nav {
        grid-template-columns: 1fr;
    }

    .topbar .nav {
        width: 88vw;
    }
}