* {
    font-family: Inter;
}

body {
    margin: 0;
    background: #f5f2eb;

    /* background: url("background.png") no-repeat center center fixed;
    background-size: cover; */
}

html,
body {
    overscroll-behavior-x: none;
}

:root {
    --cream: #f5f2eb;
    --paper: #fffef9;
    --ink: #2c2820;
    --ink-light: #8a8070;
    --accent: #c0392b;
    --grid: #d4d0c8;
}

/* login page */

body.login-page {
    font-family: Inter, sans-serif;
    background: #f5f2eb;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 16px;
}

.login-container {
    background: #fffef9;
    border: 1px solid #d4d0c8;
    border-radius: 12px;
    padding: 32px;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(44, 40, 32, 0.08);
}

.logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
}

.logo h1 {
    font-size: 20px;
    font-weight: 600;
    color: #2c2820;
    text-align: center;
    margin-bottom: 4px;
}

.subtitle {
    text-align: center;
    color: #8a8070;
    font-size: 13px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #2c2820;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d4d0c8;
    border-radius: 6px;
    font-size: 13px;
    font-family: Inter, sans-serif;
    transition: border-color 0.15s;
    background: #fffef9;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #2c2820;
}

.btn {
    width: 100%;
    padding: 10px;
    background: #2c2820;
    color: #fffef9;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
    margin-top: 6px;
}

.btn:hover {
    opacity: 0.9;
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-text {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: #8a8070;
}

.toggle-text a {
    color: #2c2820;
    font-weight: 600;
    text-decoration: none;
}

.toggle-text a:hover {
    text-decoration: underline;
}

.error-message {
    background: #fff3f3;
    border: 1px solid #ffcdd2;
    color: #c0392b;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
}

.error-message.show {
    display: block;
}

.back-link {
    text-align: center;
    margin-top: 16px;
}

.back-link a {
    color: #8a8070;
    text-decoration: none;
    font-size: 12px;
}

.back-link a:hover {
    color: #2c2820;
}

/* main stylings */

.month-header {
    text-align: center;
    font-weight: bold;
    font-size: 20px;
    padding: 10px 0;
    z-index: 10;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

#monthHeader {
    min-width: 120px;
    text-align: center;
}

.month-nav-btn {
    background: none;
    border: 1px solid var(--grid);
    color: var(--ink);
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    padding: 0;
    flex-shrink: 0;
}

.month-nav-btn:hover {
    background: rgba(44, 40, 32, 0.05);
    transform: scale(1.05);
}

.month-nav-btn:active {
    transform: scale(0.95);
}

.month-year {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.6;
    margin-top: 2px;
}

.table-wrapper {
    overflow-x: auto;
    width: 100%;
    margin-top: 20px;
    overscroll-behavior-x: none;
    border: 1px solid var(--grid);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(44, 40, 32, 0.07);
}

table {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
    overscroll-behavior-x: none;
    background: var(--paper);
}

th,
td {
    border-right: 1px solid var(--grid);
    border-bottom: 1px solid var(--grid);
    white-space: nowrap;
    text-align: center;
    width: 48px;
    min-width: 48px;
    height: 48px;
}

thead tr:first-child th {
    border-top: none;
    background: var(--paper);
}

thead tr:first-child th.today {
    background: var(--ink);
}

tr th:first-child,
tr td:first-child {
    border-left: none;
}

th:last-child,
td:last-child {
    border-right: none;
}

tbody tr:last-child td {
    border-bottom: none;
}

thead th:first-child {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-family: 'DM Mono', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ink-light);
}

.weekday {
    font-size: 9px;
    opacity: 0.6;
}

.date-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
}

th.today {
    background: var(--ink);
}

th.today .date-number {
    color: var(--paper);
}

th.today .weekday {
    color: var(--paper);
    opacity: 0.6;
}

.habit-col,
tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 5;
    background: var(--paper);
    width: 120px;
    min-width: 120px;
    text-align: left;
    white-space: normal;
    max-width: 160px;
    word-break: break-word;
    padding: 8px 14px;
}

/* day cell styling */
.day-cell {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background 0.15s;
}

.day-cell:hover {
    background: rgba(44, 40, 32, 0.04);
}

