/* 반려동물 동반 여행 (/pet/) — design pass matching /lab.css tokens and typography.
 * Loaded after /lab.css and pet/pet.css. Selectors only; no content: text injection. */

:root {
  --ok: #166534;
  --ok-soft: #e7f4ec;
  --on-ok: #ffffff;
  --warn: var(--lab-fb-err, #b42318);
  --warn-soft: #fbe9e7;
  --tag: #7a3b06;
  --tag-soft: #fdf0e7;
  --accent-soft: #fdf0e7;
  --shade: rgba(10, 10, 12, .52);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ok: #4ade80;
    --ok-soft: #13261a;
    --on-ok: #121213;
    --warn: var(--lab-fb-err, #ff8f86);
    --warn-soft: #2c1514;
    --tag: #ffb27f;
    --tag-soft: #2a1a10;
    --accent-soft: #2a1a10;
    --shade: rgba(10, 10, 12, .64);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ok: #4ade80;
  --ok-soft: #13261a;
  --on-ok: #121213;
  --warn: var(--lab-fb-err, #ff8f86);
  --warn-soft: #2c1514;
  --tag: #ffb27f;
  --tag-soft: #2a1a10;
  --accent-soft: #2a1a10;
  --shade: rgba(10, 10, 12, .64);
  color-scheme: dark;
}

/* ---------- base, type & focus ---------- */
html {
  overflow-x: clip;
}

body {
  background: var(--lab-bg);
  color: var(--lab-text);
  font-family: var(--lab-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
  overflow-x: clip;
}

:is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--lab-accent);
  outline-offset: 2px;
}

.p-wrap {
  max-width: 860px;
  min-height: calc(100dvh - 57px);
  margin: 0 auto;
  padding: 20px 16px 84px;
}

.mono {
  font-family: var(--lab-mono);
  font-variant-numeric: tabular-nums;
}

/* ---------- buttons, icon buttons & chips ---------- */
.btn {
  height: auto;
  min-height: 38px;
  max-width: 100%;
  padding: 7px 14px;
  border-radius: var(--lab-radius);
  border: 1px solid var(--lab-line-strong);
  background: var(--lab-surface);
  color: var(--lab-text);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  white-space: normal;
  text-align: center;
  box-shadow: var(--lab-shadow-sm);
  transition: border-color .15s, background-color .15s, color .15s, opacity .15s;
}

.btn:not(.primary):not(.ghost):not(.on):not(:disabled):hover {
  border-color: var(--lab-text);
  background: var(--lab-surface2);
}

.btn:not(:disabled):active {
  opacity: .84;
}

.btn.primary {
  background: var(--lab-ink);
  border-color: var(--lab-ink);
  color: var(--lab-on-ink);
}

.btn.primary:not(:disabled):hover {
  border-color: var(--lab-ink);
  opacity: .88;
}

.btn.sm {
  height: auto;
  min-height: 32px;
  padding: 5px 11px;
  font-size: 13px;
  border-radius: var(--lab-radius);
}

.btn.big {
  height: auto;
  min-height: 46px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 700;
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.btn.ghost:not(:disabled):hover {
  background: var(--lab-surface2);
  border-color: var(--lab-line);
  color: var(--lab-text);
}

.btn.on {
  background: var(--ok-soft);
  border-color: var(--ok);
  color: var(--ok);
  font-weight: 700;
  box-shadow: none;
}

.btn.on:not(:disabled):hover {
  background: color-mix(in srgb, var(--ok) 15%, var(--lab-surface));
  border-color: var(--ok);
  color: var(--ok);
}

.btn.on .ic {
  fill: currentColor;
}

.btn[data-act="near"].on .ic {
  fill: none;
}

.btn:disabled,
.btn:disabled:hover {
  border-color: var(--lab-line-strong);
  opacity: .55;
  cursor: default;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--lab-radius);
  border: 1px solid var(--lab-line);
  background: var(--lab-surface);
  color: var(--lab-text);
  box-shadow: var(--lab-shadow-sm);
  transition: border-color .15s, background-color .15s, color .15s, opacity .15s;
}

.icon-btn:hover {
  border-color: var(--lab-line-strong);
  background: var(--lab-surface2);
}

.icon-btn:active {
  opacity: .84;
}

.icon-btn.ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--lab-muted);
}

.icon-btn.ghost:hover {
  border-color: var(--lab-line);
  background: var(--lab-surface2);
  color: var(--lab-text);
}

