@font-face{font-family:"Work Sans";font-weight:400;font-display:swap;src:url(fonts/work-sans-400.woff2) format("woff2")}
@font-face{font-family:"Work Sans";font-weight:600;font-display:swap;src:url(fonts/work-sans-600.woff2) format("woff2")}

:root{
  --text:#141416; --muted:#55555c; --card:rgba(255,255,255,.96); --field:rgba(0,0,0,.035);
  --line:rgba(0,0,0,.09); --chip:rgba(0,0,0,.055); --hover:rgba(0,0,0,.08); --flag-ring:rgba(0,0,0,.14);
  --accent:#ffb627; --on-accent:#1f1600; --accent-line:#9a6400; --accent-muted:#5a4000; --accent-chip:rgba(0,0,0,.08); --solid:#fff; --ok:#16a34a; --paper:#fff; --page-1:#e8e8eb; --page-2:#d4d4d8; --radius:28px; /* departure-board amber; -line is for thin lines and text */
  color-scheme:light;
}
[data-mode=dark]{
  --text:#f4f4f5; --muted:#b2b2ba; --card:rgba(28,28,31,.96); --field:rgba(255,255,255,.03);
  --line:rgba(255,255,255,.09); --chip:rgba(255,255,255,.07); --hover:rgba(255,255,255,.12); --flag-ring:rgba(255,255,255,.18);
  --accent-line:#ffb627; --solid:#2a2a2e; --paper:#1c1c1f; --page-1:#121214; --page-2:#0a0a0b;  /* pages under the phrase book step darker, like light mode */
  color-scheme:dark;
}
/* Accent colours, chosen in Settings (amber is the default above). -line is for text and focus rings on the cards,
   so it's darker in light mode and lighter in dark mode; -muted is the label colour on the accent itself. */
