.wpm-app {
  --wpm-paper: #f4ede2;
  --wpm-paper-light: #fffaf1;
  --wpm-ink: #282019;
  --wpm-muted: #756858;
  --wpm-sand: #ded1b9;
  --wpm-sand-dark: #b58d69;
  --wpm-clay: #ba583c;
  --wpm-clay-dark: #9e442d;
  --wpm-shadow: 0 18px 45px rgba(73, 52, 31, 0.11);
  --wpm-ring: #d8c7a7;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 250, 241, 0.8), transparent 30%),
    linear-gradient(180deg, #f8f1e8 0%, var(--wpm-paper) 100%);
  color: var(--wpm-ink);
  direction: rtl;
  font-family: "Noto Sans Hebrew", "Arial Hebrew", Arial, system-ui, sans-serif;
  letter-spacing: 0;
}

.wpm-app *,
.wpm-app *::before,
.wpm-app *::after {
  box-sizing: border-box;
}

.wpm-app button,
.wpm-app input {
  font: inherit;
}

.wpm-app button {
  cursor: pointer;
}

.wpm-app button:disabled {
  cursor: default;
  opacity: 0.45;
}

.wpm-admin-link-row {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 20;
}

.wpm-admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--wpm-sand);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.72);
  color: #675847;
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(73, 52, 31, 0.08);
}

.wpm-admin-button:hover {
  background: rgba(255, 255, 255, 0.88);
  color: #675847;
}

.wpm-screen {
  min-height: 100vh;
  padding: clamp(24px, 5vw, 72px);
}

.wpm-screen[hidden] {
  display: none;
}

.wpm-start-screen {
  display: grid;
  place-items: center;
}

.wpm-intro-card {
  width: min(100%, 900px);
  padding: clamp(34px, 6vw, 82px) clamp(28px, 6vw, 72px);
  border: 1px solid rgba(190, 170, 134, 0.55);
  border-radius: 24px;
  background: rgba(255, 250, 241, 0.78);
  box-shadow: var(--wpm-shadow);
  text-align: center;
}

.wpm-eyebrow,
.wpm-pick-count,
.wpm-footer-note {
  margin: 0;
  color: var(--wpm-sand-dark);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.wpm-eyebrow {
  font-size: clamp(18px, 2vw, 24px);
}

.wpm-app h1,
.wpm-app h2 {
  margin: 20px 0 0;
  color: #211a14;
  font-family: Georgia, "Times New Roman", "Noto Sans Hebrew", serif;
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 900;
  line-height: 1.05;
}

.wpm-intro-copy {
  max-width: 760px;
  margin: clamp(28px, 4vw, 48px) auto 0;
  color: #665a4d;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.62;
}

.wpm-field-label {
  display: grid;
  gap: 14px;
  margin: clamp(34px, 5vw, 56px) auto 0;
  color: #766854;
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 700;
}

.wpm-field-label span {
  color: #968875;
  font-size: 0.88em;
  font-weight: 600;
}

.wpm-name-input {
  width: min(100%, 760px);
  min-height: 86px;
  padding: 0 30px;
  border: 2px solid var(--wpm-sand);
  border-radius: 18px;
  outline: none;
  background: rgba(255, 255, 255, 0.62);
  color: var(--wpm-ink);
  font-size: clamp(24px, 3vw, 32px);
  text-align: right;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wpm-name-input:focus {
  border-color: var(--wpm-clay);
  box-shadow: 0 0 0 5px rgba(186, 88, 60, 0.12);
}

.wpm-name-input::placeholder {
  color: #a2a4ad;
}

.wpm-primary-button,
.wpm-outline-button,
.wpm-ghost-button,
.wpm-text-button {
  border-radius: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wpm-primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 760px);
  min-height: 94px;
  margin-top: 36px;
  border: 0;
  background: var(--wpm-clay);
  color: #fff;
  box-shadow: 0 14px 24px rgba(158, 68, 45, 0.18);
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 900;
}

.wpm-primary-button:hover {
  background: var(--wpm-clay-dark);
  color: #fff;
  transform: translateY(-1px);
}

.wpm-primary-button.wpm-small {
  width: auto;
  min-height: 74px;
  margin: 0;
  padding: 0 38px;
  font-size: 24px;
}

.wpm-footer-note {
  margin-top: 42px;
  font-size: clamp(18px, 2vw, 24px);
}

.wpm-picker-screen {
  display: flex;
  justify-content: center;
}

.wpm-picker-shell {
  width: min(100%, 1180px);
  text-align: center;
}

.wpm-picker-topline,
.wpm-map-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wpm-pick-count {
  flex: 1;
  text-align: center;
  font-size: clamp(18px, 2vw, 26px);
}

.wpm-ghost-button,
.wpm-outline-button {
  min-height: 58px;
  padding: 0 28px;
  border: 2px solid var(--wpm-sand);
  background: rgba(255, 250, 241, 0.56);
  color: #675847;
  font-size: 21px;
  font-weight: 800;
}

.wpm-ghost-button:hover,
.wpm-outline-button:hover {
  background: rgba(255, 255, 255, 0.72);
  color: #675847;
}

.wpm-progress-track {
  width: min(100%, 620px);
  height: 8px;
  margin: 42px auto 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e3d8c5;
}

.wpm-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--wpm-clay);
  transition: width 0.3s ease;
}

