:root {
  --ink: #111827;
  --muted: #526070;
  --line: #d8e0e8;
  --soft: #f4f8fb;
  --mint: #e5fbfb;
  --teal: #00838b;
  --pink: #cf3f7a;
  --pink-dark: #aa2b61;
  --card: #ffffff;
  --newhalf: #007f8c;
  --josou: #c73d7a;
  --otokonoko: #5b62c8;
  --woman: #8a5c00;
  --man: #27704a;
  --newhalf-bg: #e4fbfb;
  --josou-bg: #fff1f7;
  --otokonoko-bg: #f0f2ff;
  --woman-bg: #fff7df;
  --man-bg: #eaf8ef;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #eef4f8;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.68;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 16px;
  background: rgba(255,255,255,.96);
  border-bottom: 4px solid var(--teal);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  white-space: nowrap;
  min-width: 0;
}
.brand strong { white-space: nowrap; }
.brand span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--pink));
  font-size: 17px;
}
.top-nav { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.top-nav a, .button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #b8c7d6;
  border-radius: 7px;
  background: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
  word-break: keep-all;
}
.top-nav .post-link, .button.primary, button {
  border-color: var(--pink);
  background: var(--pink);
  color: #fff;
}
button:hover, .button.primary:hover, .top-nav .post-link:hover { background: var(--pink-dark); }

.top-nav .language-switch {
  width: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 21px;
  line-height: 1;
}
.top-nav .language-switch:hover { background: var(--soft); }
.required-mark { color: var(--pink); font-weight: 900; }

