/* 무지개 공방 웹 체험. 루틴 색과 무지개 일곱 칸은 앱의 팔레트(Theme.swift Rainbow)와 같다. */
.demo-card { display: grid; gap: var(--s4); }

.wb-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); }
.wb-stats div { background: var(--bg); border-radius: var(--r-inner); padding: var(--s3) var(--s4); }
.wb-stats small { display: block; color: var(--muted); font-size: 0.8125rem; }
.wb-stats b { font-size: clamp(1.25rem, 3vw, 1.75rem); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.wb-stats .left b { color: var(--accent); }
.wb-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--bg); margin: var(--s3) 0 var(--s4); }
.wb-bar i { display: block; transition: width .4s var(--ease); }
.wb-bar .fixed { background: color-mix(in srgb, var(--text) 35%, transparent); }
.wb-bar .planned { background: var(--accent); }

.wb-routines { display: flex; flex-wrap: wrap; gap: var(--s2); }
.wb-routine { font: inherit; text-align: left; min-height: 44px; padding: var(--s2) var(--s4); border-radius: var(--r-inner);
              cursor: pointer; color: var(--text); background: var(--bg); border: 2px solid transparent;
              transition: border-color .15s var(--ease), opacity .15s var(--ease); }
.wb-routine span { display: block; font-weight: 700; }
.wb-routine span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px;
                           background: var(--c); margin-right: var(--s2); }
.wb-routine small { color: var(--muted); font-size: 0.75rem; }
.wb-routine[aria-pressed="true"] { border-color: var(--c); }
.wb-routine[aria-pressed="false"] { opacity: .55; }
.wb-routine[aria-pressed="false"] span { text-decoration: line-through; }

.wb-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--s2); }
.wb-day { background: var(--bg); border-radius: var(--r-inner); padding: var(--s3) var(--s2); min-height: 150px;
          display: flex; flex-direction: column; gap: var(--s1); text-align: center; border: 2px dashed transparent;
          transition: border-color .15s var(--ease); }
.wb-day.target { border-color: color-mix(in srgb, var(--accent) 45%, transparent); cursor: pointer; }
.wb-day.target:hover, .wb-day:focus-visible { border-color: var(--accent); outline: none; }
.wb-free { color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.wb-day.over .wb-free { color: #FF3B30; font-weight: 700; }
.wb-rainbow { display: flex; gap: 2px; margin: var(--s1) 0; }
.wb-rainbow i { flex: 1; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--text) 10%, transparent);
                transition: background .25s var(--ease); }
.wb-placed { display: grid; gap: var(--s1); }

.wb-todos { display: flex; flex-wrap: wrap; gap: var(--s2); }
.wb-todo { font: inherit; font-weight: 600; font-size: 0.9375rem; min-height: 44px; padding: var(--s2) var(--s4);
           border-radius: 12px; cursor: grab; color: var(--text); background: var(--bg); border: 2px solid var(--line);
           transition: transform .15s var(--ease), border-color .15s var(--ease); }
.wb-todo small { color: var(--muted); font-weight: 500; }
.wb-todo:hover { border-color: var(--accent); }
.wb-todo.picked { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg)); transform: translateY(-2px); }
.wb-todo.in { font-size: 0.75rem; min-height: 44px; padding: var(--s1) var(--s2); border: 0; border-left: 4px solid var(--c);
              background: var(--surface); text-align: left; cursor: pointer; line-height: 1.3; word-break: break-word; }
.wb-list { border-top: 1px solid var(--line); padding-top: var(--s3); }

@media (prefers-reduced-motion: reduce) {
  .wb-bar i, .wb-todo, .wb-rainbow i { transition: none; }
}
@media (max-width: 760px) {
  .wb-stats { grid-template-columns: repeat(2, 1fr); }
  .wb-week { grid-template-columns: repeat(4, 1fr); }
  .wb-day { min-height: 110px; }
}