.wpm-color-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(128px, 1fr));
  gap: clamp(20px, 2.4vw, 34px);
  align-items: center;
  justify-items: center;
  margin: clamp(46px, 6vw, 70px) auto 0;
}

.wpm-color-choice {
  position: relative;
  width: clamp(128px, 13vw, 190px);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  color: var(--wpm-choice-text, #fff);
  background: var(--wpm-choice-color);
  box-shadow:
    inset 0 -6px 0 rgba(0, 0, 0, 0.07),
    0 12px 24px rgba(61, 44, 23, 0.12);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 900;
  isolation: isolate;
}

.wpm-color-choice::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.wpm-color-choice:hover {
  color: var(--wpm-choice-text, #fff);
  transform: translateY(-4px) scale(1.015);
  box-shadow:
    inset 0 -6px 0 rgba(0, 0, 0, 0.08),
    0 18px 34px rgba(61, 44, 23, 0.16);
}

.wpm-color-choice:focus-visible,
.wpm-primary-button:focus-visible,
.wpm-admin-button:focus-visible,
.wpm-ghost-button:focus-visible,
.wpm-outline-button:focus-visible,
.wpm-text-button:focus-visible {
  outline: 4px solid rgba(186, 88, 60, 0.3);
  outline-offset: 4px;
}

.wpm-selected-panel {
  width: min(100%, 920px);
  margin: 48px auto 0;
  padding: 22px 26px;
  border: 1px solid rgba(216, 199, 167, 0.68);
  border-radius: 16px;
  background: rgba(255, 250, 241, 0.48);
}

.wpm-selected-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #6d5d4c;
  font-size: 20px;
  font-weight: 900;
}

.wpm-text-button {
  min-height: 42px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--wpm-clay);
  font-size: 18px;
  font-weight: 900;
}

.wpm-selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 38px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.wpm-selected-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: #5d5144;
  font-weight: 800;
}

.wpm-selected-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--wpm-dot-color);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.wpm-map-screen {
  text-align: center;
}

.wpm-map-actions {
  width: min(100%, 1220px);
  margin: 0 auto clamp(34px, 5vw, 54px);
  justify-content: flex-start;
}

.wpm-map-name {
  margin: 14px 0 0;
  color: #6c5d4d;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
}

.wpm-map-wheel {
  position: relative;
  width: min(88vw, 920px);
  aspect-ratio: 1;
  margin: clamp(44px, 6vw, 74px) auto 0;
  border: 2px solid rgba(216, 199, 167, 0.86);
  border-radius: 50%;
  background: rgba(244, 237, 226, 0.52);
}

