:root {
  color-scheme: dark;
  --ink: #0d0d0e;
  --surface: #151515;
  --surface-raised: #1d1c1c;
  --line: #302d2c;
  --muted: #858585;
  --paper: #f0ece5;
  --red: #cf382f;
  --green: #9cdf79;
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--font-body); font-size: 13px; }
button, input { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes seal-stamp { 0% { opacity: 0; transform: scale(.72) rotate(-8deg); } 72% { opacity: 1; transform: scale(1.08) rotate(2deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes rule-reveal { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.app-shell { width: min(1440px, 100% - 80px); margin: 0 auto; }
.topbar { position: sticky; z-index: 8; top: 0; height: 76px; border-bottom: 1px solid #2c2c2c; background: #101010f5; display: flex; align-items: center; justify-content: space-between; backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.brand-logo { display: block; width: 52px; height: 52px; flex: 0 0 auto; object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-copy strong { font-family: var(--font-display); font-size: 22px; line-height: 1; letter-spacing: 1px; }
.brand-copy small { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: 1.5px; }
.top-nav { height: 100%; display: flex; align-items: center; gap: 30px; }
.nav-link { height: 100%; display: grid; place-items: center; position: relative; color: #989898; font-size: 9px; font-weight: 800; letter-spacing: 1.2px; transition: color .2s; }
.nav-link::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .22s ease; }
.nav-link:hover { color: var(--paper); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--paper); }
.nav-link.active::after { transform: scaleX(1); }
.join-link { display: flex; align-items: center; gap: 17px; padding: 12px 14px 12px 17px; border-radius: 6px; background: var(--red); color: #fff; font-size: 9px; font-weight: 800; letter-spacing: 1.05px; transition: background .2s, transform .2s; }
.join-link:hover { background: #ff6259; transform: translateY(-1px); }
.join-arrow { font-size: 15px; line-height: 9px; }
.hero-banner { position: relative; display: flex; align-items: center; min-height: 390px; overflow: hidden; border-bottom: 1px solid #383838; background-color: #1a1a1a; background-image: linear-gradient(90deg, #101010 0%, #101010e8 24%, #10101088 58%, #10101020 100%), linear-gradient(0deg, #101010b5 0%, transparent 47%), url("IMG_4726.jpg"); background-position: center, center, center 62%; background-size: cover; scroll-margin-top: 76px; }
.hero-content { position: relative; z-index: 1; max-width: 610px; padding: 50px 0 54px 6%; animation: rise-in .72s cubic-bezier(.2,.7,.2,1) .08s both; }
.hero-banner h1 { margin: 15px 0 13px; font-size: 82px; line-height: .86; }
.hero-banner h1 span { color: var(--red); }
.hero-copy { margin: 0; color: #d4d0c9; font-size: 13px; line-height: 1.8; }
.hero-actions { display: flex; align-items: center; gap: 23px; margin-top: 22px; }
.hero-apply { display: flex; align-items: center; gap: 18px; min-height: 40px; padding: 0 14px; border-radius: 6px; background: var(--red); color: white; font-size: 9px; font-weight: 800; letter-spacing: 1px; transition: background .18s, transform .18s, box-shadow .18s; }
.hero-apply:hover { background: #ff6259; }
.hero-apply:hover { transform: translateY(-2px); box-shadow: 0 7px 22px #d43a3240; }
.hero-apply span { font-size: 14px; }
.hero-rules-link { color: #e3dfd8; font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.hero-rules-link span { margin-left: 5px; color: var(--red); font-size: 14px; }
.hero-stamp { position: absolute; right: 20px; bottom: 17px; display: flex; align-items: center; gap: 8px; color: #ffffffb5; font: 700 11px var(--font-display); letter-spacing: 2px; animation: rise-in .48s ease .42s both; }
.hero-stamp i { color: var(--red); font-style: normal; }
.hero-seal, .rules-seal { display: inline-grid; place-items: center; border: 1px solid #d34a40b5; color: #e45549; font-family: "Noto Serif JP", "Yu Mincho", serif; font-weight: 700; }
.hero-seal { width: 27px; height: 27px; font-size: 14px; letter-spacing: 0; animation: seal-stamp .52s cubic-bezier(.2,.8,.2,1) .48s both; }
.rules-section { padding: 33px 0 39px; scroll-margin-top: 86px; }
.rules-section { position: relative; isolation: isolate; }
.rules-section::before { content: ""; position: absolute; z-index: -1; top: 16px; right: 0; width: min(210px, 38vw); height: 180px; opacity: .32; pointer-events: none; background: radial-gradient(ellipse at 50% 100%, transparent 0 8px, #b13b3540 8.5px 9.5px, transparent 10px 17px) 0 0 / 34px 17px, radial-gradient(ellipse at 50% 100%, transparent 0 8px, #b13b3540 8.5px 9.5px, transparent 10px 17px) 17px 8.5px / 34px 17px; mask-image: linear-gradient(135deg, #000 10%, transparent 86%); }
.rules-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding-bottom: 18px; animation: rise-in .62s ease .18s both; }
.rules-heading .eyebrow { display: flex; align-items: center; gap: 8px; }
.rules-heading h2 { margin: 7px 0 0; font: 700 38px/.92 var(--font-display); }
.rules-heading h2 span { color: var(--red); }
.rules-note { margin: 0 2px 2px 0; padding-left: 13px; border-left: 1px solid #414141; color: #aaa; font-size: 9px; line-height: 1.8; }
.rules-block { padding-top: 16px; }
.rules-block-heading { display: flex; align-items: center; gap: 11px; margin: 0 0 10px; animation: rise-in .48s ease .24s both; }
.rules-index { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 auto; border: 1px solid #76312d; color: var(--red); font: 600 12px/1 var(--font-display); }
.rules-seal { width: 25px; height: 25px; margin-left: 8px; vertical-align: 5px; font-size: 12px; animation: seal-stamp .48s cubic-bezier(.2,.8,.2,1) .42s both; }
.rules-block-heading h3 { margin: 0; font: 700 24px/1 var(--font-display); }
.rule-list { margin: 0; padding: 0; list-style: none; }
.rule-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-top: 1px solid #292929; animation: rule-reveal .42s ease both; }
.rule-row:nth-child(1) { animation-delay: .08s; }
.rule-row:nth-child(2) { animation-delay: .12s; }
.rule-row:nth-child(3) { animation-delay: .16s; }
.rule-row:nth-child(4) { animation-delay: .20s; }
.rule-row:nth-child(5) { animation-delay: .24s; }
.rule-row:nth-child(6) { animation-delay: .28s; }
.rule-row:nth-child(7) { animation-delay: .32s; }
.rule-row:nth-child(8) { animation-delay: .36s; }
.rule-row:nth-child(9) { animation-delay: .40s; }
.rule-row:nth-child(10) { animation-delay: .44s; }
.rule-id { padding-top: 1px; color: var(--red); font: 600 16px/1.2 var(--font-display); }
.rule-row p { margin: 0; color: #c4c1ba; font-size: 11px; line-height: 1.65; }
.rule-row strong { color: #f0ede7; font-weight: 800; }
.rule-nested { padding-left: 20px; }
.rule-row .penalty { display: inline-block; margin-left: 7px; color: #ff8179; font-size: 9px; letter-spacing: .45px; text-transform: uppercase; }
.contract-section { margin-top: 36px; padding-top: 21px; border-top: 1px solid #3b3b3b; }
.contract-intro { max-width: 760px; margin: 0 0 16px 30px; color: #a9a69f; font-size: 11px; line-height: 1.7; }
.contract-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contract-block { padding: 13px 14px 10px 0; }
.contract-block + .contract-block { padding-left: 19px; border-left: 1px solid #353535; }
.contract-block h4 { margin: 0 0 9px; font: 700 21px/1 var(--font-display); }
.contract-block h4 span { margin-right: 7px; color: var(--red); }
.contract-block > p { margin: 0 0 10px; color: #aaa69f; font-size: 11px; line-height: 1.65; }
.contract-block .rule-row { grid-template-columns: 39px minmax(0, 1fr); padding: 9px 0; }
.contract-note { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; margin-top: 16px; padding: 14px 0; border-top: 1px solid #353535; border-bottom: 1px solid #353535; }
.note-mark { display: grid; place-items: center; width: 21px; height: 21px; background: var(--red); color: white; font: 700 14px var(--font-display); }
.contract-note strong { color: #ece8e2; font-size: 9px; letter-spacing: .8px; }
.contract-note p { margin: 4px 0 0; color: #a9a69f; font-size: 10px; line-height: 1.65; }
.final-word { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; margin-top: 20px; padding: 3px 0 3px 13px; border-left: 2px solid var(--red); }
.final-word h4 { margin: 0 0 6px; font: 700 20px/1 var(--font-display); }
.final-word p { max-width: 820px; margin: 0 0 6px; color: #c4c1ba; font-size: 11px; line-height: 1.7; }
.final-word strong { color: #ff8179; font-size: 10px; }
.eyebrow { margin: 0; color: #a3a3a3; font-size: 9px; font-weight: 800; letter-spacing: 1.5px; }
.live-dot { display: inline-block; width: 6px; height: 6px; margin: 0 7px 1px 0; border-radius: 50%; background: var(--red); box-shadow: 0 0 9px #f0443b88; }
h1 { margin: 8px 0 0; font: 700 48px/.9 var(--font-display); letter-spacing: .4px; }
h1 span { color: var(--red); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: stretch; }
.workspace { scroll-margin-top: 88px; }
.map-column { min-width: 0; }
.map-toolbar { min-height: 43px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.map-heading { display: flex; align-items: center; gap: 10px; font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.heading-index { color: var(--red); font-family: var(--font-display); font-size: 17px; }
.map-actions { display: flex; gap: 6px; align-items: center; }
.tool-button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 31px; padding: 0 9px; border: 1px solid #353535; background: #181818; color: #c1c1c1; font-size: 9px; font-weight: 800; letter-spacing: .65px; cursor: pointer; transition: border-color .18s, color .18s; }
.tool-button:hover { border-color: var(--red); color: #fff; }
.tool-icon { color: var(--red); font-size: 15px; }
.map-frame { position: relative; overflow: hidden; border: 1px solid #383838; background: #111; }
.map-viewport { position: relative; min-height: 450px; height: min(68vw, 680px); max-height: calc(100vh - 250px); overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #262626 0%, #111 75%); cursor: grab; touch-action: none; user-select: none; }
.map-viewport.zoomed { cursor: grab; }
.map-viewport.map-dragging { cursor: grabbing; }
.map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; background: #202521; transform-origin: 0 0; will-change: transform; }
.map-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .94; transition: opacity .2s; }
.map-image:not([src]), .map-image[src=""] { display: none; }
.map-image.broken { display: none; }
.map-markers { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.map-marker { position: absolute; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; background: transparent; transform: translate(-50%, -50%); pointer-events: auto; cursor: pointer; }
.marker-core { width: 11px; height: 11px; border: 2px solid #171717; border-radius: 50%; outline: 1px solid currentColor; background: var(--green); color: var(--green); box-shadow: 0 0 12px currentColor; transition: transform .16s; }
.marker-other .marker-core { background: var(--red); color: var(--red); }
.map-marker:hover, .map-marker:focus-visible { z-index: 4; }
.map-marker:hover .marker-core, .map-marker:focus-visible .marker-core { transform: scale(1.3); }
.marker-label { position: absolute; left: calc(100% + 3px); top: 50%; max-width: 150px; overflow: hidden; padding: 4px 6px; background: #111e; color: #f4f0e9; font-size: 8px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; opacity: 0; pointer-events: none; transform: translateY(-50%); transition: opacity .15s; }
.map-marker:hover .marker-label, .map-marker:focus-visible .marker-label { opacity: 1; }
.map-fallback { position: absolute; inset: 0; overflow: hidden; background: #202621; }
.fallback-grid { position: absolute; inset: 0; opacity: .2; background-image: linear-gradient(#69776a44 1px, transparent 1px), linear-gradient(90deg, #69776a44 1px, transparent 1px); background-size: 5.5% 5.5%; }
.fallback-roads { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #9ca38b; stroke-width: 5; opacity: .55; }
.fallback-roads .road-secondary { stroke-width: 2; opacity: .75; }
.region { position: absolute; z-index: 1; color: #e0dfd2a3; font-family: var(--font-display); font-size: clamp(12px, 2vw, 20px); font-weight: 700; letter-spacing: 2px; text-shadow: 0 1px 4px #101010; }
.region-city { left: 27%; top: 58%; color: #eadbb5; }
.region-desert { right: 10%; top: 35%; font-size: clamp(9px, 1.3vw, 13px); }
.region-north { left: 38%; top: 12%; font-size: clamp(10px, 1.5vw, 15px); }
.region-ocean { left: 3%; top: 45%; transform: rotate(-90deg); font-size: clamp(9px, 1.4vw, 14px); }
.map-caption, .map-coordinates { position: absolute; z-index: 3; display: flex; align-items: center; gap: 7px; padding: 7px 9px; background: #111d; color: #e7e4dd; font-size: 8px; font-weight: 800; letter-spacing: 1px; pointer-events: none; }
.map-caption { top: 12px; left: 12px; }
.map-caption-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.map-coordinates { right: 12px; bottom: 12px; color: #aaa; }
.map-zoom-controls { position: absolute; z-index: 5; top: 12px; right: 12px; display: flex; align-items: center; gap: 0; border: 1px solid #393939; background: #111e; }
.zoom-button { display: grid; place-items: center; width: 29px; height: 29px; border: 0; background: transparent; color: #e7e4dd; font-size: 17px; line-height: 1; cursor: pointer; }
.zoom-button:hover { background: #303030; color: #fff; }
.zoom-reset { border-left: 1px solid #393939; color: var(--red); font-size: 16px; }
#zoom-level { min-width: 42px; padding: 0 4px; color: #c9c6bf; font-size: 8px; font-weight: 800; text-align: center; }
.map-add-hint { position: absolute; z-index: 4; bottom: 11px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid #f0443b80; background: #131313e8; color: #eee; font-size: 8px; font-weight: 800; letter-spacing: .7px; white-space: nowrap; cursor: pointer; }
.map-add-hint span { color: var(--red); font-size: 13px; }
.map-legend { display: flex; align-items: center; gap: 20px; min-height: 39px; color: #b2b2b2; font-size: 8px; font-weight: 800; letter-spacing: .8px; }
.map-legend > span { display: flex; align-items: center; gap: 7px; }
.legend-dot, .mini-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; }
.owned { background: var(--green); }
.other { background: var(--red); }
.legend-note { margin-left: auto; color: #737373; font-weight: 500; letter-spacing: 0; }
.business-panel { min-height: 500px; display: flex; flex-direction: column; border: 1px solid #303030; background: #171717; }
.panel-topline { display: flex; justify-content: space-between; align-items: center; padding: 15px 15px 0; color: #949494; font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.record-count { color: var(--red); font-family: var(--font-display); font-size: 15px; }
.panel-title-row { display: flex; align-items: center; justify-content: space-between; padding: 3px 14px 13px; border-bottom: 1px solid #2e2e2e; }
.panel-title-row h2 { margin: 0; font: 700 27px/.95 var(--font-display); }
.add-button { width: 29px; height: 29px; border: 1px solid #484848; background: transparent; color: var(--red); font-size: 21px; cursor: pointer; transition: background .2s, color .2s; }
.add-button:hover { background: var(--red); color: white; }
.search-box { display: flex; align-items: center; gap: 8px; margin: 12px 12px 0; padding: 0 9px; height: 34px; border: 1px solid #333; color: #858585; }
.search-box > span { font-size: 19px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--paper); font-size: 10px; }
.search-box input::placeholder { color: #737373; }
.filter-tabs { display: flex; gap: 3px; padding: 12px 12px 9px; border-bottom: 1px solid #303030; }
.filter-tab { display: flex; align-items: center; gap: 5px; padding: 6px 7px; border: 0; background: transparent; color: #888; font-size: 8px; font-weight: 800; letter-spacing: .55px; cursor: pointer; }
.filter-tab.selected { background: #292929; color: #f4f0e9; }
.filter-tab span { color: #9e9e9e; font-size: 8px; }
.business-list { flex: 1; overflow: auto; max-height: 430px; }
.business-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto 20px; align-items: center; gap: 9px; min-height: 53px; padding: 8px 11px; border-bottom: 1px solid #292929; cursor: pointer; transition: background .15s; }
.business-row:hover { background: #222; }
.business-row .legend-dot { width: 6px; height: 6px; box-shadow: 0 0 9px currentColor; }
.business-name { overflow: hidden; color: #e2dfd9; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.business-owner { color: #888; font-size: 7px; font-weight: 800; letter-spacing: .4px; white-space: nowrap; }
.business-owner.owner-yakuza { color: var(--green); }
.business-owner.owner-other { color: #ff726b; }
.row-edit { display: grid; place-items: center; width: 21px; height: 23px; border: 0; background: transparent; color: #818181; font-size: 13px; cursor: pointer; }
.row-edit:hover { color: white; }
.empty-list { padding: 22px 14px; color: #808080; font-size: 10px; line-height: 1.6; }
.panel-footer { display: flex; align-items: center; gap: 7px; min-height: 33px; padding: 0 12px; border-top: 1px solid #303030; color: #777; font-size: 7px; font-weight: 700; letter-spacing: .65px; }
.sync-mark { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.site-footer { display: flex; justify-content: space-between; gap: 12px; padding: 16px 0 20px; border-top: 1px solid #292929; color: #737373; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.footer-slash { padding: 0 4px; color: var(--red); }
.business-dialog { width: min(400px, calc(100% - 32px)); padding: 0; border: 1px solid #444; background: #171717; color: var(--paper); box-shadow: 0 24px 100px #000b; }
.business-dialog::backdrop { background: #000b; backdrop-filter: blur(3px); }
.business-dialog form { padding: 22px; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; }
.close-button { width: 28px; height: 28px; border: 1px solid #393939; background: transparent; color: #ccc; font-size: 19px; cursor: pointer; }
.business-dialog h2 { margin: 10px 0 21px; font: 700 31px/.95 var(--font-display); }
.field-label { display: block; margin: 15px 0 7px; color: #aaa; font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.text-field { width: 100%; height: 40px; padding: 0 11px; border: 1px solid #3b3b3b; outline: none; background: #111; color: var(--paper); font-size: 11px; }
.text-field:focus { border-color: var(--red); }
.owner-options { display: flex; gap: 8px; }
.owner-option { display: flex; flex: 1; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border: 1px solid #393939; color: #ccc; font-size: 9px; font-weight: 800; letter-spacing: .5px; cursor: pointer; }
.owner-option:has(input:checked) { border-color: #666; background: #222; }
.owner-option input { accent-color: var(--red); }
.owner-swatch { width: 7px; height: 7px; border-radius: 50%; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.save-button, .delete-button { min-height: 37px; padding: 0 14px; border: 1px solid transparent; background: var(--red); color: white; font-size: 9px; font-weight: 800; letter-spacing: .8px; cursor: pointer; }
.save-button span { margin-left: 10px; font-size: 13px; }
.delete-button { margin-right: auto; border-color: #5a3533; background: transparent; color: #ff8179; }
.toast { position: fixed; z-index: 10; right: 22px; bottom: 22px; max-width: calc(100% - 44px); padding: 11px 14px; border: 1px solid #444; background: #202020; color: #eee; font-size: 10px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.media-page { padding: 34px 0 50px; }
.media-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 6px 0 24px; }
.media-heading h1 { margin-top: 9px; font-size: 46px; }
.media-heading h1 span { color: var(--red); }
.media-subtitle { margin: 8px 0 0; color: #aaa; font-size: 11px; }
.media-count { margin: 0 0 4px; color: #aaa; font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.media-link-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 12px; border: 1px solid #353535; background: #171717; }
.media-url-field { display: flex; align-items: center; gap: 9px; min-width: 0; height: 39px; padding: 0 10px; border: 1px solid #383838; color: var(--red); }
.media-url-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--paper); font-size: 10px; }
.media-url-field input::placeholder { color: #777; }
.media-kind-field { display: flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid #383838; color: #999; font-size: 8px; font-weight: 800; letter-spacing: .7px; }
.media-kind-field select { border: 0; outline: 0; background: #171717; color: #eee; font-size: 9px; font-weight: 800; }
.media-add-link { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 39px; padding: 0 13px; border: 0; border-radius: 6px; background: var(--red); color: white; font-size: 9px; font-weight: 800; letter-spacing: .6px; cursor: pointer; }
.media-add-link:hover { background: #ff6259; }
.media-add-link span { font-size: 15px; }
.media-link-hint { margin: 7px 0 0; color: #85817d; font-size: 9px; }
.media-library { padding-top: 21px; }
.media-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; }
.media-search { display: flex; align-items: center; gap: 8px; width: min(350px, 100%); height: 35px; padding: 0 9px; border: 1px solid #353535; color: #888; }
.media-search span { font-size: 18px; }
.media-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--paper); font-size: 10px; }
.media-search input::placeholder { color: #777; }
.media-filters { display: flex; gap: 3px; }
.media-filter { min-height: 30px; padding: 0 9px; border: 1px solid transparent; background: transparent; color: #888; font-size: 8px; font-weight: 800; letter-spacing: .7px; cursor: pointer; }
.media-filter.active { border-color: #414141; background: #222; color: #eee; }
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.media-card { min-width: 0; overflow: hidden; border: 1px solid #303030; background: #171717; transition: transform .2s ease, border-color .2s ease; }
.media-card:hover { transform: translateY(-3px); border-color: #69403d; }
.media-preview { display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; background: #0a0a0a; }
.media-preview img, .media-preview video { display: block; width: 100%; height: 100%; object-fit: contain; }
.media-video-link { position: relative; display: grid; place-items: center; width: 100%; height: 100%; background: #111; color: #f4f0e9; text-decoration: none; }
.media-video-link img { opacity: .85; object-fit: cover; transition: opacity .2s ease; }
.media-play-icon { position: absolute; display: grid; place-items: center; width: 43px; height: 31px; border-radius: 5px; background: var(--red); color: white; font-size: 14px; }
.media-video-link:hover img { opacity: 1; }
.media-video-external { color: #eee; font-size: 10px; font-weight: 800; letter-spacing: .8px; }
.media-details { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 10px 11px 7px; }
.media-name { overflow: hidden; color: #e5e1dc; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.media-meta { color: #888; font-size: 8px; font-weight: 700; letter-spacing: .4px; }
.media-actions { display: flex; justify-content: flex-end; gap: 5px; padding: 0 9px 9px; }
.media-icon-button { display: grid; place-items: center; width: 28px; height: 27px; border: 1px solid #3a3a3a; background: transparent; color: #ccc; font-size: 15px; text-decoration: none; cursor: pointer; transition: border-color .18s, color .18s, transform .18s; }
.media-icon-button:hover { border-color: var(--red); color: white; }
.media-icon-button:hover { transform: translateY(-1px); }
.media-delete { color: #ff8078; }
.media-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 190px; border-top: 1px solid #292929; border-bottom: 1px solid #292929; color: #8f8b87; text-align: center; }
.media-empty[hidden] { display: none; }
.media-empty .empty-mark { margin-bottom: 5px; color: var(--red); font: 400 26px var(--font-display); }
.media-empty strong { color: #e1ddd7; font: 600 17px var(--font-display); }
.media-empty > span:last-child { margin-top: 5px; font-size: 10px; }
.media-storage-note { display: flex; align-items: center; gap: 7px; margin: 14px 0 0; color: #777; font-size: 7px; font-weight: 700; letter-spacing: .65px; }
.media-header-actions { display: flex; align-items: center; gap: 8px; }
.media-login-button { min-height: 36px; padding: 0 12px; border: 1px solid #404040; background: transparent; color: #e4e0da; font-size: 9px; font-weight: 800; letter-spacing: .8px; cursor: pointer; }
.media-login-button:hover { border-color: var(--red); color: white; }
.media-access-note { margin: 6px 0 0; color: #aaa; font-size: 9px; }
.media-login-error { margin: 0; color: #ff6b63; font-size: 11px; }
@media (min-width: 1441px) { .map-viewport { height: min(48vw, 680px); } }
@media (max-width: 920px) {
  .app-shell { width: calc(100% - 40px); }
  .workspace { grid-template-columns: minmax(0, 1fr) 265px; gap: 15px; }
  .map-viewport { min-height: 390px; height: min(65vw, 590px); }
  .business-row { grid-template-columns: 7px minmax(0, 1fr) 19px; }
  .business-owner { display: none; }
}
@media (max-width: 680px) {
  .app-shell { width: calc(100% - 28px); }
  .topbar { height: auto; min-height: 64px; padding-top: 8px; flex-wrap: wrap; }
  .brand { min-width: auto; gap: 9px; }
  .brand-logo { width: 42px; height: 42px; }
  .brand-copy strong { font-size: 19px; }
  .brand-copy small { font-size: 7px; }
  .top-nav { order: 3; width: 100%; height: 35px; justify-content: space-between; gap: 8px; }
  .nav-link { font-size: 8px; letter-spacing: .7px; }
  .join-link { gap: 9px; padding: 11px 10px; font-size: 8px; }
  .media-header-actions { gap: 5px; }
  .media-login-button { min-height: 32px; padding: 0 8px; font-size: 8px; }
  .hero-banner { min-height: 340px; background-position: center, center, 57% 62%; scroll-margin-top: 101px; }
  .hero-content { padding: 38px 15px 42px 20px; }
  .hero-banner h1 { font-size: 56px; }
  .hero-copy { font-size: 11px; }
  .hero-actions { gap: 16px; margin-top: 19px; }
  .hero-apply { min-height: 37px; padding: 0 11px; font-size: 8px; }
  .hero-rules-link { font-size: 8px; }
  .rules-section { padding: 26px 0 30px; scroll-margin-top: 105px; }
  .rules-heading { padding-bottom: 14px; }
  .rules-heading h2 { font-size: 33px; }
  .rules-note { font-size: 8px; }
  .rules-block { padding-top: 13px; }
  .rules-block-heading { gap: 8px; }
  .rules-block-heading h3 { font-size: 21px; }
  .rule-row { grid-template-columns: 41px minmax(0, 1fr); gap: 6px; padding: 9px 0; }
  .rule-row p { font-size: 10px; }
  .rule-nested { padding-left: 12px; }
  .rule-row .penalty { margin-left: 0; }
  .contract-section { margin-top: 27px; padding-top: 17px; }
  .contract-grid { grid-template-columns: 1fr; gap: 8px; }
  .contract-block { padding: 10px 0; }
  .contract-block + .contract-block { padding: 17px 0 10px; border-top: 1px solid #353535; border-left: 0; }
  .contract-block .rule-row { grid-template-columns: 36px minmax(0, 1fr); }
  .contract-intro { margin-left: 0; }
  .contract-note { margin-top: 10px; }
  .final-word { margin-top: 16px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .map-toolbar { min-height: 39px; }
  .map-actions { gap: 4px; }
  .tool-button { min-height: 29px; padding: 0 7px; }
  .upload-label { display: none; }
  .map-viewport { min-height: 0; height: auto; aspect-ratio: 1; max-height: none; }
  .map-canvas { width: 100%; height: 100%; }
  .map-zoom-controls { top: 8px; right: 8px; }
  .zoom-button { width: 27px; height: 27px; }
  .map-add-hint { left: 8px; bottom: 8px; padding: 7px; font-size: 7px; transform: none; }
  .map-coordinates { right: 8px; bottom: 8px; gap: 4px; padding: 6px 7px; font-size: 7px; }
  .map-legend { gap: 12px; min-height: 34px; font-size: 7px; }
  .legend-note { display: none !important; }
  .business-panel { min-height: 260px; }
  .business-list { max-height: 290px; }
  .business-row { grid-template-columns: 8px minmax(0, 1fr) auto 20px; }
  .business-owner { display: block; }
  .site-footer { font-size: 7px; }
  .media-page { padding-top: 26px; }
  .media-heading h1 { font-size: 39px; }
  .media-toolbar { align-items: flex-start; flex-direction: column; }
  .media-link-form { grid-template-columns: minmax(0, 1fr) auto; }
  .media-url-field { grid-column: 1 / -1; }
  .media-add-link { min-width: 155px; }
  .media-search { width: 100%; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .media-details { padding: 8px 8px 6px; }
  .media-actions { padding: 0 7px 7px; }
}
@media (max-width: 390px) {
  .app-shell { width: calc(100% - 22px); }
  .hero-banner h1 { font-size: 51px; }
  .rules-heading h2 { font-size: 30px; }
  .rules-note { padding-left: 8px; }
  .rules-heading h2 { font-size: 28px; }
  .rules-note { max-width: 135px; font-size: 7px; }
  .rules-index { font-size: 17px; }
  .rules-block-heading h3 { font-size: 19px; }
  .map-heading { font-size: 9px; }
  .map-legend { gap: 8px; letter-spacing: .3px; }
  .business-owner { font-size: 6px; }
  .filter-tab { padding: 6px 5px; font-size: 7px; }
  .media-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
