:root {
    --bg: #f0ede9;
    --card-bg: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --accent: #3b82f6;
    --border: rgba(0,0,0,0.07);
    --radius: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'DM Sans', sans-serif;
}

html {
    font-size: 16px;
}

body {
    background-color: var(--bg);
    background-image: url('https://www.techmadeblog.it/helpcenter/images/bg.png');
    background-repeat: repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.page-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
    max-width: 500px;
}

.card {
    max-width: 500px;
    width: 100%;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 32px rgba(0,0,0,0.10), 0 32px 64px rgba(0,0,0,0.06);
    padding: 48px 40px 44px;
    text-align: center;
    animation: fadeUp 0.6s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

.logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.app-logo {
    width: 100px;
    height: 100px;
    border-radius: 26px;
    object-fit: contain;
    animation: logoPop 0.7s 0.15s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes logoPop {
    from { opacity: 0; transform: scale(0.7); }
    to   { opacity: 1; transform: scale(1); }
}

.app-name {
    font-family: 'Sora', sans-serif;
    font-size: 1.75em;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.app-sub {
    font-size: 0.82em;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 36px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 28px;
    color: var(--text-secondary);
    font-size: 0.78em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.store-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 36px;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 22px;
    border-radius: 14px;
    text-decoration: none;
    background: var(--text-primary);
    color: #fff;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    box-shadow: 0 4px 18px rgba(26,26,46,0.18);
}

.store-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(26,26,46,0.24);
}

.store-btn.apple { background: #111; }

.store-btn.google {
    background: #fff;
    color: var(--text-primary);
    border: 1.5px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.store-btn.google:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.13); }

.store-btn .store-icon { font-size: 2em; line-height: 1; flex-shrink: 0; }

.store-btn .store-text { text-align: left; line-height: 1.2; }

.store-btn .store-text small {
    display: block;
    font-size: 0.72em;
    opacity: 0.7;
    font-weight: 400;
    margin-bottom: 2px;
}

.store-btn .store-text strong { font-size: 1.05em; font-weight: 600; }

.store-btn.google .store-icon,
.store-btn.google .store-text { color: var(--text-primary); }

.qr-alert {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    background: #fffbeb;
    border: 1.5px solid #fcd34d;
    border-radius: 14px;
    padding: 15px 18px;
    margin-bottom: 16px;
    text-align: left;
    animation: fadeUp 0.6s 0.25s cubic-bezier(0.22,1,0.36,1) both;
}

.qr-alert .qr-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #fef3c7;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15em;
    color: #b45309;
    margin-top: 1px;
}

.qr-alert .qr-title {
    font-size: 0.72em;
    font-weight: 700;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 5px;
}

.qr-alert .qr-text {
    font-size: 0.86em;
    font-weight: 500;
    color: #78350f;
    line-height: 1.5;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.action-buttons + .action-buttons { margin-top: 12px; }

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg,#1d4ed8 0%,#3b82f6 100%);
    color: #fff;
    padding: 16px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    box-shadow: 0 4px 20px rgba(59,130,246,0.28);
    letter-spacing: 0.2px;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
}

.action-btn i { font-size: 1.1em; }

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(59,130,246,0.42);
}

.custom-btn {
    background: var(--custom-button-color, #f0ede9);
    color: var(--custom-button-text, #141414);
    box-shadow: 0 4px 20px color-mix(in srgb, var(--custom-button-color, #f0ede9) 32%, transparent);
}

.custom-btn:hover {
    box-shadow: 0 10px 32px color-mix(in srgb, var(--custom-button-color, #f0ede9) 45%, transparent);
}

.custom-btn .custom-icon {
    font-size: 1.15em;
    line-height: 1;
}

.manual-section {
    text-align: left;
    animation: fadeUp 0.6s 0.1s cubic-bezier(0.22,1,0.36,1) both;
}

/* Il contenuto interno del manuale è escluso dal CSS del template. */
.manual-content {
    font-family: initial;
    font-size: initial;
    line-height: normal;
    color: initial;
    text-align: initial;
}

body.manual-open { overflow: hidden; }

.manual-fullpage {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--card-bg);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.manual-fullpage.open { display: block; }

.manual-fullpage-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    border-bottom: 0;
    padding: 18px clamp(20px, 5vw, 64px);
}

.manual-fullpage-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
}

.manual-fullpage-close {
    position: fixed;
    right: clamp(16px, 3vw, 30px);
    bottom: clamp(16px, 3vw, 30px);
    z-index: 2002;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 50px;
    background: #141414;
    color: #ffffff;
    padding: 11px 18px;
    font: 600 0.9em 'DM Sans', sans-serif;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.24);
}

.manual-fullpage-inner {
    width: min(100%, 1000px);
    margin: 0 auto;
    padding: clamp(30px, 6vw, 72px) clamp(20px, 5vw, 60px) 120px;
}

@media (max-width: 768px) {
    html { font-size: 17px; }
    .card { padding: 40px 28px 36px; }
}

@media (max-width: 540px) {
    html { font-size: 18px; }
    body { padding: 24px 14px; }
    .card { padding: 36px 22px 30px; border-radius: 20px; }
    .app-logo { width: 92px; height: 92px; }
    .app-name { font-size: 1.6em; }
    .app-sub { font-size: 0.9em; letter-spacing: 1.5px; margin-bottom: 30px; }
    .divider { font-size: 0.85em; margin-bottom: 24px; }
    .store-btn { padding: 16px 18px; gap: 14px; }
    .store-btn .store-text small { font-size: 0.78em; }
    .store-btn .store-text strong { font-size: 1.12em; }
    .qr-alert { padding: 14px 16px; }
    .qr-alert .qr-title { font-size: 0.78em; }
    .qr-alert .qr-text { font-size: 0.92em; }
    .action-btn { padding: 17px 30px; font-size: 1.05em; }
}

@media (max-width: 360px) {
    html { font-size: 18.5px; }
    .card { padding: 30px 16px 26px; }
    .app-logo { width: 84px; height: 84px; }
}