.wpm-map-wheel::before,
.wpm-map-wheel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.wpm-map-wheel::before {
  inset: 2.2%;
  border: 2px dashed rgba(216, 199, 167, 0.78);
}

.wpm-map-wheel::after {
  inset: 32.4%;
  border: 2px solid rgba(216, 199, 167, 0.84);
}

.wpm-map-guides {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.wpm-map-guides line {
  stroke: rgba(216, 199, 167, 0.72);
  stroke-width: 0.26;
}

.wpm-map-node {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(66px, 8.2vw, 112px);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: var(--wpm-node-color);
  color: var(--wpm-node-text, #fff);
  box-shadow:
    0 0 0 8px rgba(255, 250, 241, 0.8),
    inset 0 -3px 0 rgba(0, 0, 0, 0.07);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.wpm-map-node:hover,
.wpm-map-node:focus-visible {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow:
    0 0 0 8px rgba(255, 250, 241, 0.88),
    0 14px 24px rgba(61, 44, 23, 0.16),
    inset 0 -3px 0 rgba(0, 0, 0, 0.07);
}

.wpm-map-node.wpm-center {
  width: clamp(112px, 14vw, 172px);
  box-shadow:
    0 0 0 10px rgba(255, 250, 241, 0.86),
    inset 0 -3px 0 rgba(0, 0, 0, 0.04);
}

.wpm-node-content {
  display: grid;
  gap: 5px;
  line-height: 1.1;
  text-align: center;
}

.wpm-house-number {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 2.1vw, 30px);
  font-weight: 900;
}

.wpm-color-name {
  font-size: clamp(15px, 1.7vw, 22px);
  font-weight: 800;
}

.wpm-center .wpm-house-number {
  font-size: clamp(24px, 2.5vw, 36px);
}

.wpm-center .wpm-color-name {
  font-size: clamp(20px, 2vw, 28px);
}

.wpm-reading-detail {
  width: min(100%, 760px);
  margin: clamp(38px, 5vw, 58px) auto 0;
  padding: 26px;
  border: 1px solid rgba(216, 199, 167, 0.72);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.72);
  box-shadow: 0 10px 24px rgba(73, 52, 31, 0.07);
  text-align: right;
}

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

.wpm-reading-detail h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 10px;
  color: #2a211a;
  font-size: clamp(24px, 3vw, 34px);
}

.wpm-reading-section {
  width: min(100%, 1120px);
  margin: clamp(54px, 7vw, 82px) auto 0;
  text-align: right;
}

.wpm-reading-section h3 {
  margin: 0 0 22px;
  color: #2b2119;
  font-family: Georgia, "Times New Roman", "Noto Sans Hebrew", serif;
  font-size: clamp(30px, 3vw, 42px);
}

.wpm-reading-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.wpm-reading-card {
  min-height: 132px;
  padding: 22px;
  border: 1px solid rgba(216, 199, 167, 0.72);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.6);
  box-shadow: 0 10px 24px rgba(73, 52, 31, 0.07);
}

.wpm-reading-card h4 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 10px;
  color: #2a211a;
  font-size: 22px;
}

.wpm-reading-meta {
  color: #9b7d5d;
  font-size: 16px;
  font-weight: 900;
}

.wpm-reading-card p {
  margin: 0;
  color: #6f6254;
  font-size: 18px;
  line-height: 1.55;
}

.wpm-empty-explanation {
  min-height: 48px;
  border-bottom: 1px dashed rgba(181, 141, 105, 0.45);
}

.wpm-mini-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--wpm-mini-color);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 0 0 3px rgba(216, 199, 167, 0.5);
}

@media (max-width: 900px) {
  .wpm-screen {
    padding: 22px;
  }

  .wpm-admin-link-row {
    position: static;
    display: flex;
    justify-content: center;
    padding-top: 16px;
  }

  .wpm-intro-card {
    border-radius: 18px;
  }

  .wpm-color-grid {
    grid-template-columns: repeat(3, minmax(96px, 1fr));
  }

  .wpm-color-choice {
    width: min(28vw, 148px);
    min-width: 96px;
  }

}

