/* Self-Worth. Everything scoped under .swr-*. */

.swr-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* the worth bar */
.swr-bar { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92px; }
.swr-bar span { font: 700 12px/1.25 var(--sans); color: var(--dim); text-align: center; }
.swr-tube { position: relative; width: 34px; height: 170px; border-radius: 17px; background: rgba(255, 255, 255, .07); border: 1.5px solid var(--line-strong); overflow: hidden; }
.swr-tube i { position: absolute; left: 0; right: 0; bottom: 0; height: 50%; border-radius: 15px; background: linear-gradient(var(--violet-bright), var(--violet)); transition: height .8s cubic-bezier(.3, 1.3, .5, 1), background .4s; }
.swr-bar.high .swr-tube i { background: linear-gradient(#ffe08a, var(--gold)); }
.swr-bar.low .swr-tube i { background: linear-gradient(#8f86b5, #5c557e); }

/* Ana and her letters */
.swr-letters { display: flex; align-items: flex-end; justify-content: center; gap: 14px; width: 100%; max-width: 340px; }
.swr-ana { position: relative; display: flex; flex-direction: column; align-items: center; }
.swr-ana img { height: 170px; width: auto; filter: drop-shadow(0 12px 20px rgba(123, 92, 253, .3)); }
.swr-env { position: relative; width: 210px; min-height: 64px; padding: 26px 10px 10px; border-radius: 10px; background: #f3ead6; border: none; color: #4b3d22; font: 700 14px var(--sans); cursor: pointer; overflow: hidden; animation: swr-drop .6s cubic-bezier(.3, 1.4, .5, 1) both; }
.swr-env.again { animation: swr-drop2 .6s cubic-bezier(.3, 1.4, .5, 1) both; }
.swr-flap { position: absolute; left: 0; right: 0; top: 0; height: 30px; background: #e4d6b6; clip-path: polygon(0 0, 100% 0, 50% 100%); transition: transform .35s; transform-origin: top; }
.swr-env.open .swr-flap { transform: scaleY(-1); }
.swr-env.read { background: #fffaf0; color: #2a2340; }
.swr-env.read b { font: 700 16px/1.25 var(--serif); }
@keyframes swr-drop { from { transform: translateY(-60px); opacity: 0; } }
@keyframes swr-drop2 { from { transform: translateY(-60px) rotate(-4deg); opacity: 0; } }

/* your week */
.swr-stakes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; max-width: 340px; }
.swr-stake { min-height: 44px; padding: 8px 14px; border-radius: 22px; background: var(--raised); border: 1.5px solid var(--line-strong); color: var(--text); font: 700 14px var(--sans); cursor: pointer; }
.swr-stake.on { background: rgba(123, 92, 253, .28); border-color: var(--violet-bright); }
.swr-stakes.locked .swr-stake:not(.on) { opacity: .35; }
.swr-stakes.gone { display: none; }
.swr-sum { display: none; font: 700 13px var(--sans); color: var(--dim); }
.swr-sum.on { display: block; }
.swr-weekrow { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 340px; }
.swr-note { position: relative; width: 100%; min-height: 64px; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto auto; column-gap: 10px; align-items: center; padding: 9px 14px; border-radius: 18px; background: rgba(255, 255, 255, .94); color: #221a3d; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); opacity: 0; }
.swr-note.in { animation: swr-land .45s cubic-bezier(.3, 1.3, .5, 1) both; }
@keyframes swr-land { from { opacity: 0; transform: translateY(-26px) scale(.96); } to { opacity: 1; transform: none; } }
.swr-app { grid-row: span 3; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--violet-bright), var(--violet)); }
.swr-dn { font: 800 12px var(--sans); letter-spacing: .06em; color: #8a7fb3; text-transform: uppercase; }
.swr-ev { font: 700 16px/1.25 var(--sans); }
.swr-hit { font: 700 13px var(--sans); font-style: normal; color: #8a7fb3; }
.swr-note.up .swr-hit { color: #a8770a; }
.swr-note.down .swr-hit { color: #6a4be0; }
.swr-note.done .swr-hit { color: #a8770a; }
.swr-hbar { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.swr-hbar > span { font: 800 13px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.swr-htube { position: relative; width: 100%; height: 54px; border-radius: 27px; background: rgba(255, 255, 255, .07); border: 2px solid var(--line-strong); overflow: hidden; box-shadow: 0 0 30px rgba(123, 92, 253, .25); }
.swr-htube i { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; border-radius: 25px; background: linear-gradient(90deg, var(--violet), var(--violet-bright)); transition: width .8s cubic-bezier(.3, 1.3, .5, 1), background .4s; }
.swr-hbar.high .swr-htube i { background: linear-gradient(90deg, var(--gold-deep), #ffe08a); }
.swr-hbar.low .swr-htube i { background: linear-gradient(90deg, #5c557e, #8f86b5); }
.swr-pop { position: absolute; right: 10px; top: 0; padding: 2px 10px; border-radius: 99px; font: 800 13px var(--sans); opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.swr-pop.on { opacity: 1; transform: none; }
.swr-pop.up { background: var(--gold); color: #2a1a00; }
.swr-pop.down { background: var(--violet-bright); color: #fff; }

/* Crocker's two students */
.swr-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 330px; }
.swr-p { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px; border-radius: 16px; background: var(--raised); border: 1.5px solid var(--line-strong); color: var(--text); cursor: pointer; }
.swr-p img { height: 74px; width: auto; }
.swr-p b { font: 700 15px var(--sans); }
.swr-p small { font: 600 12px var(--sans); color: var(--dim); }
.swr-p.ana { border-color: rgba(160, 130, 255, .6); }
.swr-p.right { border-color: var(--mint); background: rgba(70, 220, 160, .14); }
.swr-p.wrong { border-color: var(--red); background: rgba(255, 90, 90, .12); }
.swr-chart { width: 100%; max-width: 330px; }
.swr-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.swr-base { stroke: rgba(255, 255, 255, .12); stroke-dasharray: 3 4; fill: none; }
.swr-mk path { stroke: rgba(255, 255, 255, .18); stroke-dasharray: 2 4; }
.swr-mk text { font: 700 11px var(--sans); fill: var(--dim); text-anchor: middle; }
.swr-mk { opacity: 0; transition: opacity .4s; }
.swr-chart.r1 .swr-mk.rej, .swr-chart.r2 .swr-mk { opacity: 1; }
.swr-l { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.swr-l.ana { stroke: var(--violet-bright); }
.swr-l.ben { stroke: var(--mint); }
.swr-key { display: flex; align-items: center; gap: 6px; margin-top: 6px; font: 700 12px var(--sans); color: var(--text); }
.swr-key i { width: 14px; height: 4px; border-radius: 2px; }
.swr-key i.ana { background: var(--violet-bright); }
.swr-key i.ben { background: var(--mint); margin-left: 6px; }
.swr-key em { margin-left: auto; font-style: normal; color: var(--dim); font-weight: 600; }

/* the crowd of 100 */
.swr-crowd { display: grid; grid-template-columns: repeat(10, minmax(0, 19px)); gap: 5px 8px; justify-content: center; }
.swr-crowd svg { width: 100%; height: auto; fill: #8f7fe0; transition: fill .5s, opacity .5s; }
.swr-crowd.shown svg { opacity: .35; }
.swr-crowd.shown svg.free { fill: var(--gold); opacity: 1; }

/* your C */
.swr-thinks { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; max-width: 330px; }
.swr-think { position: relative; min-height: 46px; padding: 10px 18px; border-radius: 24px; background: #fff; color: #221a3d; border: 2px solid transparent; font: 700 15px/1.25 var(--sans); cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.swr-think::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.swr-think.right { border-color: var(--mint); background: #e6fbf2; }
.swr-think.wrong { border-color: var(--red); background: #ffe9e9; }
.swr-think.locked:not(.right):not(.wrong) { opacity: .5; }
.swr-paper { position: relative; width: 200px; height: 120px; margin-top: 6px; padding: 12px 14px; border-radius: 8px; background: #fbf8ef; box-shadow: 0 10px 22px rgba(0, 0, 0, .35); transform: rotate(-2deg); }
.swr-paper span { display: block; font: 600 13px var(--sans); color: #4b4560; margin-bottom: 8px; }
.swr-paper i { display: block; height: 6px; width: 62%; margin: 7px 0; border-radius: 3px; background: #ddd6c4; }
.swr-paper em { position: absolute; right: 16px; top: 22px; width: 64px; height: 64px; border: 4px solid #e2463f; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 800 40px var(--serif); font-style: normal; color: #e2463f; transform: rotate(-8deg); }

@media (max-height: 700px) {
  .swr-ana img { height: 130px; }
  .swr-tube { height: 130px; }
  .swr-p img { height: 56px; }
  .swr-htube { height: 44px; }
  .swr-paper { height: 100px; }
  .swr-crowd { grid-template-columns: repeat(10, minmax(0, 18px)); gap: 4px 7px; }
}