.chip {
  height: auto;
  min-height: 34px;
  max-width: 100%;
  padding: 5px 13px;
  border: 1px solid var(--lab-line-strong);
  border-radius: 999px;
  background: var(--lab-surface);
  color: var(--lab-text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  text-align: left;
  box-shadow: var(--lab-shadow-sm);
  transition: border-color .15s, background-color .15s, color .15s, opacity .15s;
}

.chip:not([aria-pressed="true"]):hover {
  border-color: var(--lab-text);
  background: var(--lab-surface2);
}

.chip:active {
  opacity: .84;
}

.chip[aria-pressed="true"] {
  background: var(--lab-ink);
  border-color: var(--lab-ink);
  color: var(--lab-on-ink);
  font-weight: 700;
}

.chip[aria-pressed="true"]:hover {
  border-color: var(--lab-ink);
  opacity: .9;
}

/* ---------- intro & screen tabs ---------- */
.p-intro h1 {
  margin: 2px 0 8px;
  font-size: clamp(1.5rem, 3.2vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.22;
}

.p-intro p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--lab-muted);
  max-width: 60ch;
}

.p-tabs {
  display: inline-flex;
  max-width: 100%;
  gap: 3px;
  margin: 18px 0 0;
  padding: 3px;
  border: 1px solid var(--lab-line);
  border-radius: 10px;
  background: var(--lab-surface2);
}

.p-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: auto;
  min-height: 36px;
  min-width: 0;
  padding: 6px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--lab-muted);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s, background-color .15s, box-shadow .15s;
}

.p-tabs a:not([aria-current="page"]):hover {
  color: var(--lab-text);
}

.p-tabs a[aria-current="page"] {
  background: var(--lab-surface);
  border-color: transparent;
  color: var(--lab-text);
  font-weight: 700;
  box-shadow: var(--lab-shadow-sm);
}

.p-tabs .n {
  font-family: var(--lab-mono);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--lab-muted);
}

.p-tabs a[aria-current="page"] .n {
  color: var(--lab-accent);
  font-weight: 600;
}

/* ---------- search bar & filters ---------- */
.p-search {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--lab-line);
  border-radius: 12px;
  background: var(--lab-surface);
  box-shadow: var(--lab-shadow-sm);
  min-width: 0;
}

.p-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}

.p-q {
  flex: 1 1 240px;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.p-q input,
.p-search select,
.fld input,
.fld select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--lab-line-strong);
  border-radius: var(--lab-radius);
  background: var(--lab-bg);
  color: var(--lab-text);
  font-size: 16px;
  line-height: 1.4;
  transition: border-color .15s, background-color .15s;
}

.p-q input {
  flex: 1 1 0;
  -webkit-appearance: none;
  appearance: none;
}

.p-search select {
  flex: 0 1 156px;
  width: auto;
  cursor: pointer;
}

.p-search select option,
.fld select option {
  background: var(--lab-surface);
  color: var(--lab-text);
}

.p-q input:hover,
.p-search select:hover,
.fld input:hover,
.fld select:hover {
  border-color: var(--lab-muted);
}

.p-q input:focus,
.p-search select:focus,
.fld input:focus,
.fld select:focus {
  outline: 2px solid var(--lab-accent);
  outline-offset: -1px;
  border-color: var(--lab-accent);
}

.p-q input::placeholder,
.fld input::placeholder {
  color: var(--lab-faint);
  opacity: 1;
}

.p-q .btn,
.p-row > .btn {
  height: auto;
  min-height: 44px;
  flex: none;
}

.p-q .btn {
  white-space: nowrap;
}

.p-lbl {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lab-muted);
  margin: 2px 0 -6px;
}

.p-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow-x: visible;
  padding-bottom: 0;
  min-width: 0;
}

/* ---------- results header, notes & empty/sync states ---------- */
.p-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 22px 0 12px;
  min-width: 0;
}

.p-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.35;
  color: var(--lab-text);
  min-width: 0;
  overflow-wrap: anywhere;
}

.p-head small {
  font-family: var(--lab-mono);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--lab-muted);
  margin-left: 4px;
}

.p-head [data-act="view"] {
  flex: none;
}

.p-head [data-act="view"] .ic {
  color: var(--lab-accent);
}

.p-note {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--lab-muted);
}

.p-box {
  padding: 32px 20px;
  border: 1px dashed var(--lab-line-strong);
  border-radius: 12px;
  background: var(--lab-surface);
  box-shadow: var(--lab-shadow-sm);
  color: var(--lab-muted);
  text-align: center;
}

.p-box h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--lab-text);
}

.p-box p {
  margin: 0 auto;
  max-width: 50ch;
  font-size: 14px;
  line-height: 1.6;
}

