.rst-container,
.rst-container * { box-sizing: border-box; }

.rst-container {
    --rst-text: #171717;
    --rst-muted: #6b6b6b;
    --rst-line: #e7e2db;
    --rst-soft: #f7f4ef;
    --rst-accent: #171717;
    --rst-bg: #fff;
    width: 100%;
    max-width: 680px;
    margin: 24px auto;
    color: var(--rst-text);
    font-family: inherit;
    line-height: 1.7;
}

.rst-card {
    background: var(--rst-bg);
    border: 1px solid var(--rst-line);
    border-radius: 24px;
    padding: 28px;
    overflow: hidden;
}

.rst-header { text-align: center; margin-bottom: 24px; }
.rst-kicker { display: inline-block; font-size: 12px; color: var(--rst-muted); margin-bottom: 6px; }
.rst-header h2 { margin: 0 0 8px; font-size: clamp(23px, 4vw, 32px); line-height: 1.35; color: var(--rst-text); }
.rst-header p { max-width: 560px; margin: 0 auto; color: var(--rst-muted); font-size: 14px; }

.rst-steps { display: flex; align-items: flex-start; justify-content: center; margin: 22px 0 30px; }
.rst-step-dot { width: 84px; text-align: center; color: #aaa; font-size: 11px; }
.rst-step-dot span { display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 50%; border: 1px solid #d8d8d8; background: #fff; font-weight: 700; }
.rst-step-dot em { font-style: normal; white-space: nowrap; }
.rst-step-dot.is-active { color: var(--rst-text); }
.rst-step-dot.is-active span { background: var(--rst-text); color: #fff; border-color: var(--rst-text); }
.rst-step-dot.is-done span { background: #f0eee9; color: var(--rst-text); border-color: #d2ccc3; }
.rst-step-line { flex: 1 1 65px; max-width: 95px; height: 1px; background: #e2e2e2; margin-top: 15px; }

.rst-panel { display: none; }
.rst-panel.is-active { display: block; animation: rstFade .18s ease-out; }
@keyframes rstFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.rst-instruction { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--rst-soft); border-radius: 16px; margin-bottom: 22px; }
.rst-instruction strong { display: block; margin-bottom: 2px; font-size: 14px; }
.rst-instruction p { margin: 0; color: var(--rst-muted); font-size: 13px; }
.rst-badge { flex: 0 0 28px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--rst-text); color: #fff; font-size: 12px; font-weight: 700; }

.rst-calib-area { min-height: 500px; display: grid; place-items: center; overflow: visible; padding: 10px 0; }
.rst-card-outline {
    position: relative;
    width: 204px;
    aspect-ratio: 53.98 / 85.60;
    border: 2px solid var(--rst-text);
    border-radius: 12px;
    background: repeating-linear-gradient(135deg, #fff, #fff 8px, #fafafa 8px, #fafafa 16px);
    transform-origin: center center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
    touch-action: none;
}
.rst-card-outline::before,
.rst-card-outline::after { content: ""; position: absolute; background: var(--rst-text); opacity: .15; }
.rst-card-outline::before { width: 1px; height: calc(100% + 18px); left: 50%; top: -9px; }
.rst-card-outline::after { height: 1px; width: calc(100% + 18px); top: 50%; left: -9px; }
.rst-card-chip { width: 34px; height: 26px; border: 1px solid #b7b1a8; border-radius: 6px; margin-bottom: 10px; background: #f0eee9; }
.rst-card-copy { font-size: 11px; font-weight: 700; max-width: 145px; }
.rst-card-size { display: block; margin-top: 5px; font-size: 10px; color: var(--rst-muted); direction: ltr; }

.rst-slider-wrap { margin: 12px 0 18px; }
.rst-slider-labels { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--rst-muted); font-size: 11px; margin-bottom: 7px; }
.rst-container input[type="range"] { width: 100%; accent-color: var(--rst-accent); cursor: pointer; }

.rst-calib-tip,
.rst-precision-note { margin: -4px 0 16px; text-align: center; color: var(--rst-muted); font-size: 11px; }
.rst-saved { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--rst-soft); font-size: 12px; text-align: center; }
.rst-link-btn { border: 0; background: none; text-decoration: underline; cursor: pointer; color: inherit; font: inherit; margin-right: 5px; }

.rst-btn { appearance: none; border: 0; border-radius: 13px; min-height: 48px; padding: 11px 18px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: transform .15s ease, opacity .15s ease, background .15s ease; }
.rst-btn:active { transform: scale(.99); }
.rst-btn-primary { width: 100%; background: var(--rst-text); color: #fff; }
.rst-btn-ghost { background: #f3f1ed; color: var(--rst-text); }
.rst-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; margin-top: 18px; }
.rst-actions .rst-btn { width: 100%; }

.rst-ring-area { min-height: 250px; display: grid; place-items: center; padding: 16px; overflow: visible; }
.rst-ring { position: relative; width: 180px; height: 180px; display: grid; place-items: center; border-radius: 50%; }
.rst-hole {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 0;
    outline: 2px solid var(--rst-text);
    border-radius: 50%;
    background: rgba(255,255,255,.01);
    box-shadow: 0 0 0 8px rgba(23,23,23,.035), inset 0 0 0 1px rgba(255,255,255,.75);
}
.rst-hole::before,
.rst-hole::after { content: ""; position: absolute; background: rgba(23,23,23,.22); pointer-events: none; }
.rst-hole::before { width: 12px; height: 1px; left: 50%; top: 50%; transform: translate(-50%,-50%); }
.rst-hole::after { height: 12px; width: 1px; left: 50%; top: 50%; transform: translate(-50%,-50%); }
.rst-cross { position: absolute; display: none; }

.rst-live-mm { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin: 4px 0 13px; }
.rst-live-mm span { color: var(--rst-muted); font-size: 12px; }
.rst-live-mm strong { font-size: 24px; direction: ltr; }
.rst-live-mm strong b { font-size: inherit; }

.rst-fine-controls { display: grid; grid-template-columns: 42px 1fr 42px; gap: 10px; align-items: center; }
.rst-round-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid #d7d2ca; background: #fff; color: var(--rst-text); font-size: 22px; line-height: 1; cursor: pointer; }
.rst-round-btn:active { background: var(--rst-soft); }

.rst-result { text-align: center; padding-top: 8px; }
.rst-result-eyebrow { display: block; color: var(--rst-muted); font-size: 11px; margin-bottom: 4px; }
.rst-result-mm { display: block; direction: ltr; font-size: 36px; line-height: 1.2; font-weight: 800; }
.rst-result-mm small { font-size: 12px; font-weight: 500; color: var(--rst-muted); }
.rst-result-circ { display: inline-block; margin-top: 4px; color: var(--rst-muted); font-size: 12px; direction: rtl; }
.rst-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0 12px; text-align: right; }
.rst-result-item { border: 1px solid var(--rst-line); border-radius: 16px; padding: 16px; background: #fff; }
.rst-result-primary { background: var(--rst-soft); }
.rst-result-label { display: block; color: var(--rst-muted); font-size: 11px; margin-bottom: 5px; }
.rst-result-value { display: block; font-size: 30px; line-height: 1.1; font-weight: 800; direction: ltr; }
.rst-result-label-extra { display: inline-block; margin: 0 0 12px; padding: 6px 10px; border-radius: 999px; background: var(--rst-soft); font-size: 11px; }
.rst-disclaimer { margin: 12px 0 0; padding: 13px 14px; text-align: right; border-radius: 14px; background: #faf9f7; color: var(--rst-muted); font-size: 11px; }
.rst-disclaimer strong { display: block; color: var(--rst-text); margin-bottom: 2px; }
.rst-method-note { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--rst-line); color: #8a8a8a; font-size: 10px; text-align: center; }

@media (max-width: 540px) {
    .rst-container { margin: 12px auto; }
    .rst-card { border-radius: 18px; padding: 18px 14px; }
    .rst-header { margin-bottom: 18px; }
    .rst-steps { margin: 18px 0 24px; }
    .rst-step-dot { width: 70px; }
    .rst-calib-area { min-height: 480px; }
    .rst-result-grid { grid-template-columns: 1fr 1fr; }
    .rst-actions { grid-template-columns: 1fr 1.15fr; }
}

@media (max-width: 360px) {
    .rst-card { padding-left: 10px; padding-right: 10px; }
    .rst-step-dot em { font-size: 10px; }
    .rst-result-grid { grid-template-columns: 1fr; }
}
