/* HALCIE ritual builder */
.rb { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: clamp(20px, 3vw, 44px); align-items: start; }
.rb-ctl { display: grid; gap: 28px; position: sticky; top: 100px; }
.rb-q { display: grid; grid-template-columns: 34px 1fr; gap: 14px; }
.rb-n { margin: 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--sand-2); display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 16px; }
.rb-q h3 { margin: 4px 0 12px; font-size: 15px; font-weight: 600; }
.rb-q h3 small { font-weight: 400; color: var(--ink-2); margin-left: 6px; }
.rb-note { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-2); min-height: 1.4em; }
.rb-seg { display: inline-grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--sand-2); border-radius: 99px; padding: 4px; gap: 4px; width: 100%; max-width: 320px; }
.rb-seg button { min-height: 44px; border-radius: 99px; border: 0; background: none; cursor: pointer; font-weight: 600; font-size: 14.5px; display: inline-flex; gap: 8px; align-items: center; justify-content: center; transition: background-color .3s, color .3s; }
.rb-seg button[aria-checked="true"] { background: var(--ink); color: var(--milk); }
.rb-seg .sun { width: 12px; height: 12px; border-radius: 50%; background: var(--apricot); box-shadow: 0 0 0 3px rgba(231, 169, 133, .3); }
.rb-seg .moon { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset -4px -2px 0 0 currentColor; }

