
  :root{
    --bg:#f4f1ea;
    --ink:#1c2b24;
    --muted:#6b7268;
    --panel:#ffffff;
    --sea:#dce4dc;
    --land:#c7cfc0;
    --land-hover:#e0764f;
    --land-filled:#8fa88a;
    --accent:#e0764f;
    --border:#d8d2c4;
    --serif: 'Georgia', 'Iowan Old Style', 'Palatino', serif;
    --sans: 'Helvetica Neue', Arial, sans-serif;
    --mono: 'Courier New', monospace;
  }
  *{box-sizing:border-box; margin:0; padding:0;}
  html,body{height:100%;}
  body{
    background:var(--bg);
    color:var(--ink);
    font-family:var(--sans);
    overflow:hidden;
  }
  #app{position:relative; height:100vh; height:100dvh; width:100%;}

  /* ---- MAP VIEW ---- */
  #mapView{
    position:absolute; inset:0;
    display:flex; flex-direction:column;
  }
  /* Header, map and footer share one centred column so everything lines up
     on wide screens instead of hugging the left/right edges. */
  .topbar, #mapWrap, .mapFooter{
    width:100%;
    max-width:1440px;
    margin:0 auto;
    min-width:0;
  }
  .navRow > *, .topRow > *{min-width:0;}
  .topbar{
    padding:24px 32px 8px;
    display:flex;
    flex-direction:column;
    gap:14px;
    flex-shrink:0;
  }
  .topRow{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:24px;
  }
  .brandBlock{min-width:0;}
  .statLine{margin-top:4px;}
  .statLine span:empty{display:none;}
  .statLine #progressStat:not(:empty) + #styleStat:not(:empty)::before{content:' \00b7  ';}
  .navRow{
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:10px 24px;
  }
  .brand{
    font-family:var(--serif);
    font-size:26px;
    font-weight:700;
    letter-spacing:-0.01em;
  }
  .brand em{color:var(--accent); font-style:normal;}
  .sub{
    font-family:var(--mono);
    font-size:11px;
    letter-spacing:0.08em;
    text-transform:uppercase;
    color:var(--muted);
  }
  .searchWrap{
    position:relative;
    width:300px;
    flex-shrink:0;
  }
  #searchInput{
    width:100%;
    padding:9px 14px;
    border:1px solid var(--border);
    border-radius:8px;
    background:var(--panel);
    color:var(--ink);
    font-family:var(--sans);
    font-size:14px;
    outline:none;
    -webkit-appearance:none;
    appearance:none;
  }
  #searchInput:focus{border-color:var(--accent);}
  .searchResults{
    position:absolute;
    top:calc(100% + 6px);
    left:0; right:0;
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:8px;
    max-height:240px;
    overflow-y:auto;
    z-index:60;
    display:none;
    box-shadow:0 8px 24px rgba(0,0,0,0.08);
  }
  .searchResults.show{display:block;}
  .searchResult{
    padding:9px 14px;
    font-size:13px;
    cursor:pointer;
    display:flex;
    justify-content:space-between;
    align-items:center;
  }
  .searchResult:hover{background:var(--bg);}
  .searchResultTag{
    font-family:var(--mono);
    font-size:9px;
    color:var(--muted);
    text-transform:uppercase;
  }
  .btnRow{display:flex; gap:8px; flex-wrap:wrap;}
  .btnRow > *{flex-shrink:0; white-space:nowrap;}
  .pill{
    font-family:var(--mono);
    font-size:10px;
    letter-spacing:0.05em;
    text-transform:uppercase;
    padding:6px 12px;
    border-radius:999px;
    border:1px solid var(--border);
    background:var(--panel);
    color:var(--muted);
    cursor:pointer;
    transition:all 0.12s ease;
  }
  .pill:hover{border-color:var(--accent); color:var(--accent);}
  .pill.active{background:var(--accent); border-color:var(--accent); color:#fff;}
  .actionBtn{
    font-family:var(--mono);
    font-size:10px;
    letter-spacing:0.05em;
    text-transform:uppercase;
    padding:6px 12px;
    border-radius:999px;
    border:1px solid var(--accent);
    background:var(--accent);
    color:#fff;
    cursor:pointer;
  }
  .actionBtn:hover{opacity:0.85;}
  .actionBtn.ghost{background:none; color:var(--accent);}
  #mapWrap{
    flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:8px 32px;
    min-height:0;
    position:relative;
  }
  svg#worldmap{
    position:absolute;
    inset:8px 32px;
    width:calc(100% - 64px);
    height:calc(100% - 16px);
    overflow:hidden;
    touch-action:pan-y;           /* page can still scroll vertically on touch until zoomed */
    -webkit-user-select:none;
    user-select:none;
  }
  svg#worldmap.zoomed{touch-action:none;}
  svg#worldmap.dragging{cursor:grabbing;}
  svg#worldmap.dragging .country{cursor:grabbing;}
  .zoomCtrls{
    position:absolute;
    right:40px;
    bottom:16px;
    display:flex;
    flex-direction:column;
    gap:6px;
  }
  .zoomBtn{
    width:34px; height:34px;
    border-radius:8px;
    border:1px solid var(--border);
    background:var(--panel);
    color:var(--ink);
    font-size:18px;
    line-height:1;
    cursor:pointer;
    display:flex; align-items:center; justify-content:center;
  }
  .zoomBtn:hover{border-color:var(--accent); color:var(--accent);}
  #zoomResetBtn{font-size:16px;}
  .country{
    fill:var(--land);
    stroke:var(--bg);
    stroke-width:0.6;
    vector-effect:non-scaling-stroke;
    cursor:pointer;
    transition:fill 0.12s ease, opacity 0.2s ease;
  }
  .country.has-content{fill:var(--land-filled);}
  .country:hover{fill:var(--land-hover);}
  .country.dimmed{opacity:0.18;}
  .country.favourited{stroke:var(--accent); stroke-width:1.4;}
  @keyframes pulseHighlight{
    0%,100%{fill:var(--accent);}
    50%{fill:#f2a37e;}
  }
  .country.pulse{animation:pulseHighlight 0.9s ease-in-out 3;}
  .resetZoom{
    position:absolute;
    top:16px; left:50%;
    transform:translateX(-50%);
    display:none;
  }
  .resetZoom.show{display:block;}
  .tooltip{
    position:fixed;
    pointer-events:none;
    background:var(--ink);
    color:var(--bg);
    font-family:var(--sans);
    font-size:12px;
    padding:5px 10px;
    border-radius:4px;
    transform:translate(-50%, -130%);
    white-space:nowrap;
    opacity:0;
    transition:opacity 0.1s ease;
    z-index:50;
  }
  .tooltip.show{opacity:1;}
  /* On touch devices there's no hover, so the tooltip serves no purpose and
     can get stuck floating over content — disable it entirely there. */
  @media (hover: none), (pointer: coarse){
    .tooltip{display:none !important;}
  }
  .mapFooter{
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:10px 24px;
    padding:8px 32px 18px;
    flex-shrink:0;
  }
  .legend{
    font-family:var(--mono);
    font-size:11px;
    color:var(--muted);
    display:flex;
    flex-wrap:wrap;
    gap:8px 18px;
  }
  .zoomHint{opacity:0.75;}
  .footLinks{display:flex; align-items:center; gap:6px; flex-wrap:wrap;}
  .linkBtn{
    font-family:var(--mono);
    font-size:11px;
    letter-spacing:0.04em;
    color:var(--muted);
    background:none;
    border:none;
    padding:6px 8px;
    cursor:pointer;
    text-decoration:none;
  }
  .linkBtn:hover{color:var(--accent);}
  .legend span{display:flex; align-items:center; gap:6px;}
  .sw{width:9px; height:9px; border-radius:2px; display:inline-block;}

  /* ---- COUNTRY DETAIL VIEW ---- */
  #detailView{
    position:absolute; inset:0;
    background:var(--bg);
    display:none;
    overflow-y:auto;
  }
  #detailView.show{display:block;}
  .detailInner{
    max-width:760px;
    margin:0 auto;
    padding:60px 32px 100px;
  }
  .backBtn{
    font-family:var(--mono);
    font-size:12px;
    letter-spacing:0.06em;
    text-transform:uppercase;
    color:var(--muted);
    background:none;
    border:none;
    cursor:pointer;
    margin-bottom:36px;
    display:flex;
    align-items:center;
    gap:6px;
  }
  .backBtn:hover{color:var(--accent);}
  .detailHeader{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:24px;
  }
  .countryOutline{
    width:110px;
    height:110px;
    flex-shrink:0;
  }
  .countryOutline svg{width:100%; height:100%; overflow:visible;}
  .countryOutline path{
    fill:var(--land-filled);
    stroke:var(--accent);
    stroke-width:2;
    vector-effect:non-scaling-stroke;
  }
  .countryName{
    font-family:var(--serif);
    font-size:48px;
    font-weight:700;
    letter-spacing:-0.02em;
    margin-bottom:10px;
    line-height:1.05;
  }
  .tagline{
    font-family:var(--serif);
    font-style:italic;
    font-size:19px;
    color:var(--muted);
    margin-bottom:40px;
    max-width:560px;
    line-height:1.5;
  }
  .section{margin-bottom:36px;}
  .sectionLabel{
    font-family:var(--mono);
    font-size:11px;
    letter-spacing:0.1em;
    text-transform:uppercase;
    color:var(--accent);
    margin-bottom:10px;
  }
  .sectionBody{
    font-size:16px;
    line-height:1.7;
    max-width:600px;
  }
  .attractionList{list-style:none;}
  .attractionList li{
    padding:10px 0;
    border-bottom:1px solid var(--border);
    font-size:15px;
    display:flex;
    gap:14px;
  }
  .attractionList li:last-child{border-bottom:none;}
  .attractionNum{
    font-family:var(--mono);
    color:var(--accent);
    flex-shrink:0;
    width:22px;
  }
  .funfact{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:10px;
    padding:20px 24px;
    font-size:15px;
    line-height:1.6;
    max-width:600px;
  }
  .funfact b{font-family:var(--serif); font-style:italic; color:var(--accent);}
  .empty{
    font-size:16px;
    color:var(--muted);
    line-height:1.7;
    max-width:500px;
  }

  /* ---- PRACTICAL INFO GRID ---- */
  .practicalGrid{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
    gap:1px;
    background:var(--border);
    border:1px solid var(--border);
    border-radius:10px;
    overflow:hidden;
    max-width:640px;
    margin-bottom:36px;
  }
  .practicalItem{
    background:var(--panel);
    padding:14px 18px;
  }
  .practicalLabel{
    font-family:var(--mono);
    font-size:9px;
    letter-spacing:0.08em;
    text-transform:uppercase;
    color:var(--muted);
    margin-bottom:4px;
  }
  .practicalValue{
    font-size:13px;
    line-height:1.4;
  }

  /* ---- PLACE DETAIL FACTS ---- */
  .placeFacts{
    display:flex;
    flex-direction:column;
    gap:14px;
    max-width:600px;
    margin-bottom:36px;
  }
  .placeFact{
    display:flex;
    gap:16px;
    padding:14px 18px;
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:10px;
  }
  .placeFactLabel{
    font-family:var(--mono);
    font-size:10px;
    letter-spacing:0.06em;
    text-transform:uppercase;
    color:var(--accent);
    flex-shrink:0;
    width:110px;
  }
  .placeFactValue{
    font-size:14px;
    line-height:1.6;
  }

  /* ---- PLACE CARDS (inside country view) ---- */
  .placeGrid{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
    gap:14px;
    max-width:640px;
  }
  .placeCard{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:10px;
    padding:18px 20px;
    cursor:pointer;
    transition:border-color 0.12s ease, transform 0.12s ease;
  }
  .placeCard:hover{border-color:var(--accent); transform:translateY(-2px);}
  .placeCardName{
    font-family:var(--serif);
    font-size:19px;
    font-weight:700;
    margin-bottom:6px;
  }
  .placeCardBlurb{
    font-size:13px;
    color:var(--muted);
    line-height:1.5;
  }
  .placeCardGo{
    font-family:var(--mono);
    font-size:10px;
    letter-spacing:0.08em;
    text-transform:uppercase;
    color:var(--accent);
    margin-top:10px;
  }

  /* ---- PLACE DETAIL VIEW ---- */
  .crumbs{
    font-family:var(--mono);
    font-size:11px;
    letter-spacing:0.04em;
    color:var(--muted);
    text-transform:uppercase;
    margin-bottom:36px;
    display:flex;
    gap:8px;
    align-items:center;
    flex-wrap:wrap;
  }
  .crumbs button{
    font-family:inherit;
    font-size:inherit;
    letter-spacing:inherit;
    text-transform:inherit;
    background:none;
    border:none;
    color:var(--muted);
    cursor:pointer;
    padding:0;
  }
  .crumbs button:hover{color:var(--accent);}
  .crumbs .sep{color:var(--border);}
  .crumbs .current{color:var(--ink);}
  .thingsList{list-style:none;}
  .thingsList li{
    padding:12px 0;
    border-bottom:1px solid var(--border);
    font-size:15px;
    display:flex;
    gap:14px;
    align-items:flex-start;
  }
  .thingsList li:last-child{border-bottom:none;}
  .thingsCheck{
    font-family:var(--mono);
    color:var(--accent);
    flex-shrink:0;
  }

  /* ---- FAVOURITE BUTTON ---- */
  .favBtn{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-family:var(--mono);
    font-size:11px;
    letter-spacing:0.05em;
    text-transform:uppercase;
    padding:8px 14px;
    border-radius:999px;
    border:1px solid var(--border);
    background:var(--panel);
    color:var(--muted);
    cursor:pointer;
    margin-bottom:28px;
  }
  .favBtn:hover{border-color:var(--accent);}
  .favBtn.saved{border-color:var(--accent); color:var(--accent); background:rgba(224,118,79,0.08);}
  .favBtn .heart{font-size:13px;}

  /* ---- MY LIST PANEL ---- */
  #myListPanel{
    position:absolute; inset:0;
    background:var(--bg);
    display:none;
    overflow-y:auto;
    z-index:40;
  }
  #myListPanel.show{display:block;}
  .myListInner{
    max-width:700px;
    margin:0 auto;
    padding:60px 32px 100px;
  }
  .myListEmpty{
    font-size:16px;
    color:var(--muted);
    line-height:1.7;
    max-width:440px;
  }
  .myListItem{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:10px;
    padding:16px 20px;
    margin-bottom:10px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
  }
  .myListItem:hover{border-color:var(--accent);}
  .myListItemName{font-family:var(--serif); font-size:17px; font-weight:700; cursor:pointer; flex:1;}
  .myListItemRemove{
    font-family:var(--mono);
    font-size:11px;
    color:var(--muted);
    background:none; border:none; cursor:pointer;
    flex-shrink:0;
  }
  .myListItemRemove:hover{color:var(--accent);}
  .reorderBtns{display:flex; flex-direction:column; gap:2px; flex-shrink:0;}
  .reorderBtn{
    width:26px; height:22px;
    border:1px solid var(--border);
    background:var(--bg);
    color:var(--ink);
    border-radius:5px;
    cursor:pointer;
    font-size:11px;
    line-height:1;
  }
  .reorderBtn:hover{border-color:var(--accent); color:var(--accent);}
  .reorderBtn:disabled{opacity:0.3; cursor:not-allowed;}
  .toastAction{
    font-family:var(--mono);
    font-size:12px;
    letter-spacing:0.05em;
    text-transform:uppercase;
    color:var(--accent);
    background:none;
    border:none;
    border-bottom:1px solid var(--accent);
    cursor:pointer;
    padding:0;
    margin-left:6px;
  }

  /* ---- REVIEW PANEL ---- */
  #reviewPanel{
    position:absolute; inset:0;
    background:var(--bg);
    display:none;
    overflow-y:auto;
    z-index:45;
  }
  #reviewPanel.show{display:block;}
  .reviewInner{
    max-width:720px;
    margin:0 auto;
    padding:60px 32px 100px;
  }
  .reviewProgress{
    font-family:var(--mono);
    font-size:11px;
    letter-spacing:0.06em;
    text-transform:uppercase;
    color:var(--muted);
    margin-bottom:20px;
  }
  .reviewHeader{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:24px;
    margin-bottom:8px;
  }
  .reviewBadges{display:flex; gap:8px; margin-bottom:28px;}
  .reviewBadge{
    font-family:var(--mono);
    font-size:10px;
    letter-spacing:0.05em;
    text-transform:uppercase;
    padding:5px 11px;
    border-radius:999px;
    background:rgba(224,118,79,0.1);
    color:var(--accent);
    border:1px solid var(--border);
  }
  .reviewNotesArea{
    width:100%;
    min-height:200px;
    padding:20px 22px;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--panel);
    color:var(--ink);
    font-family:var(--sans);
    font-size:15px;
    line-height:1.7;
    resize:vertical;
    outline:none;
    margin-bottom:10px;
  }
  .reviewNotesArea:focus{border-color:var(--accent);}
  .reviewNotesArea::placeholder{color:var(--muted);}
  .reviewNav{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:32px;
    padding-top:24px;
    border-top:1px solid var(--border);
  }
  .reviewNavBtn{
    font-family:var(--mono);
    font-size:11px;
    letter-spacing:0.05em;
    text-transform:uppercase;
    padding:9px 16px;
    border-radius:8px;
    border:1px solid var(--border);
    background:var(--panel);
    color:var(--ink);
    cursor:pointer;
  }
  .reviewNavBtn:hover{border-color:var(--accent); color:var(--accent);}
  .reviewNavBtn:disabled{opacity:0.35; cursor:not-allowed;}
  .reviewNavBtn:disabled:hover{border-color:var(--border); color:var(--ink);}
  .reviewEmpty{
    font-size:16px;
    color:var(--muted);
    line-height:1.7;
    max-width:440px;
  }

  .myListItemNote{
    font-size:11px;
    color:var(--muted);
    margin-top:4px;
    font-style:italic;
  }

  #progressStat{margin-top:2px;}

  /* ---- PRINT ---- */
  #printArea{display:none;}
  @media print{
    body *{visibility:hidden;}
    #printArea, #printArea *{visibility:visible;}
    #printArea{display:block; position:absolute; top:0; left:0; width:100%; padding:20px;}
    #printArea h1{font-family:var(--serif); font-size:28px; margin-bottom:20px;}
    #printArea .printItem{margin-bottom:18px; page-break-inside:avoid;}
    #printArea h2{font-family:var(--serif); font-size:18px; margin-bottom:6px;}
    #printArea p{font-size:13px; line-height:1.5;}
    #printArea .printEmpty{color:#888; font-style:italic;}
  }

  /* ---- CURRENCY CONVERTER ---- */
  .converterItem{grid-column:span 2;}
  .converterRow{display:flex; align-items:center; gap:8px; margin-top:4px;}
  .converterInput{
    width:80px;
    padding:6px 8px;
    border:1px solid var(--border);
    border-radius:6px;
    background:var(--bg);
    color:var(--ink);
    font-family:var(--sans);
    font-size:13px;
  }
  .converterResult{font-size:13px; color:var(--accent); font-family:var(--mono);}

  /* ---- PACKING LIST ---- */
  .packingList{list-style:none; max-width:600px;}
  .packingList li{
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:9px 0;
    border-bottom:1px solid var(--border);
    font-size:14px;
  }
  .packingList li:last-child{border-bottom:none;}
  .packingList input[type=checkbox]{margin-top:3px; accent-color:var(--accent);}
  .packingList label.checked{color:var(--muted); text-decoration:line-through;}

  /* ---- CALENDAR PANEL ---- */
  #calendarPanel{
    position:absolute; inset:0;
    background:var(--bg);
    display:none;
    overflow-y:auto;
    z-index:44;
  }
  #calendarPanel.show{display:block;}
  .calendarInner{max-width:900px; margin:0 auto; padding:60px 32px 100px;}
  .calendarGrid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(130px, 1fr));
    gap:10px;
    margin-top:28px;
  }
  .calendarMonth{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:10px;
    padding:14px;
    min-height:100px;
  }
  .calendarMonthLabel{
    font-family:var(--mono);
    font-size:10px;
    letter-spacing:0.06em;
    text-transform:uppercase;
    color:var(--muted);
    margin-bottom:8px;
  }
  .calendarTag{
    font-size:12px;
    background:rgba(224,118,79,0.1);
    color:var(--accent);
    padding:4px 8px;
    border-radius:6px;
    margin-bottom:4px;
    display:block;
  }

  /* ---- TRIP BUILDER (and related full-page panels) ---- */
  #tripBuilderPanel, #tripJournalPanel, #comparePanel, #myTravelsPanel, #whatsNewPanel{
    position:absolute; inset:0;
    background:var(--bg);
    display:none;
    overflow-y:auto;
    z-index:44;
  }
  #tripBuilderPanel.show, #tripJournalPanel.show, #comparePanel.show, #myTravelsPanel.show, #whatsNewPanel.show{display:block;}
  .tripBuilderInner{max-width:700px; margin:0 auto; padding:60px 32px 100px;}
  .tripStep{
    display:flex;
    align-items:center;
    gap:16px;
    padding:16px 20px;
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:10px;
    margin-bottom:10px;
  }
  .tripStepNum{
    font-family:var(--serif);
    font-size:22px;
    font-weight:700;
    color:var(--accent);
    width:32px;
    flex-shrink:0;
  }
  .tripStepName{font-family:var(--serif); font-size:18px; font-weight:700;}
  .tripArrow{
    text-align:center;
    color:var(--muted);
    font-family:var(--mono);
    font-size:12px;
    margin:2px 0;
  }

  /* ---- NOTES ---- */
  .notesArea{
    width:100%;
    max-width:600px;
    min-height:90px;
    padding:14px 16px;
    border:1px solid var(--border);
    border-radius:10px;
    background:var(--panel);
    color:var(--ink);
    font-family:var(--sans);
    font-size:14px;
    line-height:1.6;
    resize:vertical;
    outline:none;
  }
  .notesArea:focus{border-color:var(--accent);}
  .notesArea::placeholder{color:var(--muted);}
  .notesSaved{
    font-family:var(--mono);
    font-size:10px;
    color:var(--accent);
    margin-top:6px;
    opacity:0;
    transition:opacity 0.2s ease;
  }
  .notesSaved.show{opacity:1;}

  /* ---- DARK MODE ---- */
  body.dark{
    --bg:#141920;
    --ink:#e8e6de;
    --muted:#8994a3;
    --panel:#1c232c;
    --land:#2a323e;
    --land-hover:#e0764f;
    --land-filled:#3f5b50;
    --accent:#e0895f;
    --border:#2c3542;
  }
  .themeToggle{
    font-family:var(--mono);
    font-size:10px;
    letter-spacing:0.05em;
    text-transform:uppercase;
    padding:6px 12px;
    border-radius:999px;
    border:1px solid var(--border);
    background:var(--panel);
    color:var(--muted);
    cursor:pointer;
  }
  .themeToggle:hover{border-color:var(--accent); color:var(--accent);}

  /* ---- STYLE QUIZ ---- */
  .quizOverlay{
    position:fixed; inset:0;
    background:rgba(0,0,0,0.4);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:100;
    padding:20px;
  }
  .quizOverlay.show{display:flex;}
  .quizBox{
    background:var(--panel);
    border-radius:16px;
    padding:32px;
    max-width:420px;
    width:100%;
  }
  .quizTitle{font-family:var(--serif); font-size:22px; font-weight:700; margin-bottom:10px;}
  .quizSub{font-size:13px; color:var(--muted); margin-bottom:22px; line-height:1.5;}
  .quizOptions{display:flex; flex-direction:column; gap:8px; margin-bottom:16px;}
  .quizOption{
    padding:12px 16px;
    border:1px solid var(--border);
    border-radius:10px;
    background:var(--bg);
    color:var(--ink);
    font-family:var(--sans);
    font-size:14px;
    text-align:left;
    cursor:pointer;
  }
  .quizOption:hover{border-color:var(--accent);}
  .quizSkip{
    font-family:var(--mono);
    font-size:11px;
    color:var(--muted);
    background:none;
    border:none;
    cursor:pointer;
    text-decoration:underline;
  }
  .country.style-match{
    fill:var(--accent) !important;
    filter:drop-shadow(0 0 8px var(--accent));
    animation:styleMatchPulse 1.6s ease-in-out 2;
  }
  @keyframes styleMatchPulse{
    0%,100%{opacity:1;}
    50%{opacity:0.55;}
  }

  /* ---- 404 ---- */
  .notFoundCode{
    font-family:var(--mono);
    font-size:13px;
    color:var(--muted);
    margin-bottom:8px;
  }

  /* ---- ACHIEVEMENTS / CONTINENT PROGRESS ---- */
  .achieveGrid{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:28px;}
  .achieveBadge{
    font-family:var(--mono);
    font-size:11px;
    padding:6px 12px;
    border-radius:999px;
    background:rgba(224,118,79,0.1);
    border:1px solid var(--accent);
    color:var(--accent);
  }
  .continentBars{display:flex; flex-direction:column; gap:10px; margin-bottom:28px; max-width:500px;}
  .continentBarRow{display:flex; align-items:center; gap:12px;}
  .continentBarLabel{font-family:var(--mono); font-size:11px; width:100px; flex-shrink:0; color:var(--muted);}
  .continentBarTrack{flex:1; height:6px; background:var(--border); border-radius:3px; overflow:hidden;}
  .continentBarFill{height:100%; background:var(--accent);}
  .continentBarCount{font-family:var(--mono); font-size:10px; color:var(--muted); width:44px; text-align:right;}

  /* ---- SUGGESTIONS / EXTRA LINKS ---- */
  .imageLink{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-family:var(--mono);
    font-size:11px;
    letter-spacing:0.05em;
    text-transform:uppercase;
    color:var(--muted);
    text-decoration:none;
    border:1px solid var(--border);
    padding:7px 13px;
    border-radius:999px;
    margin-bottom:28px;
  }
  .imageLink:hover{border-color:var(--accent); color:var(--accent);}
  .similarChips{display:flex; flex-wrap:wrap; gap:8px;}
  .nearbyMapBox{
    width:100%;
    max-width:400px;
    height:220px;
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:10px;
    overflow:hidden;
  }
  .nearbyPath{
    fill:var(--land);
    stroke:var(--bg);
    stroke-width:0.6;
    cursor:pointer;
    transition:fill 0.12s ease;
  }
  .nearbyPath:hover{fill:var(--land-hover);}
  .nearbyPathFocal{
    fill:var(--accent);
    stroke:var(--bg);
    stroke-width:0.6;
    pointer-events:none;
  }

  /* ---- COMPARE ---- */
  .compareGrid{display:grid; grid-template-columns:1fr 1fr; gap:16px; max-width:640px;}
  .compareCol select{
    width:100%;
    padding:9px 12px;
    border:1px solid var(--border);
    border-radius:8px;
    background:var(--panel);
    color:var(--ink);
    font-family:var(--sans);
    font-size:13px;
    margin-bottom:16px;
  }
  .compareRow{padding:10px 0; border-bottom:1px solid var(--border); font-size:13px;}
  .compareRow .practicalLabel{margin-bottom:4px;}

  /* ---- MY TRAVELS (Been / Wishlist / Suggested) ---- */
  .travelTabs{display:flex; gap:8px; margin-bottom:24px;}
  .travelTab{
    font-family:var(--mono);
    font-size:11px;
    letter-spacing:0.05em;
    text-transform:uppercase;
    padding:8px 16px;
    border-radius:999px;
    border:1px solid var(--border);
    background:var(--panel);
    color:var(--muted);
    cursor:pointer;
  }
  .travelTab.active{background:var(--accent); border-color:var(--accent); color:#fff;}
  .beenGrid{display:grid; grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); gap:10px;}
  .beenCard{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:10px;
    padding:14px 16px;
    cursor:pointer;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:8px;
  }
  .beenCard.marked{border-color:var(--accent); background:rgba(224,118,79,0.06);}
  .beenCardName{font-size:13px; font-weight:600;}
  .beenCardCheck{color:var(--accent); font-size:16px;}

  /* ---- TRIP JOURNAL ---- */
  .journalEntry{margin-bottom:32px; padding-bottom:28px; border-bottom:1px solid var(--border);}
  .journalEntry:last-child{border-bottom:none;}
  .journalCountryName{font-family:var(--serif); font-size:26px; font-weight:700; margin-bottom:8px;}
  .journalTagline{font-family:var(--serif); font-style:italic; color:var(--muted); margin-bottom:12px;}
  .journalNote{font-size:14px; line-height:1.7; white-space:pre-wrap;}
  .journalEmpty{color:var(--muted); font-style:italic; font-size:13px;}

  /* ---- WHAT'S NEW ---- */
  .whatsNewItem{padding:14px 0; border-bottom:1px solid var(--border); font-size:14px; line-height:1.6;}
  .whatsNewItem:last-child{border-bottom:none;}
  .similarChip{
    font-family:var(--mono);
    font-size:12px;
    padding:7px 14px;
    border-radius:999px;
    border:1px solid var(--border);
    background:var(--panel);
    color:var(--ink);
    cursor:pointer;
  }
  .similarChip:hover{border-color:var(--accent); color:var(--accent);}
  .flightBox{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:10px;
    padding:16px 20px;
    max-width:400px;
    margin-bottom:28px;
  }
  .airportSelect{
    width:100%;
    padding:8px 10px;
    border:1px solid var(--border);
    border-radius:8px;
    background:var(--bg);
    color:var(--ink);
    font-family:var(--sans);
    font-size:13px;
    margin-top:6px;
  }
  .flightResult{font-family:var(--mono); font-size:13px; color:var(--accent); margin-top:10px;}

  /* ---- EXPORT/IMPORT ---- */
  .ioModal{
    position:fixed; inset:0;
    background:rgba(0,0,0,0.4);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:100;
    padding:20px;
  }
  .ioModal.show{display:flex;}
  .ioBox{
    background:var(--panel);
    border-radius:16px;
    padding:32px;
    max-width:420px;
    width:100%;
  }
  .ioBox input[type=password], .ioBox input[type=file]{
    width:100%;
    padding:9px 12px;
    border:1px solid var(--border);
    border-radius:8px;
    background:var(--bg);
    color:var(--ink);
    font-family:var(--sans);
    font-size:13px;
    margin:8px 0 16px;
  }
  .ioRow{display:flex; gap:10px;}
  .ioMsg{font-size:12px; color:var(--muted); margin-top:8px; min-height:16px;}
  .ioMsg.error{color:#c0503a;}

  /* ---- TABLET / SMALL LAPTOP ---- */
  @media (max-width: 1100px){
    .topbar{padding:20px 24px 8px;}
    svg#worldmap{inset:8px 16px; width:calc(100% - 32px);}
    .mapFooter{padding:8px 24px 16px;}
    .zoomCtrls{right:24px;}
  }

  /* ---- MOBILE ---- */
  @media (max-width: 720px){
    /* Page scrolls normally on phones rather than being locked to 100vh. */
    body{overflow:auto; overflow-x:hidden;}
    #app{height:auto; min-height:100vh; min-height:100dvh;}
    #mapView{position:relative; min-height:100vh; min-height:100dvh;}
    .topbar{padding:14px 0 6px; gap:10px;}
    .topRow{flex-direction:column; align-items:stretch; gap:10px; padding:0 16px;}
    .searchWrap{width:100%;}
    #searchInput{font-size:16px; padding:11px 14px;} /* 16px stops iOS zooming on focus */
    .navRow{flex-direction:column; align-items:stretch; gap:8px;}
    /* Pills and tools become single swipeable rows instead of 6+ wrapped lines. */
    .scrollStrip{
      flex-wrap:nowrap;
      max-width:100%;
      overflow-x:auto;
      overscroll-behavior-x:contain;
      -webkit-overflow-scrolling:touch;
      scrollbar-width:none;
      padding:2px 16px;
      scroll-padding:0 16px;
      -webkit-mask-image:linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 24px), transparent 100%);
              mask-image:linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 24px), transparent 100%);
    }
    .scrollStrip::-webkit-scrollbar{display:none;}
    .scrollStrip::after{content:''; flex:0 0 8px;}
    #mapWrap{flex:1 1 auto; min-height:280px;}
    svg#worldmap{inset:4px 0; width:100%; height:calc(100% - 8px);}
    .zoomCtrls{right:12px; bottom:10px; flex-direction:row;}
    .zoomBtn{width:38px; height:38px;}
    .mapFooter{padding:6px 16px 24px; flex-direction:column; align-items:flex-start; gap:8px;}
    .legend{font-size:10px; gap:6px 12px;}
    .footLinks{margin-left:-8px;}
    .detailInner, .myListInner, .reviewInner, .calendarInner, .tripBuilderInner{padding:28px 16px 80px;}
    .countryName{font-size:30px;}
    .detailHeader, .reviewHeader{align-items:center;}
    .countryOutline{width:64px; height:64px;}
    .practicalGrid{grid-template-columns:1fr 1fr;}
    .converterItem{grid-column:span 2;}
    .placeGrid{grid-template-columns:1fr;}
    .calendarGrid{grid-template-columns:repeat(2, 1fr);}
    .quizBox, .ioBox{padding:24px;}
    .brand{font-size:24px;}
    .actionBtn, .actionBtn.ghost, .themeToggle, .pill{font-size:11px; padding:8px 13px;}
    /* detail/panel views cover the viewport and scroll on mobile */
    #detailView, #myListPanel, #reviewPanel, #calendarPanel, #tripBuilderPanel, #tripJournalPanel, #comparePanel, #myTravelsPanel, #whatsNewPanel{position:fixed; inset:0;}
  }
  @media (hover: none), (pointer: coarse){
    .zoomHint::before{content:'Pinch to zoom \00b7  drag to pan';}
    .zoomHint{font-size:0;}
    .zoomHint::before{font-size:10px;}
  }

  /* ---- EASTER EGGS ---- */
  .brand{cursor:pointer; user-select:none;}
  @keyframes brandSpin{
    0%{transform:rotate(0deg) scale(1);}
    50%{transform:rotate(180deg) scale(1.15);}
    100%{transform:rotate(360deg) scale(1);}
  }
  .brand.spin{display:inline-block; animation:brandSpin 0.7s ease-in-out;}
  .eggToast{
    position:fixed;
    left:50%;
    bottom:32px;
    transform:translateX(-50%) translateY(80px);
    background:var(--ink);
    color:var(--bg);
    font-family:var(--sans);
    font-size:14px;
    padding:12px 22px;
    border-radius:999px;
    box-shadow:0 8px 30px rgba(0,0,0,0.25);
    z-index:200;
    opacity:0;
    transition:transform 0.4s cubic-bezier(0.22,1,0.36,1), opacity 0.4s ease;
    pointer-events:none;
    max-width:88vw;
    text-align:center;
  }
  .eggToast.show{transform:translateX(-50%) translateY(0); opacity:1;}
  .searchResult.fictional{opacity:0.85;}
  .searchResult.fictional .searchResultTag{color:var(--accent);}
