:root {
  --ink: #1d2939;
  --muted: #667085;
  --line: #d0d5dd;
  --panel: #ffffff;
  --surface: #f3f6f5;
  --accent: #0b7a75;
  --accent-2: #e4572e;
  --focus: #f2b84b;
}

/* My page */
.mypage-body {
  min-width: 320px;
  min-height: 100vh;
  color: #16302f;
  background: #f3f6f3;
}

.mypage-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  border-bottom: 1px solid #dce6e1;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.mypage-brand {
  color: #063b3a;
  font-size: 22px;
  font-weight: 950;
  text-decoration: none;
}

.mypage-header nav,
.mypage-header nav form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.mypage-header nav a,
.mypage-header nav button {
  min-height: 38px;
  border: 1px solid #d7e2dd;
  border-radius: 7px;
  padding: 8px 12px;
  color: #31514e;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.mypage-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 72px;
}

.mypage-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  overflow: hidden;
  border-radius: 18px;
  padding: 34px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 20%, rgba(242, 184, 75, 0.28), transparent 28%),
    linear-gradient(135deg, #063b3a, #0a5b55);
  box-shadow: 0 18px 44px rgba(6, 59, 58, 0.16);
}

.mypage-avatar {
  display: grid;
  width: 68px;
  height: 68px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  place-items: center;
  color: #063b3a;
  background: #f2b84b;
  font-size: 26px;
  font-weight: 950;
}

.mypage-eyebrow {
  color: #f2c96f;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.mypage-hero h1 {
  margin: 6px 0 7px;
  font-size: clamp(25px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.mypage-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.mypage-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  gap: 10px;
  margin: 0;
}

.mypage-summary div {
  min-width: 104px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 12px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
}

.mypage-summary dt {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 700;
}

.mypage-summary dd {
  margin: 3px 0 0;
  color: #fff;
  font-size: 25px;
  font-weight: 950;
}

.mypage-section {
  margin-top: 42px;
}

.mypage-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.mypage-section-head span,
.mypage-card-kicker {
  color: #0b7a75;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.mypage-section-head h2 {
  margin: 3px 0 0;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.mypage-section-head > strong {
  border-radius: 999px;
  padding: 7px 11px;
  color: #31514e;
  background: #e4eeea;
  font-size: 12px;
}

.mypage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mypage-card {
  display: flex;
  min-width: 0;
  min-height: 210px;
  flex-direction: column;
  border: 1px solid #dce5e1;
  border-radius: 14px;
  padding: 21px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 67, 63, 0.05);
}

.mypage-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.mypage-card h3 {
  margin: 5px 0 0;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.mypage-card-head time,
.mypage-card-address {
  color: #71817f;
  font-size: 12px;
}

.saved-mark {
  color: #aa4444;
  font-size: 22px;
}

.mypage-card-address {
  margin: 12px 0 0;
}

.mypage-review-body {
  flex: 1 1 auto;
  margin: 18px 0 0;
  color: #294442;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.mypage-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.mypage-card-stats span {
  border-radius: 7px;
  padding: 8px 10px;
  color: #536966;
  background: #f2f6f4;
  font-size: 12px;
}

.mypage-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: auto;
  padding-top: 19px;
}

.mypage-card-actions form {
  margin: 0;
}

.mypage-card-actions a,
.mypage-card-actions button,
.mypage-empty a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid #cddbd6;
  border-radius: 7px;
  padding: 7px 11px;
  color: #31514e;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.mypage-card-actions a,
.mypage-empty a {
  border-color: #0b7a75;
  color: #fff;
  background: #0b7a75;
}

.mypage-card-actions .danger {
  border-color: #e2caca;
  color: #a04444;
}

.mypage-empty {
  grid-column: 1 / -1;
  display: grid;
  min-height: 210px;
  border: 1px dashed #b8c9c5;
  border-radius: 14px;
  padding: 34px;
  place-items: center;
  align-content: center;
  color: #627673;
  background: #f9fbfa;
  text-align: center;
}

.mypage-empty strong {
  color: #294442;
  font-size: 17px;
}

.mypage-empty p {
  margin: 8px 0 16px;
}

@media (max-width: 760px) {
  .mypage-header {
    min-height: 60px;
    padding: 0 16px;
  }

  .mypage-header nav a {
    display: none;
  }

  .mypage-shell {
    width: min(100% - 28px, 1180px);
    padding-top: 20px;
  }

  .mypage-hero {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    padding: 24px 20px;
  }

  .mypage-avatar {
    width: 54px;
    height: 54px;
    font-size: 21px;
  }

  .mypage-hero p {
    font-size: 13px;
  }

  .mypage-summary {
    grid-column: 1 / -1;
    width: 100%;
  }

  .mypage-grid {
    grid-template-columns: 1fr;
  }

  .mypage-section {
    margin-top: 32px;
  }

  .mypage-card {
    min-height: 190px;
    padding: 18px;
  }
}

/* Restaurant image administration */
.restaurant-image-admin-shell {
  max-width: 1480px;
}

.restaurant-image-admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 30px 0 22px;
}

.restaurant-image-admin-head h1,
.restaurant-image-editor-head h2 {
  margin: 5px 0 7px;
}

.restaurant-image-admin-head p,
.restaurant-image-editor-head p {
  margin: 0;
  color: var(--muted);
}

.restaurant-image-admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.restaurant-image-restaurant-panel,
.restaurant-image-editor {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(21, 41, 38, 0.07);
}

.restaurant-image-restaurant-panel {
  position: sticky;
  top: 18px;
  padding: 18px;
}

.restaurant-image-search > label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 750;
}

.restaurant-image-search > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.restaurant-image-search input,
.restaurant-image-upload-form input,
.restaurant-image-admin-fields input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  padding: 10px 12px;
  color: var(--ink);
}

.restaurant-image-restaurant-list {
  display: grid;
  gap: 7px;
  max-height: min(68vh, 720px);
  overflow: auto;
  padding-right: 3px;
}

.restaurant-image-restaurant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #f5f7f3;
  padding: 12px;
  color: var(--ink);
  text-align: left;
}

.restaurant-image-restaurant-row:hover,
.restaurant-image-restaurant-row.active {
  border-color: #6b998e;
  background: #ecf4f0;
}

.restaurant-image-restaurant-row span {
  min-width: 0;
}

.restaurant-image-restaurant-row strong,
.restaurant-image-restaurant-row small {
  display: block;
}

.restaurant-image-restaurant-row small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restaurant-image-restaurant-row em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff;
  padding: 5px 8px;
  color: #35695e;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
}

.restaurant-image-editor {
  min-height: 520px;
  padding: 24px;
}

.restaurant-image-editor-empty {
  display: flex;
  min-height: 430px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.restaurant-image-editor-empty strong {
  color: var(--ink);
  font-size: 1.02rem;
}

.restaurant-image-editor-empty.compact {
  min-height: 190px;
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #fafbf9;
  padding: 28px;
}

.restaurant-image-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
}

.restaurant-image-editor-head a {
  flex: 0 0 auto;
  color: #22685a;
  font-size: 0.82rem;
  font-weight: 750;
}

.restaurant-image-upload-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(180px, 1.15fr) minmax(210px, 1.25fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid #dce8e2;
  border-radius: 16px;
  background: #f3f8f5;
  padding: 16px;
}

.restaurant-image-upload-form > div strong,
.restaurant-image-upload-form > div span,
.restaurant-image-upload-form label span,
.restaurant-image-admin-fields label span {
  display: block;
}

.restaurant-image-upload-form > div span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.74rem;
}