.page {
  max-width: 980px;
  margin: 0 auto;
  background: var(--soft);
  min-height: 70vh;
  padding: 22px 16px 42px;
}
.hero, .panel, .content-page {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 22px;
  margin-bottom: 18px;
}
.hero {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  align-items: start;
}
.eyebrow {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--mint);
  color: #005d66;
  font-size: 14px;
  font-weight: 800;
}
h1, h2, h3 { line-height: 1.25; margin: 0 0 10px; }
h1 { font-size: clamp(30px, 5vw, 52px); }
h2 { font-size: 24px; }
p { margin: 0 0 12px; }
.lead { color: #263849; font-size: 18px; }
.chips, .link-grid, .pager, .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}
.breadcrumbs a:hover { text-decoration: underline; }
.chip, .link-card {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #c7d5e4;
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
  font-weight: 800;
}
.chip.hot { color: #b01855; border-color: #f2a5c4; background: #fff6fa; }
.link-card {
  border-radius: 7px;
  min-width: 170px;
  justify-content: space-between;
}

.search-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.search-box label { color: #39485a; font-weight: 800; font-size: 14px; }
.search-box input, .search-box select, textarea {
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
  border: 1px solid #b9c7d6;
  border-radius: 7px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.search-box .wide { grid-column: 1 / -1; }
.search-box .check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-box .check input { width: auto; min-height: auto; }

.listing-list { display: grid; gap: 12px; }
.listing-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px;
}
.listing-card > * {
  min-width: 0;
}
.card-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  align-content: start;
}
.card-photos .thumb:only-child { grid-column: 1 / -1; }
.thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  background: var(--mint);
  border-radius: 7px;
  overflow: hidden;
  text-decoration: none;
  min-height: auto;
  padding: 0;
  border: 0;
  color: var(--teal);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb span {
  font-size: 32px;
  font-weight: 900;
  color: var(--teal);
}
.thumb.fallback { min-height: 150px; }
.thumb.fallback.newhalf { background: var(--newhalf-bg); color: var(--newhalf); }
.thumb.fallback.josou { background: var(--josou-bg); color: var(--josou); }
.thumb.fallback.otokonoko { background: var(--otokonoko-bg); color: var(--otokonoko); }
.thumb.fallback.woman { background: var(--woman-bg); color: var(--woman); }
.thumb.fallback.man { background: var(--man-bg); color: var(--man); }
.thumb.fallback.newhalf span { color: var(--newhalf); }
.thumb.fallback.josou span { color: var(--josou); }
.thumb.fallback.otokonoko span { color: var(--otokonoko); }
.thumb.fallback.woman span { color: var(--woman); }
.thumb.fallback.man span { color: var(--man); }
.listing-card h2 {
  max-width: 100%;
  font-size: 20px;
  margin-bottom: 5px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.listing-card h2 a {
  color: #071527;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(207,63,122,.55);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.listing-card p,
.poster-name,
.listing-meta span,
.listing-foot span {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.listing-meta, .listing-foot {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.listing-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.category-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.category-dot.newhalf { background: var(--newhalf); }
.category-dot.josou { background: var(--josou); }
.category-dot.otokonoko { background: var(--otokonoko); }
.category-dot.woman { background: var(--woman); }
.category-dot.man { background: var(--man); }
.category-text { font-weight: 900; }
.category-text.newhalf { color: var(--newhalf); }
.category-text.josou { color: var(--josou); }
.category-text.otokonoko { color: var(--otokonoko); }
.category-text.woman { color: var(--woman); }
.category-text.man { color: var(--man); }
.listing-foot {
  display: block;
  margin-top: 7px;
}
.listing-foot time {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.card-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  gap: 8px;
  margin-top: 2px;
}
.card-actions-main {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  min-width: 0;
  gap: 8px;
  margin-left: auto;
}
.card-action-link {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid rgba(207, 63, 122, .22);
  border-radius: 999px;
  background: #fff2f7;
  color: var(--pink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.card-action-link:hover,
.card-action-link:focus-visible {
  border-color: var(--pink);
  background: #ffe8f1;
  color: var(--pink-dark);
}
.card-action-link:focus-visible {
  outline: 3px solid rgba(207, 63, 122, .20);
  outline-offset: 2px;
}
.card-report-link {
  margin-right: auto;
}
.card-mail-link {
  border-color: var(--pink);
  background: var(--pink);
  color: #fff;
}
.card-mail-link:hover,
.card-mail-link:focus-visible {
  border-color: var(--pink-dark);
  background: var(--pink-dark);
  color: #fff;
}
.poster-name { color: var(--muted); font-size: 14px; font-weight: 800; margin-bottom: 4px; }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
}
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.photos img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 7px; }
.detail-photos {
  max-width: 310px;
  margin: 12px 0 18px;
}
.photo-button-plain {
  display: block;
  width: 100%;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}
.meta-table { width: 100%; border-collapse: collapse; }
.meta-table th, .meta-table td { border-bottom: 1px solid var(--line); padding: 9px 0; text-align: left; vertical-align: top; }
.meta-table th { color: var(--muted); width: 100px; }
.detail-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  gap: 12px;
  margin-top: 18px;
}
.detail-actions .button {
  flex: 0 0 auto;
}
.detail-actions .detail-report-button {
  margin-right: auto;
}
.detail-actions .detail-email-button {
  margin-left: auto;
}
.poster-ip {
  margin-top: 16px;
  color: #7a8795;
  font-size: 12px;
}
.poster-ip-footer {
  margin: 0 0 14px;
  text-align: right;
  color: #8a96a3;
  font-size: 11px;
}

.form-stack { display: grid; gap: 12px; max-width: 720px; }
.form-stack label { font-weight: 800; }
.form-stack input, .form-stack select, .form-stack textarea {
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
  padding: 9px 11px;
  border: 1px solid #b9c7d6;
  border-radius: 7px;
  font: inherit;
}
.form-stack textarea { min-height: 150px; resize: vertical; }
.form-label { font-weight: 800; margin-bottom: 6px; }
.photo-picker { display: grid; gap: 8px; }
.photo-row {
  display: grid;
  grid-template-columns: minmax(0, 210px) minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
}
.photo-select {
  display: block;
  min-width: 0;
}
.photo-row input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.photo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #b8c7d6;
  border-radius: 7px;
  background: #fff;
  font-weight: 800;
}
.photo-name { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-clear {
  width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 50%;
  border-color: #e6aec4;
  background: #fff;
  color: var(--pink-dark);
  font-size: 20px;
  line-height: 1;
}
.photo-clear:hover {
  background: #fff6fa;
  color: var(--pink-dark);
}
.photo-clear[hidden] { display: none; }
.agreement {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.agreement input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
}
.captcha-field {
  display: grid;
  gap: 8px;
}
.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.captcha-image {
  width: 100%;
  max-width: 320px;
  height: 82px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.captcha-refresh {
  min-height: 38px;
  padding: 7px 11px;
  border-color: #b8c7d6;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.captcha-modal[hidden] { display: none !important; }
.captcha-modal {
  position: fixed !important;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(7, 14, 24, .68);
}
.captcha-modal-panel {
  width: min(100%, 420px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(0,0,0,.35);
}
.captcha-field label {
  display: grid;
  gap: 4px;
  font-weight: 800;
}
.captcha-field input {
  width: 100%;
  min-height: 46px;
  padding: 9px 11px;
  border: 1px solid #b9c7d6;
  border-radius: 7px;
  font: inherit;
}
.captcha-modal .actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}
.captcha-modal .actions .button,
.captcha-modal .actions button {
  width: 100%;
  border-color: var(--pink);
  background: var(--pink);
  color: #fff;
}
.hint { color: var(--muted); font-size: 14px; }
.flash { margin-bottom: 16px; padding: 11px 13px; border: 1px solid #9ed2bd; background: #e9fff3; font-weight: 800; }
.warning { border-color: #f0bfd2; background: #fff6fa; }
.table-wrap { overflow-x: auto; }
table.admin-table { width: 100%; min-width: 760px; border-collapse: collapse; background: #fff; }
.admin-table th, .admin-table td { padding: 9px; border-bottom: 1px solid var(--line); text-align: left; }
.my-listings { display: grid; gap: 12px; }
.my-listing-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.my-listing-card h3 { margin: 0; font-size: 19px; }
.my-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.my-actions .button, .my-actions button {
  width: 100%;
  min-height: 38px;
  padding: 7px 8px;
  font-size: 14px;
}
.pager.arrows { align-items: center; justify-content: center; margin-top: 16px; }
.pager-arrow.disabled {
  color: #8390a0;
  background: #eef3f7;
  cursor: default;
}
.pager-current {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--muted);
  font-weight: 800;
}

.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 14, 24, .86);
}
.lightbox img {
  max-width: min(94vw, 980px);
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.lightbox-close {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.13);
  color: #fff;
  font-size: 28px;
}
.modal-open { overflow: hidden; }

.age-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(7, 14, 24, .78);
}
.age-gate-overlay.is-active { display: flex; }
.age-gate-card {
  width: min(420px, 94vw);
  padding: 22px 18px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 22px 70px rgba(0,0,0,.34);
  text-align: center;
}
.age-gate-card h2 {
  margin: 0 0 10px;
  font-size: 21px;
}
.age-gate-card p {
  margin: 0 0 16px;
  color: #324255;
  font-size: 15px;
}
.age-gate-actions {
  display: grid;
  gap: 10px;
}
.age-gate-button {
  width: 100%;
}
.age-gate-button.secondary {
  border-color: #c9d4df;
  background: #fff;
  color: var(--ink);
}
.age-gate-button.secondary:hover {
  background: #f5f8fb;
  color: var(--ink);
}
body.age-gate-locked { overflow: hidden; }

.site-footer {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 16px 36px;
  background: #182533;
  color: #dbe8f4;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
.site-footer a { color: #fff; }

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.admin-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}
.admin-tabs a.active {
  border-color: var(--teal);
  background: #e8fbfb;
  color: var(--teal);
}
.admin-stack {
  display: grid;
  gap: 14px;
}
.admin-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
}
.admin-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.admin-card header span,
.admin-meta dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.admin-meta {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}
.admin-meta div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
}
.admin-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.admin-actions form {
  margin: 0;
}
.admin-actions .button,
.admin-actions button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 14px;
}
.admin-inline-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}
.copy-box {
  margin-top: 12px;
}
.copy-box summary {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}
.copy-box textarea {
  width: 100%;
  min-height: 190px;
  margin-top: 10px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}
.copy-button {
  margin-top: 8px;
}

@media (max-width: 760px) {
  .site-header { padding: 10px 8px; gap: 5px; }
  .brand { flex: 1 1 auto; gap: 6px; font-size: 15px; }
  .brand span { width: 34px; height: 34px; font-size: 15px; }
  .top-nav { gap: 3px; }
  .top-nav a { min-height: 38px; padding: 6px 7px; font-size: 13px; }
  .top-nav .language-switch { width: 38px; min-width: 38px; padding: 0; font-size: 19px; }
  .page { padding: 14px 10px 34px; }
  .hero, .detail-grid { grid-template-columns: 1fr; }
  .hero, .panel, .content-page { padding: 16px; }
  .search-box { grid-template-columns: 1fr; }
  .listing-card { grid-template-columns: 112px minmax(0, 1fr); gap: 10px; }
  .listing-card h2 { font-size: 18px; }
  .thumb.fallback { min-height: 112px; }
  .my-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-inline-form { grid-template-columns: 1fr; }
  .admin-card header { display: grid; }
  .admin-actions .button, .admin-actions button { width: 100%; }
  .admin-actions form { flex: 1 1 140px; }
}

@media (max-width: 420px) {
  .site-header { gap: 4px; padding-left: 7px; padding-right: 7px; }
  .brand { font-size: 14px; gap: 5px; }
  .brand span { width: 29px; height: 29px; font-size: 13px; border-radius: 7px; }
  .top-nav a { min-height: 36px; padding: 5px 6px; font-size: 12px; }
  .top-nav .language-switch { width: 36px; min-width: 36px; padding: 0; font-size: 18px; }
  h1 { font-size: clamp(22px, 7vw, 28px); }
  .chips { gap: 8px; }
  .chip { min-height: 36px; padding: 7px 10px; font-size: 14px; }
  .listing-card { grid-template-columns: 102px minmax(0, 1fr); }
  .thumb.fallback { min-height: 102px; }
  .card-actions,
  .card-actions-main { gap: 6px; }
  .card-action-link {
    min-height: 36px;
    padding: 6px 9px;
    font-size: 13px;
  }
  .photo-row { grid-template-columns: 1fr 34px; gap: 5px 8px; }
  .photo-select { grid-column: 1 / -1; }
  .photo-name { grid-column: 1; align-self: center; }
  .photo-clear { grid-column: 2; grid-row: 2; justify-self: end; align-self: center; }
  .captcha-row { grid-template-columns: 1fr; }
  .captcha-refresh { justify-self: start; }
}

@media (max-width: 360px) {
  .listing-card {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }
  .thumb.fallback { min-height: 90px; }
  .card-actions,
  .card-actions-main { gap: 4px; }
  .card-action-link {
    min-height: 34px;
    padding: 5px 7px;
    font-size: 12px;
  }
}

html[lang="en"] .card-action-link {
  padding-left: 9px;
  padding-right: 9px;
  font-size: 13px;
}

@media (max-width: 360px) {
  html[lang="en"] .card-action-link {
    padding-left: 6px;
    padding-right: 6px;
    font-size: 11px;
  }
}

/* English interface adjustments. Japanese pages keep the existing layout. */
html[lang="en"] .brand { font-size: 18px; }
html[lang="en"] .brand strong { letter-spacing: -.2px; }

@media (max-width: 760px) {
  html[lang="en"] .brand { font-size: 14px; }
}

@media (max-width: 420px) {
  html[lang="en"] .brand { font-size: 12px; }
  html[lang="en"] .top-nav a { padding-left: 5px; padding-right: 5px; }
}


/* Keep the expanded logged-out navigation usable on narrow screens. */
@media (max-width: 560px) {
  .site-header { flex-wrap: wrap; }
  .brand { flex: 1 1 100%; }
  .top-nav {
    width: 100%;
    justify-content: space-between;
  }
}

/* Account and password controls */
.password-field-label { display: grid; gap: 4px; }
.password-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
  margin-top: 4px;
}
.form-stack .password-control input {
  min-width: 0;
  margin-top: 0;
}
.password-toggle {
  min-width: 74px;
  min-height: 46px;
  padding: 8px 12px;
  border-color: #b8c7d6;
  background: #fff;
  color: var(--ink);
}
.password-toggle:hover {
  border-color: var(--teal);
  background: var(--mint);
  color: var(--ink);
}
.account-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 2px;
}

