/*
 * Room Color Palette Generator — the photo, the palette and the 60-30-10 plan. Source:
 * sites/dreamy-tools/tools/room-color-palette-generator/tool.css (Dash repo); loaded after
 * core/tools.css on this tool only. ⚠️ Every input/button stays ≥ 16px and ≥ 44px tall (fenced).
 */
.pg { display: grid; grid-template-columns: 1fr; gap: 18px; }
.pg > * { min-width: 0; }
@media (min-width: 860px) {
  .pg { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 26px; align-items: start; }
  .pg-main { position: sticky; top: 16px; }
}
.pg-stage {
  position: relative; display: flex; justify-content: center; align-items: center; border-radius: 20px; padding: 10px;
  min-height: 240px; background: radial-gradient(120% 90% at 50% 0%, #f6f1e8 0%, #e9e1d4 100%);
}
.pg-frame {
  position: relative; display: inline-block; max-width: 100%; line-height: 0; border-radius: 14px; overflow: hidden;
  box-shadow: 0 18px 44px rgba(43, 37, 34, .22); cursor: crosshair; touch-action: manipulation;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.pg-photo, .pg-canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: min(66vh, 760px); }
.pg-mark {
  position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: none;
  border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 4px 12px rgba(0, 0, 0, .35);
}
.pg-hint {
  position: absolute; left: 50%; top: 20px; transform: translateX(-50%); margin: 0; z-index: 2; padding: 8px 14px;
  border-radius: 999px; background: rgba(20, 16, 14, .72); color: #fff; font-size: 14.5px; line-height: 1.3; font-weight: 600;
  text-align: center; width: max-content; max-width: calc(100% - 32px); pointer-events: none; transition: opacity .35s;
}
.pg-hint--off { opacity: 0; }
.pg-own {
  position: absolute; right: 20px; bottom: 20px; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 16px; font-weight: 700; min-height: 44px; padding: 8px 16px 8px 12px; cursor: pointer;
  border: 0; border-radius: 999px; background: #fffdf9; color: var(--chqt-ink); box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
}
.pg-stage input { font-size: 16px; }
.pg-own:focus-visible, .pg-try:focus-visible { outline: 3px solid rgba(215, 157, 50, .8); outline-offset: 2px; }
.pg-stage.pg-busy .pg-frame::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px; border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: pg-spin .8s linear infinite;
}
@keyframes pg-spin { to { transform: rotate(360deg); } }
.pg-samples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pg-samples [aria-pressed="true"] { background: var(--chqt-ink); color: #fff; border-color: var(--chqt-ink); }

.pg-side { display: flex; flex-direction: column; gap: 14px; }
.pg-card { background: #fff; border: 1px solid var(--chqt-line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pg-h { margin: 0; font-weight: 800; font-size: 17px; }
.pg-strip { display: flex; height: 64px; border-radius: 14px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.pg-strip i { display: block; min-width: 8px; transition: flex-grow .3s; }
.pg-list, .pg-plan { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pg-list li, .pg-plan li { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.pg-sw { flex: 0 0 44px; height: 44px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.pg-t { flex: 1; min-width: 0; line-height: 1.25; }
.pg-t b { display: block; font-size: 16px; text-transform: capitalize; }
.pg-t small { color: var(--chqt-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.pg-try {
  flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--chqt-line); color: var(--chqt-ink); text-decoration: none; font-weight: 700; font-size: 15px;
}
.pg-role { flex: 0 0 52px; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.pg-plan .pg-picked b::after { content: " · your pick"; font-weight: 600; color: var(--chqt-muted); text-transform: none; }