.restaurant-image-upload-form label span,
.restaurant-image-admin-fields label span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.restaurant-image-upload-form input {
  width: 100%;
}

.restaurant-image-file-field input {
  padding: 7px;
  font-size: 0.78rem;
}

.restaurant-image-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.restaurant-image-admin-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.restaurant-image-admin-preview {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #edf1ee;
}

.restaurant-image-admin-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.restaurant-image-admin-preview span {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  background: rgba(14, 35, 31, 0.82);
  padding: 5px 9px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 750;
}

.restaurant-image-admin-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  padding: 14px 14px 8px;
}

.restaurant-image-admin-fields input {
  width: 100%;
}

.restaurant-image-file-name {
  display: block;
  overflow: hidden;
  padding: 0 14px;
  color: var(--muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restaurant-image-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px 14px 15px;
}

.restaurant-image-admin-actions button,
.restaurant-image-admin-actions .button-link {
  min-height: 36px;
  padding: 8px 11px;
  font-size: 0.75rem;
}

.restaurant-image-admin-actions .danger {
  border-color: #eed2cf;
  background: #fff5f3;
  color: #a23d34;
}

.restaurant-image-admin-empty {
  border: 1px dashed var(--line);
  border-radius: 13px;
  padding: 24px 12px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .restaurant-image-admin-layout {
    grid-template-columns: 1fr;
  }

  .restaurant-image-restaurant-panel {
    position: static;
  }

  .restaurant-image-restaurant-list {
    max-height: 330px;
  }

  .restaurant-image-upload-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .restaurant-image-admin-head,
  .restaurant-image-editor-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .restaurant-image-editor {
    padding: 16px;
  }

  .restaurant-image-upload-form,
  .restaurant-image-admin-grid,
  .restaurant-image-admin-fields {
    grid-template-columns: 1fr;
  }
}

/* Authentication */
.account-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.account-actions form {
  margin: 0;
}

.account-login,
.account-name,
.account-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 6px;
  white-space: nowrap;
}

.account-login {
  padding: 8px 14px;
  color: #fff;
  background: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.account-name {
  gap: 7px;
  padding: 7px 10px;
  color: var(--ink);
  background: #edf6f4;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.account-name i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #03a94d;
  box-shadow: 0 0 0 3px rgba(3, 169, 77, 0.14);
}

.account-logout {
  border: 1px solid var(--line);
  padding: 7px 10px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.auth-page {
  min-width: 320px;
  min-height: 100vh;
  color: #16302f;
  background: #f4f7f4;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(520px, 1.05fr);
  min-height: 100vh;
}

.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  overflow: hidden;
  padding: 46px clamp(38px, 5vw, 78px) 52px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(242, 184, 75, 0.25) 0 8%, transparent 8.5%),
    radial-gradient(circle at 18% 82%, rgba(111, 193, 174, 0.18) 0 15%, transparent 15.5%),
    linear-gradient(145deg, #042f2e 0%, #075d57 56%, #0b7a75 100%);
}

.auth-story::after {
  position: absolute;
  right: -110px;
  bottom: 18%;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow:
    0 0 0 40px rgba(255, 255, 255, 0.035),
    0 0 0 92px rgba(255, 255, 255, 0.025);
  content: "";
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 12px;
  color: #fff;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.auth-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  color: #063b3a;
  background: #fff;
  font-size: 17px;
}

.auth-story-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: auto 0;
  padding: 72px 0;
}

.auth-story-label,
.auth-heading > span {
  display: inline-block;
  color: #8de0cb;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.auth-story-copy h1 {
  width: calc(100% + clamp(32px, 4vw, 68px));
  margin: 22px 0 20px;
  font-size: clamp(38px, 3.6vw, 62px);
  line-height: 1.12;
  letter-spacing: -0.055em;
  word-break: keep-all;
}

.auth-story-copy p {
  width: calc(100% + clamp(32px, 4vw, 68px));
  max-width: none;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  line-height: 1.75;
  word-break: keep-all;
  white-space: nowrap;
}

.auth-story-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 24px;
}

.auth-story-stats div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding-right: 18px;
}

.auth-story-stats strong {
  font-size: 14px;
}

.auth-story-stats span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 46px clamp(30px, 6vw, 92px);
  background:
    linear-gradient(rgba(11, 122, 117, 0.035) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(90deg, rgba(11, 122, 117, 0.035) 1px, transparent 1px) 0 0 / 42px 42px,
    #f7f9f6;
}

.auth-card {
  width: min(100%, 480px);
  border: 1px solid rgba(11, 91, 87, 0.12);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 80px rgba(21, 63, 60, 0.13);
}

.auth-back {
  color: #6a7977;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.auth-heading {
  margin: 36px 0 30px;
}

.auth-heading > span {
  color: var(--accent);
}

.auth-heading h2 {
  margin: 12px 0 12px;
  color: #123c39;
  font-size: clamp(30px, 3vw, 42px);
  letter-spacing: -0.05em;
}

.auth-heading p {
  margin: 0;
  color: #687775;
  line-height: 1.65;
  word-break: keep-all;
}

.auth-alert {
  margin-bottom: 18px;
  border: 1px solid #f2c8bc;
  border-radius: 10px;
  padding: 12px 14px;
  color: #924430;
  background: #fff4ef;
  font-size: 13px;
  line-height: 1.5;
}

.auth-actions {
  display: grid;
  gap: 10px;
}

.naver-sso-button,
.auth-primary-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.naver-sso-button {
  position: relative;
  background: #03a94d;
  box-shadow: 0 12px 28px rgba(3, 169, 77, 0.22);
}

.naver-sso-button:hover {
  transform: translateY(-1px);
  background: #03a94d;
  box-shadow: 0 15px 32px rgba(3, 169, 77, 0.28);
}

.naver-sso-button:focus-visible,
.auth-primary-link:focus-visible,
.auth-back:focus-visible {
  outline: 3px solid rgba(242, 184, 75, 0.72);
  outline-offset: 3px;
}

.naver-sso-button.is-disabled {
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
}

.naver-mark {
  position: absolute;
  left: 20px;
  font-family: Arial, sans-serif;
  font-size: 22px;
  font-weight: 900;
}

.auth-provider-note,
.auth-footnote {
  margin: 0;
  color: #87918f;
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.auth-assurance {
  display: grid;
  gap: 14px;
  margin: 30px 0 22px;
  border-top: 1px solid #e5ebe9;
  padding-top: 24px;
}

.auth-assurance > div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.auth-assurance > div > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #0a6f68;
  background: #e7f5f0;
  font-size: 12px;
  font-weight: 900;
}

.auth-assurance p {
  display: grid;
  gap: 3px;
  margin: 0;
  color: #82908e;
  font-size: 12px;
  line-height: 1.45;
}

.auth-assurance strong {
  color: #324b49;
  font-size: 13px;
}

.auth-current-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid #d8e9e4;
  border-radius: 12px;
  padding: 14px;
  background: #f4fbf8;
}

.auth-current-user > div {
  display: grid;
  gap: 3px;
}

.auth-current-user span:not(.auth-avatar) {
  color: #72807e;
  font-size: 12px;
}

.auth-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
}

.auth-primary-link {
  background: var(--accent);
}

.auth-logout-form {
  margin: 8px 0 0;
}

.auth-logout-form button {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d5dfdc;
  border-radius: 10px;
  color: #657370;
  background: #fff;
  font-weight: 800;
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: minmax(300px, 0.72fr) minmax(460px, 1fr);
  }

  .auth-story {
    padding: 36px;
  }

  .auth-story-copy h1 {
    width: calc(100% + 28px);
    font-size: 42px;
  }

  .auth-story-copy p {
    width: 100%;
    white-space: normal;
  }

  .auth-story-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .auth-story-stats div {
    grid-template-columns: 100px 1fr;
  }
}