.cell-stamp {
    position: absolute;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.stamp-hover-preview {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 35px;
    height: 35px;
    background-image: url("images/ok.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    filter: grayscale(100%);
    opacity: 0.35;
    transition: opacity 0.12s ease;
}

.habit-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 13px;
    background: transparent;
    color: var(--ink);
    white-space: normal;
    word-break: break-word;
    font-family: inherit;
    padding: 2px 0;
}

.habit-input::placeholder {
    color: var(--ink-light);
}

.habit-text {
    display: block;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: var(--ink);
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}

.habit-input.invalid {
    border-bottom: 2px solid #c0392b;
    background: transparent;
}

.habit-input.invalid::placeholder {
    color: #c0392b;
}

/* navbar styles */
.navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-bottom: 1px solid var(--grid);
    background: #f5f2eb;
}

.nav-left {
    font-weight: bold;
    font-size: 18px;
    color: var(--ink);
}

.nav-right {
    position: relative;
}

nav a {
    text-decoration: none;
    color: var(--ink)
}

/* settings dropdown */
.settings-dropdown {
    position: relative;
}

.settings-btn {
    background: none;
    border: none;
    color: var(--ink-light);
    font-size: 14px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
    font-family: Inter;
}

.settings-btn:hover {
    background: rgba(44, 40, 32, 0.05);
    color: var(--ink);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--paper);
    border: 1px solid var(--grid);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(44, 40, 32, 0.1);
    min-width: 160px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.15s, transform 0.15s;
}

.dropdown-menu.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--ink);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
    border-radius: 6px;
    margin: 4px;
}

.dropdown-item:hover {
    background: rgba(44, 40, 32, 0.05);
}

.settings-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 40, 32, 0.45);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.settings-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.settings-popup {
    background: var(--paper);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(44, 40, 32, 0.25), 0 4px 16px rgba(44, 40, 32, 0.1);
    width: 480px;
    max-width: 95vw;
    transform: scale(0.9) translateY(12px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.settings-overlay.open .settings-popup {
    transform: scale(1) translateY(0);
}

.settings-popup-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--grid);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-popup-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    margin: 0;
}

.settings-popup-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-light);
    font-size: 18px;
    padding: 2px 4px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.settings-popup-close:hover {
    color: var(--ink);
    background: rgba(44, 40, 32, 0.07);
}

.settings-popup-content {
    padding: 24px;
}

.setting-item {
    margin-bottom: 24px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}

.setting-item .btn-secondary {
    width: 100%;
    text-align: center;
    margin-bottom: 8px;
}

.setting-description {
    font-size: 12px;
    color: var(--ink-light);
    line-height: 1.5;
    margin: 0;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px 40px 24px;
}

#add-habit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ink);
    color: var(--paper);
    border: none;
    padding: 11px 22px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
    margin-top: 16px;
    letter-spacing: 0.2px;
}

#add-habit:hover {
    opacity: .85;
    transform: translateY(-1px);
}

#add-habit:active {
    transform: translateY(0);
}

#empty-state {
    text-align: center;
    color: var(--ink-light);
    background: var(--paper);
    font-size: 14px;
    padding: 36px;
    font-style: italic;
    box-sizing: border-box;
    position: sticky;
    left: 0;
    width: 100%;
    z-index: 6;
}

/* chart section */
.chart-section {
    margin-top: 48px;
    background: var(--paper);
    border: 1px solid var(--grid);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(44, 40, 32, 0.07);
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 20px 0;
}

.chart-container {
    position: relative;
    height: 300px;
}

/* shake animation for invalid */

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-4px);
    }

    40% {
        transform: translateX(4px);
    }

    60% {
        transform: translateX(-3px);
    }

    80% {
        transform: translateX(3px);
    }
}

.shake {
    animation: shake 0.35s ease;
}

.delete-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #c0392b;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
}

.habit-cell {
    position: relative;
}

.habit-cell:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    transform: translateY(-50%) scale(1.1);
    background: #a02d24;
}

.stamp-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 40, 32, 0.45);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.stamp-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.stamp-popup {
    background: var(--paper);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(44, 40, 32, 0.25), 0 4px 16px rgba(44, 40, 32, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9) translateY(12px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 380px;
    max-width: 95vw;
}

.stamp-overlay.open .stamp-popup {
    transform: scale(1) translateY(0);
}

.stamp-popup-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--grid);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.stamp-popup-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stamp-popup-habit {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.1;
}

.stamp-popup-date {
    font-size: 11px;
    font-family: 'DM Mono', monospace;
    color: var(--ink-light);
    letter-spacing: 0.5px;
}

.stamp-popup-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-light);
    font-size: 18px;
    padding: 2px 4px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.stamp-popup-close:hover {
    color: var(--ink);
    background: rgba(44, 40, 32, 0.07);
}

