/*
Theme Name: RoadFeel
Author: RoadFeel
Description: A responsive route-quality community app for rating road feel across longboarding, walking, scooters, rollerblades, and bikes.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: roadfeel
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

.roadfeel-content-page {
  background: #edf3ef;
}

.roadfeel-site-header {
  display: flex;
  align-items: center;
  min-height: 82px;
  padding: 16px clamp(18px, 4vw, 54px);
  background: rgba(251, 252, 249, 0.96);
  border-bottom: 1px solid var(--line);
}

.roadfeel-site-header img {
  display: block;
  width: min(260px, 64vw);
  max-height: 48px;
  object-fit: contain;
}

.roadfeel-content-shell {
  width: min(920px, calc(100% - 32px));
  margin: 42px auto;
}

.roadfeel-content-card {
  padding: clamp(24px, 4vw, 48px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.roadfeel-content-card h1 {
  margin-top: 0;
  color: var(--ink);
}

.roadfeel-content-card a {
  color: var(--green);
}

:root {
  color-scheme: light;
  --ink: #16201d;
  --muted: #60716b;
  --panel: #fbfcf9;
  --line: #d9e1dc;
  --road: #f7f3e8;
  --green: #1f7a5a;
  --mint: #bdebd5;
  --amber: #f2b84b;
  --red: #dc5b4d;
  --blue: #3579c8;
  --shadow: 0 14px 40px rgba(27, 45, 38, 0.14);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #edf3ef;
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  min-height: 92px;
  padding: 16px 18px 16px 8px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(130px, 1fr);
  align-items: center;
  gap: 18px;
  background: rgba(251, 252, 249, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: min(520px, 36vw);
  height: auto;
  max-height: 78px;
  object-fit: contain;
  transform: scaleX(1.12);
  transform-origin: left center;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.view-tabs {
  justify-self: center;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(27, 45, 38, 0.08);
}

.view-tab {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.view-tab.active {
  background: var(--ink);
  color: #fff;
}

.is-hidden {
  display: none !important;
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(250px, 310px) minmax(420px, 1fr) minmax(280px, 340px);
  gap: 14px;
  padding: 14px;
}

.map-streak-card {
  grid-column: 1 / -1;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(27, 45, 38, 0.08);
}

.offline-sync-card {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
}

.map-streak-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.map-streak-card strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1;
}

.map-streak-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  text-align: right;
}

.offline-sync-card span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.offline-sync-card strong {
  display: block;
  margin-top: 2px;
  font-size: 0.92rem;
  line-height: 1.1;
}

.offline-sync-card button {
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.offline-sync-card button:disabled {
  cursor: default;
  background: #dbe3de;
  color: var(--muted);
}

.updates-view,
.reviews-view,
.leaderboard-view,
.comments-view,
.account-view {
  padding: 18px;
}

.updates-inner,
.reviews-inner,
.leaderboard-inner,
.comments-inner,
.account-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.updates-header,
.reviews-header,
.leaderboard-header,
.comments-header,
.account-header {
  margin: 4px 0 18px;
}

.updates-header h2,
.reviews-header h2,
.leaderboard-header h2,
.comments-header h2,
.account-header h2 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: 0;
}

.updates-header p,
.reviews-header p,
.leaderboard-header p,
.comments-header p,
.account-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.version-list,
.all-reviews-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.all-reviews-list .rating-item {
  grid-template-columns: minmax(0, 1fr) 38px;
}

.leaderboard-list {
  display: grid;
  gap: 10px;
}

.leaderboard-mode-tabs {
  width: min(430px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.leaderboard-mode {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 900;
  text-align: center;
}

.leaderboard-mode.active {
  background: var(--ink);
  color: #fff;
}

.leaderboard-item {
  min-height: 92px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(27, 45, 38, 0.08);
}

.leaderboard-rank {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.leaderboard-name {
  min-width: 0;
}

.leaderboard-name strong {
  display: block;
  font-size: 1.1rem;
}

.leaderboard-name span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.leaderboard-name .review-badge-pill {
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  border: 1px solid rgba(31, 122, 90, 0.22);
  border-radius: 999px;
  background: #e9f8f0;
  color: #12392c;
  padding: 0 10px;
  font-size: 0.8rem;
  font-weight: 900;
}

.leaderboard-count {
  min-width: 92px;
  text-align: right;
}

.leaderboard-count strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
}

.leaderboard-count span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.leaderboard-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.state-leaderboard-panel {
  display: grid;
  gap: 12px;
}

.state-leaderboard-panel[hidden] {
  display: none;
}

.state-leader-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(27, 45, 38, 0.08);
}

.state-leader-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-auto-rows: 1fr;
  gap: 10px;
}

.state-leader-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 154px;
  padding: 14px;
}

.state-leader-card h3,
.state-leader-card p {
  margin: 0;
}

.state-leader-card h3 {
  font-size: 1rem;
}

.state-leader-card p {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.35;
}

.state-leader-card strong {
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}

.state-leader-pill {
  width: fit-content;
  align-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #edf3ef;
  padding: 0 9px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

.review-sort-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.review-sort {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 0 13px;
  font-weight: 850;
}

.review-sort.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.comments-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.comment-card,
.comment-item,
.comment-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow);
}

.comment-card h3,
.comment-item p {
  margin-top: 0;
}

.comment-gate,
.comment-moderation-message,
.comment-rules-card li,
.comment-empty,
.comment-item span {
  color: var(--muted);
}

.comment-form {
  display: grid;
  gap: 9px;
}

.comment-identity-form {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
}

.comment-identity-form label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.comment-identity-form input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
}

.comment-identity-form button {
  min-height: 38px;
}

.comment-form label {
  font-weight: 850;
}

.comment-form textarea {
  min-height: 132px;
}

.comment-form textarea:disabled {
  cursor: not-allowed;
  background: #f3f5f2;
}

.comment-moderation-message {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 760;
}

.comment-rules-card ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
}

.comments-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.comment-item {
  box-shadow: none;
}

.comment-item strong,
.comment-item span {
  display: block;
}

.comment-item p {
  margin: 7px 0;
  line-height: 1.45;
}

.comment-item span {
  font-size: 0.82rem;
  font-weight: 760;
}

.account-auth-grid,
.account-dashboard {
  display: grid;
  gap: 12px;
  max-width: 980px;
  margin: 0 auto;
  align-items: start;
}

.account-auth-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-dashboard {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow);
  width: 100%;
}

.account-auth-card,
.account-profile-card {
  display: grid;
  gap: 14px;
}

.account-auth-card {
  border-top: 4px solid var(--green);
}

.account-auth-card[data-account-box-mode="signup"] {
  border-top-color: var(--blue);
}

.account-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8f5;
}

.account-auth-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.account-auth-tabs button.active {
  background: var(--ink);
  color: #fff;
}

.account-form {
  display: grid;
  gap: 9px;
}

.account-form[hidden] {
  display: none;
}

.account-form h3,
.account-card h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.account-form label {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 820;
}

.account-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
  outline: none;
}

.account-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 122, 90, 0.15);
}

.account-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 850;
}

.account-button-primary {
  margin-top: 4px;
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.account-button-secondary {
  background: #fff;
  color: var(--ink);
}

.admin-signin-box {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 18px;
}

.admin-signin-text {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-code-form {
  display: grid;
  width: min(320px, 100%);
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(27, 45, 38, 0.1);
}

.admin-code-form[hidden] {
  display: none;
}

.admin-code-form label {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 850;
}

.admin-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.admin-code-row input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  letter-spacing: 0;
}

.admin-code-row button {
  min-height: 38px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 0 12px;
  font-weight: 850;
}

.admin-code-form p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.account-preview-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.account-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e6f7ed;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

.account-preview-list {
  display: grid;
  gap: 10px;
}

.account-preview-list div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
}

.account-preview-list strong,
.account-preview-list span {
  display: block;
}

.account-preview-list span,
.account-profile-card p,
.account-stats span,
.account-settings-card dt {
  color: var(--muted);
}

.account-preview-list span {
  margin-top: 3px;
  line-height: 1.4;
}

.account-profile-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-avatar {
  flex: 0 0 auto;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 950;
}

.account-profile-card p {
  margin: 4px 0 0;
  font-weight: 680;
}

.account-stats-card {
  display: grid;
  gap: 14px;
}

.account-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.account-stats div {
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
  display: grid;
  align-content: space-between;
}

.account-stats span {
  font-size: 0.85rem;
  font-weight: 800;
}

.account-stats strong {
  font-size: 1.55rem;
  line-height: 1.05;
}

.account-settings-card {
  grid-column: 1 / -1;
}

.account-settings-card dl {
  margin: 14px 0 0;
  display: grid;
  gap: 10px;
}

.account-settings-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
}

.account-settings-card dd {
  margin: 0;
  font-weight: 850;
  text-align: right;
}

.version-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow);
}

.version-card span {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 30px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 850;
}

.version-card h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.version-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.panel,
.map-area {
  min-height: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: auto;
}

.controls-panel,
.details-panel {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.section-heading {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--ink);
  font-weight: 760;
}

.section-heading output {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 760;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.transport {
  min-height: 78px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  display: grid;
  gap: 8px;
  justify-items: start;
  align-content: center;
  text-align: left;
  font-weight: 720;
}

.transport.active {
  border-color: var(--green);
  background: #e6f7ed;
  box-shadow: inset 0 0 0 1px var(--green);
}

.transport-icon {
  width: 54px;
  height: 38px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.55));
}

.score-card {
  padding: 14px;
  border-radius: 8px;
  background: #f4f8f5;
  border: 1px solid var(--line);
}

.rating-choices {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.rating-choice {
  min-height: 48px;
  border: 2px solid transparent;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  box-shadow:
    inset 0 -12px 22px rgba(0, 0, 0, 0.12),
    0 6px 14px rgba(27, 45, 38, 0.08);
}

.rating-choice[data-rating="1"] {
  background: #dc5b4d;
}

.rating-choice[data-rating="2"] {
  background: #f08a34;
}

.rating-choice[data-rating="3"] {
  background: #f2c94c;
  color: #3d3210;
}

.rating-choice[data-rating="4"] {
  background: #1f9f6b;
}

.rating-choice[data-rating="5"] {
  background: #3579c8;
}

.rating-choice.active {
  border-color: var(--ink);
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.82),
    0 10px 20px rgba(27, 45, 38, 0.16);
  transform: translateY(-1px);
}

.rating-choice span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #000;
  font-size: 1.08rem;
  font-weight: 950;
  line-height: 1;
}

.rating-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.83rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips button,
.mini-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  font-weight: 700;
}

.chips button.active,
.mini-button.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 760;
}

textarea,
.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.search-box button {
  flex: 0 0 auto;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  padding: 0 11px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

textarea {
  padding: 11px;
  resize: vertical;
  min-height: 96px;
}

textarea:focus,
.search-box:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 122, 90, 0.15);
}

.photo-proof-box {
  display: grid;
  gap: 8px;
}

.photo-proof-box input[type="file"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 9px;
}

.photo-proof-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
}

.photo-proof-preview {
  display: grid;
  gap: 8px;
}

.photo-proof-preview[hidden] {
  display: none;
}

.photo-proof-preview img,
.rating-photo-proof {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.photo-proof-preview img {
  max-height: 180px;
}

.photo-proof-preview button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #8a3a32;
  font-weight: 850;
}

.submit-box {
  margin-top: auto;
}

.loop-controls {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  align-items: center;
  gap: 10px;
}

.loop-controls[hidden],
.rating-laps[hidden] {
  display: none;
}

.loop-controls label,
.rating-laps span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.loop-controls input,
.rating-laps input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  color: var(--ink);
  font-weight: 800;
}

.primary-button,
.secondary-button,
.text-button,
.icon-button {
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-weight: 780;
}

.primary-button {
  width: 100%;
  min-height: 46px;
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.secondary-button {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  border-color: var(--ink);
  background: #fff;
  color: var(--ink);
}

.secondary-button:disabled {
  cursor: not-allowed;
  border-color: var(--line);
  color: #9aa7a2;
  background: #f3f5f2;
}

.primary-button svg,
.secondary-button svg,
.text-button svg,
.icon-button svg {
  width: 20px;
  height: 20px;
}

.icon-button {
  width: 42px;
  height: 42px;
  background: #fff;
  color: var(--ink);
}

.icon-button.active {
  border-color: var(--green);
  background: #e6f4ee;
  color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}

.text-button {
  min-height: 42px;
  padding: 0 13px;
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  white-space: nowrap;
}

#markingHint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.road-type-panel .secondary-button {
  margin-top: 0;
}

.street-history-panel {
  padding-top: 2px;
}

.street-history-trend {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef1ed;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.street-history-trend.is-improving { background: #dcfce7; color: #166534; }
.street-history-trend.is-deteriorating { background: #fee2e2; color: #991b1b; }
.street-history-trend.is-stable { background: #e0f2fe; color: #075985; }

.street-history-summary {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.street-history-chart-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f7faf7);
}

.street-history-chart {
  display: block;
  width: 100%;
  min-height: 136px;
}

.street-history-grid { stroke: #dfe6df; stroke-width: 1; stroke-dasharray: 4 5; }
.street-history-axis { fill: var(--muted); font-size: 10px; font-weight: 750; }
.street-history-line { fill: none; stroke: #64748b; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.street-history-line.is-improving { stroke: #16a34a; }
.street-history-line.is-deteriorating { stroke: #dc2626; }
.street-history-line.is-stable { stroke: #0284c7; }
.street-history-dot { fill: #fff; stroke: #64748b; stroke-width: 4; }
.street-history-dot.is-improving { stroke: #16a34a; }
.street-history-dot.is-deteriorating { stroke: #dc2626; }
.street-history-dot.is-stable { stroke: #0284c7; }

.street-history-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
}

.road-type-result {
  margin: 10px 0 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  display: grid;
  gap: 3px;
  font-size: 0.9rem;
}

.road-type-result strong {
  color: var(--ink);
  font-size: 1rem;
}

.road-type-result span {
  line-height: 1.35;
}

.segment-type-editor {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  display: grid;
  gap: 8px;
}

.segment-type-editor[hidden] {
  display: none;
}

.segment-type-editor label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.segment-type-editor select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 800;
}

.pothole-editor {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pothole-editor .section-heading {
  margin-bottom: 8px;
}

.pothole-editor label,
.pothole-editor output {
  font-weight: 850;
}

.pothole-editor input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.pothole-editor input[type="range"]:disabled {
  opacity: 0.45;
}

.pothole-editor p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.map-area {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
}

.map-toolbar {
  display: flex;
  gap: 10px;
}

.search-box {
  min-width: 0;
  flex: 1;
  margin: 0;
  position: relative;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.search-box svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  color: var(--muted);
}

.search-box input {
  border: 0;
  padding: 0;
  min-width: 0;
}

.place-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(22, 32, 29, 0.16);
}

.place-suggestions.show {
  display: grid;
}

.suggestion-option {
  border: 0;
  border-bottom: 1px solid #edf2ee;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
  display: grid;
  gap: 3px;
}

.suggestion-option:last-child {
  border-bottom: 0;
}

.suggestion-option:hover,
.suggestion-option.active {
  background: #eef7f1;
}

.suggestion-option strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.suggestion-option span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
}

.map-canvas {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid #cbd8d0;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(31, 122, 90, 0.12), transparent 36%),
    linear-gradient(45deg, #e8f1e8 0 25%, #eef4ed 25% 50%, #e4eee7 50% 75%, #edf4ef 75%);
  box-shadow: var(--shadow);
}

.roadfeel-map-frame,
.roadfeel-blank-map {
  position: absolute;
  width: 100%;
  border: 0;
}

.roadfeel-map-frame {
  left: 0;
  top: -70px;
  height: calc(100% + 70px);
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.roadfeel-blank-map {
  inset: 0;
  height: 100%;
  z-index: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background:
    linear-gradient(120deg, rgba(31, 122, 90, 0.12), transparent 36%),
    linear-gradient(45deg, #e8f1e8 0 25%, #eef4ed 25% 50%, #e4eee7 50% 75%, #edf4ef 75%);
}

.roadfeel-blank-map strong {
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: 0;
}

.map-canvas.has-live-map .roadfeel-map-frame {
  opacity: 1;
}

.map-canvas.map-fallback .roadfeel-map-frame {
  opacity: 0;
}

.map-canvas.map-fallback {
  background:
    radial-gradient(circle at 25% 28%, rgba(31, 122, 90, 0.1), transparent 28%),
    radial-gradient(circle at 78% 65%, rgba(53, 121, 200, 0.08), transparent 30%),
    linear-gradient(45deg, #f8faf8 0 25%, #eef4ef 25% 50%, #f7faf8 50% 75%, #edf4ef 75%);
}

.map-canvas.has-live-map .roadfeel-blank-map,
.map-canvas.has-live-map:not(.map-fallback) .demo-roads {
  display: none;
}

.map-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(38, 57, 51, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 57, 51, 0.08) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

.map-canvas.has-live-map .map-grid {
  background-size: 76px 76px;
  opacity: 0.35;
}

.road {
  position: absolute;
  background: var(--road);
  border: 2px solid #d7cfbd;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65);
}

.demo-roads {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
}

.map-canvas.map-fallback .demo-roads {
  display: block;
}

.road-main {
  width: 125%;
  height: 58px;
  left: -12%;
  top: 54%;
  transform: rotate(-8deg);
}

.road-north {
  width: 54px;
  height: 120%;
  left: 31%;
  top: -8%;
  transform: rotate(12deg);
}

.road-east {
  width: 58px;
  height: 118%;
  right: 21%;
  top: -9%;
  transform: rotate(-24deg);
}

.road-park {
  width: 92%;
  height: 38px;
  left: 4%;
  bottom: 19%;
  transform: rotate(4deg);
  background: #dff0de;
  border-color: #a6c5a6;
}

.park-label,
.street-label {
  position: absolute;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #4d625b;
  font-size: 0.8rem;
  font-weight: 760;
  pointer-events: none;
}

.park-label {
  left: 8%;
  bottom: 24%;
}

.label-main {
  left: 46%;
  top: 51%;
  transform: rotate(-8deg);
}

.label-north {
  left: 25%;
  top: 21%;
  transform: rotate(12deg);
}

.label-east {
  right: 10%;
  top: 31%;
  transform: rotate(-24deg);
}

.segment-layer,
.draft-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.segment {
  position: absolute;
  height: 18px;
  border: 0;
  border-radius: 999px;
  transform-origin: left center;
  box-shadow:
    0 2px 8px rgba(20, 30, 27, 0.24),
    inset 0 0 0 3px rgba(255, 255, 255, 0.58);
  pointer-events: auto;
  padding: 0;
  transition:
    background 140ms ease,
    color 140ms ease,
    filter 140ms ease,
    box-shadow 140ms ease;
}

.map-canvas.mouse-unlocked {
  cursor: pointer;
}

.map-canvas.mouse-unlocked .segment:hover {
  background: #111 !important;
  color: #111 !important;
  filter: brightness(1.12);
  box-shadow:
    0 4px 16px rgba(20, 30, 27, 0.34),
    inset 0 0 0 3px rgba(255, 255, 255, 0.72);
}

.map-canvas.marking .segment {
  pointer-events: none;
}

.map-canvas.marking.mouse-unlocked .segment {
  pointer-events: auto;
}

.segment::before,
.segment::after {
  content: "";
  position: absolute;
  width: var(--segment-dot-size, 18px);
  height: var(--segment-dot-size, 18px);
  top: 0;
  border-radius: 50%;
  background: #fff;
  border: 3px solid currentColor;
}

.segment::before {
  left: calc(var(--segment-dot-size, 18px) * -0.38);
}

.segment::after {
  right: calc(var(--segment-dot-size, 18px) * -0.38);
}

.draft-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  top: 0;
  border-radius: 50%;
  background: #fff;
  border: 3px solid currentColor;
}

.segment.selected {
  outline: 4px solid rgba(22, 32, 29, 0.22);
}

.segment.segment-active {
  outline: 4px solid rgba(22, 32, 29, 0.42);
}

.segment span {
  position: absolute;
  inset: 7px 10px;
  border-top: 3px dashed rgba(255, 255, 255, 0.82);
  pointer-events: none;
}

.draft-line {
  position: absolute;
  height: 12px;
  border-radius: 999px;
  background: rgba(22, 32, 29, 0.4);
  transform-origin: left center;
}

.draft-line.preview {
  opacity: 0.55;
  border: 2px dashed rgba(255, 255, 255, 0.76);
}

.draft-dot {
  transform: translate(-50%, -50%);
}

.zoom-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 8;
  display: grid;
  gap: 6px;
}

.zoom-controls button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(96, 113, 107, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 4px 16px rgba(22, 32, 29, 0.14);
}

.zoom-controls button:disabled {
  cursor: not-allowed;
  color: #aeb8b3;
  background: rgba(244, 246, 243, 0.92);
}

.map-toast {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(14px);
  min-height: 38px;
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(22, 32, 29, 0.91);
  color: #fff;
  font-weight: 730;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.map-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.rating-list {
  display: grid;
  gap: 9px;
}

.rating-item {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: stretch;
}

.rating-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px;
  text-align: left;
  display: grid;
  gap: 6px;
  color: var(--ink);
}

.remove-rating {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #8a3a32;
  display: grid;
  place-items: center;
  min-height: 44px;
}

.remove-rating svg {
  width: 18px;
  height: 18px;
}

.remove-rating:disabled {
  cursor: not-allowed;
  color: #b7c1bc;
  background: #f4f6f3;
}

.remove-rating:not(:disabled):hover {
  border-color: #dc5b4d;
  background: #fff3f1;
}

.confirm-rating,
.verified-badge {
  grid-column: 1 / -1;
  min-height: 34px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 850;
}

.confirm-rating {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green);
}

.confirm-rating:disabled {
  cursor: default;
  color: var(--muted);
  background: #f4f8f5;
}

.verified-badge {
  display: grid;
  place-items: center;
  border: 1px solid #9bdabc;
  background: #e6f7ed;
  color: var(--green);
}

.verified-badge[hidden] {
  display: none;
}

.rating-laps {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
}

.rating-select.active {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}

.rating-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.rating-pill {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  text-align: center;
  font-weight: 800;
}

.rating-note,
.rating-tags {
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.35;
}

.rating-photo-proof {
  display: block;
  max-height: 150px;
  margin-top: 3px;
}

.rating-photo-proof[hidden] {
  display: none;
}

.admin-heatmap-section {
  overflow: hidden;
}

.admin-heatmap-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 16px;
  align-items: stretch;
}

.admin-heatmap-panel,
.admin-heatmap-side,
.admin-heatmap-street,
.admin-heatmap-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-heatmap-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.admin-heatmap-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-heatmap-mode {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7faf8;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 900;
}

.admin-heatmap-mode.active {
  background: var(--ink);
  color: #fff;
}

.admin-heatmap-map {
  position: relative;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(213, 232, 236, 0.95), rgba(236, 246, 239, 0.95)),
    #d8e9eb;
}

.admin-heatmap-map svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
}

.admin-map-water {
  fill: #d9edf1;
}

.admin-map-land {
  fill: #eef5ec;
  stroke: #b9c9be;
  stroke-width: 1.4;
}

.admin-map-border,
.admin-map-grid {
  fill: none;
  stroke: #cad8d0;
  stroke-width: 0.8;
  stroke-dasharray: 6 8;
}

.admin-map-road-base {
  fill: none;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-map-road {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(31, 159, 107, 0.35));
  cursor: pointer;
  transition: stroke 160ms ease, stroke-width 160ms ease, opacity 160ms ease;
}

.admin-map-road.is-muted {
  opacity: 0.28;
}

.admin-map-road.is-active {
  filter: drop-shadow(0 0 12px rgba(53, 121, 200, 0.62));
}

.admin-map-city {
  fill: #111a17;
  stroke: #fff;
  stroke-width: 2;
}

.admin-map-label {
  fill: #40534b;
  font-size: 17px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 4px;
}

.admin-heatmap-legend {
  display: grid;
  gap: 8px;
}

.admin-heatmap-legend-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
}

.admin-heatmap-legend-bar span:nth-child(1) {
  background: #dc5b4d;
}

.admin-heatmap-legend-bar span:nth-child(2) {
  background: #f08a34;
}

.admin-heatmap-legend-bar span:nth-child(3) {
  background: #f2c94c;
}

.admin-heatmap-legend-bar span:nth-child(4) {
  background: #1f9f6b;
}

.admin-heatmap-legend-bar span:nth-child(5) {
  background: #3579c8;
}

.admin-heatmap-legend p {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.admin-heatmap-side {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
}

.admin-heatmap-focus h3,
.admin-heatmap-focus p {
  margin: 0;
}

.admin-heatmap-focus h3 {
  font-size: 1.3rem;
}

.admin-heatmap-focus p {
  color: var(--muted);
  line-height: 1.45;
}

.admin-heatmap-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-heatmap-detail {
  padding: 10px;
}

.admin-heatmap-detail span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-heatmap-detail strong {
  display: block;
  margin-top: 4px;
  font-size: 1.05rem;
}

.admin-heatmap-streets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.admin-heatmap-street {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.admin-heatmap-street h3 {
  margin: 0;
  font-size: 1rem;
}

.admin-heatmap-street p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.admin-heatmap-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-heatmap-mini span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  background: #edf3ef;
  padding: 0 8px;
  font-size: 0.74rem;
  font-weight: 900;
}

@media (max-width: 940px) {
  .admin-heatmap-shell,
  .admin-heatmap-streets {
    grid-template-columns: 1fr;
  }

  .admin-heatmap-map,
  .admin-heatmap-map svg {
    min-height: 360px;
  }
}

.phone-app .admin-heatmap-panel,
.phone-app .admin-heatmap-side,
.phone-app .admin-heatmap-street,
.phone-app .admin-heatmap-detail {
  box-shadow: none;
}

.phone-app .admin-heatmap-panel,
.phone-app .admin-heatmap-side {
  margin-top: 10px;
  padding: 10px;
}

.phone-app .admin-heatmap-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.phone-app .admin-heatmap-mode {
  min-height: 38px;
  padding: 0 8px;
  font-size: 0.8rem;
}

.phone-app .admin-heatmap-map,
.phone-app .admin-heatmap-map svg {
  min-height: 300px;
}

.phone-app .admin-map-label {
  font-size: 20px;
}

.phone-app .admin-heatmap-score-grid,
.phone-app .admin-heatmap-streets {
  grid-template-columns: 1fr;
}

.phone-app .mobile-admin-city-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 10px 0;
}

.phone-app .mobile-admin-city-form input,
.phone-app .mobile-admin-city-form button {
  min-height: 40px;
  border-radius: 8px;
  font: inherit;
}

.phone-app .mobile-admin-city-form input {
  min-width: 0;
  border: 1px solid var(--line);
  padding: 0 10px;
}

.phone-app .mobile-admin-city-form button {
  border: 0;
  background: var(--ink);
  color: #fff;
  padding: 0 12px;
  font-weight: 900;
}

.phone-app .mobile-admin-city-results {
  display: grid;
  gap: 10px;
}

.phone-app .mobile-admin-city-column,
.phone-app .mobile-admin-city-place {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.phone-app .mobile-admin-city-column {
  display: grid;
  gap: 8px;
}

.phone-app .mobile-admin-city-column h4,
.phone-app .mobile-admin-city-place strong,
.phone-app .mobile-admin-city-place span {
  display: block;
  margin: 0;
}

.phone-app .mobile-admin-city-place span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.google-panel {
  min-height: 255px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.google-panel iframe {
  width: 100%;
  min-height: 225px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 300px 1fr;
  }

  .details-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 920px) {
  .account-auth-grid,
  .account-dashboard {
    grid-template-columns: 1fr;
    max-width: 620px;
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px 10px 12px 6px;
  }

  .brand-logo {
    width: min(400px, 66vw);
    max-height: 54px;
  }

  .top-actions {
    max-width: 40vw;
  }

  .view-tabs {
    grid-column: 1 / -1;
    width: 100%;
    order: 3;
  }

  .view-tab {
    flex: 1;
    padding: 0 8px;
  }

  .version-list,
  .all-reviews-list,
  .leaderboard-list,
  .comments-grid,
  .account-auth-grid,
  .account-dashboard,
  .account-stats {
    grid-template-columns: 1fr;
  }

  .leaderboard-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .leaderboard-count {
    grid-column: 2;
    text-align: left;
  }

  .leaderboard-mode-tabs {
    width: 100%;
  }

  .leaderboard-mode {
    min-height: 40px;
    padding: 0 8px;
    font-size: 0.86rem;
  }

  .state-leader-details {
    grid-template-columns: 1fr;
  }

  .workspace {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .controls-panel,
  .details-panel {
    display: flex;
  }

  .map-toolbar {
    flex-direction: column;
  }

  .text-button {
    width: 100%;
  }

  .map-canvas {
    min-height: 500px;
  }
}