@media (max-width: 760px) {
  .auth-shell {
    display: block;
  }

  .auth-story {
    min-height: auto;
    padding: 28px 24px 56px;
  }

  .auth-story-copy {
    padding: 64px 0 54px;
  }

  .auth-story-copy h1 {
    width: 100%;
    font-size: clamp(34px, 10vw, 48px);
  }

  .auth-story-stats {
    display: none;
  }

  .auth-panel {
    min-height: auto;
    padding: 28px 16px 48px;
  }

  .auth-card {
    margin-top: -48px;
    border-radius: 20px;
    padding: 28px 22px;
  }

  .auth-heading {
    margin-top: 28px;
  }
}

@media (max-width: 820px) {
  .account-actions {
    justify-content: flex-end;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--surface);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
}

.map-stage {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.map-controls {
  position: absolute;
  z-index: 20;
  top: 16px;
  left: 16px;
  right: 392px;
  display: grid;
  gap: 8px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(29, 41, 57, 0.14);
}

.brand {
  flex: 0 0 auto;
  font-weight: 800;
}

.searchbar {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 72px 128px;
  gap: 8px;
  width: 100%;
}

.searchbar input,
.review-form input,
.review-form select,
.review-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
}

.searchbar > button,
.review-form button,
.admin-header button,
.admin-item button,
.button-link {
  border: 0;
  border-radius: 6px;
  padding: 9px 12px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
}

.visit-filter-toggle {
  position: relative;
  min-width: 0;
}

.visit-filter-toggle summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  color: var(--muted);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  user-select: none;
  white-space: nowrap;
}

.visit-filter-toggle summary::-webkit-details-marker {
  display: none;
}

.visit-filter-toggle summary::after {
  width: 0;
  height: 0;
  margin-left: 8px;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
}

.visit-filter-toggle[open] summary {
  border-color: var(--accent);
  color: var(--accent);
}

.visit-filter-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 6px;
  width: 232px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 32px rgba(29, 41, 57, 0.18);
}

.visit-filter-menu button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--muted);
  background: #fff;
  font-weight: 800;
  white-space: nowrap;
}

.visit-filter-menu button:hover,
.visit-filter-menu button.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  text-decoration: none;
}

.filter-index {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 10px;
}

.filter-index-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-index button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--muted);
  background: #fff;
  font-weight: 800;
  white-space: nowrap;
}

.filter-index button:hover,
.filter-index button.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.filter-index .saved-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-color: #e0c2c2;
  color: #8f4141;
}

.filter-index .saved-filter span {
  font-size: 13px;
}

.filter-index .saved-filter:hover,
.filter-index .saved-filter.active {
  border-color: #aa4444;
  color: #fff;
  background: #aa4444;
}

.map {
  width: 100vw;
  min-height: 100vh;
  background: #dbe8e6;
  overflow: hidden;
}

.fallback-map {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.22) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(0deg, rgba(255,255,255,0.22) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(145deg, #d7ece6, #c8d8cf 42%, #b8d7e4 43%, #9fc6d8 100%);
  transform: translate(var(--fallback-pan-x, 0), var(--fallback-pan-y, 0)) scale(var(--fallback-scale, 1));
  transform-origin: 0 0;
  transition: transform 240ms ease;
}

.water-label {
  position: absolute;
  left: 28px;
  bottom: 22px;
  color: rgba(29, 41, 57, 0.32);
  font-size: 52px;
  font-weight: 900;
  letter-spacing: 0;
}

.map-marker {
  position: absolute;
  z-index: 5;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--marker);
  box-shadow: 0 8px 20px rgba(29, 41, 57, 0.24);
  transition: background 160ms ease, color 160ms ease;
}

.map-marker.active {
  z-index: 8;
  color: var(--ink);
  background: var(--focus) !important;
}

.ranking-panel,
.detail-panel {
  position: absolute;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(29, 41, 57, 0.18);
}

.ranking-panel {
  top: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  width: 360px;
}

.detail-panel {
  left: 16px;
  right: 392px;
  bottom: 16px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 18px;
  height: clamp(200px, 25vh, 300px);
  padding: 18px;
  overflow: hidden;
}

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

.detail-summary,
.detail-review-entry,
.reviews {
  min-width: 0;
  overflow: auto;
}

.detail-review-entry,
.reviews {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.detail-panel h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.detail-expand-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  padding: 0 38px 0 0;
  color: var(--ink);
  background: transparent;
  font-weight: 900;
  text-align: left;
}

.detail-expand-toggle > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-expand-label {
  position: relative;
  flex: 0 0 auto;
  padding-right: 18px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.detail-expand-label::after {
  position: absolute;
  top: 50%;
  right: 2px;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-68%) rotate(45deg);
  transition: transform 160ms ease;
}

.detail-expand-toggle[aria-expanded="true"] .detail-expand-label::after {
  transform: translateY(-28%) rotate(225deg);
}

.detail-expand-toggle:hover > span,
.detail-expand-toggle:focus-visible > span {
  color: var(--accent);
}

.detail-expand-toggle:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgba(242, 184, 75, 0.52);
  outline-offset: 3px;
}

.visit-history[hidden],
.ai-summary-card[hidden],
.restaurant-photo-card[hidden],
.detail-review-entry[hidden],
.reviews[hidden] {
  display: none;
}

.detail-panel.detail-expanded {
  top: 128px;
  height: auto;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto minmax(160px, 1fr);
}

.detail-panel.detail-expanded .detail-summary {
  display: grid;
  grid-column: 1 / -1;
  grid-template-areas:
    "title stats link"
    "address stats link";
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 0.7fr) 190px;
  gap: 8px 18px;
  align-items: center;
  overflow: visible;
}

.detail-panel.detail-expanded .detail-summary h2 {
  grid-area: title;
}

.detail-panel.detail-expanded .detail-address {
  grid-area: address;
  margin: 0;
}

.detail-panel.detail-expanded .detail-stats {
  grid-area: stats;
  margin: 0;
}

.detail-panel.detail-expanded .detail-primary-actions {
  grid-area: link;
  margin: 0;
}

.visit-history {
  display: flex;
  grid-column: 1 / -1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  overflow: hidden;
}

.visit-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.visit-history-head h3 {
  margin: 0;
}

.visit-history-head span {
  min-width: 34px;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--accent);
  background: #e7f5f0;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.visit-table-scroll {
  min-height: 0;
  margin-top: 10px;
  overflow-x: auto;
  overflow-y: hidden;
}

.visit-history.is-paginated {
  height: min(360px, 42vh);
}

.visit-history.is-paginated .visit-table-scroll {
  flex: 1 1 auto;
  overflow: auto;
}

.visit-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 13px;
}

.visit-table th,
.visit-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

.visit-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  color: #405250;
  background: #eef5f3;
  font-size: 12px;
}

.visit-table th:first-child,
.visit-table td:first-child {
  width: 160px;
  border-left: 1px solid var(--line);
}

.visit-table th:nth-child(2),
.visit-table td:nth-child(2) {
  width: 210px;
}

.visit-table thead th {
  border-top: 1px solid var(--line);
}

.visit-table thead th:first-child {
  border-top-left-radius: 7px;
}

.visit-table thead th:last-child {
  border-top-right-radius: 7px;
}

.visit-table tbody tr:nth-child(even) td {
  background: #f8faf9;
}

.visit-empty {
  padding: 26px !important;
  color: var(--muted);
  text-align: center !important;
}

