/* Base */
:root {
  --paper: #f7f2e9;
  --ink: #173b38;
  --muted: #6e7d77;
  --line: #d9ded6;
  --coral: #e86c4c;
  --coral-dark: #c95138;
  --mint: #dbe9df;
  --card: #fffdf8;
  --shadow: 0 16px 40px rgba(27, 55, 47, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "DM Sans", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }

.page-shell { max-width: 1240px; margin: 0 auto; padding: 0 42px; overflow: hidden; }
.topbar { height: 66px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 22px; font-weight: 700; letter-spacing: -.8px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; background: var(--coral); color: white; border-radius: 50% 50% 50% 4px; font-family: "Playfair Display", serif; font-size: 18px; transform: rotate(-8deg); }
.brand-dot { color: var(--coral); }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.help-link { color: var(--coral-dark); font-size: 12px; font-weight: 700; text-decoration: none; }
.help-link:hover { text-decoration: underline; }
.topbar-note, .live-pill { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; letter-spacing: .4px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #5ca67b; box-shadow: 0 0 0 4px rgba(92, 166, 123, .13); }

.hero { display: flex; align-items: center; min-height: 72px; padding: 12px 7% 10px; background: linear-gradient(105deg, rgba(219,233,223,.48), transparent 68%); }
.eyebrow { margin: 0 0 7px; color: var(--coral-dark); font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font-family: "Playfair Display", serif; font-size: clamp(34px, 4vw, 50px); font-weight: 600; line-height: .93; letter-spacing: -2px; }
h1 em { color: var(--coral); font-weight: 600; }
.hero-description { max-width: 435px; margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.hero-stamp { width: 82px; height: 82px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-right: 4%; border: 1px solid var(--coral); border-radius: 50%; color: var(--coral-dark); transform: rotate(9deg); }
.hero-stamp span { font-family: "Playfair Display", serif; font-size: 32px; line-height: .8; }
.hero-stamp small { margin-top: 9px; font-size: 7px; line-height: 1.15; text-align: center; text-transform: uppercase; letter-spacing: 1px; }

.stats-strip { display: flex; align-items: center; gap: 22px; padding: 10px 7%; border-bottom: 1px solid var(--line); }
.stat { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.stat strong { font-family: "Playfair Display", serif; font-size: 30px; font-weight: 600; }
.stat span { color: var(--muted); font-size: 12px; }
.stat-wide { flex: 1; }
.stat-divider { height: 30px; width: 1px; background: var(--line); }

.workspace, .global-section { padding: 22px 7% 70px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
h2 { margin-bottom: 0; font-family: "Playfair Display", serif; font-size: 42px; font-weight: 600; letter-spacing: -1.3px; }
.helper-text { margin-bottom: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: right; }
.add-destination { padding: 20px 22px; margin-bottom: 36px; border: 1px solid var(--line); background: rgba(255,253,248,.45); }
.add-destination label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 700; }
.input-row { display: flex; gap: 10px; }
.input-wrap { position: relative; flex: 1; }
.search-icon { position: absolute; top: 9px; left: 13px; color: var(--muted); font-size: 24px; line-height: 1; transform: rotate(-20deg); }
input { width: 100%; height: 44px; padding: 0 14px 0 40px; border: 1px solid var(--line); border-radius: 2px; outline: none; background: var(--card); color: var(--ink); font-size: 14px; }
input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(232,108,76,.1); }
.suggestion-list { position: absolute; z-index: 5; top: calc(100% + 5px); right: 0; left: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 2px; background: var(--card); box-shadow: 0 12px 25px rgba(27, 55, 47, .12); }
.suggestion-item { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; font-size: 13px; }
.suggestion-item:last-child { border-bottom: 0; }
.suggestion-item:hover, .suggestion-item:focus { background: var(--mint); outline: 0; }
.suggestion-state { color: var(--muted); font-size: 11px; }
.button { border: 0; border-radius: 2px; font-size: 13px; font-weight: 700; transition: transform .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { padding: 0 20px; background: var(--coral); color: white; }
.button-primary:hover { background: var(--coral-dark); }
.button-primary span { margin-right: 5px; font-size: 18px; font-weight: 400; vertical-align: -1px; }
.form-hint { margin: 9px 0 0; color: var(--muted); font-size: 11px; }

.destination-grid { border-top: 1px solid var(--ink); }
.personal-row { position: relative; display: grid; grid-template-columns: 54px 92px 1fr 54px; align-items: center; gap: 16px; min-height: 96px; border-bottom: 1px solid var(--line); animation: rise .45s both; }
.personal-position { font-family: "Playfair Display", serif; font-size: 22px; }
.personal-thumb { width: 92px; height: 68px; background-position: center; background-size: cover; }
.personal-place h3 { margin: 0 0 4px; font-size: 16px; letter-spacing: -.3px; }
.personal-place p { margin: 0; color: var(--muted); font-size: 11px; }
.personal-row .like-button { justify-self: end; }
.destination-card { position: relative; overflow: hidden; min-height: 305px; background: var(--card); box-shadow: var(--shadow); animation: rise .45s both; }
.card-image { height: 185px; background-position: center; background-size: cover; }
.card-rank { position: absolute; top: 14px; left: 14px; display: grid; place-items: center; width: 35px; height: 35px; border-radius: 50%; background: var(--card); color: var(--ink); font-family: "Playfair Display", serif; font-size: 17px; box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.card-content { display: flex; align-items: center; justify-content: space-between; padding: 17px 17px 18px; }
.card-content h3 { margin-bottom: 3px; font-size: 17px; letter-spacing: -.3px; }
.card-content p { margin: 0; color: var(--muted); font-size: 11px; }
.place-tag { display: inline-block; padding: 4px 7px; margin-top: 9px; border: 1px solid #c9d9ce; border-radius: 10px; color: #527166; font-size: 9px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
.like-button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 82px; padding: 4px 8px; border: 0; border-radius: 4px; background: transparent; color: var(--coral-dark); transition: transform .2s, background .2s, box-shadow .2s; }
.like-button:hover, .like-button.liked { background: #fff0eb; color: var(--coral-dark); box-shadow: 0 0 0 5px rgba(232,108,76,.09); transform: translateY(-2px); }
.like-button.liked { animation: like-pop .5s ease-out; }
.heart { font-size: 15px; line-height: 1; }
.like-count { font-size: 20px; font-weight: 700; line-height: 1.05; }
.like-meta { display: flex; align-items: center; gap: 4px; }
.like-label { font-size: 9px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.remove-button { position: absolute; top: 12px; right: 12px; width: 25px; height: 25px; border: 0; border-radius: 50%; background: rgba(23,59,56,.7); color: white; opacity: 0; transition: opacity .2s; }
.personal-row:hover .remove-button, .destination-card:hover .remove-button { opacity: 1; }
.empty-state { padding: 55px 20px; border: 1px dashed #c7d0c7; text-align: center; }
.empty-icon { margin-bottom: 13px; color: var(--coral); font-size: 25px; }
.empty-state h3 { margin-bottom: 7px; font-family: "Playfair Display", serif; font-size: 22px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 13px; }

.global-section { border-top: 1px solid var(--line); padding-bottom: 95px; }
.global-heading { margin-bottom: 28px; }
.global-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 45px; }
.ranking-list { border-top: 1px solid var(--ink); }
.ranking-row { display: grid; grid-template-columns: 54px 62px 1fr auto; align-items: center; gap: 16px; min-height: 83px; border-bottom: 1px solid var(--line); animation: rise .4s both; }
.unified-row { grid-template-columns: 54px 62px 1fr 54px; }
.unified-row.voted { background: rgba(232, 108, 76, .055); }
.unified-row.voted .ranking-position { color: var(--coral-dark); }
.unified-row.just-liked { background: #fff0eb; animation: rank-climb .75s ease-out both; }
.ranking-position { font-family: "Playfair Display", serif; font-size: 22px; }
.ranking-thumb { width: 62px; height: 52px; background-position: center; background-size: cover; }
.ranking-place { font-size: 15px; font-weight: 700; }
.ranking-place strong { display: block; font-weight: 700; }
.ranking-country { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 400; }
.ranking-votes { color: var(--muted); font-size: 12px; text-align: right; }
.ranking-votes strong { display: block; color: var(--ink); font-size: 15px; }
.global-aside { align-self: start; padding: 27px; background: var(--mint); }
.aside-number { font-family: "Playfair Display", serif; font-size: 46px; letter-spacing: -2px; }
.global-aside p { max-width: 195px; margin: 4px 0 35px; color: #4d6b61; font-size: 13px; line-height: 1.55; }
.aside-rule { width: 38px; height: 2px; margin-bottom: 13px; background: var(--coral); }
.global-aside span { color: #4d6b61; font-size: 11px; }
footer { display: flex; justify-content: space-between; padding: 22px 7%; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
footer span { color: var(--ink); font-weight: 700; }
.help-content { max-width: 900px; padding: 72px 7% 90px; }
.help-content h1 { max-width: 560px; margin-bottom: 20px; }
.help-intro { max-width: 570px; margin-bottom: 48px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--line); }
.help-card { min-height: 220px; padding: 28px; background: var(--card); }
.help-number { display: block; margin-bottom: 35px; color: var(--coral-dark); font-family: "Playfair Display", serif; font-size: 24px; }
.help-card h2 { margin-bottom: 10px; font-size: 24px; }
.help-card p { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.help-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; margin-top: 30px; text-decoration: none; }
.toast { position: fixed; right: 24px; bottom: 24px; padding: 13px 17px; background: var(--ink); color: white; font-size: 12px; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translateY(0); }
.celebration-layer { position: fixed; z-index: 10; inset: 0; overflow: hidden; pointer-events: none; }
.confetti { position: absolute; top: 42%; width: 8px; height: 13px; border-radius: 2px; animation: confetti-fall 850ms cubic-bezier(.2,.75,.3,1) forwards; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes like-pop { 0% { transform: scale(1); } 45% { transform: scale(1.22) rotate(-3deg); } 100% { transform: scale(1); } }
@keyframes confetti-fall { from { opacity: 1; transform: translate(0, 0) rotate(0); } to { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--rotation)); } }
@keyframes rank-climb { 0% { opacity: .4; transform: translateY(18px) scale(.98); } 55% { background: #ffe0d5; } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 800px) { .page-shell { padding: 0 20px; } .hero { min-height: 68px; padding: 12px 5% 9px; } .workspace, .global-section { padding: 30px 5% 55px; } .global-layout { grid-template-columns: 1fr; gap: 30px; } }
@media (max-width: 600px) { .help-content { padding: 52px 5% 65px; } .help-intro { margin-bottom: 32px; font-size: 14px; } .help-grid { grid-template-columns: 1fr; } .help-card { min-height: 0; padding: 24px; } .help-number { margin-bottom: 24px; } }
@media (max-width: 520px) { .topbar-actions { gap: 9px; } .topbar-note { font-size: 10px; } .help-link { font-size: 10px; } .hero { min-height: 60px; padding: 10px 5% 8px; } h1 { font-size: 36px; } .stats-strip { gap: 13px; padding: 12px 5%; } .stat { display: block; } .stat strong { display: block; font-size: 22px; } .stat span { font-size: 10px; } .stat-divider { height: 34px; } h2 { font-size: 32px; } .section-heading { align-items: flex-start; } .add-destination { padding: 16px; } .input-row { display: block; } .input-wrap { display: block; margin-bottom: 10px; } .button-primary { width: 100%; height: 43px; } .unified-row { grid-template-columns: 31px 53px 1fr 40px; gap: 10px; min-height: 83px; } .ranking-thumb { width: 53px; height: 47px; } .ranking-place { font-size: 13px; } .ranking-votes { font-size: 10px; } footer { display: block; line-height: 2; } }
