:root {
    --paper: #f5f3ed;
    --paper-deep: #ebe7de;
    --ink: #162622;
    --muted: #68736f;
    --line: rgba(22, 38, 34, .14);
    --moss: #48665c;
    --sage: #a8b7a4;
    --white: #fffdf8;
    --error: #9b3e36;
    --success: #2f6b52;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 82% -10%, rgba(168,183,164,.24), transparent 34rem), var(--paper); }
a { color: inherit; }
button, input, textarea { font: inherit; }
button, .button { min-height: 44px; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .8rem 1rem; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }
.site-header { height: 78px; max-width: 1280px; margin: auto; padding: 0 3rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: .7rem; align-items: center; text-decoration: none; font-weight: 750; letter-spacing: -.03em; font-size: 1.15rem; }
.brand-mark { width: 31px; height: 31px; border: 1.5px solid var(--ink); border-radius: 50%; display: grid; place-items: center; position: relative; }
.brand-mark::before, .brand-mark::after, .brand-mark span { content: ""; position: absolute; border: 1px solid var(--ink); border-radius: 50%; }
.brand-mark::before { inset: 5px 0; }
.brand-mark::after { inset: 0 9px; }
.brand-mark span { width: 5px; height: 5px; background: var(--ink); border: 0; }
nav { display: flex; align-items: center; gap: 1.5rem; }
nav form { margin: 0; }
.nav-link { color: #41504b; text-decoration: none; font-size: .9rem; }
.nav-link.active { color: var(--ink); font-weight: 650; }
.nav-link.muted { opacity: .45; cursor: default; }

.button { border: 0; border-radius: 99px; padding: .75rem 1.25rem; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; text-decoration: none; font-weight: 700; cursor: pointer; transition: transform .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(72,102,92,.35); outline-offset: 3px; }
.button-dark { color: var(--white); background: var(--ink); box-shadow: 0 8px 22px rgba(22,38,34,.16); }
.button-dark:hover { background: #29443c; }
.button-quiet { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.button-small { padding: .55rem 1rem; min-height: 38px; font-size: .88rem; }
.button-full { width: 100%; margin-top: .65rem; }
.text-link { font-size: .9rem; text-underline-offset: 4px; }

.hero { max-width: 1160px; margin: 0 auto; padding: 6.8rem 3rem 3rem; text-align: center; }
.eyebrow { color: var(--moss); text-transform: uppercase; letter-spacing: .16em; font-size: .68rem; font-weight: 800; display: flex; align-items: center; gap: .6rem; justify-content: center; }
.eyebrow span { width: 23px; height: 1px; background: var(--moss); display: inline-block; }
.hero h1, .auth-intro h1 { margin: 1.25rem auto 1.35rem; max-width: 870px; font: 500 clamp(3.3rem, 7vw, 6.9rem)/.94 Georgia, serif; letter-spacing: -.065em; }
em { color: var(--moss); font-weight: 400; }
.hero-copy { color: var(--muted); max-width: 580px; margin: 0 auto; font-size: 1.08rem; line-height: 1.65; }
.hero-actions { display: flex; gap: 1.5rem; align-items: center; justify-content: center; margin: 2.2rem 0 4rem; }
.panorama-card { height: 370px; max-width: 1030px; border-radius: 180px 180px 24px 24px; overflow: hidden; margin: auto; position: relative; background: #8fa7ab; box-shadow: 0 34px 70px rgba(28,50,44,.17); }
.panorama-sky { position: absolute; inset: 0; background: linear-gradient(#8ca8ac 0%, #c9d0c3 62%, #acafa0); }
.panorama-glow { position: absolute; z-index: 1; width: 9rem; height: 9rem; top: 3rem; left: 50%; border-radius: 50%; background: rgba(255,245,204,.85); filter: blur(8px); }
.panorama-hills { position: absolute; z-index: 2; left: -8%; right: -8%; height: 58%; bottom: 17%; background: #66827a; clip-path: polygon(0 75%, 12% 41%, 20% 64%, 33% 23%, 44% 62%, 59% 32%, 73% 64%, 87% 38%, 100% 74%, 100% 100%, 0 100%); }
.hill-two { background: #405e56; bottom: 5%; transform: scaleX(1.08); clip-path: polygon(0 61%, 12% 50%, 25% 73%, 42% 44%, 54% 70%, 67% 51%, 82% 67%, 100% 48%, 100% 100%, 0 100%); }
.panorama-ground { position: absolute; z-index: 3; inset: 78% 0 0; background: #2f4942; }
.viewer-chip { position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%,-50%); background: rgba(22,38,34,.68); color: white; backdrop-filter: blur(8px); padding: .65rem 1rem; border-radius: 99px; font-size: .77rem; }
.viewer-dots { position: absolute; z-index: 4; bottom: 1.1rem; left: 50%; transform: translateX(-50%); display: flex; gap: .35rem; }
.viewer-dots span { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.48); }
.viewer-dots .selected { width: 17px; border-radius: 5px; background: white; }
.promise-grid { max-width: 1160px; margin: 1.5rem auto 7rem; padding: 0 3rem; display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); }
.promise-grid article { padding: 2.3rem 2rem 0 0; }
.promise-grid .number { color: var(--moss); font: italic .8rem Georgia,serif; }
.promise-grid h2 { font: 500 1.3rem Georgia,serif; margin: .7rem 0; }
.promise-grid p { color: var(--muted); font-size: .88rem; line-height: 1.6; max-width: 290px; }

.auth-shell { max-width: 1180px; min-height: calc(100vh - 150px); margin: auto; padding: 5rem 3rem 7rem; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 8rem; }
.auth-intro .eyebrow { justify-content: flex-start; }
.auth-intro h1 { font-size: clamp(3.2rem, 5.5vw, 5.7rem); margin-left: 0; }
.auth-intro > p { color: var(--muted); line-height: 1.7; max-width: 480px; }
.auth-intro blockquote { border-left: 1px solid var(--sage); margin: 3rem 0 0; padding-left: 1.2rem; color: var(--moss); font: italic 1rem Georgia,serif; }
.form-card { background: rgba(255,253,248,.86); border: 1px solid rgba(22,38,34,.1); border-radius: 20px; padding: 2.6rem; box-shadow: 0 28px 70px rgba(22,38,34,.08); }
.form-kicker { color: var(--moss) !important; text-transform: uppercase; letter-spacing: .15em; font-size: .67rem !important; font-weight: 800; }
.form-card h1, .form-card h2 { font: 500 2.1rem Georgia,serif; letter-spacing: -.025em; margin: .35rem 0 .45rem; }
.form-card > p { color: var(--muted); font-size: .88rem; }
.form-card > p a { color: var(--ink); font-weight: 700; }
form { margin-top: 1.8rem; }
label { display: flex; justify-content: space-between; margin: 1.1rem 0 .45rem; font-weight: 700; font-size: .79rem; }
label span { color: var(--muted); font-weight: 500; }
input, textarea { display: block; width: 100%; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.65); padding: .85rem .95rem; color: var(--ink); }
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #9ba29e; }
.field-error { color: var(--error); font-size: .75rem; margin: .35rem 0; }
.privacy-note { text-align: center; padding-top: 1.2rem; margin-bottom: 0; border-top: 1px solid var(--line); }
.privacy-note span { color: var(--moss); }
.alert { margin: 1.2rem 0; padding: .85rem 1rem; border-radius: 9px; font-size: .86rem; border: 1px solid; }
.alert-error { color: var(--error); background: #faefec; border-color: #e9c7c1; }
.alert-success { color: var(--success); background: #edf6f1; border-color: #c3ded1; }

.dashboard-shell { max-width: 1180px; margin: auto; padding: 4.8rem 3rem 8rem; }
.dashboard-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.dashboard-head .eyebrow { justify-content: flex-start; }
.dashboard-head h1 { font: 500 clamp(3rem,6vw,5rem) Georgia,serif; margin: .8rem 0 .4rem; letter-spacing: -.055em; }
.dashboard-head p:not(.eyebrow) { color: var(--muted); margin: 0; }
.storage-summary { display: grid; grid-template-columns: 220px 1fr auto; align-items: center; gap: 1.5rem; margin: 3rem 0; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.38); }
.storage-summary p { color: var(--muted); font-size: .72rem; margin: 0 0 .3rem; }
.storage-summary strong { font-size: .86rem; }
.storage-summary strong span { color: var(--muted); font-weight: 500; }
.storage-track { height: 3px; background: var(--paper-deep); border-radius: 3px; overflow: hidden; }
.storage-track span { display: block; height: 100%; background: var(--moss); }
.privacy-pill { color: var(--success); border: 1px solid rgba(47,107,82,.25); border-radius: 99px; padding: .45rem .75rem; font-size: .7rem; font-weight: 700; }
.empty-state { border: 1px dashed rgba(22,38,34,.22); border-radius: 20px; padding: 5.5rem 2rem; text-align: center; background: rgba(255,255,255,.25); }
.empty-state h2 { font: 500 2.2rem Georgia,serif; margin: .4rem 0 .7rem; }
.empty-state > p:not(.form-kicker) { color: var(--muted); max-width: 480px; margin: 0 auto 1.7rem; line-height: 1.6; }
.empty-orbit { width: 72px; height: 72px; margin: 0 auto 1.4rem; border: 1px solid var(--sage); border-radius: 50%; position: relative; display: grid; place-items: center; }
.empty-orbit::before { content: ""; position: absolute; width: 92px; height: 35px; border: 1px solid var(--sage); border-radius: 50%; transform: rotate(-20deg); }
.empty-orbit span { width: 13px; height: 13px; background: var(--moss); border-radius: 50%; }
.album-toolbar { display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.album-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.6rem; }
.album-card { border-radius: 15px; overflow: hidden; background: rgba(255,253,248,.7); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.album-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(22,38,34,.09); }
.album-card-link { display: block; color: inherit; text-decoration: none; }
.album-cover { height: 205px; position: relative; overflow: hidden; background: linear-gradient(145deg,#90a7a1,#36564d); }
.cover-2 { background: linear-gradient(145deg,#c5a885,#6e8065); }
.cover-3 { background: linear-gradient(145deg,#8c9eb6,#555c72); }
.cover-4 { background: linear-gradient(145deg,#b0a48c,#725d50); }
.cover-orbit { position: absolute; width: 240px; height: 90px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%) rotate(-14deg); }
.cover-orbit::after { content: ""; position: absolute; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.12); left: 47%; top: 20%; }
.album-count { position: absolute; z-index: 2; right: .8rem; bottom: .8rem; color: white; background: rgba(22,38,34,.55); border-radius: 99px; padding: .35rem .6rem; font-size: .65rem; backdrop-filter: blur(5px); }
.album-meta { padding: 1.2rem; }
.album-meta h2 { font: 500 1.35rem Georgia,serif; margin: 0 0 .35rem; }
.album-meta p { color: var(--muted); font-size: .8rem; line-height: 1.45; min-height: 2.4em; margin: 0 0 1rem; }
.album-meta span { color: #8a918e; font-size: .65rem; }

.album-page { padding-top: 3rem; }
.album-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 2.2rem; }
.album-page-head .eyebrow { justify-content: flex-start; }
.album-page-head h1 { font: 500 clamp(2.8rem, 6vw, 5rem) Georgia,serif; letter-spacing: -.055em; margin: .8rem 0 .35rem; }
.album-page-head p:not(.eyebrow) { color: var(--muted); margin: 0; max-width: 650px; line-height: 1.6; }
.upload-card { margin: 0 0 3rem; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,253,248,.72); overflow: hidden; }
.drop-zone { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.2rem; padding: 1.8rem; transition: background .2s, border .2s; }
.drop-zone.dragging { background: #e8efe9; box-shadow: inset 0 0 0 2px var(--moss); }
.drop-zone h2 { font: 500 1.45rem Georgia,serif; margin: 0 0 .25rem; }
.drop-zone p { color: var(--muted); font-size: .8rem; margin: 0; }
.upload-orbit { width: 52px; height: 52px; border: 1px solid var(--sage); border-radius: 50%; display: grid; place-items: center; color: var(--moss); font-size: 1.4rem; }
.upload-picker { position: relative; }
.upload-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-card-foot { display: flex; justify-content: space-between; align-items: center; padding: .85rem 1.2rem; border-top: 1px solid var(--line); background: rgba(235,231,222,.45); }
.upload-card-foot p { color: var(--muted); font-size: .72rem; margin: 0; }
.upload-queue { list-style: none; margin: 0; padding: .4rem 1.2rem 1.2rem; }
.upload-row { display: grid; grid-template-columns: minmax(180px,1fr) minmax(100px,1fr) 180px auto; align-items: center; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.upload-file { min-width: 0; }
.upload-file strong, .upload-file span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-file strong { font-size: .8rem; }
.upload-file span, .upload-status { color: var(--muted); font-size: .68rem; margin: .15rem 0 0; }
.upload-progress { height: 4px; border-radius: 4px; background: var(--paper-deep); overflow: hidden; }
.upload-progress span { display: block; width: 0; height: 100%; background: var(--moss); transition: width .2s; }
.upload-complete .upload-status { color: var(--success); }
.upload-failed .upload-status { color: var(--error); }
.album-empty { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.album-empty h2 { color: var(--ink); font: 500 1.8rem Georgia,serif; margin: .3rem; }
.photo-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.3rem; }
.photo-card { overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,253,248,.75); }
.photo-card > a { display: block; aspect-ratio: 2/1; background: var(--paper-deep); overflow: hidden; }
.photo-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-card > div { padding: 1rem; }
.photo-card h2 { font: 500 1.08rem Georgia,serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 0 .25rem; }
.photo-card p { color: var(--muted); font-size: .68rem; margin: 0 0 .75rem; }
.photo-card div a { color: var(--moss); font-size: .7rem; font-weight: 700; text-underline-offset: 3px; }

.narrow-shell { max-width: 740px; min-height: calc(100vh - 150px); margin: auto; padding: 4.5rem 2rem 7rem; }
.back-link { color: var(--muted); text-decoration: none; font-size: .82rem; display: inline-block; margin-bottom: 1.5rem; }
.form-card-wide { padding: 3rem; }
.form-actions { margin-top: 1.8rem; padding-top: 1.3rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: .8rem; }
.error-shell { min-height: calc(100vh - 160px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3rem; }
.error-shell h1 { font: 500 3rem Georgia,serif; margin: .3rem; }
.error-shell > p:not(.form-kicker) { color: var(--muted); margin-bottom: 1.5rem; }
footer { max-width: 1180px; margin: auto; padding: 1.5rem 3rem 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .7rem; display: flex; justify-content: space-between; }

@media (max-width: 820px) {
    .site-header { padding: 0 1.25rem; }
    .nav-link.muted { display: none; }
    .auth-shell { grid-template-columns: 1fr; gap: 2.5rem; padding: 3.5rem 1.25rem 5rem; }
    .auth-intro blockquote { display: none; }
    .hero { padding: 5rem 1.25rem 2rem; }
    .panorama-card { height: 280px; border-radius: 120px 120px 18px 18px; }
    .promise-grid { padding: 0 1.25rem; grid-template-columns: 1fr; }
    .promise-grid article { border-bottom: 1px solid var(--line); padding: 1.6rem 0; }
    .dashboard-shell { padding: 3.5rem 1.25rem 6rem; }
    .dashboard-head { align-items: flex-start; flex-direction: column; }
    .storage-summary { grid-template-columns: 1fr auto; }
    .storage-track { grid-row: 2; grid-column: 1/-1; }
    .album-grid { grid-template-columns: repeat(2,1fr); }
    .photo-grid { grid-template-columns: repeat(2,1fr); }
    .drop-zone { grid-template-columns: auto 1fr; }
    .drop-zone .upload-picker { grid-column: 1/-1; width: 100%; }
    .upload-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 540px) {
    .site-header { height: 66px; }
    nav { gap: .75rem; }
    .nav-link.active { display: none; }
    .hero h1 { font-size: 3.25rem; }
    .hero-actions { flex-direction: column; margin-bottom: 3rem; }
    .panorama-card { height: 220px; border-radius: 100px 100px 14px 14px; }
    .auth-intro h1 { font-size: 3.25rem; }
    .form-card, .form-card-wide { padding: 1.5rem; border-radius: 14px; }
    .dashboard-head .button { width: 100%; }
    .storage-summary { grid-template-columns: 1fr; }
    .privacy-pill { justify-self: start; }
    .storage-track { grid-row: auto; grid-column: auto; }
    .album-grid { grid-template-columns: 1fr; }
    .photo-grid { grid-template-columns: 1fr; }
    .album-page-head { align-items: flex-start; flex-direction: column; }
    .drop-zone { grid-template-columns: 1fr; text-align: center; }
    .upload-orbit { margin: auto; }
    .upload-card-foot { align-items: stretch; flex-direction: column; gap: .7rem; }
    .upload-row { grid-template-columns: 1fr; gap: .4rem; }
    .empty-state { padding: 3.5rem 1.2rem; }
    footer { margin: 0 1.25rem; padding: 1.3rem 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
