/* ==================================================================
   אות בספר תורה - עיצוב
   כיוון: קלף ודיו. הקלף הוא הגיבור של הדף, כל השאר משרת אותו.

   כל הכללים מוגבלים ל-.otiot-app כדי שלא יזלגו לעיצוב של האתר,
   ובאותה מידה כדי שהתבנית של האתר לא תשבור את המערכת.
   ================================================================== */

.otiot-app {
  direction: rtl;
  text-align: right;
  --klaf: #fffdf7;
}

/* ==================================================================
   מערכת אות בספר תורה
   כיוון עיצובי: קלף ודיו. הקלף הוא הגיבור של הדף, .otiot-app כל השאר משרת אותו.
   ================================================================== */
.otiot-app {
  --klaf:        #fffdf7;
  --klaf-edge:   #eadfbd;
  --page:        #fafafa;
  --page-deep:   #f4f1e8;

  --ink:         #565d64;
  --ink-soft:    #72777d;
  --ink-faint:   #9aa0a6;

  --paid:        #596068;   /* תכלת עמוק - אות שנרכשה */
  --paid-wash:   #ececec;
  --pending:     #d8a400;   /* ענבר - אות בתהליך */
  --pending-wash:#fff9e7;
  --cta:         #596068;   /* יין - פעולה ראשית */
  --cta-hover:   #454b51;

  --radius: 4px;
  --shadow: 0 1px 2px rgba(89,96,104,.08), 0 8px 28px -14px rgba(89,96,104,.20);

  --display: "Frank Ruhl Libre", "Times New Roman", serif;
  --body: "Assistant", system-ui, sans-serif;
}

.otiot-app * { box-sizing: border-box; }

.otiot-app { -webkit-text-size-adjust: 100%; }

