/*! iMoon Script Formatter - (c) iMoon Studio */
.isf {
  --isf-accent: #d08a2e;
  --isf-accent-2: #a86b1c;
  --isf-text: currentColor;
  --isf-muted: color-mix(in srgb, currentColor 58%, transparent);
  --isf-faint: color-mix(in srgb, currentColor 32%, transparent);
  --isf-line: color-mix(in srgb, currentColor 16%, transparent);
  --isf-h: clamp(460px, 72vh, 780px);
  --isf-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --isf-courier: "Courier Prime", "Courier New", Courier, "Nimbus Mono PS", monospace;
  position: relative; display: block; width: 100%; box-sizing: border-box;
  background: transparent; font-family: inherit; font-size: 16px; line-height: 1.5;
}
.elementor-widget-imoon_script_formatter, .elementor-widget-imoon_script_formatter > .elementor-widget-container { width: 100%; max-width: 100%; }
.isf *, .isf *::before, .isf *::after { box-sizing: border-box; }

.isf-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin: 0 0 clamp(28px, 4vw, 48px); }
.isf-eyebrow { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 16px; font-family: var(--isf-mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--isf-accent); }
.isf-eyebrow::before { content: ""; width: 30px; height: 2px; background: var(--isf-accent); }
.isf .isf-title { margin: 0 0 14px; padding: 0; color: inherit; font-family: inherit; font-weight: 800; letter-spacing: -.035em; line-height: .98; font-size: clamp(34px, 5.2vw, 72px); text-transform: none; }
.isf-sub { margin: 0; max-width: 640px; color: var(--isf-muted); font-size: clamp(15px, 1.25vw, 18px); }

.isf-lang { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; font-family: var(--isf-mono); font-size: 12px; letter-spacing: .14em; }
.isf-lang span { color: var(--isf-faint); }
.isf .isf-lang button { all: unset; cursor: pointer; padding: 4px 6px; color: var(--isf-muted); border-bottom: 2px solid transparent; }
.isf .isf-lang button.is-on { color: inherit; border-bottom-color: var(--isf-accent); }
.isf .isf-lang button:focus-visible { outline: 2px solid var(--isf-accent); outline-offset: 2px; }

.isf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); gap: 10px; align-items: start; }
.isf-step { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-family: var(--isf-mono); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.isf-step b { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--isf-accent); color: var(--isf-accent); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; letter-spacing: 0; }
.isf-count { margin-left: auto; color: var(--isf-muted); font-weight: 400; letter-spacing: .12em; }

.isf-editor { display: flex; height: var(--isf-h); border-top: 2px solid var(--isf-accent); border-bottom: 1px solid var(--isf-line); }
.isf-gutter { flex: 0 0 auto; min-width: 44px; margin: 0; padding: 14px 10px 14px 0; overflow: hidden; white-space: pre; text-align: right; font-family: var(--isf-mono); font-size: 12px; line-height: 23px; color: var(--isf-faint); border-right: 1px solid var(--isf-line); user-select: none; }
.isf .isf-input { flex: 1 1 auto; min-width: 0; height: 100%; margin: 0; padding: 14px 0 14px 14px; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: none; resize: none; color: inherit; font-family: var(--isf-mono); font-size: 13px; line-height: 23px; white-space: pre; overflow: auto; }
.isf .isf-input::placeholder { color: var(--isf-faint); opacity: 1; }

.isf-arrow { display: flex; align-items: center; justify-content: center; height: var(--isf-h); margin-top: 42px; color: var(--isf-accent); }
.isf-arrow svg { width: 26px; height: 26px; }

.isf-viewer { position: relative; padding: 0 12px 12px 0; }
.isf-viewer::before { content: ""; position: absolute; inset: 12px 0 0 12px; background: #f1eee8; border: 1px solid rgba(0, 0, 0, .14); }
.isf-pages { position: relative; height: var(--isf-h); overflow-y: auto; overflow-x: hidden; container-type: inline-size; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; }
.isf-page { position: relative; flex: 0 0 auto; width: 100%; aspect-ratio: 210 / 297; overflow: hidden; background: #fff; color: #111; border: 1px solid rgba(0, 0, 0, .16); font-family: var(--isf-courier); font-size: calc(100cqw / 49.61); line-height: 1; padding: 6em 0 0 15ch; }
.isf-page--empty { display: flex; align-items: center; justify-content: center; padding: 0; }
.isf-empty { font-family: inherit; font-size: max(12px, 1.6em); color: #9a958c; }
.isf-body { position: relative; }
.isf-l { position: relative; height: 1em; line-height: 1em; white-space: pre; }
.isf-sn { position: absolute; top: 0; }
.isf-sn--l { left: -10ch; width: 3ch; text-align: right; }
.isf-sn--r { left: 60ch; }
.isf-pn { position: absolute; top: 3em; right: 10.68ch; }

.isf-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.isf-editor + .isf-actions { margin-top: 30px; }
.isf .isf-btn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 24px; margin: 0; border: 0; border-radius: 4px; background: var(--isf-accent); color: #fff; font-family: inherit; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; box-shadow: none; transition: background-color .2s, transform .1s; }
.isf .isf-btn:hover { background: var(--isf-accent-2); color: #fff; }
.isf .isf-btn:active { transform: scale(.98); }
.isf .isf-btn:focus-visible { outline: 2px solid var(--isf-accent); outline-offset: 3px; }
.isf-btn svg { width: 18px; height: 18px; }

.isf-msg { margin: 12px 0 0; font-size: 14px; color: #d64545; }
.isf-note { display: flex; gap: 12px; margin: 0 0 14px; padding: 2px 0 2px 14px; border-left: 2px solid var(--isf-accent); font-size: 14px; color: var(--isf-muted); }
.isf [hidden] { display: none !important; }

@media (max-width: 900px) {
  .isf-head { flex-direction: column-reverse; gap: 16px; }
  .isf-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .isf-arrow { height: 44px; margin: 0; transform: rotate(90deg); }
  .isf { --isf-h: 62vh; }
}
@media print { .isf { display: none; } }
.isf .isf-input:focus, .isf .isf-input:hover { border: 0; box-shadow: none; outline: none; background: transparent; }