.p-bar {
  height: 6px;
  margin: 16px auto 0;
  max-width: 300px;
  border-radius: 999px;
  background: var(--lab-surface2);
  overflow: hidden;
}

.p-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--lab-accent);
  transition: width .4s ease;
}

/* ---------- result cards & tags ---------- */
.p-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: 12px;
}

.p-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  border: 1px solid var(--lab-line);
  border-radius: 12px;
  background: var(--lab-surface);
  box-shadow: var(--lab-shadow-sm);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}

.p-card:hover {
  border-color: var(--lab-line-strong);
  box-shadow: 0 3px 12px rgba(20, 20, 18, .06);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .p-card:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, .3);
  }
}

:root[data-theme="dark"] .p-card:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, .3);
}

.p-card > a {
  flex: 1;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  color: var(--lab-text);
  text-decoration: none;
}

.p-card > a:focus-visible {
  outline: 2px solid var(--lab-accent);
  outline-offset: -2px;
  border-radius: 11px;
}

.p-img {
  aspect-ratio: 16 / 10;
  background: var(--lab-surface2);
  border-bottom: 1px solid var(--lab-line);
  display: grid;
  place-items: center;
  color: var(--lab-faint);
  overflow: hidden;
}

.p-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.p-img .ic {
  width: 32px;
  height: 32px;
  opacity: .75;
}

.p-img.none {
  aspect-ratio: 16 / 5;
}

.p-body {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  min-height: 108px;
  padding: 12px 14px 14px;
}

.p-body b {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.35;
  padding-right: 0;
  overflow-wrap: anywhere;
}

.p-card > a:hover .p-body b {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--lab-line-strong);
}

.p-meta {
  font-size: 13px;
  line-height: 1.45;
  color: var(--lab-muted);
  padding-right: 42px;
  overflow-wrap: anywhere;
}

.p-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.p-tags:empty {
  display: none;
}

.p-card .p-tags {
  padding-right: 42px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: auto;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--tag) 26%, var(--lab-line));
  border-radius: 999px;
  background: var(--tag-soft);
  color: var(--tag);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
}

.tag.k {
  background: var(--lab-surface2);
  border-color: var(--lab-line);
  color: var(--lab-muted);
  font-weight: 600;
}

.p-save {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  color: var(--lab-muted);
}

.p-save:hover {
  border-color: var(--lab-line-strong);
  background: var(--lab-surface2);
  color: var(--lab-text);
}

.p-save[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--lab-accent) 55%, var(--lab-line-strong));
  color: var(--lab-accent);
}

.p-save[aria-pressed="true"]:hover {
  background: var(--accent-soft);
  border-color: var(--lab-accent);
  color: var(--lab-accent);
}

.p-save[aria-pressed="true"] .ic {
  fill: currentColor;
}

.p-more {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.p-more .btn {
  min-width: 148px;
}

/* ---------- maps, pins & popups ---------- */
.p-map {
  height: 420px;
  border: 1px solid var(--lab-line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--lab-surface2);
  box-shadow: var(--lab-shadow-sm);
  margin-bottom: 14px;
}

.p-map.sm {
  height: 220px;
  margin: 18px 0 0;
}

.kpin {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 999px;
  background: #b83b0a;
  color: #ffffff;
  font-family: var(--lab-mono);
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  cursor: pointer;
}

.kpin.me {
  min-width: 16px;
  width: 16px;
  height: 16px;
  padding: 0;
  background: #1d4ed8;
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, .22), 0 2px 6px rgba(0, 0, 0, .3);
  cursor: default;
}

.kpop {
  max-width: 220px;
  padding: 9px 11px;
  border: 1px solid var(--lab-line-strong);
  border-radius: var(--lab-radius);
  background: var(--lab-surface);
  color: var(--lab-text);
  font: 600 13px/1.38 var(--lab-sans);
  box-shadow: var(--lab-shadow-lg);
  transform: translateY(-38px);
  text-decoration: none;
  display: block;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  transition: border-color .15s;
}

.kpop:hover {
  border-color: var(--lab-accent);
}

.kpop small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--lab-muted);
}

/* ---------- place detail (#/p/<id>) ---------- */
.p-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -4px 0 10px;
}

.p-top .btn {
  color: var(--lab-muted);
  min-height: 34px;
  padding: 5px 10px 5px 6px;
  margin-left: -6px;
  font-size: 13.5px;
}

.p-top .btn:not(:disabled):hover {
  color: var(--lab-text);
  background: var(--lab-surface2);
  border-color: transparent;
}

