/* Dr. Sonia Review Helper - front end. Mobile-first, no external fonts. */
html.dsrh-lock, html.dsrh-lock body { overflow: hidden; }
body.dsrh-body { margin: 0; background: #fff; }

.dsrh {
	--dsrh-primary: #136b45;
	--dsrh-secondary: #eaf5ee;
	--dsrh-ink: #14231c;
	--dsrh-muted: #53675c;
	--dsrh-line: #d5e5db;
	box-sizing: border-box;
	max-width: 600px;
	margin: 0 auto;
	padding: 0 18px calc(40px + env(safe-area-inset-bottom, 0px));
	background: #fff;
	color: var(--dsrh-ink);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", sans-serif;
	font-size: 18px;
	line-height: 1.55;
	-webkit-text-size-adjust: 100%;
}
.dsrh *, .dsrh *::before, .dsrh *::after { box-sizing: border-box; }
:where(.dsrh) :where(p, h1, h2, ol) { margin: 0; padding: 0; }
:where(.dsrh) :where(button, textarea) { font: inherit; }
.dsrh button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dsrh :focus-visible { outline: 3px solid var(--dsrh-primary); outline-offset: 2px; }
.dsrh [hidden] { display: none !important; }

/* top bar */
.dsrh-top { display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top, 0px)) 0 14px; border-bottom: 1px solid var(--dsrh-line); flex-wrap: wrap; }
.dsrh-logo, .dsrh-mono { width: 52px; height: 52px; border-radius: 14px; flex: none; }
.dsrh-logo { object-fit: contain; border: 1px solid var(--dsrh-line); background: #fff; }
.dsrh-mono { display: flex; align-items: center; justify-content: center; background: var(--dsrh-primary); color: #fff; font-size: 22px; font-weight: 800; letter-spacing: 0.02em; }
.dsrh-top-text { flex: 1; min-width: 150px; }
.dsrh-clinic { font-weight: 700; font-size: 16px; line-height: 1.3; }
.dsrh-city { color: var(--dsrh-muted); font-size: 14px; }
.dsrh-lang { display: inline-flex; border: 1.5px solid var(--dsrh-line); border-radius: 999px; overflow: hidden; }
.dsrh-lang button { border: 0; background: #fff; color: var(--dsrh-muted); padding: 0 14px; min-height: 40px; font-size: 15px; }
.dsrh-lang button[aria-pressed="true"] { background: var(--dsrh-primary); color: #fff; font-weight: 700; }

/* hero */
.dsrh-hero { padding: 26px 0 6px; }
.dsrh-title { font-size: 29px; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
.dsrh-intro { margin-top: 10px; color: var(--dsrh-muted); font-size: 17px; }
.dsrh-quick { display: inline-block; margin-top: 16px; padding: 10px 14px; background: var(--dsrh-secondary); border-radius: 12px; color: var(--dsrh-primary); font-weight: 700; font-size: 16px; }

/* steps */
.dsrh-step { margin-top: 34px; }
.dsrh-step-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.dsrh-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--dsrh-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; margin-top: 1px; }
.dsrh-step-title { font-size: 21px; line-height: 1.3; font-weight: 800; }
.dsrh-tag { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: var(--dsrh-secondary); color: var(--dsrh-primary); font-size: 13px; font-weight: 700; vertical-align: middle; }
.dsrh-hint { color: var(--dsrh-muted); font-size: 16px; margin: 0 0 12px 46px; }

/* topics */
.dsrh-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dsrh-topic { min-height: 60px; padding: 10px 14px; border: 2px solid var(--dsrh-line); border-radius: 16px; background: #fff; color: var(--dsrh-ink); font-weight: 700; font-size: 17px; line-height: 1.3; text-align: left; }
.dsrh-topic[aria-checked="true"] { border-color: var(--dsrh-primary); background: var(--dsrh-primary); color: #fff; }
.dsrh-topic:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* chips */
.dsrh-chips { display: flex; flex-direction: column; gap: 8px; }
.dsrh-chip { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 14px; border: 2px solid var(--dsrh-line); border-radius: 14px; background: #fff; color: var(--dsrh-ink); text-align: left; font-size: 17px; line-height: 1.35; }
.dsrh-chip::before { content: ""; flex: none; width: 24px; height: 24px; border: 2px solid #9fb8a9; border-radius: 7px; background: #fff; }
.dsrh-chip[aria-pressed="true"] { border-color: var(--dsrh-primary); background: var(--dsrh-secondary); font-weight: 600; }
.dsrh-chip[aria-pressed="true"]::before { border-color: var(--dsrh-primary); background: var(--dsrh-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }

/* review cards */
.dsrh-cards { display: grid; gap: 14px; }
.dsrh-card { border: 2px solid var(--dsrh-line); border-radius: 20px; padding: 16px; background: #fff; }
.dsrh-card-label { color: var(--dsrh-primary); font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.dsrh-card-text { font-size: 18px; line-height: 1.6; margin-bottom: 14px; }
.dsrh-edit { display: block; width: 100%; margin-bottom: 14px; padding: 12px 14px; border: 2px solid var(--dsrh-primary); border-radius: 14px; background: #fff; color: var(--dsrh-ink); line-height: 1.55; resize: vertical; }
.dsrh-card-actions { display: grid; gap: 8px; }

.dsrh-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 12px 18px; border-radius: 16px; border: 2px solid var(--dsrh-primary); font-size: 18px; font-weight: 800; line-height: 1.25; text-align: center; }
.dsrh-btn--main { background: var(--dsrh-primary); color: #fff; }
.dsrh-btn--main:active { filter: brightness(0.92); }
.dsrh-btn--ghost { min-height: 48px; background: #fff; color: var(--dsrh-primary); border-color: transparent; font-size: 16px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.dsrh-more { display: flex; margin: 14px auto 0; min-height: 48px; padding: 10px 22px; border: 2px solid var(--dsrh-line); border-radius: 999px; background: #fff; color: var(--dsrh-primary); font-weight: 700; font-size: 16px; align-items: center; }

/* footer */
.dsrh-foot { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--dsrh-line); text-align: center; }
.dsrh-foot-msg { font-weight: 700; margin-bottom: 8px; }
.dsrh-small { font-size: 14px; color: var(--dsrh-muted); margin-top: 6px; line-height: 1.5; }

/* "copied" screen */
.dsrh-overlay { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: flex-end; justify-content: center; background: rgba(12, 28, 20, 0.6); }
.dsrh-sheet { width: 100%; max-width: 560px; max-height: 94vh; overflow-y: auto; padding: 26px 20px calc(22px + env(safe-area-inset-bottom, 0px)); background: #fff; border-radius: 26px 26px 0 0; text-align: center; }
.dsrh-tick { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: var(--dsrh-primary); display: flex; align-items: center; justify-content: center; }
.dsrh-sheet-title { font-size: 26px; font-weight: 800; }
.dsrh-sheet-sub { margin-top: 4px; color: var(--dsrh-muted); font-size: 17px; }
.dsrh-preview { margin: 14px 0; padding: 12px 14px; border-radius: 14px; background: var(--dsrh-secondary); font-size: 16px; line-height: 1.5; max-height: 96px; text-align: left; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dsrh-how { font-weight: 800; text-align: left; margin-bottom: 4px; }
.dsrh-howlist { text-align: left; padding-left: 24px !important; margin-bottom: 18px !important; font-size: 17px; }
.dsrh-howlist li { margin-bottom: 4px; }
.dsrh-sheet .dsrh-btn { margin-top: 6px; }
.dsrh-fallback { display: block; width: 100%; margin: 12px 0; padding: 12px 14px; border: 2px solid var(--dsrh-primary); border-radius: 14px; font-size: 16px; line-height: 1.5; }

@media (min-width: 640px) {
	.dsrh { padding-left: 24px; padding-right: 24px; }
	.dsrh-title { font-size: 34px; }
	.dsrh-overlay { align-items: center; }
	.dsrh-sheet { border-radius: 26px; }
}
@media (prefers-reduced-motion: reduce) { .dsrh * { transition: none !important; animation: none !important; } }