@media (max-width: 520px) {
  .password-control {
    grid-template-columns: minmax(0, 1fr) 68px;
    gap: 6px;
  }
  .password-toggle {
    min-width: 68px;
    padding-inline: 8px;
    font-size: 13px;
  }
}

/* Stateful mobile forms and client-side photo preparation. */
.form-stack button[disabled],
.form-stack input[type="submit"][disabled] {
  opacity: .65;
  cursor: wait;
}

[data-photo-upload-error]:not(.warning) {
  background: #eef8fb;
  border-color: #9fcbd5;
  color: #1e5662;
}

/* Mobile hamburger navigation (2026-07-14)
   Desktop navigation is unchanged. Phones show the full brand plus one compact
   native <details> menu, which works without JavaScript. */
.mobile-menu,
.mobile-language-switch { display: none; }

@media (max-width: 760px) {
  .site-header {
    position: sticky;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
  }

  .desktop-nav { display: none; }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
    font-size: 17px;
  }

  .brand span {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .brand strong {
    display: block;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }


  .mobile-language-switch {
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #b8c7d6;
    border-radius: 9px;
    background: #fff;
    font-size: 21px;
    line-height: 1;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-language-switch:hover,
  .mobile-language-switch:focus-visible { background: var(--soft); }

  .mobile-language-switch:focus-visible {
    outline: 3px solid rgba(0, 131, 139, .25);
    outline-offset: 2px;
  }

  .mobile-menu {
    position: relative;
    display: block;
    flex: 0 0 auto;
  }

  .mobile-menu-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #b8c7d6;
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
    list-style: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-menu-toggle::-webkit-details-marker { display: none; }
  .mobile-menu-toggle::marker { display: none; content: ''; }
  .mobile-menu-toggle:hover,
  .mobile-menu-toggle:focus-visible { background: var(--soft); }
  .mobile-menu-toggle:focus-visible {
    outline: 3px solid rgba(0, 131, 139, .25);
    outline-offset: 2px;
  }

  .mobile-menu-icon {
    display: grid;
    gap: 4px;
    width: 21px;
  }

  .mobile-menu-icon i {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
    transition: transform .18s ease, opacity .18s ease;
  }

  .mobile-menu[open] .mobile-menu-icon i:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .mobile-menu[open] .mobile-menu-icon i:nth-child(2) { opacity: 0; }
  .mobile-menu[open] .mobile-menu-icon i:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .mobile-menu-panel {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: min(300px, calc(100vw - 24px));
    padding: 12px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--teal);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(17, 24, 39, .18);
  }

  .mobile-menu-panel a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid #c7d2dd;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
  }

  .mobile-menu-panel a:hover,
  .mobile-menu-panel a:focus-visible { background: var(--soft); }

  .mobile-menu-panel .post-link {
    border-color: var(--pink);
    background: var(--pink);
    color: #fff;
  }
  .mobile-menu-panel .post-link:hover,
  .mobile-menu-panel .post-link:focus-visible { background: var(--pink-dark); }
}

