@font-face {
  font-family: 'Studio Futura Condensed';
  src: url('/assets/futura-condensed-extra-bold.otf') format('opentype');
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: 'Studio Futura';
  src: local('Futura-Medium'), local('Futura Medium');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Studio Futura';
  src: local('Futura-Bold'), local('Futura Bold');
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}

@font-face {
  font-family: 'Studio Geometric Fallback';
  src: url('/assets/league-spartan-latin-wght-normal.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --black: #090909;
  --cream: #ece8e0;
  --accent: #b2cf46;
  --accent-hover: #cce778;
  --accent-dark: #203527;
  --line: #353430;
  --tracking-tight: -.055em;
  --tracking-display: -.07em;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: var(--black); color: var(--cream); font-family: 'Studio Futura', Futura, 'Studio Geometric Fallback', sans-serif; letter-spacing: var(--tracking-tight); }
button, input { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }

.app-shell { max-width: 1600px; min-height: 100vh; margin: auto; display: flex; flex-direction: column; }
.site-header { height: 78px; flex: none; padding: 0 clamp(24px, 4.5vw, 72px); display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.brand { color: var(--cream); text-decoration: none; display: inline-flex; align-items: center; width: max-content; }
.brand-wordmark { display: flex; flex-direction: column; font: 800 28px/.72 'Studio Futura Condensed', 'Futura Condensed', 'Studio Geometric Fallback', sans-serif; letter-spacing: -1.8px; }
.brand-wordmark span:last-child { font-size: 31px; letter-spacing: -2.2px; }

.studio { flex: 1; display: grid; grid-template-columns: minmax(420px, 44%) minmax(0, 56%); }
.editor { min-width: 0; padding: 56px clamp(32px, 5vw, 82px) 60px clamp(32px, 7vw, 110px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
h1 { margin: 0 0 55px; font: 800 clamp(90px, 8.1vw, 138px)/.84 'Studio Futura Condensed', 'Futura Condensed', 'Studio Geometric Fallback', sans-serif; letter-spacing: var(--tracking-display); }
h1 em { color: var(--accent); font-style: normal; }

.controls { width: min(100%, 480px); }
.controls label, .controls legend { color: var(--cream); font-size: 11px; font-weight: 800; letter-spacing: var(--tracking-tight); }
.input-wrap { margin-top: 15px; border-bottom: 2px solid var(--accent); display: flex; align-items: center; gap: 14px; }
.input-wrap:focus-within { border-color: var(--accent); }
#destination { flex: 1; min-width: 0; padding: 7px 0 13px; border: 0; outline: 0; background: transparent; color: var(--cream); font: 800 clamp(36px, 3.6vw, 54px)/1 'Studio Futura Condensed', 'Futura Condensed', 'Studio Geometric Fallback', sans-serif; letter-spacing: var(--tracking-display); text-transform: uppercase; }
#destination::placeholder { color: #66635e; }
.map-trigger { width: 48px; height: 48px; flex: none; margin-bottom: 8px; border: 1px solid var(--accent); background: var(--accent-dark); color: var(--accent); display: grid; place-items: center; cursor: pointer; transition: background .18s, color .18s; }
.map-trigger:hover { background: var(--accent); color: var(--black); }
.map-trigger:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
.format-fieldset { width: 100%; border: 0; padding: 0; margin: 42px 0 0; }
.format-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; }
.format-option { position: relative; min-height: 82px; padding: 17px; border: 1px solid #4a4843; display: flex; align-items: center; gap: 16px; cursor: pointer; font-size: 15px !important; letter-spacing: var(--tracking-tight) !important; }
.format-option:has(input:checked) { border-color: var(--accent); background: var(--accent-dark); }
.format-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.format-option input:focus-visible + .format-icon { outline: 2px solid var(--accent); outline-offset: 5px; }
.format-icon { flex: none; border: 2px solid currentColor; opacity: .8; }
.phone-icon { width: 20px; height: 32px; border-radius: 3px; position: relative; }
.phone-icon::after { content: ''; position: absolute; width: 5px; height: 2px; left: 6px; bottom: 2px; background: currentColor; }
.desktop-icon { width: 34px; height: 24px; border-radius: 2px; position: relative; }
.desktop-icon::after { content: ''; position: absolute; top: 22px; left: 6px; width: 19px; height: 7px; border: solid currentColor; border-width: 0 2px 2px; }
.format-check { position: absolute; right: 14px; top: 12px; color: var(--accent); opacity: 0; }
.format-option:has(input:checked) .format-check { opacity: 1; }

.action-row { display: grid; grid-template-columns: 1.3fr .8fr; gap: 10px; margin-top: 32px; }
.action-button { min-height: 64px; padding: 0 20px; border: 1px solid var(--accent); display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-size: 13px; font-weight: 900; letter-spacing: var(--tracking-tight); transition: background .18s, color .18s, transform .18s; }
.action-button:hover { transform: translateY(-2px); }
.action-button:focus-visible, .social-links a:focus-visible, .social-links button:focus-visible { outline: 2px solid var(--cream); outline-offset: 4px; }
.action-button span:last-child { font-size: 27px; line-height: 1; font-weight: 400; }
.download-button { background: var(--accent); color: #101010; }
.download-button:hover { background: var(--accent-hover); }
.share-button { background: transparent; color: var(--accent); }
.share-button:hover { background: var(--accent); color: #101010; }
.social-links { margin-top: 27px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.social-links a, .social-links button { padding: 0; border: 0; background: transparent; color: #aaa69e; text-decoration: none; cursor: pointer; font-size: 10px; font-weight: 800; letter-spacing: var(--tracking-tight); white-space: nowrap; }
.social-links a:hover, .social-links button:hover { color: var(--accent); }
.status { margin: 16px 0 0; color: var(--accent); font-size: 12px; }
.status:empty { display: none; }

.preview-area { min-width: 0; border-left: 1px solid var(--line); background: radial-gradient(circle at center, #141414, #0a0a0a 68%); display: flex; align-items: center; justify-content: center; padding: 28px; }
.preview-stage { width: 100%; display: flex; align-items: center; justify-content: center; }
.wallpaper-preview { flex: none; background: #000; overflow: hidden; box-shadow: 0 25px 65px #000b; transition: width .25s, height .25s; }
.wallpaper-preview svg { display: block; width: 100%; height: 100%; }
.mobile-preview { height: min(77vh, 760px); aspect-ratio: 402/874; }
.desktop-preview { width: min(100%, 740px); aspect-ratio: 16/9; }

.map-dialog { width: min(960px, calc(100vw - 28px)); max-width: none; max-height: calc(100dvh - 28px); padding: 0; border: 1px solid #4c6533; background: #0c0c0c; color: var(--cream); box-shadow: 0 30px 100px #000e; overflow: auto; }
.map-dialog::backdrop { background: #000b; backdrop-filter: blur(8px); }
.map-sheet { padding: 24px; }
.map-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.map-kicker { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: var(--tracking-tight); }
.map-header h2 { margin: 9px 0 0; font: 800 clamp(34px, 4vw, 58px)/.95 'Studio Futura Condensed', 'Futura Condensed', 'Studio Geometric Fallback', sans-serif; letter-spacing: var(--tracking-display); }
.map-close { width: 42px; height: 42px; border: 1px solid var(--line); background: transparent; color: var(--cream); font-size: 30px; line-height: 1; cursor: pointer; }
.map-close:hover { color: var(--accent); border-color: var(--accent); }
.map-search-wrap { position: relative; }
.map-search { display: flex; gap: 8px; margin: 22px 0 12px; }
.map-search input { flex: 1; min-width: 0; height: 48px; padding: 0 15px; border: 1px solid #595650; outline: 0; background: #171717; color: var(--cream); font-size: 13px; }
.map-search input:focus { border-color: var(--accent); }
.map-search button, .map-selection-row button { padding: 0 21px; border: 1px solid var(--accent); background: var(--accent); color: #121212; cursor: pointer; font-size: 11px; font-weight: 900; letter-spacing: var(--tracking-tight); white-space: nowrap; }
.map-search button:hover, .map-selection-row button:not(:disabled):hover { background: var(--accent-hover); }
.map-results { position: absolute; top: calc(100% - 12px); left: 0; right: 0; z-index: 5; max-height: min(330px, 48dvh); overflow-y: auto; border: 1px solid #4c6533; background: #101010; box-shadow: 0 18px 40px #000b; }
.map-results[hidden] { display: none; }
.map-result { width: 100%; min-height: 56px; padding: 10px 14px; border: 0; border-bottom: 1px solid #30302e; background: transparent; color: var(--cream); display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; cursor: pointer; }
.map-result:hover, .map-result:focus-visible { outline: 0; background: var(--accent-dark); }
.map-result strong, .map-result small { display: block; }
.map-result strong { font-size: 13px; }
.map-result small { margin-top: 4px; color: #aaa49d; font-size: 11px; }
.map-result-kind { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: var(--tracking-tight); }
.map-frame { position: relative; height: clamp(380px, 54vh, 570px); border: 1px solid #393631; overflow: hidden; background: #1b1d20; }
#location-map { width: 100%; height: 100%; }
.map-hint { position: absolute; top: 14px; left: 14px; z-index: 1; padding: 9px 11px; background: #111d; color: var(--cream); pointer-events: none; font-size: 10px; font-weight: 800; letter-spacing: var(--tracking-tight); }
.map-city-view { position: absolute; bottom: 14px; left: 14px; z-index: 2; min-height: 36px; padding: 0 11px; border: 1px solid var(--accent); background: #122018ed; color: var(--accent); cursor: pointer; font-size: 10px; font-weight: 900; letter-spacing: var(--tracking-tight); }
.map-city-view:hover, .map-city-view:focus-visible { background: var(--accent); color: #111; }
.map-selection-row { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.map-selection-row span { font-size: 12px; font-weight: 800; letter-spacing: var(--tracking-tight); }
.map-selection-row button { min-height: 45px; }
.map-selection-row button:disabled { opacity: .45; cursor: not-allowed; }
.map-status { min-height: 16px; margin: 0; color: #aaa49d; font-size: 11px; }
.map-dialog .maplibregl-ctrl-group { border: 1px solid #4c6533; background: var(--accent); }
.map-dialog .maplibregl-ctrl-group button:hover { background: var(--accent-hover); }
.map-marker-label { position: absolute; left: 50%; bottom: calc(100% + 7px); transform: translateX(-50%); padding: 6px 9px; border: 1px solid var(--accent); background: #101710ef; color: var(--cream); font-size: 10px; font-weight: 900; letter-spacing: var(--tracking-tight); line-height: 1.2; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 12px #0008; }

@media (max-width: 1050px) {
  .studio { grid-template-columns: minmax(360px, 45%) minmax(0, 55%); }
  .editor { padding-left: 38px; padding-right: 38px; }
  h1 { font-size: clamp(78px, 8.5vw, 112px); }
  .social-links { gap: 14px; }
}

@media (max-width: 760px) {
  .site-header { height: 66px; padding: 0 24px; }
  .brand-wordmark { font-size: 23px; }
  .brand-wordmark span:last-child { font-size: 26px; }
  .studio { display: flex; flex-direction: column; }
  .preview-area { order: 0; padding: 28px 18px; border: 0; border-bottom: 1px solid var(--line); }
  .mobile-preview { height: min(62vh, 580px); }
  .desktop-preview { width: min(100%, 650px); }
  .editor { order: 1; padding: 42px 24px 65px; }
  h1 { margin-bottom: 38px; font-size: clamp(76px, 16vw, 116px); }
  .controls { max-width: none; }
}

@media (max-width: 420px) {
  h1 { font-size: clamp(67px, 17vw, 78px); }
  .format-option { gap: 10px; padding: 12px; font-size: 13px !important; }
  .desktop-icon { width: 29px; }
  .action-button { padding: 0 15px; font-size: 11px; }
  .social-links { gap: 17px; }
  .map-sheet { padding: 16px; }
  .map-search button { padding: 0 13px; }
  .map-frame { height: min(49dvh, 430px); }
  .map-selection-row { align-items: stretch; flex-direction: column; padding: 13px 0 0; gap: 12px; }
  .map-selection-row button { width: 100%; }
}