[data-accent=tomato]{--accent:#ff6542; --on-accent:#250600; --accent-muted:#4a1004; --accent-chip:rgba(0,0,0,.09); --accent-line:#c2361a}
[data-accent=terracotta]{--accent:#b8552f; --on-accent:#fff; --accent-muted:#fff0e8; --accent-chip:rgba(255,255,255,.16); --accent-line:#a24a28}
[data-accent=olive]{--accent:#a9b43f; --on-accent:#1a1e00; --accent-muted:#3c430b; --accent-chip:rgba(0,0,0,.08); --accent-line:#6b7420}
[data-accent=bubblegum]{--accent:#ff9ec4; --on-accent:#2a0716; --accent-muted:#6b2246; --accent-chip:rgba(0,0,0,.07); --accent-line:#c2457a}
/* Klein: Yves Klein blue. Ink (navy) was too close to black; [data-accent=ink] stays so saved choices still paint before app.js swaps them */
[data-accent=klein],[data-accent=ink]{--accent:#002fa7; --on-accent:#fff; --accent-muted:#cfd8ff; --accent-chip:rgba(255,255,255,.16); --accent-line:#002fa7}
[data-mode=dark][data-accent=tomato]{--accent-line:#ff7a5c}
[data-mode=dark][data-accent=terracotta]{--accent-line:#e0825d}
[data-mode=dark][data-accent=olive]{--accent-line:#c2cd55}
[data-mode=dark][data-accent=bubblegum]{--accent-line:#ff9ec4}
[data-mode=dark][data-accent=klein],[data-mode=dark][data-accent=ink]{--accent-line:#8ea4ff}
*{box-sizing:border-box;margin:0}
html,body{min-height:100%}
body{font:400 16px/1.4 "Work Sans",system-ui,sans-serif;color:var(--text);background:#1c1c20;-webkit-tap-highlight-color:transparent}
button,input{font:inherit;color:inherit}
button{background:none;border:0;cursor:pointer}
[hidden]{display:none!important}
svg.i{width:1em;height:1em;flex:none;fill:currentColor}
:focus-visible{outline:2px solid var(--accent-line);outline-offset:2px}
.muted{color:var(--muted)}
.small{font-size:13px}
.flag{font-size:22px;line-height:1;display:inline-flex;flex:none;position:relative}
/* A soft ring inside every flag, so white ones (Japan, Finland) and dark ones in dark mode keep their edge */
.flag::after{content:'';position:absolute;inset:0;border-radius:50%;box-shadow:inset 0 0 0 1px var(--flag-ring);pointer-events:none}
.flag img{width:1em;height:1em;display:block;border-radius:50%}
.glass{background:var(--card);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}

/* Background photo, two layers for a cross-fade */
.bg{position:fixed;inset:0;background:var(--fallback,#2a2a30) center/cover no-repeat;opacity:0;transition:opacity .6s ease}
.bg.on{opacity:1}
.scrim{position:fixed;inset:0;background:linear-gradient(to bottom,rgba(0,0,0,.25),transparent 30%,transparent 70%,rgba(0,0,0,.55))}

/* One screen tall: header and nav stay put, only .scroll moves */
.app{position:relative;height:100vh;height:100dvh;max-width:440px;margin:0 auto;display:flex;flex-direction:column;
  padding:calc(env(safe-area-inset-top) + 16px) 20px calc(env(safe-area-inset-bottom) + 12px)}
.scroll{flex:1;min-height:0;display:flex;flex-direction:column;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;
  margin:0 -20px;padding:0 20px 16px}  /* side padding keeps card shadows from being clipped; no fade mask, it would break the glass blur */
.scroll::-webkit-scrollbar{display:none}
.scroll>*{flex:none}

/* Header */
.top{display:flex;align-items:center;justify-content:flex-end;gap:8px}
/* Convert / Phrases switch, floating at the bottom for one-handed use */
.tabs{position:relative;flex:none;align-self:stretch;margin-top:12px;display:flex;padding:4px;border-radius:99px;box-shadow:0 8px 28px rgba(0,0,0,.28)}
.tabs button{flex:1;justify-content:center;position:relative;z-index:1;display:flex;align-items:center;gap:8px;height:44px;padding:0 20px 0 18px;border-radius:99px;font-weight:600;font-size:16px;color:var(--muted);transition:color .2s ease}
.tabs .i{font-size:20px}
.tabs button[aria-selected=true]{color:var(--solid)}
.tab-pill{position:absolute;top:4px;border-radius:99px;background:var(--text);pointer-events:none}
.tab-pill.is-ready{transition:left .3s cubic-bezier(.34,1.56,.64,1),width .3s cubic-bezier(.34,1.56,.64,1)}
@keyframes tab-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.tab-entering{animation:tab-enter .22s ease-out both}
.tool{display:flex;align-items:center;gap:6px;height:42px;padding:0 12px;border-radius:99px;font-size:18px}
.tool .flag{font-size:20px}
.where{margin-right:auto;min-width:0;max-width:60%}
.where-name{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.round{width:42px;justify-content:center;padding:0}

/* Card */
/* Paper (the ticket and the phrase book) is solid. The controls above it (header, tabs, sheets) are the same colour,
   just 4% see-through with a blur, so everything reads as one white (or one charcoal in dark mode) */
.card{margin-top:16px;padding:24px 20px;border-radius:var(--radius);background:var(--paper)}  /* no shadow: the scroll area would clip it, and the ticket has none */
/* Converter ticket: glass top, amber stub, notches cut through to the photo */
.convert{position:relative;display:flex;flex-direction:column;margin-top:clamp(24px,10vh,120px)}
.ticket-top,.ticket-stub{padding:24px 20px}
.ticket-top{padding-bottom:40px;border-radius:var(--radius) var(--radius) 0 0;background:var(--paper)}
.ticket-stub{padding-top:30px;border-radius:0 0 var(--radius) var(--radius);background:var(--accent);color:var(--on-accent);--muted:var(--accent-muted);
  background-image:linear-gradient(90deg,rgba(0,0,0,.22) 50%,transparent 0);background-size:12px 2px;background-repeat:repeat-x;background-position:20px 0}
/* Masks: a round hole around the swap button (4px wider than it), cut out of the two notched halves.
   The hole layer is intersected with the notches below it, which are added together */
.ticket-top,.ticket-stub{-webkit-mask:var(--hole),var(--notch-l) left/51% 100% no-repeat,var(--notch-r) right/51% 100% no-repeat;-webkit-mask-composite:source-in,source-over;
  mask:var(--hole),var(--notch-l) left/51% 100% no-repeat,var(--notch-r) right/51% 100% no-repeat;mask-composite:intersect,add}
.ticket-top{--notch-l:radial-gradient(13px at 0 100%,#0000 97%,#000);--notch-r:radial-gradient(13px at 100% 100%,#0000 97%,#000);--hole:radial-gradient(28px at 50% 100%,#0000 97%,#000)}
.ticket-stub{--notch-l:radial-gradient(13px at 0 0,#0000 97%,#000);--notch-r:radial-gradient(13px at 100% 0,#0000 97%,#000);--hole:radial-gradient(28px at 50% 0,#0000 97%,#000)}
.stub-row{display:flex;align-items:center;gap:8px;min-height:64px;padding-left:4px}
.ticket-stub .value{font-size:46px;line-height:1.1}
.hint{display:flex;align-items:center;gap:6px;margin:6px 0 0 2px;font-size:14px;font-weight:600;color:var(--muted)}
.hint .i{font-size:17px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.hint:empty{display:none}
.ticket-stub .chip{background:var(--accent-chip)}
.ticket-stub{--flag-ring:rgba(0,0,0,.14)}  /* the stub stays amber in dark mode */
.ticket-stub .chip:hover{background:rgba(0,0,0,.14)}
.ticket-stub .chip .i{color:inherit;opacity:.6}
.label{display:block;font-size:15px;font-weight:600;color:var(--muted);margin:0 0 8px 4px}
.field{display:flex;align-items:center;gap:8px;min-height:76px;padding:8px 8px 8px 20px;border:1px solid var(--line);border-radius:20px;background:var(--field)}
.field:focus-within{border-color:var(--accent-line)}
.value{flex:1;min-width:0;font-size:34px;font-weight:600;font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Currency symbol on the result: smaller and lighter than the digits */
.value .sym{font-size:.62em;font-weight:400;margin-right:.08em;vertical-align:.32em}
.value .sym.txt{margin-right:.25em}
input.value{border:0;background:none;outline:none;padding:0}
input.value::placeholder{color:var(--muted)}
.chip{display:flex;align-items:center;gap:10px;height:56px;padding:0 14px;border-radius:14px;background:var(--chip);font-weight:600;font-size:18px}
.chip:hover{background:var(--hover)}
.chip .i{font-size:14px;color:var(--muted)}

.pills{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:14px -20px 0;padding:0 20px}
.pills::-webkit-scrollbar{display:none}
.pills:empty{display:none}
@media (hover:hover) and (pointer:fine){.pills{flex-wrap:wrap;overflow:visible;margin-inline:0;padding:0}}
.pill{flex:none;padding:8px 14px;font-size:15px;border-radius:99px;border:1px solid var(--line);background:var(--field);font-variant-numeric:tabular-nums}
.pill:hover{background:var(--hover)}
.pill[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:var(--on-accent);font-weight:600}

.swap{position:relative;z-index:1;display:grid;place-items:center;width:48px;height:48px;margin:-24px auto;border-radius:50%;background:var(--solid);color:var(--text);box-shadow:0 1px 4px rgba(0,0,0,.16);font-size:20px;transition:transform .3s}
.swap:hover{filter:brightness(.96)}
.swap.spin{transform:rotate(180deg)}

/* Phrasebook */
.ph-head{display:flex;align-items:center;gap:14px;margin:0 -8px;width:calc(100% + 16px);padding:8px 12px;border-radius:18px;text-align:left}
.ph-head:hover{background:var(--chip)}
.ph-head .flag{font-size:36px}
.ph-title{flex:1;min-width:0}
.ph-name{display:block;font-size:22px;font-weight:600;line-height:1.2}
.ph-from{display:block;font-size:13px;color:var(--muted)}
.ph-head .i{font-size:16px;color:var(--muted)}
.ph-note{font-size:14px;margin:6px 4px 0}
.ph-note:empty{display:none}

/* Stacked pages: two sheets peek out under the notepad, slightly askew. They start below
   the punched holes so the holes still show the photo. */
.stack{flex:1 1 0;min-height:300px;display:flex;flex-direction:column;position:relative;isolation:isolate;margin-top:16px;padding-bottom:16px}
.stack .phrasebook{margin-top:0}
.stack::before,.stack::after{content:'';position:absolute;top:56px;border-radius:var(--radius);box-shadow:0 1px 2px rgba(0,0,0,.22)}
.stack::before{z-index:-1;left:8px;right:8px;bottom:8px;background:var(--page-1);transform:rotate(-.6deg)}
.stack::after{z-index:-2;left:16px;right:16px;bottom:0;background:var(--page-2);transform:rotate(.7deg)}
/* Dark pages need a faint edge, or they vanish against a dark photo */
[data-mode=dark] .stack::before,[data-mode=dark] .stack::after{box-shadow:0 1px 2px rgba(0,0,0,.5),inset 0 0 0 1px rgba(255,255,255,.08)}
/* The card fills the space above the nav; only the list scrolls, so the rounded corners stay put */
.phrasebook{flex:1 1 0;min-height:300px;display:flex;flex-direction:column}
/* Notepad: a row of punched holes cut through to the photo, like the ticket's notches.
   Solid card XOR a strip of 10 evenly spaced dots, inset 20px from each side. */
.phrasebook{padding-top:42px;-webkit-mask:linear-gradient(#000 0 0),url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100%25' height='24'><circle cx='5%25' cy='12' r='4.5'/><circle cx='15%25' cy='12' r='4.5'/><circle cx='25%25' cy='12' r='4.5'/><circle cx='35%25' cy='12' r='4.5'/><circle cx='45%25' cy='12' r='4.5'/><circle cx='55%25' cy='12' r='4.5'/><circle cx='65%25' cy='12' r='4.5'/><circle cx='75%25' cy='12' r='4.5'/><circle cx='85%25' cy='12' r='4.5'/><circle cx='95%25' cy='12' r='4.5'/></svg>") 50% 6px/calc(100% - 40px) 24px no-repeat;-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0),url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100%25' height='24'><circle cx='5%25' cy='12' r='4.5'/><circle cx='15%25' cy='12' r='4.5'/><circle cx='25%25' cy='12' r='4.5'/><circle cx='35%25' cy='12' r='4.5'/><circle cx='45%25' cy='12' r='4.5'/><circle cx='55%25' cy='12' r='4.5'/><circle cx='65%25' cy='12' r='4.5'/><circle cx='75%25' cy='12' r='4.5'/><circle cx='85%25' cy='12' r='4.5'/><circle cx='95%25' cy='12' r='4.5'/></svg>") 50% 6px/calc(100% - 40px) 24px no-repeat;mask-composite:exclude}
.phrasebook>*{flex:none}
.phrase-list{list-style:none;padding:4px 0;margin:8px 0;flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;
  -webkit-mask:linear-gradient(transparent,#000 14px,#000 calc(100% - 14px),transparent);mask:linear-gradient(transparent,#000 14px,#000 calc(100% - 14px),transparent)}
.phrase-list::-webkit-scrollbar{display:none}
.phrase-list li+li{border-top:1px solid var(--line)}
.phrase{display:block;width:100%;padding:12px 4px;text-align:left}
.phrase small{display:block;font-size:13px;color:var(--muted)}
.phrase .local{display:block;font-size:21px;font-weight:600;margin:2px 0}
.phrase .pron{display:block;font-size:15px;color:var(--muted)}
.phrase:hover .local{color:var(--accent-line)}
div.phrase:hover .local{color:inherit}  /* local words aren't tappable */
.ph-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:24px 12px;text-align:center}
.ph-empty-title{font-size:20px;font-weight:600}
.ph-empty-btn{margin-top:14px;padding:10px 18px;border-radius:99px;border:1px solid var(--line);background:var(--field);font-weight:600;font-size:15px}
.ph-empty-btn:hover{background:var(--hover)}

.fact-list{list-style:none;margin:4px 0 0;padding:4px 24px 20px;display:grid;gap:12px;font-size:16px;line-height:1.35;overflow-y:auto}
.fact-list small{display:block;font-size:14px;color:var(--muted)}
.plugs{display:flex;align-items:flex-end;gap:10px;margin:8px 0 6px}
.plug-face{margin:0;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:12px;font-weight:600;color:var(--muted)}
.plug{width:44px;height:44px;color:var(--text)}
.plug-yours{display:flex;flex-direction:column;align-items:center;margin-left:auto;padding-left:14px;border-left:1px solid var(--line)}
.plug-yours small{font-size:12px;margin-bottom:2px}
.plug-face.mine .plug{color:var(--muted);opacity:.7}
.place-title{display:flex;align-items:center;justify-content:center;gap:10px}
.place-title .flag{font-size:26px}
.fact-list li{display:flex;gap:10px;align-items:flex-start}
.fact-list .i{flex:none;font-size:20px;margin-top:1px;color:var(--muted)}
.fact-list a{color:inherit;font-weight:600}
.meta{margin-top:auto;padding-top:24px;text-align:center;font-size:13px;color:rgba(255,255,255,.85);text-shadow:0 1px 3px rgba(0,0,0,.6)}
.meta a{color:inherit}

/* Dialogs */
dialog{width:min(100% - 24px,440px);max-height:min(76vh,640px);margin:calc(env(safe-area-inset-top) + 8vh) auto auto;padding:0;
  border:1px solid var(--line);border-radius:var(--radius);background:var(--card);color:var(--text);
  backdrop-filter:blur(30px);-webkit-backdrop-filter:blur(30px);box-shadow:0 30px 80px rgba(0,0,0,.4)}
dialog[open]{display:flex;flex-direction:column;animation:pop .2s ease-out}
dialog::backdrop{background:rgba(0,0,0,.45)}
@keyframes pop{from{opacity:0;transform:translateY(8px) scale(.98)}}
.sheet-head{position:relative;padding:22px 56px 14px;text-align:center}
.sheet-head h2{font-size:20px;font-weight:600}
.sheet-head p{margin-top:4px}
.close{position:absolute;right:12px;top:14px;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font-size:20px;color:var(--muted)}
.close:hover{background:var(--chip)}
.back{position:absolute;left:12px;top:14px;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font-size:20px;color:var(--muted)}
.back:hover{background:var(--chip)}

/* Settings */
.set-body{padding:0 20px 20px}
.set-body h3{margin:8px 4px 10px}
.swatches{display:flex;justify-content:space-between;padding:0 4px}
.swatch{width:44px;height:44px;border-radius:50%;background:var(--sw);box-shadow:inset 0 0 0 1px rgba(0,0,0,.14)}
.swatch[aria-pressed=true]{box-shadow:0 0 0 3px var(--solid),0 0 0 5px var(--text)}
.swatches+h3{margin-top:22px}
.segmented{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;border-radius:14px;background:var(--chip)}
.segmented button{height:40px;border-radius:11px;font-weight:600;font-size:15px;color:var(--muted)}
.segmented button[aria-pressed=true]{background:var(--solid);color:var(--text);box-shadow:0 1px 3px rgba(0,0,0,.12)}
/* In dark mode --solid is too close to the track, so the selected option gets a clearly lighter fill */
[data-mode=dark] .segmented button[aria-pressed=true]{background:#4a4a52;box-shadow:0 1px 3px rgba(0,0,0,.4)}
.set-links{display:flex;flex-direction:column;margin-top:22px;border:1px solid var(--line);border-radius:18px;overflow:hidden}
.set-links button{display:flex;align-items:center;gap:12px;min-height:52px;padding:0 16px;text-align:left;font-size:16px}
.set-links button+button{border-top:1px solid var(--line)}
.set-links button:hover{background:var(--chip)}
.set-links span{flex:1}
.set-links .i{color:var(--muted)}
/* Official Buy Me a Coffee button artwork, as on AboveTheFold. The thin outline keeps its yellow
   visible next to the Amber accent */
.coffee-button{align-self:flex-start;display:inline-block;margin-top:4px;line-height:0;border-radius:8px;box-shadow:0 0 0 1px #000;transition:transform .15s ease-out,box-shadow .15s ease-out}
.coffee-button img{display:block;height:50px;width:auto}
.coffee-button:hover,.coffee-button:focus-visible{transform:translateY(-2px);box-shadow:0 0 0 1px #000,0 3px 0 #000}
.set-foot{margin-top:16px;text-align:center}
/* Usage stats switch, on the Privacy page */
.toggle-row{margin-top:4px;display:flex;align-items:center;gap:14px;width:100%;min-height:56px;padding:10px 16px;border:1px solid var(--line);border-radius:18px;text-align:left;font-size:16px}
.toggle-row:hover{background:var(--chip)}
.toggle-row>span:first-child{flex:1;min-width:0}
.toggle-row small{display:block;margin-top:2px;font-size:13px;color:var(--muted)}
.switch{flex:none;position:relative;width:48px;height:28px;border-radius:99px;background:var(--hover);transition:background .2s}
.switch::after{content:'';position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .2s}
[aria-checked=true] .switch{background:var(--accent)}
[aria-checked=true] .switch::after{transform:translateX(20px)}
.set-page section{display:flex;flex-direction:column;gap:10px;padding:0 4px 8px;font-size:16px;line-height:1.5}
.set-page h4{margin-top:8px;font-size:15px;font-weight:600;color:var(--muted)}
.search{display:flex;align-items:center;gap:10px;margin:0 20px;padding:0 6px 0 14px;height:52px;flex:none;border:1px solid var(--line);border-radius:14px;background:var(--field)}
.search:focus-within{border-color:var(--accent-line)}
.search .i{color:var(--muted);font-size:20px}
.search input{flex:1;min-width:0;border:0;background:none;outline:none;font-size:17px}
.search input::-webkit-search-cancel-button{display:none}
.clear{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;color:var(--muted)}
.list{overflow-y:auto;padding:8px 12px 16px;overscroll-behavior:contain}
.list h3{font-size:14px;font-weight:600;color:var(--muted);margin:16px 12px 6px}
.list ul{list-style:none;padding:0}
.row{display:flex;align-items:center;border-radius:16px}
.row:hover,.row.current{background:var(--chip)}
.pick{flex:1;display:flex;align-items:center;gap:14px;padding:10px 12px;text-align:left;min-width:0}
.pick .flag{font-size:28px}
.pick b{display:block;font-weight:600;font-size:17px}
.pick small{display:block;color:var(--muted);font-size:15px}
.act{flex:none;display:grid;place-items:center;min-width:44px;height:44px;margin-right:6px;border-radius:12px;color:var(--muted);font-size:18px}
.act:hover{background:var(--hover);color:var(--text)}
.add{display:flex;gap:6px;padding:0 12px;background:var(--chip);color:var(--text);font-size:15px}
.tick{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--ok);color:#fff;font-size:15px;margin:0 16px 0 auto;flex:none}
/* Footer action in a sheet, e.g. "Change travel currency" under the languages */
.sheet-foot{flex:none;margin:0 20px 20px;padding:12px;border-radius:14px;border:1px solid var(--line);background:var(--field);font-weight:600;font-size:15px}
.sheet-foot:hover{background:var(--hover)}
.empty{padding:24px 12px;color:var(--muted);text-align:center}

.say{margin-top:calc(env(safe-area-inset-top) + 14vh);padding:56px 24px 32px;text-align:center;align-items:center;gap:12px}
.say-flag{font-size:40px;margin-bottom:4px}
.say-local{font-size:clamp(36px,11vw,60px);font-weight:600;line-height:1.15;overflow-wrap:anywhere}
.say-local.long{font-size:clamp(30px,8.5vw,44px)}
.speak{display:grid;place-items:center;width:64px;height:64px;margin-top:12px;border-radius:50%;background:var(--accent);color:var(--on-accent);font-size:28px}

/* "Looks like you're in…" */
.nudge{display:flex;align-items:center;gap:10px;margin-top:12px;padding:6px 6px 6px 14px;border-radius:22px;font-size:15px}
.nudge-text{flex:1;min-width:0}
.nudge-go{flex:none;padding:8px 14px;border-radius:99px;background:var(--accent);color:var(--on-accent);font-weight:600;font-size:14px}
.nudge-x{flex:none;width:36px;height:36px;display:grid;place-items:center;border-radius:50%;color:var(--muted);font-size:18px}
.nudge-x:hover{background:var(--chip)}

/* First visit */
.welcome-in{padding:32px 20px 20px;text-align:center;overflow-y:auto}
.welcome h2{font-size:24px;font-weight:600;margin-bottom:6px}
.setup{display:grid;gap:10px;margin:22px 0 12px;text-align:left}
.setup-row{display:block;width:100%;padding:12px 16px;border:1px solid var(--line);border-radius:18px;background:var(--field);text-align:left}
.setup-row:hover{background:var(--hover)}
.setup-row small{display:block;font-size:14px;font-weight:600;color:var(--muted);margin-bottom:4px}
.setup-main{display:flex;align-items:center;gap:12px}
.setup-main .flag{font-size:28px}
.setup-txt{flex:1;min-width:0;font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.setup-txt b{font-weight:600}
.setup-note{display:flex;align-items:center;gap:4px;margin:4px 0 0 40px;font-size:13px;color:var(--muted)}
.setup-note .i{font-size:15px}
.setup-main .i{color:var(--muted);font-size:14px}
.primary{width:100%;height:54px;margin-top:16px;border-radius:16px;background:var(--accent);color:var(--on-accent);font-weight:600;font-size:17px}
.primary:hover{filter:brightness(1.05)}

/* Desktop (mouse or trackpad): tabs move to the top, under the header (they span the card everywhere).
   Bottom tabs only earn their place where a thumb is reaching for them. */
@media (hover:hover) and (pointer:fine){
  .top{order:0}
  .tabs{order:1;margin-top:16px;box-shadow:0 4px 16px rgba(0,0,0,.18)}
  .nudge{order:2}
  .scroll{order:3}
  .convert{margin-top:clamp(16px,6vh,64px)}
}
/* Logo, top left on desktop only, hidden once there's no room beside the 440px app column.
   Hover (or keyboard focus) turns the wordmark into the initials: the other letters fade out one by one,
   then N, F and H slide to their diagonal places, while the square turns the accent colour. Reversed on the way out. */
.logo{display:none}
@media (hover:hover) and (pointer:fine) and (min-width:740px){
  .logo{display:block;position:fixed;z-index:5;top:calc(env(safe-area-inset-top) + 20px);left:24px;width:96px;height:96px;
    overflow:hidden;box-shadow:0 6px 20px rgba(0,0,0,.25)}
  .logo svg{display:block;width:100%;height:100%}
  .logo .go{transition:opacity .25s ease,transform .3s ease;transition-delay:calc(.22s + var(--i) * .025s);transform-box:fill-box;transform-origin:center}
  .logo .stay{transition:transform .45s cubic-bezier(.2,.8,.2,1)}
  .logo:hover .go,.logo:focus-visible .go{opacity:0;transform:scale(.6);transition-delay:calc(var(--i) * .03s)}
  .logo:hover .stay,.logo:focus-visible .stay{transform:translate(var(--x),var(--y));transition-delay:.18s}
  /* The square takes the accent colour as the letters move; letters use the text colour made for the accent */
  .logo rect{transition:fill .35s ease}
  .logo g{transition:fill .35s ease}
  .logo:hover rect,.logo:focus-visible rect{fill:var(--accent);transition-delay:.1s}
  .logo:hover g,.logo:focus-visible g{fill:var(--on-accent);transition-delay:.1s}
}
/* Way back to the destination's currency and yours, under the converter when both sides have drifted */
.reset{align-self:center;display:flex;align-items:center;gap:8px;min-height:44px;margin-top:14px;padding:0 18px;border-radius:99px;
  font-size:15px;font-weight:600;color:var(--text);box-shadow:0 4px 16px rgba(0,0,0,.18)}
.reset .i{font-size:18px;color:var(--muted)}
.reset:hover{filter:brightness(.97)}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