.visit-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.visit-pagination[hidden] {
  display: none;
}

.visit-pagination button {
  min-width: 58px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.visit-pagination button:hover:not(:disabled),
.visit-pagination button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.visit-pagination button:focus-visible {
  outline: 3px solid rgba(242, 184, 75, 0.42);
  outline-offset: 2px;
}

.visit-pagination button:disabled {
  cursor: default;
  opacity: 0.42;
}

.visit-page-status {
  min-width: 48px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.ai-summary-card {
  display: none;
  min-width: 0;
  border: 1px solid #d7e8e3;
  border-radius: 10px;
  padding: 16px 18px;
  background:
    linear-gradient(135deg, rgba(231, 245, 240, 0.92), rgba(255, 250, 235, 0.82));
}

.detail-panel.detail-expanded .ai-summary-card {
  display: block;
  grid-column: 1;
  grid-row: 3;
}

.ai-summary-head,
.ai-summary-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-summary-head {
  justify-content: space-between;
}

.ai-summary-head h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 16px;
}

.ai-summary-kicker {
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.ai-summary-count,
.ai-summary-pending {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
}

.ai-summary-count {
  color: #176b5b;
  background: rgba(255, 255, 255, 0.88);
}

.ai-summary-text {
  margin: 12px 0 10px;
  color: #273d39;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

.ai-summary-meta {
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}

.ai-summary-meta time {
  margin-left: auto;
}

.ai-summary-pending {
  color: #8a5a00;
  background: #fff2c7;
}

.restaurant-photo-card {
  display: flex;
  grid-column: 2 / -1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-left: 1px solid var(--line);
  padding-left: 18px;
  overflow: hidden;
}

.detail-panel.detail-expanded .restaurant-photo-card {
  grid-column: 1;
  grid-row: 4;
  border-top: 1px solid var(--line);
  border-left: 0;
  padding-top: 8px;
  padding-left: 0;
}

.restaurant-photo-head,
.restaurant-photo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.restaurant-photo-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.restaurant-photo-head h3 {
  margin: 0;
}

.restaurant-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  flex: 1 1 auto;
  gap: 8px;
  min-height: 0;
  margin-top: 6px;
}

.detail-panel.detail-expanded .restaurant-photo-grid[data-image-count="1"] {
  grid-template-columns: minmax(0, 1fr);
}

.detail-panel.detail-expanded .restaurant-photo-grid[data-image-count="2"],
.detail-panel.detail-expanded .restaurant-photo-grid[data-image-count="3"],
.detail-panel.detail-expanded .restaurant-photo-grid[data-image-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.restaurant-photo-item {
  min-width: 0;
  min-height: 0;
  margin: 0;
}

.restaurant-photo-link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #eef3f1;
}

.restaurant-photo-grid[hidden],
.restaurant-photo-item[hidden],
.restaurant-photo-meta[hidden],
.restaurant-photo-empty[hidden] {
  display: none;
}

.restaurant-photo-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.restaurant-photo-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  border-radius: 999px;
  padding: 4px 7px;
  color: #fff;
  background: rgba(23, 107, 91, 0.9);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.restaurant-photo-badge.admin {
  background: rgba(29, 41, 57, 0.9);
}

.restaurant-photo-meta {
  display: none;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.restaurant-photo-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restaurant-photo-empty {
  display: grid;
  flex: 1 1 auto;
  min-height: 136px;
  margin: 0;
  border: 1px dashed #b8c9c5;
  border-radius: 8px;
  padding: 24px;
  place-items: center;
  color: var(--muted);
  background: #f7faf9;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.detail-panel.detail-expanded .detail-review-entry {
  grid-column: 2;
  grid-row: 3;
  min-height: 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  overflow: visible;
}

.detail-panel.detail-expanded .reviews {
  grid-column: 2;
  grid-row: 4;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.review-list {
  min-height: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 18px 10px;
}

.panel-head h1,
.detail-panel h2,
.admin-header h1,
.admin-grid h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.admin-grid h2 small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

#result-count {
  min-width: 34px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent-2);
  text-align: center;
  font-weight: 800;
}

.ranking-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow: auto;
}

.rank-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.rank-item:hover {
  border-color: var(--accent);
}

.rank-item:focus-visible,
.rank-item.active {
  border-color: var(--focus);
  outline: 3px solid rgba(242, 184, 75, 0.42);
  outline-offset: 2px;
}

.rank-main,
.rank-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rank-main strong {
  overflow-wrap: anywhere;
}

.rank-main small,
.rank-meta small,
.detail-address,
.empty,
.admin-item p,
.admin-item small {
  color: var(--muted);
}

.rank-meta {
  align-items: flex-end;
}

.detail-address {
  margin: 8px 0 14px;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.detail-stats span {
  min-height: 44px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  font-weight: 800;
}

.naver-map-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0 0 16px;
  border-radius: 6px;
  color: #fff;
  background: #03c75a;
  font-weight: 800;
  text-decoration: none;
}

.naver-map-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.detail-primary-actions {
  display: grid;
  gap: 8px;
}

.detail-primary-actions .naver-map-link {
  margin-bottom: 0;
}

.save-restaurant-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #d5a1a1;
  border-radius: 6px;
  padding: 9px 12px;
  color: #8a3b3b;
  background: #fff;
  font-weight: 800;
}

.save-restaurant-button span {
  margin-right: 6px;
  font-size: 18px;
}

.save-restaurant-button.is-saved {
  border-color: #aa4444;
  color: #fff;
  background: #aa4444;
}

.panel-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #eef2f1;
}

.review-form {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 8px;
  margin: 0;
}

.review-form textarea,
.review-form button {
  grid-column: 1 / -1;
}

.reviews article,
.admin-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 8px;
}

.reviews article div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.report-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  padding: 6px 8px;
}

.admin-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 18px;
}

