/* META AI – Bagrut Writing corner (preview). Uses style.css + exam.css. */
.t-writing .bx-tile-ic, .t-speaking .bx-tile-ic { background: #DFF1EA; font-size: 30px; }
.t-speaking .bx-tile-ic { background: #FFF1D1; }
.bx-tile.is-soon { opacity: .78; cursor: default; }
.bx-tile.is-soon:hover { transform: none; }
.wr-art { background: linear-gradient(135deg, #1FA2B4, #35A96E); position: relative; }
.wr-paper { background: #FFFDF6; border-radius: 10px; padding: 16px 20px 18px 34px; width: 230px; transform: rotate(-4deg); box-shadow: var(--shadow-s);
  background-image: repeating-linear-gradient(#FFFDF6 0 27px, #BFD8EA 27px 28px); border-left: 3px solid #F0A6A6; display: grid; gap: 4px; }
.wr-paper i { font-family: "Segoe Print", "Comic Sans MS", cursive; color: #22307A; font-size: 17px; line-height: 24px; }
.wr-bubble { position: absolute; right: 16px; bottom: 18px; background: #fff; border-radius: 16px 16px 4px 16px; padding: 8px 12px; font-weight: 700; font-size: 15px; box-shadow: var(--shadow-s); transform: rotate(3deg); }
.sp-art { background: linear-gradient(135deg, #FFB547, #FF6B57); }
.sp-wave { display: flex; gap: 8px; align-items: center; height: 90px; }
.sp-wave i { width: 12px; border-radius: 9px; background: #fff; opacity: .9; }
.sp-wave i:nth-child(1), .sp-wave i:nth-child(7) { height: 26px; } .sp-wave i:nth-child(2), .sp-wave i:nth-child(6) { height: 50px; }
.sp-wave i:nth-child(3), .sp-wave i:nth-child(5) { height: 76px; } .sp-wave i:nth-child(4) { height: 90px; }

.wr { display: grid; gap: 18px; max-width: 980px; }
.wr-h { font-size: 21px; font-weight: 800; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.wr-h .ic { width: 22px; height: 22px; }
.wr-h2 { font-size: 22px; font-weight: 800; margin: 6px 4px 0; }

/* home */
.wr-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.wr-hero h1 { font-size: 30px; font-weight: 800; margin-top: 4px; }
.wr-how { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 14px 0 0; }
.wr-how li { background: #EEF6F9; border-radius: 999px; padding: 6px 14px 6px 6px; font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.wr-how b { width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-size: 14px; }
.wr-due { text-decoration: none; color: inherit; }
.wr-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wr-topic { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; text-decoration: none; color: inherit; transition: transform .15s; border: 3px solid transparent; }
.wr-topic:hover { transform: translateY(-2px); }
.wr-topic.is-asg { border-color: var(--coral); }
.wr-topic-emo { font-size: 34px; width: 58px; height: 58px; border-radius: 18px; background: #EEF6F9; display: grid; place-items: center; }
.wr-topic small { color: var(--ink-2); font-weight: 700; font-size: 13px; }
.wr-topic h3 { font-size: 20px; font-weight: 800; }
.wr-topic p { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.wr-topic-foot { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.wr-st { border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 700; background: #EEF3F7; color: var(--ink-2); }
.wr-st.st-draft, .wr-st.st-plan { background: #FFF1D1; color: #8A5A00; }
.wr-st.st-sent { background: var(--leaf-soft); color: #145C33; }
.wr-asg { border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 700; background: #FFE3DD; color: var(--coral-d); display: inline-flex; gap: 5px; align-items: center; }

/* steps */
.wr-steps { display: flex; gap: 6px; align-items: center; background: var(--paper); border-radius: 999px; padding: 6px; box-shadow: var(--shadow-s); overflow-x: auto; scrollbar-width: none; }
.wr-step { border: 0; background: transparent; border-radius: 999px; padding: 8px 14px 8px 8px; display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 16px; white-space: nowrap; color: var(--ink-2); }
.wr-step b { width: 30px; height: 30px; border-radius: 50%; background: #EEF3F7; display: grid; place-items: center; font-size: 15px; }
.wr-step b .ic { width: 16px; height: 16px; }
.wr-step.on { background: var(--ink); color: #fff; } .wr-step.on b { background: var(--coral); color: #fff; }
.wr-step.done b { background: var(--leaf); color: #fff; }
.wr-step:disabled { opacity: .4; cursor: default; }
.wr-draftpill { margin-left: auto; background: #FFF1D1; color: #8A5A00; border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: 15px; white-space: nowrap; }
.wr-stage { display: grid; gap: 16px; }

/* task */
.wr-task { background: linear-gradient(135deg, #FFFFFF, #F1FAFC); border: 2px solid #CBE7EF; }
.wr-task-top { display: flex; justify-content: space-between; align-items: center; }
.wr-task-q { font-family: var(--f-read); font-size: 22px; line-height: 1.5; margin: 8px 0 0; font-weight: 500; }
.wr-means { margin: 12px 0 0; background: #FFF6DB; border-radius: 14px; padding: 10px 14px; font-size: 16px; line-height: 1.5; }

/* plan */
.wr-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wr-side { border: 3px solid var(--line); background: #fff; border-radius: 18px; padding: 16px; font-weight: 800; font-size: 18px; display: flex; gap: 12px; align-items: center; text-align: left; }
.wr-radio { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line); display: grid; place-items: center; color: transparent; flex: 0 0 auto; }
.wr-side.on { border-color: var(--teal); background: #E9F7FA; }
.wr-side.on .wr-radio { background: var(--teal); border-color: var(--teal); color: #fff; }
.wr-count { margin-left: auto; font-size: 15px; background: #EEF3F7; border-radius: 999px; padding: 3px 12px; }
.wr-ideas, .wr-chunks { display: flex; flex-wrap: wrap; gap: 10px; }
.wr-idea { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 10px 16px; font-weight: 600; font-size: 17px; display: inline-flex; gap: 8px; align-items: center; }
.wr-idea b { width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--teal-d); display: grid; place-items: center; font-size: 14px; }
.wr-idea.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.wr-chunk { border: 0; background: #F3EEFA; color: var(--ink); border-radius: 14px; padding: 9px 14px; font-weight: 700; font-size: 16px; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.wr-chunk i { font-style: normal; color: var(--plum); font-size: 18px; font-weight: 600; align-self: stretch; text-align: right; }
.wr-chunk.open { background: #E9DDF7; }
.wr-next { display: flex; justify-content: center; padding: 4px 0; }

/* write */
.wr-remind { border: 3px solid var(--saffron); }
.wr-remind-list { margin: 6px 0 4px; padding-left: 22px; display: grid; gap: 8px; line-height: 1.45; }
.wr-tpl { display: grid; gap: 10px; font-family: var(--f-read); font-size: 18px; line-height: 1.6; }
.wr-tpl p { margin: 0; background: #FAFCFD; border-left: 5px solid var(--teal); border-radius: 0 12px 12px 0; padding: 8px 14px; }
.wr-tpl .wr-myside { border-left-color: var(--coral); background: #FFF4F1; font-family: var(--f-ui); font-weight: 700; }
.wr-tpl mark { background: #DDF2F6; border-radius: 6px; padding: 0 5px; color: var(--teal-d); font-weight: 600; }
.wr-tpl .wr-myside mark { background: #FFE3DD; color: var(--coral-d); }
.wr-lbl { display: block; font-family: var(--f-ui); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; color: var(--ink-2); }
.wr-len { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 700; color: var(--ink-2); }
.wr-len i { flex: 0 0 120px; height: 10px; border-radius: 9px; background: var(--leaf); }
.wr-len b { color: var(--leaf); font-size: 20px; }
.wr-linkers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.wr-linkers div { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.wr-linkers small { width: 100%; font-weight: 800; color: var(--ink-2); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.wr-linkers span { background: #EEF6F9; border-radius: 10px; padding: 5px 10px; font-size: 15px; font-weight: 600; }
.wr-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wr-chk { display: flex; gap: 10px; align-items: center; background: #F7FAFC; border-radius: 12px; padding: 10px 12px; font-size: 16px; font-weight: 600; cursor: pointer; }
.wr-chk input { position: absolute; opacity: 0; pointer-events: none; }
.wr-chk span { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #B9CBD6; display: grid; place-items: center; color: transparent; flex: 0 0 auto; }
.wr-chk input:checked + span { background: var(--leaf); border-color: var(--leaf); color: #fff; }

/* photo */
.wr-tips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.wr-tips span { background: #EEF6F9; border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 15px; }
.wr-drop { border: 3px dashed #B9D8E3; border-radius: 20px; min-height: 260px; display: grid; place-items: center; background: #F7FBFD; overflow: hidden; }
.wr-drop-empty { text-align: center; color: var(--ink-2); }
.wr-drop-empty .ic { width: 56px; height: 56px; opacity: .5; }
.wr-drop img { max-width: 100%; max-height: 520px; display: block; }
.wr-photo-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 16px 0 6px; }
.wr-photo-btns label { cursor: pointer; }
.wr-demo { margin-top: 10px; background: #FFF6DB; border-radius: 14px; padding: 10px 14px; font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wr-photo.is-reading .wr-photo-btns, .wr-photo.is-reading .wr-next, .wr-photo.is-reading .wr-demo, .wr-photo.is-reading .wr-drop { display: none; }
.wr-reading { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 10px 0; font-size: 18px; }
.wr-scan { position: relative; border-radius: 16px; overflow: hidden; max-width: 460px; box-shadow: var(--shadow-s); }
.wr-scan img { display: block; width: 100%; }
.wr-scan i { position: absolute; left: 0; right: 0; height: 60px; background: linear-gradient(rgba(31,162,180,0), rgba(31,162,180,.45), rgba(31,162,180,0)); animation: wrscan 1.6s ease-in-out infinite alternate; }
@keyframes wrscan { from { top: -60px; } to { top: 100%; } }
@media (prefers-reduced-motion: reduce) { .wr-scan i { animation: none; top: 40%; } }
.wr-blurry { display: flex; gap: 12px; align-items: center; background: var(--red-soft); color: #9B1C20; border-radius: 14px; padding: 12px 14px; margin-top: 14px; }

/* feedback */
.wr-tabs { display: flex; gap: 8px; }
.wr-tabs button { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 18px; font-weight: 800; }
.wr-tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.wr-demo-note { display: flex; gap: 10px; align-items: flex-start; background: #FFF6DB; border-radius: 14px; padding: 10px 14px; font-size: 15px; line-height: 1.45; }
.wr-demo-note .ic { margin-top: 3px; }
.wr-fbtop { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
.wr-shot { padding: 10px; position: relative; }
.wr-shot img { width: 100%; height: 150px; object-fit: cover; object-position: top; border-radius: 14px; display: block; }
.wr-shot span { position: absolute; left: 18px; top: 18px; background: rgba(27,42,74,.85); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 700; }
.wr-wc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 18px; align-items: center; }
.wr-wc small { grid-column: 1; font-weight: 800; color: var(--ink-2); text-transform: uppercase; font-size: 13px; letter-spacing: .04em; }
.wr-wc b { grid-column: 1; grid-row: 2 / span 2; font-size: 54px; font-weight: 800; line-height: 1; }
.wr-wc.ok b { color: var(--leaf); } .wr-wc.bad b { color: var(--coral-d); }
.wr-meter { grid-column: 2; grid-row: 1 / span 2; position: relative; height: 16px; background: #EEF3F7; border-radius: 9px; }
.wr-meter .band { position: absolute; left: 42.86%; width: 28.57%; top: 0; bottom: 0; background: #BFE8D0; border-radius: 9px; }
.wr-meter .dot { position: absolute; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: var(--ink); border: 4px solid #fff; box-shadow: var(--shadow-s); }
.wr-wc span { grid-column: 2; font-weight: 700; font-size: 17px; }
.wr-fixed { background: var(--leaf-soft); }
.wr-fixed ul, .wr-good ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 17px; line-height: 1.45; }
.wr-fixed li { display: flex; gap: 8px; } .wr-fixed li .ic { color: var(--leaf); margin-top: 4px; }
.wr-fixed .wr-h .ic { color: #E0A100; }
.wr-good .wr-h .ic { color: var(--leaf); }
.wr-good li::before { content: "★"; color: #E0A100; margin-right: 8px; }
.wr-read-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wr-transcript { font-family: var(--f-read); font-size: 19px; line-height: 1.9; margin: 6px 0 10px; background: #FFFDF6; border-radius: 14px; padding: 14px 16px; border: 1px solid #F0E6CC; }
.wr-transcript mark { background: transparent; border-bottom: 3px solid; padding: 0 1px; color: inherit; }
.wr-transcript sup { font-family: var(--f-ui); font-size: 12px; font-weight: 800; color: #fff; border-radius: 999px; padding: 1px 6px; margin-right: 3px; }
.wr-transcript u.unclear { text-decoration: underline dotted 2px #999; }
.c-content { --c: #1FA2B4; --cs: #DDF2F6; } .c-vocab { --c: #7A5BA8; --cs: #EEE6F8; } .c-lang { --c: #E04E3A; --cs: #FFE3DD; } .c-mech { --c: #C98A00; --cs: #FFF1D1; }
.wr-transcript mark { border-color: var(--c); background: var(--cs); }
.wr-transcript mark sup { background: var(--c); }
/* fix number: a coloured circle before the marked words (not part of the text, not copied) */
.wr-transcript .wr-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff;
  font-family: var(--f-ui); font-size: 13px; font-weight: 800; line-height: 1; margin: 0 5px 0 2px; vertical-align: 2px; user-select: none; box-shadow: 0 0 0 2px #fff; }
.wr-transcript .wr-n::before { content: attr(data-n); }
.wr-tag { display: inline-block; background: var(--cs); color: var(--c); border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.wr-fixes { display: grid; gap: 12px; }
.wr-fix { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; border-left: 8px solid var(--c); }
.wr-fix-n { width: 40px; height: 40px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.wr-fix blockquote { margin: 10px 0 6px; font-family: var(--f-read); font-size: 18px; background: var(--cs); border-radius: 10px; padding: 8px 12px; }
.wr-problem { margin: 6px 0; font-size: 18px; font-weight: 600; line-height: 1.45; }
.wr-hint { margin: 0; display: flex; gap: 8px; color: var(--ink-2); font-size: 17px; line-height: 1.45; background: #F7FAFC; border-radius: 12px; padding: 8px 12px; }
.wr-hint .ic { color: #E0A100; margin-top: 4px; flex: 0 0 auto; }
.wr-check-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.wr-ck-col { display: grid; gap: 6px; align-content: start; }
.wr-ck-col > b { justify-self: start; margin-bottom: 2px; }
.wr-ck { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; line-height: 1.35; }
.wr-ck .ic { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; padding: 3px; margin-top: 1px; }
.wr-ck.yes .ic { background: var(--leaf); color: #fff; } .wr-ck.no .ic { background: #EEF3F7; color: var(--coral-d); }
.wr-ck.no span { color: var(--ink-2); }
.wr-actions { display: grid; gap: 12px; }
.wr-nextstep { margin: 0; display: flex; gap: 10px; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; text-align: center; }
.wr-nextstep .ic { color: #E0A100; }
.wr-act-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.wr-maxnote { text-align: center; margin: 0; }
.wr-sent { display: flex; gap: 14px; align-items: center; background: var(--leaf-soft); font-size: 17px; }
.wr-sent > .ic { width: 34px; height: 34px; color: var(--leaf); }
.wr-model summary { font-weight: 800; font-size: 18px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.wr-model p { font-family: var(--f-read); line-height: 1.8; font-size: 18px; }
.wr-model small { color: var(--ink-2); }
.wr-dialog { position: fixed; z-index: 60; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); text-align: center; }
.wr-dialog h2 { font-size: 24px; font-weight: 800; }
.wr-dialog .wr-act-row { margin-top: 16px; }

@media (max-width: 760px) {
  .wr-hero { grid-template-columns: 1fr; }
  .wr-hero h1 { font-size: 24px; }
  .wr-topics, .wr-sides, .wr-checks, .wr-fbtop { grid-template-columns: 1fr; }
  .wr-linkers { grid-template-columns: 1fr 1fr; }
  .wr-check-grid { grid-template-columns: 1fr 1fr; }
  .wr-task-q { font-size: 19px; }
  .wr-step span { display: none; } .wr-step.on span { display: inline; }
  .wr-shot img { height: 120px; }
  .wr-wc b { font-size: 44px; }
  .wr-photo-btns .btn, .wr-act-row .btn { width: 100%; }
  .wr-paper { width: 190px; } .wr-bubble { font-size: 13px; }
}
@media (max-width: 420px) { .wr-check-grid, .wr-linkers { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .wr-draftpill { display: none; } }

/* ---------- two modes: Guided / Advanced ---------- */
.m-guided { --mc: var(--teal); --ms: #DDF2F6; } .m-advanced { --mc: #7A5BA8; --ms: #EEE6F8; }
.wr-modepill { margin-left: auto; border: 0; background: var(--ms); color: var(--mc); border-radius: 999px; padding: 7px 14px; font-weight: 800; font-size: 15px; white-space: nowrap; }
.wr-modepill:disabled { cursor: default; opacity: 1; }
.wr-modepill + .wr-draftpill { margin-left: 0; }
.wr-mode-h { font-size: 28px; font-weight: 800; margin-top: 6px; }
.wr-mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.wr-mode-card { border: 3px solid var(--line); background: #fff; border-radius: 22px; padding: 20px; text-align: left; display: grid; gap: 8px; align-content: start; }
.wr-mode-card:hover { border-color: var(--mc); }
.wr-mode-card.on { border-color: var(--mc); background: var(--ms); }
.wr-mode-ic { font-size: 40px; }
.wr-mode-card b { font-size: 24px; font-weight: 800; color: var(--mc); }
.wr-mode-card span:not(.wr-mode-ic) { color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.wr-mode-card small { justify-self: start; background: var(--mc); color: #fff; border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 13px; }
.wr-exam { border-color: #D9CCEB; background: linear-gradient(135deg, #fff, #F7F2FC); }
.wr-exam-rule { margin: 12px 0 0; background: #F1EAF9; border-radius: 12px; padding: 10px 14px; font-size: 17px; }
.wr-timer { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.wr-timer .wr-h small { font-size: 13px; font-weight: 700; color: var(--ink-2); background: #EEF3F7; border-radius: 999px; padding: 2px 10px; }
.wr-timer-r { display: flex; align-items: center; gap: 14px; }
.wr-timer-r b { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 96px; text-align: right; }
.wr-timer.run { position: sticky; top: 76px; z-index: 5; border: 3px solid var(--plum); }
.wr-timer.over b { color: var(--coral-d); }
.wr-help { border: 2px dashed #C9B6E4; }
.wr-help-btn { border: 0; background: transparent; width: 100%; text-align: left; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 18px; padding: 0; }
.wr-help-btn span { color: var(--ink-2); font-size: 15px; }
.wr-help-body { display: none; margin-top: 12px; }
.wr-help.open .wr-help-body { display: block; }
.wr-help-note { background: #FFF6DB; border-radius: 12px; padding: 8px 12px; font-size: 15px; margin: 0 0 12px; }
.wr-drafttags { display: flex; gap: 8px; flex-wrap: wrap; }
.wr-mchip { background: #EEF3F7; color: var(--ink-2); border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: 14px; }
.wr-mchip.m-guided, .wr-mchip.m-advanced { background: var(--ms); color: var(--mc); }
.wr-mchip.help { background: #FFF1D1; color: #8A5A00; }
.wr-hint.is-q b { width: 24px; height: 24px; border-radius: 50%; background: var(--plum); color: #fff; display: grid; place-items: center; flex: 0 0 auto; font-size: 15px; margin-top: 1px; }
.wr-hint.is-q { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) {
  .wr-mode-cards { grid-template-columns: 1fr; } .wr-mode-h { font-size: 22px; }
  .wr-timer.run { top: 64px; } .wr-timer-r b { font-size: 28px; }
}

/* ---------- 26 Nov: locked plan for draft 2+, pages, photo viewer, play state ---------- */
.wr [hidden], .wr-viewer [hidden] { display: none !important; }
.wr-lock { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 700; color: var(--ink-2); background: #EEF3F7; border-radius: 999px; padding: 4px 12px; }
.wr-lock .ic { width: 15px; height: 15px; }
.wr-locked .wr-side:not(.on) { opacity: .45; }
.wr-locked .wr-side:disabled, .wr-locked .wr-idea:disabled { cursor: default; }
.icon-btn.is-playing { background: var(--teal); color: #fff; box-shadow: 0 0 0 6px rgba(31,162,180,.18); }
.wr-flash { margin: 10px 0 0; background: var(--red-soft); color: #9B1C20; border-radius: 12px; padding: 8px 12px; font-size: 15px; }

.wr-photo.is-reading .wr-pages, .wr-photo.is-reading .wr-pagenote { display: none !important; }
.wr-drop-empty small { display: block; margin-top: 2px; font-size: 14px; }
.wr-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.wr-pg { border: 2px solid var(--line); border-radius: 18px; background: #F7FBFD; overflow: hidden; display: grid; grid-template-rows: auto auto; }
.wr-pg-img { border: 0; padding: 0; background: #E9F1F5; display: block; cursor: zoom-in; }
.wr-pg-img img { width: 100%; height: 260px; object-fit: contain; display: block; }
.wr-pg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px 10px; background: #fff; }
.wr-pg-bar b { font-weight: 800; flex: 1 0 100%; }
.wr-pg-bar .sp { flex: 1; }
.wr-pg-b { border: 0; background: #EEF3F7; color: var(--ink); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.wr-pg-b .ic { width: 18px; height: 18px; }
.wr-pg-b:disabled { opacity: .3; cursor: default; }
.wr-pg-b.del { background: var(--red-soft); color: #9B1C20; }
.wr-pg-add { border-style: dashed; border-color: #B9D8E3; min-height: 300px; place-content: center; justify-items: center; gap: 10px; padding: 16px; text-align: center; }
.wr-pg-add b { font-size: 18px; font-weight: 800; color: var(--ink-2); }
.wr-pg-add .btn { cursor: pointer; min-width: 150px; justify-content: center; }
.wr-pagenote { text-align: center; margin: 12px 0 0; font-weight: 600; }

button.wr-shot { border: 0; font: inherit; color: inherit; text-align: left; cursor: zoom-in; display: block; width: 100%; }
button.wr-shot:disabled { cursor: default; }
.wr-shot em { position: absolute; font-style: normal; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.wr-shot .wr-shot-n { right: 18px; top: 18px; background: var(--saffron); color: var(--ink); }
.wr-shot .wr-shot-zoom { right: 18px; bottom: 18px; background: rgba(255,255,255,.92); color: var(--ink); display: inline-flex; gap: 4px; align-items: center; box-shadow: var(--shadow-s); }
.wr-shot .wr-shot-zoom .ic { width: 15px; height: 15px; }
button.wr-shot:disabled .wr-shot-zoom { display: none; }

body.wr-noscroll { overflow: hidden; }
.wr-viewer { position: fixed; inset: 0; z-index: 80; background: #0C121E; display: grid; grid-template-rows: auto minmax(0, 1fr); color: #fff; }
.wr-v-top { display: flex; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 12px 10px; }
.wr-v-top b { font-weight: 800; font-size: 17px; }
.wr-v-top .sp { flex: 1; }
.wr-v-b { border: 0; background: rgba(255,255,255,.14); color: #fff; min-width: 44px; height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 22px; font-weight: 700; padding: 0 12px; }
.wr-v-b.wide { font-size: 16px; padding: 0 16px; background: var(--coral); }
.wr-v-b .ic { width: 20px; height: 20px; }
.wr-v-b:disabled { opacity: .5; }
.wr-v-stage { overflow: auto; display: grid; place-items: center; padding: 0 8px 16px; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; }
.wr-viewer.zoomed .wr-v-stage { place-items: start; }
.wr-v-stage img { max-width: 100%; max-height: calc(100vh - 90px); display: block; border-radius: 6px; background: #fff; }
.wr-v-msg { color: #CFD8E6; }
.wr-v-nav { position: fixed; top: 50%; margin-top: -26px; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-s); }
.wr-v-nav .ic { width: 24px; height: 24px; }
.wr-v-nav.prev { left: 10px; } .wr-v-nav.next { right: 10px; }
@media (max-width: 760px) {
  .wr-pages { grid-template-columns: 1fr 1fr; gap: 10px; }
  .wr-pg-img img { height: 200px; }
  .wr-pg-b { width: 34px; height: 34px; }
  .wr-pg-add { min-height: 240px; } .wr-pg-add .btn { min-width: 0; width: 100%; }
  .wr-v-b.wide span { display: none; } .wr-v-b.wide { padding: 0 12px; }
}
@media (max-width: 380px) { .wr-pages { grid-template-columns: 1fr; } }
.wr-noreasons { margin: 0; background: #F3F7FA; border-radius: 12px; padding: 10px 14px; font-size: 16px; color: var(--ink-2); }
.wr-locked .wr-idea:not(.on) { opacity: .45; }
.wr-dialog.is-warn { border: 3px solid var(--saffron); }
.wr-warn-ic { font-size: 40px; line-height: 1; }
.wr-dialog .sub { line-height: 1.5; }