.p-hero {
  border: 1px solid var(--lab-line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--lab-surface2);
  box-shadow: var(--lab-shadow-sm);
  aspect-ratio: 16 / 9;
  max-height: 380px;
  width: 100%;
}

.p-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.p-thumbs {
  display: flex;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  margin-top: 8px;
  padding: 2px 2px 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--lab-line-strong) transparent;
}

.p-thumbs button {
  flex: none;
  scroll-snap-align: start;
  width: 72px;
  height: 52px;
  padding: 0;
  border: 2px solid var(--lab-line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--lab-surface2);
  transition: border-color .15s, opacity .15s;
}

.p-thumbs button:not([aria-current="true"]):hover {
  border-color: var(--lab-line-strong);
}

.p-thumbs button[aria-current="true"] {
  border-color: var(--lab-accent);
  box-shadow: 0 0 0 1px var(--lab-accent);
}

.p-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.p-h1 {
  margin: 18px 0 6px;
  font-size: clamp(1.32rem, 3vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.p-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
  color: var(--lab-muted);
  font-size: 14px;
  line-height: 1.48;
}

.p-sub span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.p-sub span:first-child {
  color: var(--lab-text);
  font-weight: 600;
}

.p-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.p-sec {
  margin-top: 26px;
}

.p-sec h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lab-text);
}

.p-sec h2 .ic {
  width: 18px;
  height: 18px;
  color: var(--lab-accent);
}

.p-kv {
  display: grid;
  grid-template-columns: minmax(112px, 176px) minmax(0, 1fr);
  margin: 0;
  border: 1px solid var(--lab-line);
  border-radius: 12px;
  background: var(--lab-surface);
  box-shadow: var(--lab-shadow-sm);
  overflow: hidden;
}

.p-kv dt,
.p-kv dd {
  margin: 0;
  padding: 11px 14px;
  border-top: 1px solid var(--lab-line);
  font-size: 14.5px;
  line-height: 1.5;
  min-width: 0;
  overflow-wrap: anywhere;
}

.p-kv dt {
  color: var(--lab-muted);
  font-weight: 600;
  font-size: 13.5px;
  background: var(--lab-surface2);
}

.p-kv dd {
  white-space: pre-line;
  color: var(--lab-text);
}

.p-kv dt:first-of-type,
.p-kv dt:first-of-type + dd {
  border-top: 0;
}

.p-pet {
  border-color: color-mix(in srgb, var(--lab-accent) 55%, var(--lab-line-strong));
}

.p-pet dt {
  background: var(--accent-soft);
  color: var(--lab-text);
}

.p-over {
  margin: 0;
  white-space: pre-line;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--lab-text);
  overflow-wrap: anywhere;
}

.p-over.cut {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.p-credit {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--lab-line);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--lab-muted);
}

.p-credit a {
  color: inherit;
  text-underline-offset: 3px;
}

/* ---------- saved list & packing checklist (#/saved) ---------- */
.p-saved {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--lab-line);
  border-radius: 12px;
  background: var(--lab-surface);
  box-shadow: var(--lab-shadow-sm);
  overflow: hidden;
}

.p-saved li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 10px 10px 14px;
  border-top: 1px solid var(--lab-line);
  transition: background-color .15s;
}

.p-saved li:first-child {
  border-top: 0;
}

.p-saved li:hover {
  background: var(--lab-surface2);
}

.p-saved a {
  flex: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 2px 0;
  border-radius: 6px;
  color: var(--lab-text);
  text-decoration: none;
}

.p-saved a:focus-visible {
  outline: 2px solid var(--lab-accent);
  outline-offset: -2px;
}

.p-saved a b {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.p-saved a:hover b {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.p-saved small {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--lab-muted);
  overflow-wrap: anywhere;
}

.p-saved .n {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--lab-line);
  background: var(--lab-surface2);
  color: var(--lab-text);
  font-family: var(--lab-mono);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.p-saved .icon-btn.ghost:hover {
  background: var(--lab-surface);
  border-color: var(--lab-line-strong);
}

.p-saved [data-del]:hover {
  background: var(--warn-soft);
  border-color: color-mix(in srgb, var(--warn) 38%, var(--lab-line));
  color: var(--warn);
}

.p-check {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 8px;
}

.p-check li {
  min-width: 0;
}

.p-check label {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  height: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--lab-line);
  border-radius: 10px;
  background: var(--lab-surface);
  box-shadow: var(--lab-shadow-sm);
  cursor: pointer;
  font-size: 14.5px;
  line-height: 1.42;
  transition: border-color .15s, background-color .15s;
}