@media (max-width: 420px) {
  .site-header { gap: 7px; padding-left: 8px; padding-right: 8px; }
  .brand { gap: 7px; font-size: 16px; }
  .mobile-language-switch,
  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
  }
  .mobile-language-switch { flex-basis: 40px; font-size: 19px; }
  .brand span {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }
  html[lang="en"] .brand { font-size: 15px; }
}

/* Advertising banner marquee and admin management */
body { overflow-x: hidden; }
.ad-banner-slot {
  position: relative;
  left: 50%;
  width: 100vw;
  max-width: none;
  height: 100px;
  margin: 12px 0;
  transform: translateX(-50%);
  overflow: hidden;
}
.ad-banner-home,
.ad-banner-search-top,
.ad-banner-search-bottom,
.ad-banner-detail { margin-top: -6px; margin-bottom: 12px; }
.ad-banner-results { margin: 0; }
.ad-banner-disclosure {
  position: absolute;
  z-index: 2;
  top: 5px;
  right: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(17, 24, 39, .72);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  pointer-events: none;
}
.ad-banner-marquee {
  position: relative;
  width: 100%;
  height: 100px;
  overflow: hidden;
  background: transparent;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.ad-banner-marquee.is-dragging { cursor: grabbing; }
.ad-banner-track {
  display: flex;
  width: max-content;
  height: 100px;
  will-change: transform;
}
.ad-banner-item {
  display: block;
  flex: 0 0 320px;
  width: 320px;
  height: 100px;
  overflow: hidden;
  background: #e8f2f6;
}
.ad-banner-item img {
  display: block;
  width: 320px;
  height: 100px;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
}

.ad-banner-admin-panel { max-width: none; }
.admin-heading.ad-banner-admin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.ad-banner-admin-heading h2 { margin: 0; }
.ad-banner-admin-heading p:not(.ad-banner-kicker) { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.ad-banner-kicker {
  margin: 0;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ad-banner-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}
.ad-banner-admin-list { display: grid; gap: 13px; }
.ad-banner-admin-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 15px;
  padding: 14px;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.ad-banner-admin-row.has-error { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(207, 63, 122, .12); }
.ad-banner-admin-row[hidden] { display: none !important; }
.ad-banner-admin-media { display: grid; gap: 8px; align-content: start; }
.ad-banner-admin-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 5;
  overflow: hidden;
  color: #718093;
  background: repeating-conic-gradient(#e9f0f5 0 25%, #fff 0 50%) 0 / 18px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}
.ad-banner-admin-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ad-banner-admin-thumb img[hidden] { display: none; }
.ad-banner-file-button {
  position: relative;
  display: grid;
  min-height: 38px;
  place-items: center;
  overflow: hidden;
  color: var(--teal);
  background: #fff;
  border: 1px dashed #aebdcc;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}
.ad-banner-file-button input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.ad-banner-ratio-note { color: var(--muted); font-size: 11px; line-height: 1.45; }
.ad-banner-ratio-note.is-warning { color: var(--pink-dark); font-weight: 800; }
.ad-banner-admin-fields { display: grid; gap: 10px; min-width: 0; }
.ad-banner-admin-fields > label,
.ad-banner-admin-field-grid > label { display: grid; gap: 5px; color: var(--muted); font-size: 13px; font-weight: 800; }
.ad-banner-admin-fields input[type="text"],
.ad-banner-admin-fields input[type="url"] {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #b9c7d6;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.ad-banner-admin-fields input:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(0, 131, 139, .14);
}
.ad-banner-admin-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ad-banner-admin-row-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ad-banner-admin-row-footer .admin-card-actions { margin-top: 0; }
.ad-banner-admin-toggle { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 800; }
.ad-banner-admin-toggle input { width: 18px; height: 18px; accent-color: var(--teal); }
.ad-banner-admin-save-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 15px; }
.ad-banner-admin-status { min-height: 23px; margin-top: 9px; color: var(--teal); font-size: 13px; font-weight: 800; }
.ad-banner-admin-status.is-error { color: var(--pink-dark); }
.button.ad-banner-secondary,
button.ad-banner-secondary {
  border-color: #b8c7d6;
  background: #fff;
  color: var(--ink);
}
.button.ad-banner-secondary:hover,
button.ad-banner-secondary:hover { background: var(--soft); color: var(--ink); }
.button.ad-banner-danger,
button.ad-banner-danger {
  border-color: #f0b3cc;
  background: #fff;
  color: var(--pink-dark);
}
.button.ad-banner-danger:hover,
button.ad-banner-danger:hover { background: #fff0f6; color: var(--pink-dark); }
.ad-banner-admin-row button:disabled { opacity: .45; cursor: default; }
.ad-banner-admin-preview-panel {
  position: sticky;
  top: 82px;
  padding: 16px;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.ad-banner-admin-preview-panel h3 { margin: 0; font-size: 17px; }
.ad-banner-admin-preview-panel > p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.ad-banner-admin-preview-panel > p strong { color: var(--teal); }
.ad-banner-phone-preview { display: grid; place-items: center; margin-top: 14px; padding: 18px 5px; background: #eaf3f7; border: 1px solid var(--line); border-radius: 12px; }
.ad-banner-phone-frame { width: 350px; max-width: 100%; padding: 11px 8px 17px; background: #fff; border: 6px solid #253444; border-radius: 29px; box-shadow: 0 15px 28px rgba(17, 24, 39, .18); }
.ad-banner-phone-speaker { width: 70px; height: 6px; margin: 0 auto 11px; background: #ccd6df; border-radius: 999px; }
.ad-banner-phone-lines { display: grid; gap: 6px; margin: 8px 2px; }
.ad-banner-phone-lines span { display: block; height: 7px; background: #e9eff4; border-radius: 999px; }
.ad-banner-phone-lines span:nth-child(2) { width: 72%; }
.ad-banner-phone-lines span:nth-child(3) { width: 86%; }
.ad-banner-preview-label { display: flex; justify-content: space-between; margin: 8px 2px 5px; color: var(--muted); font-size: 11px; font-weight: 800; }
.ad-banner-admin-preview { width: 320px; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.ad-banner-preview-placeholder { display: grid; flex: 0 0 320px; width: 320px; height: 100px; place-items: center; color: #718093; background: #edf3f7; font-size: 12px; font-weight: 800; }
.ad-banner-preview-controls { display: grid; gap: 9px; margin-top: 13px; }
.ad-banner-preview-controls label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 800; }
.ad-banner-preview-controls input[type="range"] { width: 100%; accent-color: var(--teal); }
.ad-banner-preview-controls output { color: var(--muted); font-variant-numeric: tabular-nums; }
.ad-banner-admin-help { margin-top: 12px !important; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; line-height: 1.55; }

@media (max-width: 1020px) {
  .ad-banner-admin-layout { grid-template-columns: 1fr; }
  .ad-banner-admin-preview-panel { position: static; }
}
@media (max-width: 680px) {
  .ad-banner-admin-row { grid-template-columns: 1fr; }
  .ad-banner-admin-media { grid-template-columns: minmax(130px, 190px) minmax(120px, 1fr); align-items: center; }
  .ad-banner-ratio-note { grid-column: 1 / -1; }
  .ad-banner-admin-field-grid { grid-template-columns: 1fr; }
  .ad-banner-admin-row-footer { align-items: flex-start; flex-direction: column; }
  .ad-banner-admin-row-footer .admin-card-actions { justify-content: flex-start; }
}
@media (max-width: 390px) {
  .ad-banner-admin-media { grid-template-columns: 1fr; }
  .ad-banner-ratio-note { grid-column: auto; }
  .ad-banner-admin-save-row { flex-direction: column; }
  .ad-banner-admin-save-row .button { width: 100%; }
  .ad-banner-phone-preview { margin-inline: -8px; }
}
@media (prefers-reduced-motion: reduce) {
  .ad-banner-track { will-change: auto; }
}