.dashboard-shell {
  max-width: 1440px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.dashboard-brand {
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-nav {
  display: flex;
  align-self: stretch;
}

.dashboard-nav a {
  display: inline-flex;
  align-items: center;
  min-width: 92px;
  padding: 0 18px;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-weight: 800;
  justify-content: center;
  text-decoration: none;
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.dashboard-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 32px;
  align-items: center;
  min-height: 240px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dashboard-eyebrow,
.dashboard-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-overview h1 {
  margin: 6px 0 4px;
  font-size: 30px;
}

.dashboard-overview p {
  margin: 0;
  color: var(--muted);
}

.dashboard-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 620px;
  margin: 24px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.dashboard-totals div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  background: #fff;
}

.dashboard-totals dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-totals dd {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.verification-donut-block {
  display: grid;
  grid-template-columns: 154px minmax(180px, 1fr);
  gap: 24px;
  align-items: center;
}

.verification-donut {
  position: relative;
  display: grid;
  place-content: center;
  width: 154px;
  aspect-ratio: 1;
  border-radius: 50%;
  text-align: center;
  isolation: isolate;
}

.verification-donut::after {
  position: absolute;
  z-index: -1;
  inset: 34px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.verification-donut strong {
  font-size: 24px;
}

.verification-donut span {
  color: var(--muted);
  font-size: 12px;
}

.verification-donut-legend {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.verification-donut-legend li {
  display: grid;
  grid-template-columns: 10px minmax(68px, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.verification-donut-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.verification-donut-legend strong {
  font-size: 12px;
  text-align: right;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  margin-top: 18px;
}

.dashboard-panel {
  min-width: 0;
  min-height: 500px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dashboard-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.dashboard-panel-head h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.dashboard-text-link {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-filter-row {
  display: grid;
  grid-template-columns: 116px repeat(2, minmax(128px, 1fr)) 64px;
  gap: 8px;
  margin-bottom: 16px;
}

.dashboard-filter-row label {
  display: grid;
  gap: 4px;
}

.dashboard-filter-row label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.dashboard-filter-row input,
.dashboard-filter-row select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--ink);
  background: #fff;
}

.dashboard-filter-row button,
.collection-operation-actions button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 7px 12px;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-filter-row button {
  align-self: end;
}

.dashboard-bars {
  display: grid;
  align-content: start;
  max-height: 392px;
  overflow: auto;
}

.collection-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.collection-status-legend li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.collection-status-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.collection-status-legend .legend-divider {
  margin-left: 6px;
}

.dashboard-bar-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(150px, 1.5fr) 120px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 10px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  text-align: left;
  text-decoration: none;
}

.dashboard-bar-row:hover,
.dashboard-bar-row.active {
  background: #edf6f4;
}

.dashboard-bar-label,
.dashboard-bar-value {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.dashboard-bar-label strong,
.dashboard-bar-label small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-bar-label small,
.dashboard-bar-value small {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-bar-track {
  display: flex;
  height: 12px;
  overflow: hidden;
  border-radius: 6px;
  background: #dfe5e3;
}

.dashboard-bar-track i {
  display: block;
  height: 100%;
}

.dashboard-metric-tracks {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.dashboard-track-line {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.dashboard-track-line > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.dashboard-bar-track .collected,
.collection-status-legend .collected {
  background: #397fa6;
}

.dashboard-bar-track .failed,
.collection-status-legend .failed {
  background: #d95d4f;
}

.dashboard-bar-track .processing,
.collection-status-legend .processing {
  background: #f2a93b;
}

.dashboard-bar-track .pending,
.collection-status-legend .pending {
  background: #8aa4b8;
}

.collection-status-legend .approved {
  background: #087f5b;
}

.collection-status-legend .needs-review {
  background: #f2a93b;
}

.collection-status-legend .rejected {
  background: #d95d4f;
}

.collection-status-legend .verification-pending {
  background: #8aa4b8;
}

.dashboard-bar-value {
  text-align: right;
}

.collection-operations {
  margin-top: 28px;
  padding: 22px 0 8px;
  border-top: 1px solid var(--line);
}

.collection-operation-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.api-usage-section {
  margin-top: 28px;
  padding: 22px 0 8px;
  border-top: 1px solid var(--line);
}

.api-usage-section .section-head {
  align-items: flex-end;
  gap: 20px;
}

.api-usage-section .section-head h2 {
  margin-top: 3px;
}

.api-usage-section .section-head p {
  max-width: 680px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.api-usage-summary {
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
  min-width: 92px;
  text-align: right;
}

.api-usage-summary strong {
  color: var(--accent);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.api-usage-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.api-usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.api-usage-card {
  display: grid;
  min-width: 0;
  gap: 15px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.api-usage-card.warning {
  border-color: #e5b6ae;
}

.api-usage-card > header,
.api-usage-card > footer,
.api-usage-numbers {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.api-usage-card > header > div,
.api-usage-numbers > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.api-usage-card > header strong {
  font-size: 16px;
}

.api-usage-card > header small,
.api-usage-card > footer,
.api-usage-numbers span {
  color: var(--muted);
  font-size: 11px;
}

.api-state {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  border-radius: 13px;
  padding: 4px 9px;
  color: #526075;
  background: #e8eeec;
  font-size: 11px;
  font-weight: 900;
}

.api-state::after {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 10;
  width: max-content;
  max-width: min(250px, calc(100vw - 40px));
  padding: 7px 9px;
  border-radius: 6px;
  color: #fff;
  background: #263238;
  box-shadow: 0 6px 18px rgba(29, 41, 57, 0.2);
  content: attr(data-tooltip);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translateY(3px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.api-state:hover::after,
.api-state:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.api-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8aa4b8;
}

.api-state.healthy,
.api-state.connected {
  color: #08715c;
  background: #e1f2ed;
}

.api-state.healthy i,
.api-state.connected i {
  background: #087f5b;
}

.api-state.warning {
  color: #a93f35;
  background: #fae8e5;
}

.api-state.warning i {
  background: #d95d4f;
}

.api-usage-numbers {
  align-items: end;
}

.api-usage-numbers > div > strong {
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.api-usage-numbers > strong {
  color: var(--accent);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.api-usage-track {
  height: 9px;
  overflow: hidden;
  border-radius: 5px;
  background: #dfe5e3;
}

.api-usage-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 220ms ease;
}

.api-usage-card.warning .api-usage-track i {
  background: #d95d4f;
}

.api-usage-card > footer {
  align-items: center;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.api-usage-card > footer span:last-child {
  flex: 0 0 auto;
  text-align: right;
}

@media (max-width: 820px) {
  .api-usage-section .section-head {
    align-items: flex-start;
  }

  .api-usage-grid {
    grid-template-columns: 1fr;
  }

  .api-usage-card > footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .api-usage-card > footer span:last-child {
    text-align: left;
  }
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.admin-header h1 {
  flex: 0 0 auto;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-actions button,
.admin-actions .button-link {
  white-space: nowrap;
}

.live-collect-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.live-collect-controls label {
  display: grid;
  gap: 4px;
}

.live-collect-controls span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.live-collect-controls input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
}

button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.batch-status {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2fr;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.batch-status p {
  margin: 0;
  color: var(--muted);
}

.batch-status div {
  display: grid;
  gap: 4px;
}

.batch-status small,
.batch-status span {
  color: var(--muted);
}

.batch-status ul {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.batch-status li {
  display: grid;
  gap: 4px;
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.collection-progress-section {
  margin-bottom: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.collection-progress-section .section-head {
  align-items: end;
  margin-bottom: 8px;
}

.collection-progress-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.collection-progress-controls label {
  display: grid;
  gap: 3px;
}

.collection-progress-controls label span,
.collection-progress-period {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.collection-progress-controls select,
.collection-progress-controls input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  color: var(--ink);
  background: #fff;
}

.collection-progress-controls button {
  align-self: end;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 7px 12px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.collection-progress-period {
  margin: 0 0 8px;
}

.collection-progress {
  display: grid;
  max-height: 360px;
  overflow: auto;
}

.collection-progress-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 2fr) 64px;
  gap: 12px;
  align-items: center;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}

.collection-progress-row:last-child {
  border-bottom: 0;
}

.collection-progress-label {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.collection-progress-label strong,
.collection-progress-label small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-progress-label small {
  color: var(--muted);
}

.collection-progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 6px;
  background: #dfe5e3;
}

.collection-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0b7a75;
}

.collection-progress-percent {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.source-section,
.verification-section {
  margin-bottom: 20px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
}

.section-head > button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 7px 12px;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
}

#source-summary,
#verification-summary {
  min-width: 58px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  text-align: center;
  font-weight: 800;
}

.verification-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.verification-status article {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 132px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.verification-status ul {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.verification-status li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
  font-size: 13px;
}

.verification-status li strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.verification-status p {
  margin: 0;
  overflow-wrap: anywhere;
}

.verification-status small,
.verification-status span {
  color: var(--muted);
}

.verification-status .ok {
  color: var(--accent);
}

.verification-status .warn {
  color: var(--accent-2);
}

.source-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.source-group {
  min-height: 162px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.source-group > div {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.source-group strong,
.source-group span {
  overflow-wrap: anywhere;
}

.source-group small,
.source-more {
  color: var(--muted);
}

.source-group ul {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.source-group li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
  font-size: 13px;
}

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

.manual-review-section {
  min-width: 0;
}

.review-reports-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.review-reports-section h2 {
  margin-bottom: 12px;
}

.admin-list {
  min-height: 220px;
}

.candidate-group {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.candidate-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 10px 14px;
  cursor: pointer;
  background: var(--surface);
  font-weight: 800;
}

.candidate-group summary span {
  color: var(--muted);
  font-size: 13px;
}

.candidate-summary-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.candidate-sort-select {
  height: 30px;
  min-width: 112px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.candidate-group-body {
  display: grid;
  gap: 10px;
  padding: 10px;
  min-width: 0;
}

.candidate-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 80px;
  gap: 8px;
  margin-bottom: 10px;
}

.candidate-search input {
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
}

.candidate-search button {
  min-height: 36px;
  padding: 7px 10px;
}

.candidate-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.candidate-pager span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.candidate-pager button {
  min-height: 34px;
  padding: 6px 10px;
}

.admin-item div {
  display: flex;
  gap: 8px;
}

.review-meta {
  display: grid;
  gap: 5px;
  margin: 8px 0;
}

.review-meta div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
}

.review-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.review-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.review-purpose {
  padding: 8px;
  border-left: 3px solid var(--accent);
  background: #fff;
}

.candidate-evidence {
  padding: 8px;
  border-radius: 6px;
  background: var(--surface);
  font-size: 13px;
  line-height: 1.45;
}

.candidate-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  min-width: 0;
}

.candidate-row {
  min-width: 0;
  overflow: hidden;
}

.provider-candidates {
  display: grid;
  gap: 6px;
  margin: 8px 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.provider-candidates > strong {
  font-size: 13px;
}

.provider-candidate-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}

.provider-candidates label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-width: 280px;
  padding: 6px;
  border-radius: 6px;
  background: var(--surface);
  font-size: 13px;
  scroll-snap-align: start;
}

.provider-candidates label.disabled {
  color: var(--muted);
  opacity: 0.68;
}

.provider-candidates small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.candidate-db-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  margin: 8px 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfa;
}

.admin-item .candidate-db-row {
  display: grid;
}

.candidate-db-meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 92px 92px minmax(150px, 1fr) minmax(180px, 1.15fr) minmax(180px, 1.15fr);
  gap: 6px;
  min-width: 0;
  padding-bottom: 2px;
}

.admin-item .candidate-db-meta {
  display: grid;
}

.candidate-db-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.candidate-db-row label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-db-row label span small {
  margin-left: 6px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 600;
}

.candidate-db-row label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-item .candidate-db-row label {
  display: grid;
}

.candidate-db-row label.wide {
  grid-column: span 2;
}

.candidate-db-row .cell-id {
  grid-column: span 1;
}

.candidate-db-row .cell-status,
.candidate-db-row .cell-category {
  grid-column: span 1;
}

.candidate-db-row .cell-address {
  grid-column: span 3;
}

.candidate-db-row .cell-original-address {
  grid-column: span 3;
}

.candidate-db-row .cell-reason {
  grid-column: span 2;
}

.candidate-db-row .cell-note {
  grid-column: span 4;
}

.candidate-db-row .cell-action {
  grid-column: span 2;
}

.candidate-db-row label.readonly input {
  color: var(--muted);
  background: #f1f5f4;
}

.candidate-db-row input,
.candidate-db-row select {
  width: 100%;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  line-height: 1.2;
}

.candidate-db-row button {
  height: 32px;
  min-height: 32px;
  padding: 5px 8px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

.candidate-db-row button.secondary {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: #fff;
}

.admin-item .review-feedback {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  gap: 8px;
  margin: 8px 0;
}

.review-feedback label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.review-feedback select,
.review-feedback textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
}

@media (max-width: 1280px) {
  .candidate-db-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .candidate-db-meta {
    grid-template-columns: 96px 96px repeat(2, minmax(0, 1fr));
  }

  .candidate-db-row .cell-id,
  .candidate-db-row .cell-status,
  .candidate-db-row .cell-category,
  .candidate-db-row .cell-reason,
  .candidate-db-row .cell-action {
    grid-column: span 1;
  }

  .candidate-db-row label.wide,
  .candidate-db-row .cell-original-address,
  .candidate-db-row .cell-address,
  .candidate-db-row .cell-note {
    grid-column: span 2;
  }
}

.ops-log-shell {
  gap: 14px;
}

.ops-log-controls {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 140px;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ops-log-controls label {
  display: grid;
  gap: 4px;
}

.ops-log-controls span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ops-log-controls select,
.ops-log-controls input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--ink);
  background: #fff;
}

.ops-log-section {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ops-log-section h2 {
  margin: 0;
  font-size: 16px;
}

.ops-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ops-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  font-size: 12px;
}

.ops-table th,
.ops-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.ops-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.ops-table td {
  background: #fff;
}

.ops-table a {
  color: var(--accent);
  font-weight: 700;
}

.document-admin-shell {
  max-width: 1680px;
}

.document-page-head,
.document-detail-head,
.document-row-toolbar,
.document-board,
.document-row-board,
.document-filter-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.document-page-head,
.document-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 20px;
}

.document-page-head h1,
.document-detail-head h1 {
  margin: 4px 0;
  font-size: 28px;
}

.document-page-head p,
.document-detail-head p {
  margin: 0;
  color: var(--muted);
}

.document-back-link {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.document-filter-panel {
  margin-bottom: 12px;
  padding: 14px;
}

.document-filter-grid {
  display: grid;
  grid-template-columns: 120px minmax(180px, 1fr) 150px 150px 130px 160px minmax(220px, 1.2fr) 72px;
  gap: 10px;
  align-items: end;
}

.document-filter-grid label,
.document-row-filters label {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.document-filter-grid input,
.document-filter-grid select,
.document-row-filters input,
.document-row-filters select,
.document-bulk-actions select {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--ink);
  background: #fff;
}

.document-filter-grid button,
.document-row-toolbar button,
.document-board button,
.document-row-board button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 7px 12px;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}

.document-filter-grid button.secondary,
.document-row-toolbar button.secondary,
.document-board button.secondary,
.document-row-board button.secondary,
.button-link.secondary {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: #fff;
}

.document-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.document-summary div {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.document-summary div:last-child {
  border-right: 0;
}

.document-summary span,
.document-detail-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.document-summary strong {
  font-size: 22px;
}

.document-board,
.document-row-board {
  padding: 14px;
}

.document-table-wrap,
.document-edit-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.document-table,
.document-edit-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 13px;
}

.document-table {
  min-width: 1180px;
}

.document-edit-table {
  min-width: 2100px;
}

.document-table th,
.document-table td,
.document-edit-table th,
.document-edit-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.document-table th,
.document-edit-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #526075;
  background: #f3f6f5;
  font-size: 11px;
  white-space: nowrap;
}

.document-table tbody tr:hover,
.document-edit-table tbody tr:hover {
  background: #f7faf9;
}

.document-table tr.failed {
  background: #fff8f7;
}

.document-table td small,
.document-edit-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.document-table a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.document-error {
  color: #b44338 !important;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 4px;
  padding: 3px 7px;
  color: #526075;
  background: #e8eeec;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge.collected,
.status-badge.duplicate,
.status-badge.verified {
  color: #08715c;
  background: #e1f2ed;
}

.status-badge.failed,
.status-badge.rejected {
  color: #a93f35;
  background: #fae8e5;
}

.status-badge.processing,
.status-badge.needs_review {
  color: #94620b;
  background: #fff0cf;
}

.mini-progress {
  display: block;
  width: 108px;
  height: 6px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 3px;
  background: #dfe5e3;
}

.mini-progress i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.document-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}

.document-pagination button:disabled {
  cursor: default;
  opacity: 0.45;
}

.document-detail-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.document-detail-summary div {
  display: grid;
  gap: 4px;
  min-height: 66px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.document-detail-summary div:nth-child(5n) {
  border-right: 0;
}

.document-detail-summary div.wide {
  grid-column: span 5;
  border-bottom: 0;
}

.document-detail-summary strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-row-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 12px;
}

.document-row-filters {
  display: grid;
  grid-template-columns: 130px 160px minmax(220px, 1fr) 72px;
  flex: 1 1 auto;
  gap: 8px;
  align-items: end;
}

.document-bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#document-dirty-count {
  min-width: 64px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.document-edit-table input:not([type="checkbox"]),
.document-edit-table select {
  width: 100%;
  min-width: 110px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 7px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.document-edit-table td:nth-child(5),
.document-edit-table td:nth-child(7),
.document-edit-table td:nth-child(12) {
  max-width: 190px;
}

.document-edit-table .readonly-cell {
  color: #526075;
  background: #f7f9f8;
}

.document-edit-table .number-cell {
  text-align: right;
  white-space: nowrap;
}

.document-edit-table tr.dirty {
  background: #fff9e9;
}

.document-edit-table .icon-text-button {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
}

.document-save-message {
  margin-bottom: 10px;
  border-radius: 5px;
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 800;
}

.document-save-message.success {
  color: #08715c;
  background: #e1f2ed;
}

.document-save-message.error {
  color: #a93f35;
  background: #fae8e5;
}

.workflow-shell {
  max-width: 1680px;
}

.workflow-head,
.workflow-scope-controls,
.workflow-controls,
.workflow-status-strip,
.workflow-panel,
.workflow-db-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.workflow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 20px;
}

.workflow-head h1 {
  margin: 4px 0;
  font-size: 28px;
}

.workflow-head p {
  margin: 0;
  color: var(--muted);
}

.workflow-scope-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
}

.workflow-scope-controls label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workflow-scope-controls label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.workflow-scope-controls select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--ink);
  background: #fff;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.workflow-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.workflow-steps li::after {
  position: absolute;
  top: 50%;
  right: -9px;
  width: 9px;
  height: 2px;
  background: #98a2b3;
  content: "";
}

.workflow-steps li:last-child::after {
  content: none;
}

.workflow-steps span {
  display: grid;
  place-items: center;
  width: 32px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #526075;
  background: #e8eeec;
  font-weight: 900;
}

.workflow-steps strong,
.workflow-steps small {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-steps strong {
  align-self: end;
  font-size: 14px;
}

.workflow-steps small {
  align-self: start;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.workflow-steps li.active {
  border-color: #397fa6;
  background: #f1f7fb;
}

.workflow-steps li.active span {
  color: #fff;
  background: #397fa6;
}

.workflow-steps li.done {
  border-color: #0b7a75;
  background: #eff8f5;
}

.workflow-steps li.done span {
  color: #fff;
  background: #0b7a75;
}

.workflow-steps li.warn {
  border-color: #d95d4f;
  background: #fff8f7;
}

.workflow-steps li.warn span {
  color: #fff;
  background: #d95d4f;
}

.workflow-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(136px, 1fr)) repeat(5, minmax(96px, auto));
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 14px;
}

.workflow-controls label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workflow-controls label span,
.workflow-panel-tools label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.workflow-controls input,
.workflow-panel-tools input,
.workflow-panel-tools select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--ink);
  background: #fff;
}

.workflow-controls button,
.workflow-panel-tools button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 7px 12px;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}

.workflow-controls button.secondary,
.workflow-panel-tools button.secondary {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: #fff;
}

.workflow-status-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: 14px;
}

.workflow-status-strip-compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.workflow-status-strip div {
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}

.workflow-status-strip div:last-child {
  border-right: 0;
}

.workflow-status-strip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.workflow-status-strip strong {
  font-size: 22px;
}

.workflow-main-grid {
  display: grid;
  grid-template-columns: minmax(520px, 0.85fr) minmax(680px, 1.15fr);
  gap: 14px;
  align-items: start;
}

.workflow-document-log-grid,
.workflow-review-log-grid {
  grid-template-columns: minmax(620px, 1fr) 320px;
}

.workflow-panel,
.workflow-db-panel {
  min-width: 0;
  padding: 14px;
}

.workflow-db-panel {
  margin-top: 14px;
}

.workflow-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.workflow-panel-head h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.workflow-panel-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.workflow-panel-tools input {
  min-width: 240px;
}

.workflow-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.workflow-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

.workflow-verification-table {
  min-width: 960px;
}

.workflow-table th,
.workflow-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.workflow-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #526075;
  background: #f3f6f5;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.workflow-table td {
  background: #fff;
}

.workflow-table tbody tr:hover td {
  background: #f7faf9;
}

.workflow-table a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.workflow-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.workflow-progress {
  display: block;
  width: 132px;
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #dfe5e3;
}

.workflow-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #8aa4b8;
  transition: width 260ms ease;
}

.workflow-progress.collected i,
.workflow-progress.verified i {
  background: #087f5b;
}

.workflow-progress.processing i,
.workflow-progress.needs_review i,
.workflow-progress.running i {
  background: #397fa6;
}

.workflow-progress.pending i,
.workflow-progress.queued i {
  background: #8aa4b8;
}

.workflow-progress.failed i,
.workflow-progress.rejected i {
  background: #d95d4f;
}

.workflow-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 4px;
  padding: 3px 7px;
  color: #526075;
  background: #e8eeec;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.workflow-status-pill.collected,
.workflow-status-pill.verified,
.workflow-status-pill.parsed {
  color: #08715c;
  background: #e1f2ed;
}

.workflow-status-pill.processing,
.workflow-status-pill.parsing,
.workflow-status-pill.needs_review,
.workflow-status-pill.running {
  color: #235f8a;
  background: #e5f1f8;
}

.workflow-status-pill.pending,
.workflow-status-pill.not_requested,
.workflow-status-pill.queued {
  color: #526075;
  background: #e8eeec;
}

.workflow-status-pill.failed,
.workflow-status-pill.rejected,
.workflow-status-pill.unsupported {
  color: #a93f35;
  background: #fae8e5;
}

.workflow-status-pill.empty {
  color: #7a5b12;
  background: #fbf0d0;
}

.workflow-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workflow-pagination button {
  min-height: 32px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 5px 10px;
  color: var(--accent);
  background: #fff;
  font-weight: 900;
}

.workflow-pagination button:disabled {
  border-color: var(--line);
  color: #98a2b3;
  background: #f3f6f5;
}

.workflow-verification-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  align-items: start;
}

.workflow-verification-layout .workflow-table-wrap {
  grid-column: 1;
}

#workflow-candidate-pagination {
  grid-column: 1;
}

.workflow-log-panel {
  position: sticky;
  top: 12px;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 360px;
  max-height: calc(100vh - 24px);
  padding: 12px;
  border-radius: 6px;
  color: #fff;
  background: #176782;
}

.workflow-main-grid > .workflow-log-panel {
  grid-column: auto;
  grid-row: auto;
}

.workflow-log-panel > strong {
  margin-bottom: 10px;
}

#workflow-log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
}

.workflow-log-entry {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  line-height: 1.45;
}

.workflow-log-entry span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.workflow-log-entry.success {
  border-left: 4px solid #63d297;
}

.workflow-log-entry.error {
  border-left: 4px solid #ffb1a8;
}

.workflow-status-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f6f5;
}

.workflow-status-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: #526075;
  background: transparent;
  font-weight: 900;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.workflow-status-tabs button:hover,
.workflow-status-tabs button.active {
  color: #fff;
  background: var(--accent);
  transform: translateY(-1px);
}

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

.workflow-db-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid #8aa4b8;
  border-radius: 8px;
  background: #fff;
}