.p-check label:hover {
  border-color: var(--lab-line-strong);
}

.p-check label > span:last-child {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

.p-check input {
  position: absolute;
  opacity: 0;
  width: 22px;
  height: 22px;
  margin: 0;
}

.box {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1.8px solid var(--lab-line-strong);
  border-radius: 6px;
  color: transparent;
  background: var(--lab-surface);
  transition: border-color .15s, background-color .15s, color .15s;
}

.box .ic {
  width: 14px;
  height: 14px;
}

.p-check label:hover input:not(:checked) + .box {
  border-color: var(--ok);
  background: var(--ok-soft);
  color: var(--ok);
}

.p-check label:has(input:checked) {
  background: var(--ok-soft);
  border-color: color-mix(in srgb, var(--ok) 28%, var(--lab-line));
  box-shadow: none;
}

.p-check input:checked + .box {
  background: var(--ok);
  border-color: var(--ok);
  color: var(--on-ok);
}

.p-check input:focus-visible + .box {
  outline: 2px solid var(--lab-accent);
  outline-offset: 2px;
}

.p-check input:checked ~ span:not(.box) {
  color: var(--lab-muted);
  text-decoration: line-through;
}

.p-check small {
  display: inline-block;
  width: 100%;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.42;
  color: var(--lab-muted);
  text-decoration: none;
}

/* ---------- send to planner dialog ---------- */
.p-dlg {
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--lab-line-strong);
  border-radius: 14px;
  background: var(--lab-surface);
  color: var(--lab-text);
  box-shadow: var(--lab-shadow-lg);
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--lab-line-strong) transparent;
}

.p-dlg::backdrop {
  background: var(--shade);
}

.p-dlg form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 18px 20px 20px;
}

.p-dlg header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--lab-line);
}

.p-dlg h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.3;
  min-width: 0;
  overflow-wrap: anywhere;
}

.p-dlg header .icon-btn {
  border: 1px solid var(--lab-line);
  background: var(--lab-surface);
  color: var(--lab-text);
  box-shadow: var(--lab-shadow-sm);
}

.p-dlg header .icon-btn:hover {
  border-color: var(--lab-line-strong);
  background: var(--lab-surface2);
}

.p-dlg p {
  margin: 0;
  font-size: 14px;
  line-height: 1.58;
  color: var(--lab-muted);
  overflow-wrap: anywhere;
}

.fld {
  display: grid;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.fld > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--lab-muted);
}

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

.two > * {
  min-width: 0;
}

.p-dlg-b {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}

/* ---------- toast ---------- */
.p-toast {
  bottom: calc(20px + env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: var(--lab-radius);
  background: var(--lab-ink);
  color: var(--lab-on-ink);
  box-shadow: var(--lab-shadow-lg);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

/* ---------- tablet & desktop (>= 720px / 960px) ---------- */
@media (min-width: 720px) {
  .p-list {
    gap: 14px;
  }
}

@media (min-width: 960px) {
  .p-wrap {
    padding: 28px 16px 92px;
  }
}

/* ---------- mobile (<= 520px / 480px / 420px) ---------- */
@media (max-width: 520px) {
  .p-tabs {
    display: flex;
    width: 100%;
  }

  .p-tabs a {
    flex: 1;
  }

  .p-search select {
    flex: 1 1 120px;
  }

  .p-row > .btn {
    flex: 0 1 auto;
  }

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

@media (max-width: 480px) {
  .p-kv {
    grid-template-columns: minmax(0, 1fr);
  }

  .p-kv dt {
    padding: 9px 12px 4px;
    font-size: 12.5px;
  }

  .p-kv dt:not(:first-of-type) {
    border-top: 1px solid var(--lab-line);
  }

  .p-kv dd {
    padding: 4px 12px 10px;
    border-top: 0;
  }

  .p-map {
    height: 340px;
  }
}

@media (max-width: 420px) {
  .p-wrap {
    padding: 16px 12px 76px;
  }

  .p-search {
    padding: 12px;
  }

  .p-box {
    padding: 26px 16px;
  }

  .p-dlg form {
    padding: 16px 16px 18px;
    gap: 13px;
  }

  .p-dlg-b .btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .icon-btn,
  .chip,
  .p-tabs a,
  .p-q input,
  .p-search select,
  .fld input,
  .fld select,
  .p-bar i,
  .p-card,
  .kpop,
  .p-thumbs button,
  .p-saved li,
  .p-check label,
  .box,
  .p-toast {
    transition: none;
  }
}