.stamp-canvas-area {
    position: relative;
    margin: 16px 20px;
    border-radius: 10px;
    border: 1.5px dashed var(--grid);
    aspect-ratio: 1 / 1;
    width: calc(100% - 40px);
    background: #faf9f5;
    cursor: crosshair;
    overflow: hidden;
    user-select: none;
}

.canvas-hint {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--ink-light);
    font-size: 13px;
    pointer-events: none;
    transition: opacity 0.2s;
}

.canvas-hint .hint-icon {
    font-size: 28px;
    opacity: 0.4;
}

.canvas-hint .hint-text {
    font-style: italic;
    opacity: 0.6;
}

.canvas-hint.hidden {
    opacity: 0;
}

.placed-stamp {
    position: absolute;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.placed-stamp.new {
    animation: stampDown 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes stampDown {
    0% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0.4;
        filter: blur(2px);
    }

    55% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 1;
        filter: blur(0);
    }

    80% {
        transform: translate(-50%, -50%) scale(1.06);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

.stamp-popup-actions {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
}

.btn-primary {
    flex: 1;
    background: var(--ink);
    color: var(--paper);
    border: none;
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.15s;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    opacity: 0.85;
}

.btn-secondary {
    background: none;
    color: var(--ink-light);
    border: 1px solid var(--grid);
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.btn-secondary:hover {
    background: rgba(44, 40, 32, 0.05);
    color: var(--ink);
}

.btn-danger {
    background: none;
    color: #c0392b;
    border: 1px solid rgba(192, 57, 43, 0.3);
    padding: 11px 14px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-danger:hover {
    background: rgba(192, 57, 43, 0.07);
}

/* skeleton row styles for smoother loading */

.skeleton-row .skeleton-text {
    height: 14px;
    width: 80%;
    background: linear-gradient(90deg, #e8e4dc 25%, #f0ece4 50%, #e8e4dc 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* landing page styles */

body.landing {
    background: var(--cream);
    margin: 0;
}

.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.landing-login-btn {
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-light);
    padding: 8px 14px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.landing-login-btn:hover {
    color: var(--ink);
    background: rgba(44, 40, 32, 0.05);
}

.landing-cta-btn {
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 6px;
    transition: opacity 0.15s;
}

.landing-cta-btn:hover {
    opacity: 0.82;
}

/* hero  */

.hero {
    padding: 80px 24px 60px;
    min-height: calc(100vh - 49px);
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.hero-inner {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-headline {
    font-family: 'Newsreader', serif;
    font-size: clamp(42px, 8vw, 72px);
    font-weight: 300;
    line-height: 1.1;
    color: var(--ink);
    margin: 0 0 24px;
    letter-spacing: -1px;
}

.hero-headline em {
    font-style: italic;
    font-weight: 400;
}

.hero-sub {
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink-light);
    max-width: 500px;
    margin: 0 0 36px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 56px;
}

.btn-hero-primary {
    display: inline-block;
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 8px;
    letter-spacing: 0.2px;
    transition: opacity 0.15s, transform 0.15s;
}

.btn-hero-primary:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.btn-hero-primary:active {
    transform: translateY(0);
}

.hero-login-link {
    font-size: 13px;
    color: var(--ink-light);
    text-decoration: none;
    transition: color 0.15s;
}

.hero-login-link:hover {
    color: var(--ink);
}

.stamp-editor-section {
    padding: 80px 24px;
    border-top: 1px solid var(--grid);
    background: var(--cream);
}

/* features section */

.features {
    padding: 80px 24px;
    border-top: 1px solid var(--grid);
    background: var(--paper);
}

.features-inner {
    max-width: 900px;
    margin: 0 auto;
}

.features-heading {
    font-family: 'Newsreader', serif;
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 300;
    line-height: 1.15;
    color: var(--ink);
    margin: 0 0 52px;
    letter-spacing: -0.5px;
    text-align: center;
}

.features-heading em {
    font-style: italic;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--grid);
    border-radius: 10px;
    overflow: hidden;
}

.feature-card {
    padding: 32px 28px;
    border-right: 1px solid var(--grid);
    background: var(--paper);
    transition: background 0.15s;
}

.feature-card:last-child {
    border-right: none;
}

.feature-card:hover {
    background: #faf9f4;
}

.feature-title {
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 600;
    font-style: normal;
    color: var(--ink);
    margin: 0 0 10px;
    letter-spacing: 0;
}

.feature-desc {
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink-light);
    margin: 0;
}

@media (max-width: 680px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        border-right: none;
        border-bottom: 1px solid var(--grid);
    }

    .feature-card:last-child {
        border-bottom: none;
    }
}

/* footer cta */

.footer-cta {
    padding: 100px 24px;
    border-top: 1px solid var(--grid);
    text-align: center;
}

.footer-cta-inner {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-cta-heading {
    font-family: 'Newsreader', serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 300;
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.5px;
}

.footer-cta-sub {
    font-size: 15px;
    color: var(--ink-light);
    margin: 0;
    line-height: 1.5;
}

/* footer */
.footer {
    border-top: 1px solid var(--grid);
    padding: 40px 24px 28px;
    background: var(--cream);
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.footer-brand {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

.footer-tagline {
    font-size: 13px;
    color: var(--ink-light);
    margin: 4px 0 0;
    font-style: italic;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-links a {
    font-size: 13px;
    color: var(--ink-light);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: var(--ink);
}

.footer-bottom {
    max-width: 1400px;
    margin: 24px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--grid);
    font-size: 12px;
    color: var(--ink-light);
    opacity: 0.6;
}

@media (max-width: 500px) {
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

/* responsive  */

@media (max-width: 600px) {
    .hero {
        padding: 52px 16px 40px;
    }

    .features {
        padding: 52px 16px;
    }

    .footer-cta {
        padding: 64px 16px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* screenshots showcase section */
.screenshots {
    padding: 80px 24px;
    border-top: 1px solid var(--grid);
    background: var(--paper);
    overflow: hidden;
}

.screenshots-inner {
    max-width: 900px;
    margin: 0 auto;
}

.screenshots-heading {
    font-family: 'Newsreader', serif;
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 300;
    line-height: 1.15;
    color: var(--ink);
    margin: 0 0 52px;
    letter-spacing: -0.5px;
    text-align: center;
}

.screenshots-heading em {
    font-style: italic;
}

.screenshots-grid {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.screenshot-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.screenshot-item.reverse {
    direction: rtl;
}

.screenshot-item.reverse>* {
    direction: ltr;
}

.screenshot-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.screenshot-eyebrow {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ink-light);
}

.screenshot-title {
    font-family: 'Newsreader', serif;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 300;
    color: var(--ink);
    margin: 0;
    line-height: 1.2;
}

.screenshot-title em {
    font-style: italic;
}

.screenshot-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink-light);
    margin: 0;
}

.screenshot-image-wrap {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--grid);
    box-shadow: 0 8px 32px rgba(44, 40, 32, 0.1), 0 2px 8px rgba(44, 40, 32, 0.06);
    background: var(--paper);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.screenshot-image-wrap:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(44, 40, 32, 0.14), 0 4px 12px rgba(44, 40, 32, 0.08);
}

.screenshot-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

/* divider between the two items */
.screenshots-divider {
    width: 1px;
    height: 1px;
    border: none;
    border-top: 1px dashed var(--grid);
    margin: 0;
    opacity: 0.6;
}

@media (max-width: 700px) {
    .screenshots {
        padding: 52px 16px;
    }

    .screenshot-item,
    .screenshot-item.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
        gap: 20px;
    }

    /* on mobile show image first, then text */
    .screenshot-item .screenshot-image-wrap {
        order: -1;
    }
}

/* stamp settings preview */
.stamp-preview-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.stamp-preview-box {
    width: 48px;
    height: 48px;
    border: 1px solid var(--grid);
    border-radius: 6px;
    background: #faf9f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.stamp-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

/* pixel editor overlay */
.pixel-editor-overlay {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 40, 32, 0.45);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.pixel-editor-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.pixel-editor-popup {
    background: var(--paper);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(44, 40, 32, 0.25), 0 4px 16px rgba(44, 40, 32, 0.1);
    width: 340px;
    max-width: 95vw;
    transform: scale(0.9) translateY(12px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.pixel-editor-overlay.open .pixel-editor-popup {
    transform: scale(1) translateY(0);
}

.pixel-editor-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--grid);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pixel-editor-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

.pixel-editor-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

#pixelCanvas {
    border: 1px solid var(--grid);
    border-radius: 6px;
    cursor: crosshair;
    image-rendering: pixelated;
    width: 256px;
    height: 256px;
}

.pixel-editor-tools {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tool-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-row label {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-light);
    width: 36px;
    flex-shrink: 0;
}

.color-swatches {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.1s;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: var(--ink);
}

.tool-btns {
    display: flex;
    gap: 6px;
}

.tool-btn {
    background: none;
    border: 1px solid var(--grid);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    color: var(--ink-light);
    transition: background 0.15s, color 0.15s;
}

.tool-btn:hover {
    background: rgba(44, 40, 32, 0.05);
    color: var(--ink);
}

.tool-btn.active {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.pixel-editor-actions {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
}