/* Thai Phrases — Thailand visa photo checker & cropper styles.
   ==========================================================================
   Layout only, adapted from the tool family sheet. Every colour, radius,
   shadow and font is a token from styles.css, so the explicit dark choice
   and the OS dark fallback both repoint this sheet automatically. No
   hard-coded colours outside the canvas-drawing JS (which must paint an
   actual photo, not a themed surface). scripts/css_check.py rejects
   undefined var().
   ========================================================================== */

.pc-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}

/* --- masthead ----------------------------------------------------------- */
.pc-hero { padding: 12px 0 18px; }
.pc-crumbs {
  margin: 0 0 14px;
  font-size: .82rem;
  color: var(--ink-faint);
}
.pc-crumbs a { color: var(--accent-text); text-decoration: none; }
.pc-crumbs span { color: var(--ink-soft); }
.pc-eyebrow {
  margin: 0 0 10px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.pc-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.5vw, 2.6rem);
  line-height: 1.22;
  margin: 0 0 12px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.pc-lead {
  margin: 0;
  max-width: 780px;
  font-size: 1.06rem;
  line-height: 1.72;
  color: var(--ink-soft);
}

/* --- rules metadata / disclaimer ---------------------------------------- */
.pc-meta {
  margin: 20px 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.pc-checked {
  margin: 0 0 10px;
  font-weight: 800;
  font-size: .95rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.pc-meta h2 {
  margin: 12px 0 6px;
  font-size: .84rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-faint);
}
.pc-meta p { margin: 0 0 6px; font-size: .92rem; line-height: 1.66; color: var(--ink-soft); }
.pc-disclaimer { color: var(--ink-soft); overflow-wrap: anywhere; }
.pc-local { color: var(--good-text); }
.pc-source { font-size: .86rem; color: var(--ink-faint); overflow-wrap: anywhere; }

/* --- two-column work area ------------------------------------------------ */
.pc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 860px) {
  .pc-grid { grid-template-columns: minmax(0, 1fr); }
}
.pc-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.pc-card h2 {
  margin: 0 0 16px;
  font-size: 1.18rem;
  font-family: var(--font-display);
  color: var(--ink);
}
.pc-card h3 {
  margin: 20px 0 10px;
  font-size: .96rem;
  font-weight: 800;
  color: var(--ink);
}

/* --- controls ------------------------------------------------------------ */
.pc-field { margin: 0 0 16px; }
.pc-label {
  display: block;
  margin: 0 0 6px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.pc-select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
}
.pc-select:focus-visible,
.pc-btn:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 2px;
}

/* --- drop zone ----------------------------------------------------------- */
.pc-drop {
  box-sizing: border-box;
  padding: 28px 18px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
}
.pc-drop.is-drag {
  border-color: var(--accent-text);
  background: var(--surface);
}
.pc-drop p {
  margin: 0 0 10px;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.pc-drop p:last-child { margin-bottom: 0; }
.pc-file { display: none; }
.pc-choose {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: .92rem;
  font-weight: 700;
  color: var(--accent-text);
}

/* --- crop stage ----------------------------------------------------------- */
.pc-stage-wrap { margin: 18px 0 0; }
.pc-stage {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  touch-action: none;
  cursor: move;
}
.pc-crop-note {
  margin: 12px 0 0;
  font-size: .86rem;
  line-height: 1.6;
  color: var(--ink-faint);
}
.pc-crop-note[hidden] { display: none; }
.pc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
}
.pc-btn {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  font: inherit;
  font-size: .94rem;
  font-weight: 700;
  color: var(--accent-text);
  cursor: pointer;
}
.pc-btn:disabled { opacity: .55; cursor: not-allowed; }
.pc-status {
  margin: 12px 0 0;
  font-size: .88rem;
  color: var(--ink-faint);
}
.pc-status[hidden] { display: none; }
.pc-downloads { margin: 16px 0 0; }
.pc-downloads[hidden] { display: none; }
.pc-downloads ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pc-downloads li { margin: 0 0 8px; }
.pc-downloads a {
  color: var(--accent-text);
  font-size: .92rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}

/* --- spec table ----------------------------------------------------------- */
.pc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.pc-table caption {
  text-align: left;
  margin: 0 0 8px;
  font-size: .84rem;
  font-weight: 800;
  color: var(--ink-faint);
}
.pc-table th, .pc-table td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--ink-soft);
}
.pc-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.pc-table tbody th { font-weight: 600; color: var(--ink); }
.pc-table td { color: var(--ink); line-height: 1.55; font-variant-numeric: tabular-nums; }

/* --- explanation sections -------------------------------------------------- */
.pc-explain { margin: 24px 0 0; }
.pc-explain h2 { margin: 0 0 12px; font-size: 1.18rem; font-family: var(--font-display); color: var(--ink); }
.pc-explain h3 { margin: 20px 0 8px; font-size: 1rem; font-weight: 800; color: var(--ink); }
.pc-explain p {
  margin: 0 0 12px;
  max-width: 820px;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.pc-explain .pc-table { margin: 12px 0 14px; }
.pc-checks {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  max-width: 820px;
}
.pc-checks li {
  position: relative;
  padding: 10px 0 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: .94rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.pc-checks li:last-child { border-bottom: 0; }
.pc-checks b { color: var(--ink); }
.pc-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: .9rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.pc-note b { color: var(--ink); }
.pc-good { color: var(--good-text); }

/* --- next steps ---------------------------------------------------------- */
.pc-next { margin: 24px 0 0; }
.pc-next h2 { margin: 0 0 12px; font-size: 1.18rem; font-family: var(--font-display); color: var(--ink); }
.pc-next-links { display: flex; flex-wrap: wrap; gap: 10px; }
.pc-next-link,
.pc-next-todo {
  display: inline-block;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: .9rem;
  color: var(--accent-text);
  text-decoration: none;
}
.pc-next-todo {
  color: var(--ink-faint);
  border-style: dashed;
  cursor: not-allowed;
}
.pc-next-todo small { display: block; margin-top: 3px; font-size: .74rem; color: var(--bad-text); }

/* --- footer -------------------------------------------------------------- */
.pc-footer { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.pc-footer-small { margin: 0 0 8px; font-size: .84rem; color: var(--ink-faint); }
