:root {
  --aqua: #00cbd2;
  --aqua-dark: #08777b;
  --ink: #202727;
  --muted: #687374;
  --green: #31785b;
  --line: #dce5e5;
  --surface: #ffffff;
  --page: #eef2f2;
  --radius: 20px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: radial-gradient(circle at 86% -10%, rgba(0,203,210,.16), transparent 32%), var(--page); }
button, input, select { font: inherit; }
button, summary, input[type="file"] { -webkit-tap-highlight-color: transparent; }
a { color: var(--aqua-dark); }
.eyebrow { margin: 0 0 8px; color: var(--aqua-dark); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; min-width: 178px; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: transform .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .6; }
.button-primary { color: #103b3d; background: var(--aqua); border: 1px solid var(--aqua); }
.button-secondary { color: var(--aqua-dark); background: white; border: 2px solid var(--aqua); }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 26px; }
.login-card { width: min(720px, 100%); padding: clamp(30px, 7vw, 72px); background: white; border-radius: 26px; box-shadow: 0 26px 80px rgba(21,65,67,.15); }
.brand-mark { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 28px; color: #123e40; background: var(--aqua); border-radius: 17px; font-size: 24px; font-weight: 850; }
.login-card h1 { max-width: 620px; margin: 0; font-size: clamp(38px, 8vw, 68px); font-weight: 430; letter-spacing: -.055em; line-height: .99; }
.login-intro { max-width: 570px; margin: 24px 0 32px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.login-form label, .dialog-card label { display: grid; gap: 8px; font-size: 13px; font-weight: 750; }
.password-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 8px; }
input { width: 100%; min-height: 48px; padding: 10px 14px; color: var(--ink); background: #f8fbfb; border: 1px solid #cbd8d8; border-radius: 11px; }
input:focus { outline: 3px solid rgba(0,203,210,.23); border-color: var(--aqua); }
.password-row button { min-height: 48px; padding: 10px 20px; color: #123e40; background: var(--aqua); border: 0; border-radius: 11px; font-weight: 700; cursor: pointer; }
.form-error { margin: 10px 0 0; color: #a32929; font-weight: 650; }
.login-note { margin: 22px 0 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.text-link, .back-link { font-size: 13px; font-weight: 700; }

.site-header { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding: 38px max(24px, calc((100vw - 1280px) / 2)); color: white; background: radial-gradient(circle at 85% 0%, rgba(0,203,210,.32), transparent 34%), linear-gradient(135deg, #202727, #1f5052); }
.site-header h1 { margin: 0; font-size: clamp(42px, 7vw, 72px); font-weight: 430; letter-spacing: -.055em; line-height: 1; }
.site-header p:last-child { margin: 12px 0 0; color: #d0e0e1; }
.site-header .eyebrow { color: #6cf2f4; }
.header-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 10px; }
.header-actions form { display: contents; }
.admin-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; min-width: 178px; padding: 10px 18px; color: #d7ffe9; background: rgba(46,126,90,.5); border: 1px solid rgba(215,255,233,.3); border-radius: 999px; font-size: 14px; font-weight: 700; }
.page-shell { width: min(1280px, calc(100% - 34px)); margin: 24px auto 60px; }
.area-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; padding: 7px; background: #dfe8e8; border-radius: 999px; }
.area-tab { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 16px; color: #355455; border-radius: 999px; font-size: 14px; font-weight: 750; text-align: center; text-decoration: none; }
.area-tab:hover { color: #173f41; background: rgba(255,255,255,.58); }
.area-tab.active { color: #173f41; background: white; box-shadow: 0 6px 18px rgba(24,64,66,.12); }
.info-strip { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding: 14px 18px; color: #395152; background: #e2f8f8; border: 1px solid #b4e6e8; border-radius: 13px; font-size: 13px; }

.upload-panel { margin-bottom: 28px; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 38px rgba(27,65,66,.08); }
.upload-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 24px; list-style: none; cursor: pointer; }
.upload-panel summary::-webkit-details-marker { display: none; }
.upload-panel summary > span:first-child { display: grid; gap: 4px; }
.upload-panel summary small { color: var(--muted); }
.summary-action { color: var(--aqua-dark); font-size: 13px; font-weight: 750; }
#upload-form { padding: 0 24px 24px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-top: 20px; }
.form-grid label { display: grid; gap: 7px; font-size: 13px; font-weight: 750; }
.form-grid label small { color: var(--muted); font-weight: 500; }
.file-picker { position: relative; display: grid; place-items: center; gap: 6px; margin-top: 14px; padding: 26px; color: var(--aqua-dark); text-align: center; background: #f0fbfb; border: 2px dashed #77cfd2; border-radius: 15px; cursor: pointer; }
.file-picker-title { font-size: 16px; font-weight: 750; }
.file-picker small { color: var(--muted); }
.file-picker input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; pointer-events: none; }
.selected-files { margin-top: 12px; padding: 13px 16px; background: #f4f7f7; border-radius: 12px; font-size: 13px; }
.selected-files ul { margin: 8px 0 0; padding-left: 20px; }
.selected-files li { margin: 4px 0; overflow-wrap: anywhere; }
.consent-check { display: grid; grid-template-columns: 22px 1fr; align-items: start; gap: 10px; margin-top: 16px; color: #405152; font-size: 13px; line-height: 1.5; }
.consent-check input { width: 19px; height: 19px; min-height: 0; margin: 1px 0 0; }
.form-actions { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
#upload-status { margin: 0; color: var(--aqua-dark); font-size: 13px; font-weight: 700; }

.gallery-section { padding: 26px; color: white; background: radial-gradient(circle at 95% 0%, rgba(0,203,210,.24), transparent 30%), linear-gradient(135deg, #242929, #224f51); border-radius: 24px; box-shadow: 0 20px 56px rgba(20,53,55,.18); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-heading .eyebrow { color: #6cf2f4; }
.section-heading h2 { margin: 0; font-size: clamp(32px, 5vw, 48px); font-weight: 440; letter-spacing: -.045em; }
.gallery-toolbar { display: grid; grid-template-columns: auto minmax(260px, 390px) 1fr; align-items: center; gap: 11px 14px; margin: -5px 0 20px; padding: 13px 15px; color: #d7e7e7; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.17); border-radius: 15px; }
.gallery-toolbar label { font-size: 13px; font-weight: 750; }
.sort-select-wrap { position: relative; }
.sort-select-wrap::after { position: absolute; right: 14px; top: 50%; content: "⌄"; color: var(--aqua-dark); font-size: 18px; pointer-events: none; transform: translateY(-57%); }
.gallery-toolbar select { width: 100%; min-height: 44px; padding: 9px 40px 9px 14px; color: #173f41; background: white; border: 2px solid var(--aqua); border-radius: 999px; font-size: 13px; font-weight: 600; appearance: none; cursor: pointer; }
.gallery-toolbar select:focus { outline: 3px solid rgba(108,242,244,.27); outline-offset: 2px; }
.sort-status { color: #bcd2d3; font-size: 12px; line-height: 1.35; }
.empty-state { display: grid; place-items: center; min-height: 250px; padding: 34px; text-align: center; border: 1px dashed rgba(255,255,255,.36); border-radius: 17px; }
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 10px; color: #153f41; background: var(--aqua); border-radius: 50%; font-size: 30px; }
.empty-state p { margin: 8px 0 0; color: #c9dada; }
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 8px; align-items: start; gap: 15px; }
.media-card { min-width: 0; overflow: hidden; color: var(--ink); background: white; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.23); }
.media-card--span-2 { grid-column: span 2; }
.media-card--span-3 { grid-column: span 3; }
.media-visual { position: relative; overflow: hidden; background: #121616; }
.media-visual img, .media-visual video, .image-button { display: block; width: 100%; height: auto; }
.media-visual img, .media-visual video { object-fit: contain; }
.image-button { padding: 0; background: transparent; border: 0; cursor: zoom-in; }
.video-shell { position: relative; width: 100%; height: auto; overflow: hidden; background: linear-gradient(145deg, #173f41, #08777b); }
.video-cover { position: absolute; inset: 0; display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; align-items: end; gap: 14px 16px; width: 100%; height: 100%; padding: 18px; color: white; text-align: left; background: radial-gradient(circle at 82% 12%, rgba(0,203,210,.62), transparent 34%), linear-gradient(145deg, #193133 0%, #17666a 100%); border: 0; cursor: pointer; transition: background .25s ease, opacity .2s ease; }
.video-cover::after { position: absolute; inset: 0; content: ""; background: linear-gradient(180deg, rgba(13,31,32,.05) 18%, rgba(13,31,32,.82) 100%); pointer-events: none; }
.video-cover-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-cover > :not(.video-cover-image) { z-index: 1; }
.video-cover[hidden] { display: none; }
.video-cover-brand { position: absolute; left: 17px; top: 16px; color: #a6fbfc; font-size: 11px; font-weight: 800; letter-spacing: .15em; }
.video-cover-play { display: grid; place-items: center; width: 58px; height: 58px; padding-left: 4px; color: #123e40; background: var(--aqua); border-radius: 50%; box-shadow: 0 8px 30px rgba(0,0,0,.24); font-size: 23px; }
.video-cover-copy { display: grid; gap: 3px; min-width: 0; padding-bottom: 3px; }
.video-cover-copy strong { font-size: 17px; }
.video-cover-copy small { overflow: hidden; color: #e1f2f2; text-overflow: ellipsis; white-space: nowrap; }
.video-cover:hover .video-cover-play { transform: scale(1.04); }
.type-badge { position: absolute; left: 10px; top: 10px; padding: 5px 9px; color: white; background: rgba(20,27,28,.78); border-radius: 999px; font-size: 11px; font-weight: 750; backdrop-filter: blur(8px); }
.delete-button { position: absolute; right: 10px; top: 10px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: #9e2525; background: rgba(255,255,255,.95); border: 0; border-radius: 50%; font-size: 23px; font-weight: 700; cursor: pointer; }
.media-card footer { display: grid; gap: 12px; min-height: 76px; padding: 13px 14px; }
.media-card footer > div:first-child { display: grid; min-width: 0; gap: 4px; }
.media-card footer strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-card footer small { color: var(--muted); }
.card-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); width: 100%; gap: 7px; }
.card-action { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 38px; padding: 8px 10px; color: var(--aqua-dark); background: #ebfcfc; border: 1px solid var(--aqua); border-radius: 999px; font-size: 12px; font-weight: 650; line-height: 1.15; text-align: center; text-decoration: none; cursor: pointer; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; width: min(1280px, calc(100% - 34px)); margin: -32px auto 30px; color: var(--muted); font-size: 12px; }

dialog { width: min(480px, calc(100% - 30px)); padding: 0; border: 0; border-radius: 20px; box-shadow: 0 24px 90px rgba(0,0,0,.32); }
dialog::backdrop { background: rgba(13,19,20,.78); backdrop-filter: blur(5px); }
.dialog-card { position: relative; display: grid; gap: 14px; padding: 28px; }
.dialog-card h2 { margin: 0; font-size: 28px; }
.dialog-note { margin: -5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.dialog-close, .lightbox-close { position: absolute; right: 14px; top: 12px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; font-size: 26px; cursor: pointer; }
.image-dialog { width: min(1200px, calc(100% - 30px)); max-width: none; height: min(90vh, 900px); padding: 50px 14px 14px; background: #121616; }
.image-dialog img { width: 100%; height: 100%; object-fit: contain; }
.lightbox-close { color: white; background: rgba(255,255,255,.16); }
.map-dialog { width: min(760px, calc(100% - 24px)); max-width: none; overflow: hidden; }
.map-dialog-content { display: grid; gap: 14px; padding: 28px; }
.map-dialog-content h2 { margin: 0; padding-right: 45px; font-size: clamp(25px, 5vw, 36px); font-weight: 500; }
.map-placeholder { display: grid; place-items: center; min-height: 360px; padding: 30px; color: #d9eeee; text-align: center; background: radial-gradient(circle at 80% 0%, rgba(0,203,210,.3), transparent 38%), #193f41; border-radius: 15px; }
.map-placeholder strong { font-size: 23px; }
.map-placeholder span { max-width: 520px; margin: -8px 0 12px; line-height: 1.55; }
.map-dialog iframe { width: 100%; height: min(58vh, 500px); border: 0; border-radius: 15px; background: #dbe5e5; }
.map-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; color: var(--muted); font-size: 12px; }
.map-footer a { font-weight: 650; }

.legal-shell { width: min(820px, calc(100% - 34px)); margin: 30px auto 60px; }
.back-link { display: inline-block; margin-bottom: 14px; }
.legal-card { padding: clamp(26px, 6vw, 58px); background: white; border-radius: 24px; box-shadow: 0 18px 55px rgba(22,59,61,.12); }
.legal-card h1 { margin: 0 0 30px; font-size: clamp(36px, 6vw, 56px); font-weight: 440; letter-spacing: -.045em; line-height: 1.02; }
.legal-card h2 { margin: 26px 0 7px; font-size: 20px; }
.legal-card p { color: #465455; line-height: 1.7; }

@media (max-width: 860px) {
  .site-header { align-items: stretch; flex-direction: column; }
  .header-actions { width: 100%; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-card--span-3 { grid-column: span 2; }
}

@media (max-width: 620px) {
  .login-shell { padding: 14px; }
  .login-card { padding: 30px 22px; border-radius: 20px; }
  .password-row { grid-template-columns: 1fr; }
  .site-header { padding: 28px 18px; }
  .site-header h1 { font-size: 48px; }
  .header-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-actions .button, .admin-badge { width: 100%; min-width: 0; padding-inline: 10px; font-size: 12px; }
  .page-shell { width: min(100% - 20px, 1280px); margin-top: 10px; }
  .area-tabs { border-radius: 18px; }
  .area-tab { min-height: 54px; padding-inline: 8px; border-radius: 13px; font-size: 13px; }
  .info-strip { align-items: start; flex-direction: column; gap: 5px; }
  .upload-panel summary { padding: 18px; }
  #upload-form { padding: 0 18px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .button { width: 100%; }
  .gallery-section { padding: 19px 13px; border-radius: 18px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .section-heading .button { width: 100%; }
  .gallery-toolbar { grid-template-columns: 1fr; margin-top: -4px; padding: 14px; }
  .sort-status { padding-inline: 4px; }
  .media-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .media-card--span-2, .media-card--span-3 { grid-column: span 1; }
  .video-cover { padding: 16px; }
  .video-cover-play { width: 54px; height: 54px; }
  .card-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-actions .card-action:only-child { grid-column: 1 / -1; }
  .map-dialog-content { padding: 22px 15px 16px; }
  .map-placeholder { min-height: 300px; }
  .site-footer { align-items: center; flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