.workflow-db-row.verified {
  border-left-color: #087f5b;
}

.workflow-db-row.needs_review {
  border-left-color: #397fa6;
}

.workflow-db-row.rejected {
  border-left-color: #d95d4f;
}

.workflow-db-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.workflow-db-row-head strong,
.workflow-db-row-head span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.workflow-db-row-head span,
.workflow-provider-line,
.workflow-db-row dd {
  color: var(--muted);
}

.workflow-provider-line {
  margin: 0;
  padding: 8px;
  border-radius: 6px;
  background: var(--surface);
  font-size: 13px;
}

.workflow-db-row dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.workflow-db-row dl div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.workflow-db-row dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.workflow-db-row dd {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.workflow-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 16px 38px rgba(29, 41, 57, 0.22);
  font-weight: 800;
}

.workflow-toast.error {
  background: #b44338;
}

@media (max-width: 820px) {
  .map-controls {
    right: 16px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .searchbar {
    grid-template-columns: 1fr;
  }

  .visit-filter-menu {
    right: auto;
    left: 0;
    width: min(100%, 232px);
  }

  .ranking-panel {
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto;
    width: auto;
    max-height: 42vh;
  }

  .map-stage.detail-open .ranking-panel {
    bottom: calc(clamp(180px, 25dvh, 240px) + 24px);
    max-height: 30dvh;
  }

  .map-stage.detail-expanded .ranking-panel {
    display: none;
  }

  .detail-panel {
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: block;
    width: auto;
    height: clamp(180px, 25dvh, 240px);
    min-height: 0;
    padding: 16px;
    overflow: auto;
  }

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

  .detail-summary,
  .detail-review-entry,
  .reviews {
    overflow: visible;
  }

  .detail-review-entry,
  .reviews {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 18px;
    padding-left: 0;
  }

  .restaurant-photo-card {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 18px;
    padding-left: 0;
    overflow: visible;
  }

  .detail-panel.detail-expanded {
    top: clamp(260px, 38dvh, 320px);
    bottom: 12px;
    display: block;
    height: auto;
    overflow: auto;
  }

  .detail-panel.detail-expanded .detail-summary {
    display: block;
  }

  .detail-panel.detail-expanded .detail-address {
    margin: 8px 0 14px;
  }

  .detail-panel.detail-expanded .detail-stats {
    margin-bottom: 16px;
  }

  .detail-panel.detail-expanded .naver-map-link {
    margin-bottom: 0;
  }

  .detail-panel.detail-expanded .visit-history {
    margin-top: 18px;
    overflow: visible;
  }

  .detail-panel.detail-expanded .ai-summary-card {
    margin-bottom: 18px;
  }

  .detail-panel.detail-expanded .restaurant-photo-card {
    margin-bottom: 18px;
    padding-top: 14px;
  }

  .restaurant-photo-grid {
    grid-template-columns: repeat(4, minmax(72px, 1fr));
    min-height: 100px;
    margin-top: 8px;
    overflow-x: auto;
  }

  .detail-panel.detail-expanded .restaurant-photo-grid {
    min-height: 208px;
    overflow-x: visible;
  }

  .detail-panel.detail-expanded .restaurant-photo-grid[data-image-count="1"] {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-panel.detail-expanded .restaurant-photo-grid[data-image-count="2"],
  .detail-panel.detail-expanded .restaurant-photo-grid[data-image-count="3"],
  .detail-panel.detail-expanded .restaurant-photo-grid[data-image-count="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .restaurant-photo-item,
  .restaurant-photo-link,
  .restaurant-photo-image {
    min-height: 100px;
  }

  .restaurant-photo-meta {
    display: flex;
  }

  .ai-summary-head,
  .ai-summary-meta {
    align-items: flex-start;
  }

  .ai-summary-meta time {
    margin-left: 0;
  }

  .visit-table-scroll {
    overflow-x: auto;
  }

  .visit-table {
    min-width: 650px;
  }

  .detail-panel.detail-expanded .detail-review-entry,
  .detail-panel.detail-expanded .reviews {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 18px;
    padding-left: 0;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    align-items: stretch;
    flex-direction: column;
    padding-bottom: 10px;
  }

  .dashboard-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .dashboard-nav a {
    min-width: 0;
    min-height: 40px;
    padding: 0 8px;
  }

  .dashboard-overview,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-overview {
    padding: 20px;
  }

  .verification-donut-block {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .verification-donut {
    width: 132px;
  }

  .dashboard-panel {
    min-height: 0;
  }

  .dashboard-filter-row {
    grid-template-columns: 1fr;
  }

  .dashboard-bar-row {
    grid-template-columns: minmax(0, 1fr) 66px;
  }

  .dashboard-metric-tracks {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .dashboard-bar-value {
    grid-column: 2;
    grid-row: 1;
  }

  .collection-operation-actions {
    justify-content: flex-start;
  }

  .source-groups,
  .verification-status {
    grid-template-columns: 1fr;
  }

  .batch-status,
  .batch-status ul,
  .live-collect-controls,
  .ops-log-controls {
    grid-template-columns: 1fr;
  }

  .candidate-db-row {
    grid-template-columns: 1fr;
  }

  .candidate-db-row label,
  .candidate-db-row label.wide,
  .candidate-db-meta,
  .candidate-db-row .cell-id,
  .candidate-db-row .cell-status,
  .candidate-db-row .cell-category,
  .candidate-db-row .cell-address,
  .candidate-db-row .cell-reason,
  .candidate-db-row .cell-note,
  .candidate-db-row .cell-action {
    grid-column: 1 / -1;
  }

  .candidate-db-meta {
    grid-template-columns: 1fr;
  }

  .candidate-search {
    grid-template-columns: 1fr;
  }

  .collection-progress-row {
    grid-template-columns: 1fr 56px;
  }

  .collection-progress-label {
    grid-column: 1 / -1;
  }

  .collection-progress-section .section-head,
  .collection-progress-controls {
    align-items: stretch;
  }

  .collection-progress-section .section-head {
    display: grid;
  }

  .collection-progress-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .document-page-head,
  .document-detail-head,
  .document-row-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .document-filter-grid,
  .document-row-filters {
    grid-template-columns: 1fr;
  }

  .document-summary,
  .document-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-detail-summary div:nth-child(5n) {
    border-right: 1px solid var(--line);
  }

  .document-detail-summary div:nth-child(2n) {
    border-right: 0;
  }

  .document-detail-summary div.wide {
    grid-column: 1 / -1;
  }

  .document-bulk-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-head,
  .workflow-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-steps,
  .workflow-scope-controls,
  .workflow-controls,
  .workflow-status-strip,
  .workflow-main-grid,
  .workflow-verification-layout,
  .workflow-db-row dl {
    grid-template-columns: 1fr;
  }

  .workflow-steps li::after {
    top: auto;
    right: auto;
    bottom: -9px;
    left: 24px;
    width: 2px;
    height: 9px;
  }

  .workflow-status-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workflow-status-strip div:last-child {
    border-bottom: 0;
  }

  .workflow-panel-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-panel-tools input {
    min-width: 0;
  }

  .workflow-log-panel {
    position: static;
    grid-column: auto;
    grid-row: auto;
    min-height: 240px;
    max-height: 420px;
  }

  .workflow-status-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .workflow-db-row-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