.rb-stage { background: var(--milk); border-radius: 28px; padding: clamp(18px, 2.4vw, 32px); box-shadow: 0 40px 80px -50px rgba(42, 31, 26, .45); transition: background-color .6s; }
.rb[data-time="pm"] .rb-stage { background: #2a201b; color: var(--milk); }
.rb[data-time="pm"] .rb-stage .k, .rb[data-time="pm"] .rb-why, .rb[data-time="pm"] .rb-meta, .rb[data-time="pm"] .rb-sub small, .rb[data-time="pm"] .rb-total small, .rb[data-time="pm"] .rb-total s { color: #dcc8b8; }
.rb-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.rb-head .k { margin: 0 0 8px; }
.rb-meta { display: flex; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.rb-meta span { border: 1px solid currentColor; border-radius: 99px; padding: 4px 12px; }
.rb-main { display: grid; grid-template-columns: minmax(220px, .9fr) 1.3fr; gap: clamp(16px, 2vw, 28px); }

/* the cross-section of skin with the layers on it */
.rb-skin { position: relative; border-radius: 20px; overflow: hidden; min-height: 520px; display: flex; flex-direction: column; justify-content: flex-end; background: #efe3d7 url(/templates/assets/no9/101-halcie/ritual-am.jpg) 38% 30% / cover; }
.rb-skin::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28, 21, 18, 0) 30%, rgba(28, 21, 18, .45) 100%); pointer-events: none; }
.rb-layers, .rb-base { position: relative; }
.rb[data-time="pm"] .rb-skin { background-image: url(/templates/assets/no9/101-halcie/ritual-pm.jpg); background-position: 50% 30%; }
.rb-layers { display: flex; flex-direction: column; justify-content: flex-end; }
.rb-layer { position: relative; height: var(--h); background-size: cover; background-position: center; display: flex; justify-content: space-between; align-items: center; padding: 0 14px; font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .55); border-top: 1px solid rgba(255, 255, 255, .5); transition: height .7s var(--ease), filter .5s, box-shadow .5s; }
.rb-layer::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(42, 31, 26, .35), rgba(42, 31, 26, 0) 60%); pointer-events: none; }
.rb-layer > span { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-layer > span + span { font-weight: 400; font-style: italic; font-family: var(--serif); font-size: 13px; }
.rb-layer i { font-style: normal; opacity: .8; margin-right: 4px; }
.rb-layer.rinse { opacity: .55; }
.rb-layer.rinse > span + span { display: none; }
.rb-layer.drop { animation: drop .9s var(--ease) both; }
@keyframes drop { 0% { transform: translateY(-160px); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
.rb-layer.now { box-shadow: inset 0 0 0 2px var(--apricot); filter: brightness(1.12) saturate(1.1); }
.playing .rb-layer:not(.now) { filter: saturate(.5) brightness(.85); }
.rb-base { height: 96px; background: url(/templates/assets/no9/101-halcie/t-body.jpg) 30% 60% / cover; position: relative; display: flex; align-items: flex-end; padding: 10px 14px; }
.rb-base span { font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.rb-play { position: absolute; inset: 0 0 auto; padding: 14px; pointer-events: none; }
.rb-card { position: relative; border-radius: 16px; overflow: hidden; background-size: cover; background-position: center; display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 12px; color: #fff; animation: rise .5s var(--ease); }
.rb-card::before { content: ''; position: absolute; inset: 0; background: rgba(28, 21, 18, .52); }
.rb-card > * { position: relative; }
.rb-card img { width: 96px; height: 120px; object-fit: cover; border-radius: 10px; }
.rb-card .k { color: #f1dccb !important; margin: 4px 0 4px; font-size: 11px; }
.rb-card .d { font-size: 26px; }
.rb-card p { margin: 0 0 4px; font-size: 13.5px; }
.rb-count { display: flex; align-items: center; gap: 8px; margin-top: 6px !important; }
.rb-count svg { width: 28px; height: 28px; transform: rotate(-90deg); }
.rb-count circle { fill: none; stroke: rgba(255, 255, 255, .3); stroke-width: 3; }
.rb-count circle.c { stroke: var(--apricot); stroke-dasharray: 107; stroke-dashoffset: 107; animation: count linear forwards; }
@keyframes count { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.rb-done { background: rgba(28, 21, 18, .6); color: #fff; border-radius: 16px; padding: 16px; animation: rise .5s var(--ease); }
.rb-done .d { font-size: 34px; margin: 0; }
.rb-done p { margin: 4px 0 0; }

/* the shelf, in order */
.rb-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; }
.rb-steps li { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 10px; border-radius: 16px; background: var(--porcelain); position: relative; transition: background-color .4s, transform .4s var(--ease), box-shadow .4s; }
.rb[data-time="pm"] .rb-steps li { background: #3a2d26; }
.rb-steps li.in { animation: rise .7s var(--ease) both; }
.rb-steps li.now { box-shadow: inset 0 0 0 2px var(--apricot); transform: translateX(6px); }
.rb-thumb img { width: 64px; height: 80px; object-fit: cover; border-radius: 10px; }
.rb-st p { margin: 0; }
.rb-st-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rb-st-h a { font-family: var(--serif); font-size: 21px; text-decoration: none; line-height: 1.1; }
.rb-st-h a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rb-i { font-size: 12px; font-weight: 600; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--milk); display: inline-grid; place-items: center; transform: translateY(-2px); }
.rb[data-time="pm"] .rb-i { background: var(--milk); color: var(--ink); }
.rb-amt { font-size: 12.5px; font-weight: 600; color: var(--clay); }
.rb[data-time="pm"] .rb-amt { color: var(--apricot); }
.rb-why { font-size: 13.5px; color: var(--ink-2); margin-top: 3px !important; line-height: 1.4; }
.rb-pr { font-weight: 600; font-size: 14.5px; }
.rb-wait { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); z-index: 2; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: var(--apricot); color: var(--ink); border-radius: 99px; padding: 2px 10px; }

.rb-foot { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.rb[data-time="pm"] .rb-foot { border-color: rgba(251, 248, 244, .16); }
.rb-sub { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; font-size: 14.5px; }
.rb-sub small { display: block; font-weight: 400; color: var(--ink-2); font-size: 12.5px; }
.rb-sub input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { width: 44px; height: 26px; border-radius: 99px; background: var(--sand-2); position: relative; flex: none; transition: background-color .3s; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
input:checked + .sw { background: var(--clay); }
input:checked + .sw::after { transform: translateX(18px); }
input:focus-visible + .sw { outline: 2px solid var(--clay); outline-offset: 3px; }
.rb-total { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.rb-total p { margin: 0; display: grid; text-align: right; }
.rb-total s { color: var(--ink-2); font-size: 14px; }
.rb-total b { font-family: var(--serif); font-size: 34px; font-weight: 400; line-height: 1; }
.rb-total small { font-size: 12.5px; color: var(--ink-2); }
.rb-btns { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 1080px) {
  .rb { grid-template-columns: 1fr; }
  .rb-ctl { position: static; }
}
@media (max-width: 720px) {
  .rb-main { grid-template-columns: 1fr; }
  .rb-skin { min-height: 360px; }
  .rb-steps li { grid-template-columns: 52px 1fr auto; gap: 10px; }
  .rb-thumb img { width: 52px; height: 66px; }
  .rb-st-h a { font-size: 19px; }
  .rb-total { width: 100%; justify-content: space-between; }
  .rb-total p { text-align: left; }
  .rb-btns { width: 100%; }
  .rb-btns .btn { flex: 1; padding: 0 14px; }
}