@media (max-width: 620px) {
  .wpm-picker-topline,
  .wpm-map-actions,
  .wpm-selected-head {
    flex-direction: column;
  }

  .wpm-picker-topline .wpm-ghost-button,
  .wpm-map-actions button {
    width: 100%;
  }

  .wpm-color-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 18px;
  }

  .wpm-color-choice {
    width: min(40vw, 150px);
  }

  .wpm-map-wheel {
    width: min(96vw, 520px);
  }

  .wpm-map-node {
    width: clamp(48px, 14vw, 70px);
    box-shadow: 0 0 0 5px rgba(255, 250, 241, 0.78);
  }

  .wpm-map-node.wpm-center {
    width: clamp(84px, 25vw, 116px);
    box-shadow: 0 0 0 7px rgba(255, 250, 241, 0.86);
  }

  .wpm-name-input,
  .wpm-primary-button {
    min-height: 72px;
  }
}

/* Compact scale for embedding in WordPress and Elementor */
.wpm-app {
  min-height: auto;
}

.wpm-admin-link-row {
  top: 16px;
  left: 16px;
}

.wpm-admin-button {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
}

.wpm-screen {
  min-height: auto;
  padding: clamp(18px, 3.2vw, 44px);
}

.wpm-start-screen {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.wpm-intro-card {
  width: min(100%, 760px);
  padding: clamp(28px, 4vw, 50px) clamp(22px, 4vw, 46px);
  border-radius: 18px;
}

.wpm-eyebrow {
  font-size: 18px;
}

.wpm-app h1,
.wpm-app h2 {
  margin-top: 14px;
  font-size: 52px;
}

.wpm-intro-copy {
  max-width: 620px;
  margin-top: 28px;
  font-size: 22px;
  line-height: 1.55;
}

.wpm-field-label {
  margin: 28px auto 0;
  font-size: 18px;
}

.wpm-name-input {
  width: min(100%, 620px);
  min-height: 62px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 21px;
}

.wpm-primary-button {
  width: min(100%, 620px);
  min-height: 68px;
  margin-top: 24px;
  border-radius: 14px;
  font-size: 22px;
}

.wpm-primary-button.wpm-small {
  min-height: 54px;
  padding: 0 24px;
  font-size: 18px;
}

.wpm-footer-note {
  margin-top: 28px;
  font-size: 18px;
}

.wpm-picker-shell {
  width: min(100%, 940px);
}

.wpm-pick-count {
  font-size: 19px;
}

.wpm-progress-track {
  width: min(100%, 500px);
  height: 6px;
  margin-top: 28px;
}

.wpm-color-grid {
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
  margin-top: 36px;
}

.wpm-color-choice {
  width: clamp(96px, 9.5vw, 132px);
  font-size: 20px;
}

.wpm-selected-panel {
  width: min(100%, 740px);
  margin-top: 32px;
  padding: 18px 20px;
}

.wpm-selected-head {
  font-size: 18px;
}

.wpm-text-button,
.wpm-selected-list li {
  font-size: 16px;
}

.wpm-map-actions {
  width: min(100%, 760px);
  margin-bottom: 28px;
}

.wpm-map-name {
  font-size: 21px;
}

.wpm-map-wheel {
  width: min(82vw, 680px);
  margin-top: 34px;
}

.wpm-map-node {
  width: clamp(52px, 6.2vw, 78px);
  box-shadow:
    0 0 0 6px rgba(255, 250, 241, 0.8),
    inset 0 -3px 0 rgba(0, 0, 0, 0.07);
}

.wpm-map-node:hover,
.wpm-map-node:focus-visible {
  box-shadow:
    0 0 0 6px rgba(255, 250, 241, 0.88),
    0 12px 22px rgba(61, 44, 23, 0.16),
    inset 0 -3px 0 rgba(0, 0, 0, 0.07);
}

.wpm-map-node.wpm-center {
  width: clamp(88px, 10vw, 124px);
  box-shadow:
    0 0 0 8px rgba(255, 250, 241, 0.86),
    inset 0 -3px 0 rgba(0, 0, 0, 0.04);
}

.wpm-house-number {
  font-size: 21px;
}

.wpm-color-name {
  font-size: 15px;
}

.wpm-center .wpm-house-number {
  font-size: 24px;
}

.wpm-center .wpm-color-name {
  font-size: 20px;
}

.wpm-reading-detail {
  width: min(100%, 620px);
  margin-top: 34px;
  padding: 20px;
}

.wpm-reading-detail h3 {
  font-size: 24px;
}

@media (max-width: 900px) {
  .wpm-screen {
    padding: 18px;
  }

  .wpm-app h1,
  .wpm-app h2 {
    font-size: 42px;
  }

  .wpm-intro-copy {
    font-size: 19px;
  }

  .wpm-color-grid {
    grid-template-columns: repeat(4, minmax(82px, 1fr));
    gap: 14px;
  }

  .wpm-color-choice {
    width: min(20vw, 104px);
    min-width: 82px;
    font-size: 17px;
  }

  .wpm-map-wheel {
    width: min(92vw, 560px);
  }
}

@media (max-width: 620px) {
  .wpm-admin-link-row {
    padding-top: 12px;
  }

  .wpm-screen {
    padding: 16px;
  }

  .wpm-intro-card {
    padding: 24px 18px;
  }

  .wpm-eyebrow,
  .wpm-footer-note,
  .wpm-pick-count {
    font-size: 15px;
  }

  .wpm-app h1,
  .wpm-app h2 {
    font-size: 34px;
  }

  .wpm-intro-copy {
    margin-top: 22px;
    font-size: 17px;
  }

  .wpm-field-label {
    margin-top: 22px;
    font-size: 16px;
  }

  .wpm-name-input,
  .wpm-primary-button {
    min-height: 56px;
    font-size: 18px;
  }

  .wpm-color-grid {
    grid-template-columns: repeat(3, minmax(74px, 1fr));
    gap: 12px;
    margin-top: 26px;
  }

  .wpm-color-choice {
    width: min(27vw, 92px);
    min-width: 74px;
    font-size: 15px;
  }

  .wpm-selected-panel {
    margin-top: 26px;
    padding: 16px;
  }

  .wpm-selected-head {
    font-size: 16px;
  }

  .wpm-map-wheel {
    width: min(94vw, 390px);
    margin-top: 26px;
  }

  .wpm-map-node {
    width: clamp(38px, 12vw, 50px);
    box-shadow: 0 0 0 4px rgba(255, 250, 241, 0.78);
  }

  .wpm-map-node.wpm-center {
    width: clamp(64px, 21vw, 84px);
    box-shadow: 0 0 0 6px rgba(255, 250, 241, 0.86);
  }

  .wpm-house-number {
    font-size: 15px;
  }

  .wpm-color-name {
    font-size: 11px;
  }

  .wpm-center .wpm-house-number {
    font-size: 17px;
  }

  .wpm-center .wpm-color-name {
    font-size: 14px;
  }

  .wpm-reading-detail {
    margin-top: 24px;
    padding: 16px;
  }

  .wpm-reading-detail h3 {
    font-size: 20px;
  }
}

@media (max-width: 390px) {
  .wpm-color-grid {
    grid-template-columns: repeat(2, minmax(86px, 1fr));
  }

  .wpm-color-choice {
    width: min(38vw, 96px);
    min-width: 86px;
  }
}

@media print {
  .wpm-app {
    background: #fff;
  }

  .wpm-map-actions,
  .wpm-outline-button,
  .wpm-admin-link-row {
    display: none !important;
  }

  .wpm-screen {
    min-height: auto;
    padding: 0;
  }

  .wpm-map-wheel {
    width: 92vmin;
    margin-top: 32px;
  }
}