.otiot-app {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

.otiot-app h1, .otiot-app h2, .otiot-app h3 { font-family: var(--display); font-weight: 700; margin: 0; line-height: 1.25; }

.otiot-app button { font-family: inherit; font-size: inherit; cursor: pointer; }

.otiot-app :focus-visible { outline: 3px solid var(--paid); outline-offset: 2px; }

.otiot-app .hidden { display: none !important; }

/* ---------------- כותרת ---------------- */
.otiot-app .masthead {
  background: var(--ink);
  color: var(--klaf);
  padding: 14px 0;
}
.otiot-app .masthead-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 16px;
  display: grid; grid-template-columns: 1fr auto; gap: 12px 20px; align-items: center;
}
.otiot-app .brand h1 { font-size: 22px; letter-spacing: -.01em; }
.otiot-app .brand p { margin: 2px 0 0; font-size: 13px; color: #d8d8d8; }

.otiot-app .scroll-gauge { grid-column: 1 / -1; order: 3; }
.otiot-app .gauge-track {
  height: 9px; border-radius: 999px; background: #4f555b;
  overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.5);
}
.otiot-app .gauge-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #d8a400, #ffc51f);
  transition: width .9s cubic-bezier(.2,.7,.2,1);
}
.otiot-app .gauge-caption { margin: 6px 0 0; font-size: 12.5px; color: #d8d8d8; }
.otiot-app .gauge-caption strong { color: #ffe18a; font-variant-numeric: tabular-nums; }

.otiot-app .cart-button {
  background: none; border: 1px solid #72777d; color: var(--klaf);
  border-radius: var(--radius); padding: 9px 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
}
.otiot-app .cart-button:hover { border-color: #ffc51f; }
.otiot-app .cart-count {
  background: var(--cta); color: #fff; border-radius: 999px;
  min-width: 22px; height: 22px; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; padding: 0 6px;
}

/* ---------------- מקרא ---------------- */
.otiot-app .legend-bar { background: var(--page-deep); border-bottom: 1px solid #e4e4e4; }
.otiot-app .legend-inner {
  max-width: 1080px; margin: 0 auto; padding: 9px 16px;
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
  font-size: 13.5px; color: var(--ink-soft);
}
.otiot-app .legend { display: inline-flex; align-items: center; gap: 7px; }
.otiot-app .swatch { width: 15px; height: 19px; border-radius: 3px; display: inline-block; }
.otiot-app .swatch.is-free { background: var(--klaf); border: 1px solid var(--klaf-edge); }
.otiot-app .swatch.is-pending { background: var(--pending-wash); border: 1px solid var(--pending); }
.otiot-app .swatch.is-paid { background: var(--paid); }
.otiot-app .legend-price { margin-inline-start: auto; font-weight: 600; color: var(--ink); }

.otiot-app .notice {
  background: #fff9e7; border-bottom: 1px solid var(--pending);
  padding: 12px 16px; text-align: center; font-weight: 600; color: #7b5a20;
}

/* ---------------- פריסה ---------------- */
.otiot-app main { max-width: 1080px; margin: 0 auto; padding: 20px 16px 120px; }

.otiot-app .tabs { display: flex; gap: 4px; margin-bottom: 18px; }
.otiot-app .tab {
  background: none; border: none; border-bottom: 3px solid transparent;
  padding: 8px 14px; font-size: 16px; font-weight: 600; color: var(--ink-soft);
}
.otiot-app .tab.is-active { color: var(--ink); border-bottom-color: var(--cta); }

.otiot-app .picker {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 16px;
}
.otiot-app .picker label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.otiot-app .picker select {
  font-family: inherit; font-size: 16px; padding: 9px 12px; min-width: 130px;
  border: 1px solid #e0d7bd; border-radius: var(--radius); background: var(--klaf); color: var(--ink);
}
.otiot-app .picker-nav { display: flex; gap: 6px; margin-inline-start: auto; }

.otiot-app .ghost {
  background: var(--klaf); border: 1px solid #e0d7bd; color: var(--ink);
  border-radius: var(--radius); padding: 8px 14px; font-weight: 700;
}
.otiot-app .ghost:hover { background: #fff; }
.otiot-app .ghost:disabled { opacity: .4; cursor: not-allowed; }

/* ---------------- הקלף ---------------- */
.otiot-app .klaf {
  background: var(--klaf);
  border: 1px solid var(--klaf-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px;
  /* גרעיניות עדינה שמרמזת על קלף בלי להפריע לקריאה */
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255,197,31,.08) 0 40%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(255,197,31,.06) 0 40%, transparent 60%);
}
.otiot-app .klaf-loading { text-align: center; color: var(--ink-faint); padding: 40px 0; }

.otiot-app .verse { margin: 0 0 6px; padding: 6px 8px 8px; border-radius: var(--radius); }
.otiot-app .verse:hover { background: rgba(255,197,31,.08); }

.otiot-app .verse-head {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 12.5px; color: var(--ink-faint); margin-bottom: 2px;
}
.otiot-app .verse-num {
  font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--pending);
  min-width: 2ch;
}
.otiot-app .buy-verse {
  background: none; border: 1px dashed #ead8b4; color: var(--ink-soft);
  border-radius: var(--radius); padding: 2px 9px; font-size: 12.5px; font-weight: 600;
  opacity: 0; transition: opacity .15s;
}
.otiot-app .verse:hover .buy-verse, .otiot-app .buy-verse:focus-visible { opacity: 1; }
.otiot-app .buy-verse:hover { border-style: solid; border-color: var(--cta); color: var(--cta); }
.otiot-app .buy-verse[disabled] { opacity: .45; cursor: not-allowed; border-style: solid; }

.otiot-app .verse-text {
  /* --otiot-torah-font ו---otiot-scale נקבעים כשגופן סת"ם מופעל.
     המכפיל בונה על הגודל הקיים במקום לדרוס אותו, אחרת הטקסט
     היה מתכווץ לגודל הבסיס של הדף. */
  font-family: var(--otiot-torah-font, var(--display));
  font-size: calc(clamp(21px, 2.6vw, 27px) * var(--otiot-scale, 1));
  line-height: var(--otiot-line, 2.05);
  letter-spacing: 0;
}

.otiot-app .word { display: inline-block; margin-inline-start: .5em; white-space: nowrap; }

/* האות עצמה - יעד הלחיצה. min 28px כדי שיהיה אפשר ללחוץ בטלפון. */
.otiot-app .ot {
  display: inline-block;
  min-width: .78em;
  padding: 3px 1px;
  margin: 0 .01em;
  border-radius: 3px;
  border: 1px solid transparent;
  text-align: center;
  transition: background-color .12s, color .12s, border-color .12s;
}
.otiot-app .ot:hover { border-color: var(--ink-faint); background: #fff; }
.otiot-app .ot.is-selected { background: var(--cta); color: #fff; border-color: var(--cta); }
.otiot-app .ot.is-pending { background: var(--pending-wash); border-color: #ffe18a; color: #7b5a20; cursor: not-allowed; }
.otiot-app .ot.is-paid { background: var(--paid); color: var(--klaf); border-color: var(--paid); }
.otiot-app .ot.is-paid:hover { background: #4f555b; }

/* במסכי מגע אין hover - הכפתור חייב להיות גלוי תמיד */
.otiot-app @media (hover: none) {
  .buy-verse { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .otiot-app * { transition: none !important; animation: none !important; }
  .otiot-app .buy-verse { opacity: 1; }
}

/* ---------------- חיפוש ---------------- */
.otiot-app .search-form { background: var(--klaf); border: 1px solid var(--klaf-edge);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.otiot-app .search-form > label { display: block; font-weight: 600; margin-bottom: 8px; }
.otiot-app .search-row { display: flex; gap: 8px; }
.otiot-app .search-row input {
  flex: 1; font-family: var(--display); font-size: 22px; padding: 10px 14px;
  border: 1px solid #e0d7bd; border-radius: var(--radius); background: #fff; color: var(--ink);
}
.otiot-app .search-hint { font-size: 13px; color: var(--ink-soft); margin: 10px 0 0; }

.otiot-app .result-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.otiot-app .result {
  background: var(--klaf); border: 1px solid var(--klaf-edge); border-radius: var(--radius);
  padding: 12px 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.otiot-app .result-text { font-family: var(--otiot-torah-font, var(--display)); font-size: calc(26px * var(--otiot-scale, 1)); letter-spacing: .02em; }
.otiot-app .result-ref { color: var(--ink-soft); font-size: 14px; }
.otiot-app .result .spacer { margin-inline-start: auto; }
.otiot-app .result.is-taken { opacity: .55; }
.otiot-app .result-taken-note { font-size: 13px; color: var(--pending); font-weight: 600; }

.otiot-app .summary { margin: 16px 0 0; font-size: 15px; color: var(--ink-soft); }

/* ---------------- סל ---------------- */
.otiot-app .cart[hidden] { display: none; }
.otiot-app .cart {
  position: fixed; inset-block: 0; inset-inline-start: 0; width: min(420px, 92vw);
  background: var(--klaf); border-inline-end: 1px solid var(--klaf-edge);
  display: flex; flex-direction: column; z-index: 40;
  box-shadow: 0 0 60px -10px rgba(89,96,104,.25);
}
.otiot-app .cart-head, .otiot-app .sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--klaf-edge);
}
.otiot-app .cart-head h2, .otiot-app .sheet-head h2 { font-size: 20px; }
.otiot-app .close { padding: 4px 10px; font-size: 18px; line-height: 1; }

.otiot-app .cart-timer {
  margin: 0; padding: 9px 18px; background: var(--pending-wash);
  color: #7b5a20; font-size: 13.5px; font-weight: 600; border-bottom: 1px solid #ffe18a;
}
.otiot-app .cart-items { list-style: none; margin: 0; padding: 8px 0; overflow-y: auto; flex: 1; }
.otiot-app .cart-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 18px;
  border-bottom: 1px solid rgba(224,210,180,.6);
}
.otiot-app .cart-item-main { flex: 1; min-width: 0; }
.otiot-app .cart-item-label { font-family: var(--display); font-size: 18px; }
.otiot-app .cart-item-kind { font-size: 12.5px; color: var(--ink-faint); }
.otiot-app .cart-item-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.otiot-app .remove {
  background: none; border: none; color: var(--ink-faint); font-size: 18px; padding: 4px 8px;
}
.otiot-app .remove:hover { color: var(--cta); }
.otiot-app .cart-empty { padding: 40px 18px; text-align: center; color: var(--ink-faint); }

.otiot-app .cart-foot { padding: 16px 18px; border-top: 1px solid var(--klaf-edge); background: #fff9e7; }
.otiot-app .cart-total { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 17px; }
.otiot-app .cart-total strong { font-size: 22px; font-variant-numeric: tabular-nums; }

.otiot-app .scrim { position: fixed; inset: 0; background: rgba(22,18,11,.45); z-index: 35; }

.otiot-app .primary {
  background: var(--cta); color: #fff; border: 1px solid var(--cta);
  border-radius: var(--radius); padding: 12px 20px; font-weight: 700;
}
.otiot-app .primary:hover { background: var(--cta-hover); }
.otiot-app .primary:disabled { background: #d9d9d9; border-color: #d9d9d9; cursor: not-allowed; }
.otiot-app .block { display: block; width: 100%; }

/* ---------------- חלוניות ---------------- */
.otiot-app .sheet {
  border: none; border-radius: 8px; padding: 0; width: min(560px, 94vw);
  background: var(--klaf); color: var(--ink); box-shadow: var(--shadow);
}
.otiot-app .sheet.narrow { width: min(400px, 94vw); }
.otiot-app .sheet::backdrop { background: rgba(22,18,11,.55); }
.otiot-app .sheet-body { padding: 20px; max-height: 78vh; overflow-y: auto; }

.otiot-app #buyer-form label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 14.5px; }
.otiot-app #buyer-form input:not([type=checkbox]), .otiot-app #buyer-form textarea {
  display: block; width: 100%; margin-top: 5px; font-family: inherit; font-size: 16px;
  padding: 10px 12px; border: 1px solid #e0d7bd; border-radius: var(--radius);
  background: #fff; color: var(--ink);
}
.otiot-app #buyer-form textarea { resize: vertical; }
.otiot-app #buyer-form .hint { font-weight: 400; color: var(--ink-faint); font-size: 12.5px; }
.otiot-app #buyer-form .req { color: var(--cta); }
.otiot-app .checkbox { display: flex !important; align-items: center; gap: 9px; font-weight: 400 !important; }
.otiot-app .sheet-total { text-align: center; font-size: 17px; margin: 18px 0; }
.otiot-app .sheet-total strong { font-size: 24px; }

.otiot-app .secure-note {
  background: var(--paid-wash); border: 1px solid #ececec; border-radius: var(--radius);
  padding: 10px 12px; font-size: 13.5px; color: #596068; margin: 0 0 14px;
}
.otiot-app #nedarim-frame { width: 100%; min-height: 480px; border: none; background: #fff; border-radius: var(--radius); }
.otiot-app .payment-status { text-align: center; color: var(--ink-soft); font-size: 14px; }

.otiot-app .done-mark {
  width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--paid); color: #fff; display: grid; place-items: center; font-size: 32px;
}
.otiot-app #done-step { text-align: center; }
.otiot-app .certificate {
  background: #fff; border: 2px double var(--paid); border-radius: var(--radius);
  padding: 20px; margin: 18px 0; font-family: var(--display);
}
.otiot-app .certificate ul { list-style: none; padding: 0; margin: 10px 0 0; font-size: 18px; }

.otiot-app .owner-card {
  background: var(--paid-wash); border-inline-start: 4px solid var(--paid);
  padding: 12px 14px; border-radius: var(--radius); margin-top: 12px;
}
.otiot-app .big-letter {
  font-family: var(--otiot-torah-font, var(--display)); font-size: calc(64px * var(--otiot-scale, 1)); line-height: 1; text-align: center;
  color: var(--ink); margin-bottom: 6px;
}

.otiot-app .toast {
  position: fixed; inset-block-end: 22px; inset-inline: 16px; margin: 0 auto;
  max-width: 460px; background: var(--ink); color: var(--klaf);
  padding: 13px 18px; border-radius: var(--radius); z-index: 60;
  box-shadow: var(--shadow); font-weight: 600; text-align: center;
}
.otiot-app .toast.is-error { background: var(--cta); }

@media (max-width: 640px) {
  .otiot-app .masthead-inner { grid-template-columns: 1fr auto; }
  .otiot-app .brand h1 { font-size: 19px; }
  .otiot-app .klaf { padding: 18px 12px; }
  .otiot-app .verse-text { line-height: 2.15; }
}

/* ---------------- מונה בלבד, לקוד הקצר view="counter" ---------------- */

.otiot-counter { max-width: 520px; margin: 0 auto; direction: rtl; text-align: center; }
.otiot-counter-track {
  height: 10px; border-radius: 999px; background: #E2D9C6;
  overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.15);
}
.otiot-counter-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #d8a400, #ffc51f);
}
.otiot-counter p { margin: 8px 0 0; font-size: 15px; }

/* ---------------- הגנה מפני תבניות אגרסיביות ---------------- */
/* תבניות רבות מגדירות כללים גורפים ל-button ול-input. הכללים כאן
   מבטיחים שהמערכת נראית כמו שתוכננה גם בתוך תבנית עמוסה. */

.otiot-app button { text-transform: none; letter-spacing: normal; box-shadow: none; }
.otiot-app input, .otiot-app select, .otiot-app textarea { max-width: 100%; box-shadow: none; }
.otiot-app dialog { max-width: 96vw; }
.otiot-app ul { list-style: none; }

/* ---------------- סינון ומידע על הפרק ---------------- */

.otiot-app .filters {
  display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center;
  margin-bottom: 12px; font-size: 14px;
}
.otiot-app .filter-note { color: var(--ink-soft); margin-inline-start: auto; }

/* אות תפוסה במצב "רק פנויות": נשארת במקום כדי שהמילה לא תתפרק,
   אבל דוהה כך שהעין קופצת ישר לפנויות */
.otiot-app .ot.is-dimmed { opacity: .16; }
.otiot-app .ot.is-dimmed:hover { opacity: .5; }

.otiot-app .view-intro {
  color: var(--ink-soft); font-size: 15px; margin: 0 0 18px; max-width: 62ch;
}

/* ---------------- סגולות ---------------- */

.otiot-app .sections-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.otiot-app .section-card {
  background: var(--klaf); border: 1px solid var(--klaf-edge);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; display: flex; flex-direction: column; gap: 6px;
}
.otiot-app .section-card h3 { font-size: 21px; }
.otiot-app .section-desc { margin: 0; font-size: 14px; color: var(--ink-soft); }
.otiot-app .section-preview {
  font-family: var(--otiot-torah-font, var(--display)); font-size: calc(19px * var(--otiot-scale, 1)); line-height: 1.7;
  margin: 6px 0; color: var(--ink); letter-spacing: .01em;
  border-inline-start: 3px solid var(--pending); padding-inline-start: 10px;
}
.otiot-app .section-meta { margin: 0; font-size: 12.5px; color: var(--ink-faint); }
.otiot-app .section-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: auto; padding-top: 12px;
}
.otiot-app .section-price {
  font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.otiot-app .section-card.is-taken { opacity: .55; }

/* ---------------- אות אקראית ---------------- */

.otiot-app .random-box {
  background: var(--klaf); border: 1px solid var(--klaf-edge);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; max-width: 620px;
}
.otiot-app .random-box h2 { font-size: 23px; margin-bottom: 8px; }
.otiot-app .random-row {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px;
}
.otiot-app .random-row label { font-weight: 600; font-size: 14px; }
.otiot-app .random-row select {
  font-family: inherit; font-size: 16px; padding: 9px 12px;
  border: 1px solid #e0d7bd; border-radius: var(--radius);
  background: #fff; color: var(--ink);
}
.otiot-app .random-list {
  list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 7px;
}
.otiot-app .random-list li {
  display: flex; align-items: center; gap: 12px;
  background: #fff9e7; border-radius: var(--radius); padding: 8px 12px;
}
.otiot-app .random-letter {
  font-family: var(--otiot-torah-font, var(--display)); font-size: calc(28px * var(--otiot-scale, 1)); line-height: 1;
  min-width: 1.4em; text-align: center; color: var(--cta);
}
.otiot-app .random-actions { display: flex; gap: 10px; margin-top: 14px; }

/* ---------------- מצבי חיפוש ---------------- */

.otiot-app .search-modes { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.otiot-app .radio {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid #e0d7bd; border-radius: 999px; padding: 7px 14px;
  font-size: 14px; background: #fff;
}
.otiot-app .radio:has(input:checked) {
  border-color: var(--cta); background: var(--cta); color: #fff; font-weight: 600;
}
.otiot-app .radio input { accent-color: var(--cta); }

/* ---------------- תוצאת חיפוש מפוזר ---------------- */

.otiot-app .hit {
  background: var(--klaf); border: 1px solid var(--klaf-edge);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; margin-bottom: 12px;
}
.otiot-app .hit-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 14.5px; color: var(--ink-soft); margin-bottom: 8px;
}
.otiot-app .hit-num {
  background: var(--page-deep); color: var(--ink-soft); border-radius: 999px;
  min-width: 24px; height: 24px; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700;
}
.otiot-app .hit-head strong { color: var(--ink); font-family: var(--display); font-size: 17px; }
.otiot-app .hit-note {
  font-size: 12px; color: var(--pending); border: 1px solid #ffe18a;
  border-radius: 3px; padding: 1px 7px;
}

.otiot-app .hit-verse {
  font-family: var(--otiot-torah-font, var(--display)); font-size: calc(clamp(19px, 2.2vw, 23px) * var(--otiot-scale, 1));
  line-height: 1.95; margin: 0 0 14px; color: var(--ink-faint);
}
.otiot-app .hit-verse .vl { display: inline-block; }

/* האות המודגשת: זו שהתורם קונה */
.otiot-app .hit-verse .vl.is-match {
  color: var(--cta); font-weight: 700;
  background: #F2E2D8; border-radius: 3px; padding: 1px 2px; margin: 0 .5px;
}
/* אות בפסוק שכבר נמכרה לתורם אחר */
.otiot-app .hit-verse .vl.is-sold { color: var(--paid); text-decoration: underline dotted; }
.otiot-app .hit-verse .vl.is-match.is-sold {
  background: var(--paid-wash); color: var(--paid);
}

.otiot-app .hit-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.otiot-app .hit-actions button { font-size: 14px; padding: 8px 14px; }

/* ---------------- רכישה כמותית ---------------- */

.otiot-app .bulk-presets { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.otiot-app .bulk-presets button { padding: 6px 15px; font-size: 14px; }
.otiot-app .random-row input[type="number"] {
  font-family: inherit; font-size: 16px; padding: 9px 12px; width: 120px;
  border: 1px solid #e0d7bd; border-radius: var(--radius); background: #fff; color: var(--ink);
}
.otiot-app .bulk-summary {
  background: #fff9e7; border: 1px solid var(--klaf-edge); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 16px; text-align: center;
}
.otiot-app .bulk-total {
  font-family: var(--display); font-size: 38px; font-weight: 700;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.otiot-app .bulk-summary p { margin: 6px 0 0; color: var(--ink-soft); font-size: 14.5px; }
.otiot-app .bulk-saved {
  color: var(--paid); background: var(--paid-wash);
  border-radius: 3px; padding: 1px 8px; margin-inline-start: 8px;
}
.otiot-app .random-more {
  justify-content: center; color: var(--ink-faint); font-size: 14px; background: none;
}

/* ---------------- אביזרים ותרומה חופשית ---------------- */

.otiot-app .section-foot.custom { gap: 6px; }
.otiot-app .section-foot.custom input[type="number"] {
  font-family: inherit; font-size: 17px; padding: 8px 10px; width: 100px;
  border: 1px solid #e0d7bd; border-radius: var(--radius);
  background: #fff; color: var(--ink); text-align: center;
}
.otiot-app .section-foot.custom .currency {
  font-size: 18px; font-weight: 700; color: var(--ink-soft); margin-inline-end: auto;
}

/* תפריט הפרשיות ארוך - נותנים לו רוחב שמכיל את השם המלא */
.otiot-app #otiot-parasha-select { min-width: 210px; }

/* ==================================================================
   עיצוב נבחר: תורני, מכובד ויוקרתי
   שינוי חזותי בלבד — ללא שינוי במבנה או בפונקציונליות.
   ================================================================== */
.otiot-app {
  --klaf: #fffdf7;
  --klaf-edge: #e4e4e4;
  --page: #f4f1e8;
  --page-deep: #ebe6da;
  --ink: #263126;
  --ink-soft: #676d62;
  --ink-faint: #929486;
  --paid: #405a50;
  --paid-wash: #e5ece8;
  --pending: #d8a400;
  --pending-wash: #ffe18a;
  --cta: #9b7432;
  --cta-hover: #7b5a20;
  --radius: 10px;
  --shadow: 0 16px 38px rgba(53, 51, 41, .08);
  background: #f4f1e8;
  color: var(--ink);
}

.otiot-app .masthead {
  background: #263126;
  color: #fffdf7;
  padding: 23px 0 20px;
  border-bottom: 1px solid rgba(215,181,109,.32);
}
.otiot-app .masthead-inner {
  max-width: 1180px;
  padding: 0 28px;
  grid-template-columns: minmax(260px,1fr) minmax(300px,430px) auto;
  gap: 28px;
}
.otiot-app .brand h1 { font-size: 29px; color: #fffdf7; }
.otiot-app .brand p { color: #e4e4e4; font-size: 14px; margin-top: 5px; }
.otiot-app .scroll-gauge { grid-column: auto; order: initial; }
.otiot-app .gauge-track { height: 8px; background: #475448; box-shadow: none; }
.otiot-app .gauge-fill { background: #ffc51f; }
.otiot-app .gauge-caption { color: #e4e4e4; margin-top: 8px; }
.otiot-app .gauge-caption strong { color: #f0d99f; }
.otiot-app .cart-button {
  background: #ffc51f;
  color: #292e26;
  border: 1px solid #ffc51f;
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 7px 18px rgba(0,0,0,.12);
}
.otiot-app .cart-button:hover { background: #ffe18a; border-color: #ffe18a; }
.otiot-app .cart-count { background: #263126; color: #fff; }

.otiot-app .legend-bar {
  background: #faf8f2;
  border-bottom: 1px solid #ded8c9;
}
.otiot-app .legend-inner { max-width: 1180px; padding: 10px 28px; }
.otiot-app .swatch { border-radius: 4px; }
.otiot-app .swatch.is-free { background: #fffdf7; border-color: #c9c0ad; }
.otiot-app .swatch.is-pending { background: #ffe18a; border-color: #c4a35c; }
.otiot-app .swatch.is-paid { background: #405a50; }

.otiot-app main { max-width: 1180px; padding: 0 28px 130px; }
.otiot-app .tabs {
  margin: 0 -28px 28px;
  padding: 0 28px;
  min-height: 64px;
  align-items: stretch;
  gap: 6px;
  background: #faf8f2;
  border-bottom: 1px solid #ded8c9;
  overflow-x: auto;
}
.otiot-app .tab {
  border-bottom-width: 3px;
  padding: 19px 15px 15px;
  color: #666c61;
  white-space: nowrap;
  border-radius: 0;
}
.otiot-app .tab:hover { color: #263126; background: rgba(215,181,109,.08); }
.otiot-app .tab.is-active { color: #263126; border-bottom-color: #d8a400; }

.otiot-app .picker {
  gap: 14px;
  padding: 18px 20px;
  background: #faf8f2;
  border: 1px solid #ded8c9;
  border-radius: 16px;
  margin-bottom: 14px;
}
.otiot-app .picker label { color: #737568; gap: 7px; }
.otiot-app .picker select,
.otiot-app .search-row input,
.otiot-app #otiot-buyer-form input:not([type=checkbox]),
.otiot-app #otiot-buyer-form textarea,
.otiot-app .random-row input,
.otiot-app .random-row select {
  background: #fffdf7;
  border: 1px solid #eadfbd;
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.otiot-app .picker select { min-width: 155px; padding: 11px 14px; }
.otiot-app .ghost {
  background: #fffdf7;
  border: 1px solid #eadfbd;
  color: #263126;
  border-radius: 11px;
}
.otiot-app .ghost:hover { background: #fff; border-color: #bda66e; }
.otiot-app .filters { padding: 0 4px 10px; }

.otiot-app .klaf {
  background: #fffdf7;
  border: 1px solid #e4e4e4;
  border-radius: 18px;
  box-shadow: 0 13px 34px rgba(52,51,41,.08);
  padding: 34px 36px;
  background-image: linear-gradient(rgba(255,255,255,.28),rgba(255,255,255,.28));
}
.otiot-app .verse { border-radius: 11px; padding: 9px 12px 11px; }
.otiot-app .verse:hover { background: #f7f2e7; }
.otiot-app .verse-head { color: #858778; }
.otiot-app .verse-num { color: #9b7432; }
.otiot-app .verse-text { color: #20271f; line-height: 2.08; }
.otiot-app .ot:hover { background: #fff; border-color: #b9ad92; }
.otiot-app .ot.is-selected { background: #9b7432; border-color: #9b7432; }
.otiot-app .ot.is-pending { background: #ffe18a; border-color: #c8a85d; color: #74571c; }
.otiot-app .ot.is-paid { background: #405a50; border-color: #405a50; color: #fffdf7; }

.otiot-app .search-form,
.otiot-app .random-box,
.otiot-app .section-card,
.otiot-app .item-card,
.otiot-app .result {
  background: #fffdf7;
  border: 1px solid #e4e4e4;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(52,51,41,.06);
}
.otiot-app .search-form { padding: 26px; }
.otiot-app .search-row input { padding: 12px 15px; }
.otiot-app .primary {
  background: #9b7432;
  color: #fff;
  border-color: #9b7432;
  border-radius: 11px;
  box-shadow: 0 6px 14px rgba(116,85,31,.14);
}
.otiot-app .primary:hover { background: #7b5a20; border-color: #7b5a20; }

.otiot-app .cart {
  background: #fffdf7;
  border-inline-end: 1px solid #d8cfbd;
  box-shadow: 0 0 70px rgba(28,32,26,.28);
}
.otiot-app .cart-head,
.otiot-app .sheet-head { background: #faf8f2; border-bottom-color: #ded8c9; }
.otiot-app .cart-foot { background: #f4efe4; border-top-color: #ded8c9; }
.otiot-app .sheet {
  background: #fffdf7;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(30,34,28,.28);
}
.otiot-app .sheet::backdrop { background: rgba(30,34,28,.58); }
.otiot-app .done-mark { background: #405a50; color: #fff; }

@media (max-width: 820px) {
  .otiot-app .masthead-inner {
    grid-template-columns: 1fr auto;
    gap: 16px;
  }
  .otiot-app .scroll-gauge { grid-column: 1 / -1; order: 3; }
  .otiot-app main { padding-inline: 16px; }
  .otiot-app .tabs { margin-inline: -16px; padding-inline: 16px; }
  .otiot-app .klaf { padding: 24px 18px; }
}


/* ---------------- אייקונים וקטוריים מונוכרומטיים ---------------- */
.otiot-app .has-otiot-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.otiot-app .otiot-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  display: inline-block;
}
.otiot-app .tab .otiot-icon { width: 20px; height: 20px; flex-basis: 20px; }
.otiot-app .cart-button .otiot-icon { width: 21px; height: 21px; flex-basis: 21px; }
.otiot-app .close .otiot-icon,
.otiot-app .remove .otiot-icon { width: 18px; height: 18px; flex-basis: 18px; }
.otiot-app .done-mark .otiot-icon { width: 38px; height: 38px; }
.otiot-app .otiot-icon--blue { color: #315f74; }
.otiot-app .otiot-icon--green { color: #41685a; }
.otiot-app .otiot-icon--red { color: #9b4545; }
.otiot-app .otiot-icon--gold { color: #9b7432; }
.otiot-app .otiot-icon--purple { color: #6f5b86; }
.otiot-app .primary .otiot-icon,
.otiot-app .cart-button .otiot-icon { color: currentColor; }
.otiot-app .close,
.otiot-app .remove { padding: 8px; min-width: 36px; min-height: 36px; }
.otiot-app .close .otiot-button-label,
.otiot-app .remove .otiot-button-label { display: none; }
.otiot-app .tab { gap: 8px; }
.otiot-app .done-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef3ef;
  border: 1px solid #cbdacf;
}

/* ---------------- חלונית בחירה: רכישה מהירה או סל ---------------- */

.otiot-app .choice-title {
  font-family: var(--display); font-size: 21px; text-align: center; margin: 4px 0 2px;
}
.otiot-app .choice-sub {
  text-align: center; color: var(--ink-soft); font-size: 14px; margin: 0 0 10px;
}
.otiot-app .choice-price {
  text-align: center; font-size: 30px; font-weight: 700;
  font-variant-numeric: tabular-nums; margin: 0 0 18px;
}
.otiot-app .choice-actions { display: grid; gap: 9px; }
.otiot-app .choice-note {
  text-align: center; color: var(--ink-faint); font-size: 12.5px; margin: 14px 0 0;
}

/* ---------------- מצב גבאי ---------------- */

.otiot-app .admin-key {
  background: none; border: none; padding: 4px 6px; line-height: 0;
  color: var(--ink-faint); opacity: .45; cursor: pointer;
  margin-inline-start: 8px;
}
.otiot-app .admin-key:hover { opacity: 1; color: var(--cta); }
.otiot-app .admin-key svg { width: 17px; height: 17px; }

.otiot-app .gabbai-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; background: var(--paid); color: var(--klaf);
  padding: 10px 16px; font-size: 14.5px;
}
.otiot-app .gabbai-bar strong { color: #FFF; }
.otiot-app .gabbai-bar .ghost {
  background: transparent; border-color: rgba(255,255,255,.5); color: #fff; padding: 5px 14px;
}
.otiot-app .gabbai-bar .ghost:hover { background: rgba(255,255,255,.14); }

.otiot-app .login-error {
  background: #F6E2E2; border: 1px solid var(--cta); color: var(--cta);
  border-radius: var(--radius); padding: 9px 12px; font-size: 14px; font-weight: 600;
}
.otiot-app #otiot-login-form label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 14.5px; }
.otiot-app #otiot-login-form input {
  display: block; width: 100%; margin-top: 5px; font-family: inherit; font-size: 16px;
  padding: 10px 12px; border: 1px solid #e0d7bd; border-radius: var(--radius);
  background: #fff; color: var(--ink);
}

.otiot-app .record-note {
  background: var(--paid-wash); border: 1px solid #ececec; border-radius: var(--radius);
  padding: 11px 13px; font-size: 14px; color: #596068; margin: 0 0 16px;
}
.otiot-app #otiot-record-form label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 14.5px; }
.otiot-app #otiot-record-form select,
.otiot-app #otiot-record-form input {
  display: block; width: 100%; margin-top: 5px; font-family: inherit; font-size: 16px;
  padding: 10px 12px; border: 1px solid #e0d7bd; border-radius: var(--radius);
  background: #fff; color: var(--ink);
}

/* ---------------- טופס תשלום מוטמע ---------------- */

/* הטופס של נדרים פלוס צר וארוך. החלונית מתרחבת רק במצב הזה,
   כדי שהוא לא יידחס לעמודה צרה באמצע. */
.otiot-app dialog#otiot-checkout.is-embedded-payment,
dialog#otiot-checkout.is-embedded-payment {
  width: min(820px, 97vw);
  max-width: 97vw;
}
dialog#otiot-checkout.is-embedded-payment .sheet-body {
  padding: 14px;
  max-height: 88vh;
}
dialog#otiot-checkout.is-embedded-payment .secure-note {
  margin-bottom: 10px; font-size: 13px; padding: 8px 11px;
}
dialog#otiot-checkout.is-embedded-payment #otiot-nedarim-frame {
  width: 100%;
  height: min(72vh, 760px);
  min-height: 560px;
  border: 1px solid var(--klaf-edge);
  border-radius: var(--radius);
  background: #fff;
  display: block;
}

/* שורת הסכום מעל הטופס — התורם רואה כמה הוא עומד לשלם
   בלי לגלול עד שדה הסכום בתוך המסגרת */
.otiot-app .payment-status,
dialog#otiot-checkout .payment-status {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  align-items: center; justify-content: space-between;
  margin: 10px 0 0; text-align: start;
}
.otiot-app .pay-amount { font-size: 17px; }
.otiot-app .pay-amount strong {
  font-size: 22px; font-variant-numeric: tabular-nums; color: var(--cta);
}
.otiot-app .pay-fallback { font-size: 13px; color: var(--ink-soft); }

@media (max-width: 640px) {
  dialog#otiot-checkout.is-embedded-payment { width: 100vw; max-width: 100vw; border-radius: 0; }
  dialog#otiot-checkout.is-embedded-payment .sheet-body { padding: 8px; max-height: 92vh; }
  dialog#otiot-checkout.is-embedded-payment #otiot-nedarim-frame { height: 76vh; min-height: 480px; }
}
