/* u13 couple conversation decks (engine-u13-deck-couples.js). Tokens only, so dark mode works. */
.tool.u13 { gap: 12px; }
@media (max-width: 599px) { .tool.u13 { gap: 9px; } .tool .u13-filters { gap: 8px; } .tool .u13-stage { padding-bottom: 8px; } }

/* Chip row: one scrollable line, edges fade only while there is more to see */
.tool .u13-chipwrap { position: relative; margin: 0 -24px; }
.tool .u13-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 24px; scroll-padding: 24px; gap: 6px; }
.tool .u13-chips::-webkit-scrollbar { display: none; }
.tool .u13-chips button { flex: none; min-height: 40px; }
.tool .u13-chipwrap.fade-r .u13-chips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
.tool .u13-chipwrap.fade-l .u13-chips { -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px); mask-image: linear-gradient(90deg, transparent, #000 48px); }
.tool .u13-chipwrap.fade-l.fade-r .u13-chips { -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent); }

/* Filters: chip row over the depth control on phones, side by side on wide screens */
.tool .u13-filters { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 900px) {
  .tool .u13-chipwrap { margin: 0; }
    .tool .u13-chips, .tool .u13-chipwrap.fade-l .u13-chips, .tool .u13-chipwrap.fade-r .u13-chips, .tool .u13-chipwrap.fade-l.fade-r .u13-chips { flex-wrap: wrap; overflow: visible; padding: 0; -webkit-mask-image: none; mask-image: none; }
  .tool .u13-chips button { min-height: 36px; }
  .tool .u13-depth { max-width: 420px; }
}

/* Chips never wrap their label */
.tool .u13-chips button { white-space: nowrap; }
/* One-at-a-time stages: a stepper with every stage visible */
.tool .u13-chipwrap:has(.u13-steps) { margin: 0; }
.tool .u13-chips.u13-steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 0; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.tool .u13-steps button { min-height: 48px; padding: 4px 4px; border-radius: 16px; font-size: 13px; line-height: 16px; white-space: normal; text-wrap: balance; }
.tool .u13-depthrow { display: flex; gap: 8px; align-items: center; }
.tool .u13-depthrow .u13-depth { flex: 1; }
.tool .u13-select {
  flex: none; width: auto; max-width: 46%; min-height: 42px; padding: 0 32px 0 12px; border-radius: 16px; border: 0; appearance: none; -webkit-appearance: none;
  background: rgb(var(--ink) / .06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  font: inherit; font-size: 14px; font-weight: 800; color: rgb(var(--ink)); box-shadow: none; text-overflow: ellipsis;
}
.tool .u13-select:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; }

/* Spin wheel: turns over the card, lands on the topic of the next card */
.tool .u13-wheel { position: absolute; z-index: 2; inset: 0 0 8px; display: grid; place-items: center; border-radius: 26px; background: rgb(var(--accent) / .08); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); animation: card-in .25s var(--ease-out) both; }
.tool .u13-wheel[hidden] { display: none; }
.tool .u13-wheel-svg { width: min(250px, calc(100% - 16px)); height: auto; max-height: calc(100% - 16px); transition: transform 1.2s cubic-bezier(.12, .7, .16, 1); filter: drop-shadow(0 6px 16px rgb(0 0 0 / .15)); }
.tool .u13-seg { stroke: var(--surface); stroke-width: 2; }
.tool .u13-seg-0 { fill: rgb(var(--accent)); }
.tool .u13-seg-1 { fill: var(--link); }
.tool .u13-seg-2 { fill: rgb(var(--accent) / .55); }
.tool .u13-seg-label { fill: var(--surface); font-size: 10.5px; font-weight: 850; letter-spacing: .01em; }
.tool .u13-hub { fill: var(--surface); }
.tool .u13-pointer { position: absolute; top: calc(50% - min(125px, 50% - 8px) - 10px); left: 50%; z-index: 1; width: 0; height: 0; margin-left: -10px; border: 10px solid transparent; border-top: 16px solid rgb(var(--ink)); border-bottom: 0; }
.tool .u13-wheel.is-landed .u13-wheel-svg { animation: u13-land .38s var(--ease-out); }
@keyframes u13-land { 50% { scale: 1.04; } }

/* Depth: one segmented control */
.tool .u13-depth {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: 16px;
  background: rgb(var(--ink) / .06);
}
.tool .u13-depth button {
  min-height: 36px; padding: 0 4px; white-space: nowrap; border-radius: 13px; font-size: 14px; font-weight: 750; color: rgb(var(--ink) / .62); background: transparent;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.tool .u13-depth button[aria-checked="true"] { background: var(--surface); color: rgb(var(--ink)); box-shadow: 0 1px 3px rgb(0 0 0 / .1), 0 0 0 1px rgb(var(--ink) / .04); }
.tool .u13-depth button:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 1px; }

/* The card: a small stack, so it reads as a deck */
.tool .u13-stage { position: relative; padding-bottom: 10px; }
.tool .u13-stage::before, .tool .u13-stage::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 40px; border-radius: 0 0 24px 24px;
  background: var(--surface); box-shadow: 0 2px 10px rgb(var(--ink) / .06); opacity: .7;
}
.tool .u13-stage::after { left: 28px; right: 28px; bottom: -2px; opacity: .4; }
.tool .u13-card {
  position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; min-height: 252px; padding: 18px 20px 8px;
  border-radius: 26px; background: var(--surface); box-shadow: var(--shadow);
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab;
  transition: transform .35s var(--ease-out);
}
.tool .u13-card:focus-visible { outline: 3px solid rgb(var(--accent) / .6); outline-offset: 3px; }
.tool .u13-card.is-drag { transition: none; cursor: grabbing; }
.tool .u13-card.is-in { animation: u13-in .42s var(--ease-out) both; }
.tool .u13-card.is-back { animation: u13-back .42s var(--ease-out) both; }
@keyframes u13-in { from { opacity: 0; transform: translateX(18px) rotate(.6deg) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes u13-back { from { opacity: 0; transform: translateX(-18px) rotate(-.6deg) scale(.985); } to { opacity: 1; transform: none; } }
.tool .u13-card.is-spinning .u13-meta { color: rgb(var(--ink) / .45); }
.tool .u13-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 20px; }
.tool .u13-meta { font-size: 12px; line-height: 18px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; color: var(--link); white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.tool .u13-count { flex: none; font-size: 13px; line-height: 18px; font-weight: 750; color: rgb(var(--ink) / .45); font-variant-numeric: tabular-nums; }
.tool .u13-q {
  flex: 1; display: flex; align-items: center; margin: 0;
  font-size: 25px; line-height: 33px; font-weight: 850; letter-spacing: -.015em; color: rgb(var(--ink)); text-wrap: pretty;
}
.tool .u13-card.is-long .u13-q { font-size: 22px; line-height: 30px; }
.tool .u13-card-foot { display: flex; align-items: center; gap: 2px; margin: 0 -10px 0 -8px; }
.tool .u13-gap { flex: 1; }
.tool .u13-skip {
  display: inline-flex; align-items: center; gap: 4px; min-height: 36px; margin: 4px 0; padding: 0 12px 0 8px; border-radius: 18px;
  background: rgb(var(--ink) / .05); font-size: 14px; font-weight: 750; color: rgb(var(--ink) / .7);
  transition: background-color .2s ease, color .2s ease, transform .2s var(--ease-out);
}
.tool .u13-skip .tool-icon { width: 16px; height: 16px; }
.tool .u13-skip:active { transform: scale(.96); }
.tool .u13-skip:hover { background: rgb(var(--ink) / .09); color: rgb(var(--ink)); }
.tool .u13-icon {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 22px; background: transparent;
  color: rgb(var(--ink) / .55); transition: background-color .2s ease, color .2s ease, transform .2s var(--ease-out);
}
.tool .u13-icon:hover { background: rgb(var(--ink) / .06); color: rgb(var(--ink)); }
.tool .u13-icon:active { transform: scale(.92); }
.tool .u13-icon[aria-pressed="true"] { color: #E0347E; }
.tool .u13-icon[aria-pressed="true"] path { fill: currentColor; }
.tool .u13-icon.is-pop .tool-icon { animation: u13-pop .4s var(--ease-out); }
@keyframes u13-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.tool .u13-tip {
  position: absolute; bottom: 46px; right: 0; padding: 4px 10px; border-radius: 10px; white-space: nowrap;
  background: rgb(var(--ink)); color: var(--surface); font-size: 13px; font-weight: 800; animation: card-in .3s var(--ease-out) both;
}
.tool .tool-icon { width: 22px; height: 22px; }

/* Thumb row: back, next, spin */
.tool .u13-actions { display: flex; align-items: center; gap: 10px; }
.tool .u13-next { flex: 1; min-height: 56px; padding: 0 12px; font-size: 17px; white-space: nowrap; }
.tool .u13-next:active, .tool .u13-round:active { transform: scale(.96); }
.tool .u13-round {
  flex: none; width: 56px; height: 56px; border-radius: 28px; display: grid; place-items: center;
  background: var(--surface); color: rgb(var(--ink) / .8); box-shadow: inset 0 0 0 1px rgb(var(--ink) / .1);
  transition: transform .2s var(--ease-out), opacity .2s ease, background-color .2s ease;
}
.tool .u13-round:hover { background: var(--surface-2); }
.tool .u13-round:disabled { opacity: .35; cursor: default; }
.tool .u13-round:focus-visible, .tool .u13-skip:focus-visible, .tool .u13-icon:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; }

.tool .u13-spin {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 56px; padding: 0 18px 0 14px; border-radius: 28px;
  background: var(--surface); color: rgb(var(--ink)); font-size: 16px; font-weight: 850; box-shadow: inset 0 0 0 1px rgb(var(--ink) / .1);
  transition: transform .2s var(--ease-out), background-color .2s ease;
}
.tool .u13-spin:hover { background: var(--surface-2); }
.tool .u13-spin:active { transform: scale(.96); }
.tool .u13-spin.is-on .tool-icon { animation: u13-turn .5s linear infinite; }
@keyframes u13-turn { to { transform: rotate(360deg); } }
.tool .u13-card.is-spinning .u13-q { opacity: .35; }
.tool .u13-spin:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; }

/* More ways to play */
.tool .u13-panel { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.tool .u13-panel.is-new { animation: card-in .35s var(--ease-out) both; }
.tool .u13-quote { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); font-size: 16px; line-height: 23px; font-weight: 800; color: rgb(var(--ink)); }
.tool .u13-quote small { display: block; font-size: 12px; line-height: 18px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--link); }
.tool .u13-panel-title { font-size: 17px; line-height: 24px; font-weight: 850; color: rgb(var(--ink)); }
.tool .u13-panel textarea, .tool .u13-panel input[type="text"] { background: var(--surface-2); box-shadow: none; }
.tool .u13-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tool .u13-inline input[type="text"] { flex: 1 1 160px; width: auto; }
.tool .u13-inline .btn { flex: 1 1 auto; }
.tool .u13-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tool .u13-ans { padding: 12px 14px; border-radius: 16px; background: var(--surface-2); animation: card-in .45s var(--ease-out) both; }
.tool .u13-ans.is-theirs { animation-delay: .12s; background: rgb(var(--accent) / .14); }
.tool .u13-ans b { display: block; font-size: 12px; line-height: 18px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; color: var(--link); }
.tool .u13-ans p { font-size: 16px; line-height: 23px; white-space: pre-wrap; overflow-wrap: anywhere; color: rgb(var(--ink)); }
.tool .u13-ten { display: grid; gap: 6px; counter-reset: ten; }
.tool .u13-ten li {
  counter-increment: ten; display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2);
  font-size: 15px; line-height: 22px;
}
.tool .u13-ten li::before { content: counter(ten); grid-row: span 2; font-weight: 900; color: var(--link); font-variant-numeric: tabular-nums; }
.tool .u13-ten small { font-size: 12px; line-height: 16px; font-weight: 750; color: rgb(var(--ink) / .5); }
.tool .u13-banner { padding: 12px 16px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 2px rgb(var(--accent) / .45); }
.tool .u13-banner p { font-size: 15px; line-height: 22px; font-weight: 750; color: rgb(var(--ink)); }
.tool .u13-streak { text-align: center; }

/* Favorites and skipped */
.tool .u13-more { border-radius: 18px; background: var(--surface); }
.tool .u13-more summary { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 12px 16px; font-size: 15px; font-weight: 800; cursor: pointer; list-style: none; }
.tool .u13-more summary::-webkit-details-marker { display: none; }
.tool .u13-n { min-width: 26px; padding: 2px 8px; border-radius: 12px; background: var(--surface-2); text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.tool .u13-more > ol, .tool .u13-more-body { padding: 0 12px 12px; }
.tool .u13-more-body { display: flex; flex-direction: column; gap: 8px; }
.tool .u13-list li { background: var(--surface-2); font-size: 15px; line-height: 22px; padding: 8px 8px 8px 14px; }
.tool .u13-list li span { flex: 1; }
.tool .u13-x { flex: none; width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; background: transparent; color: rgb(var(--ink) / .45); }
.tool .u13-x .tool-icon { width: 18px; height: 18px; }

@media (max-width: 599px) {
  .tool .u13-spin { padding: 0 14px 0 12px; font-size: 15px; }
  .tool .u13-chipwrap { margin: 0 -16px; }
  .tool .u13-chips { padding: 2px 16px; scroll-padding: 16px; }
  .tool .u13-card { min-height: 198px; padding: 14px 18px 4px; }
  .tool .u13-q { font-size: 23px; line-height: 31px; }
  .tool .u13-card.is-long .u13-q { font-size: 20px; line-height: 28px; }
  .tool .u13-actions { flex-direction: row; }
  .tool .u13-actions .btn { width: auto; }
  .tool .u13-inline { flex-direction: column; align-items: stretch; }
  .tool .u13-inline input[type="text"] { flex: none; width: 100%; }
  .tool .u13-inline .btn { width: 100%; }
}
@media (min-width: 600px) {
  .tool .u13-card { min-height: 214px; padding: 20px 28px 8px; }
  .tool .u13-q { font-size: 30px; line-height: 38px; }
  .tool .u13-card.is-long .u13-q { font-size: 25px; line-height: 33px; }
}
@media (prefers-color-scheme: dark) {
  .tool .u13-card { background: var(--surface-2); box-shadow: var(--shadow), inset 0 0 0 1px rgb(var(--ink) / .1); }
  .tool .u13-stage::before, .tool .u13-stage::after { background: var(--surface-2); }
  .tool .u13-quote, .tool .u13-ans, .tool .u13-ten li, .tool .u13-list li { background: rgb(var(--ink) / .06); }
}
@media (hover: none) {
  .tool .u13-icon:hover { background: transparent; }
  .tool .u13-skip:hover { background: rgb(var(--ink) / .05); color: rgb(var(--ink) / .7); }
  .tool .u13-round:hover, .tool .u13-spin:hover { background: var(--surface); }
}
@media (prefers-reduced-motion: reduce) {
  .tool .u13-card.is-in, .tool .u13-card.is-back, .tool .u13-panel.is-new, .tool .u13-ans, .tool .u13-icon.is-pop .tool-icon { animation: none; }
  .tool .u13-card { transition: none; }
}
/* Wide screens: controls on the left, the card and its buttons on the right, so Next stays on the first screen */
@media (min-width: 900px) {
  .tool.u13 { display: grid; grid-template-columns: 236px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 20px; row-gap: 14px; align-items: start; }
  .tool.u13 > * { grid-column: 1 / -1; }
  .tool.u13 > .u13-banner { grid-row: 1; }
  .tool.u13 > .u13-filters { grid-column: 1; grid-row: 2 / span 2; gap: 12px; }
  .tool.u13 > .u13-stage { grid-column: 2; grid-row: 2; }
  .tool.u13 > .u13-actions { grid-column: 2; grid-row: 3; }
  .tool.u13 > .u13-modes { grid-row: 4; }
  .tool.u13 > .u13-panel { grid-row: 5; }
  .tool.u13 > .u13-streak { grid-row: 6; }
  .tool.u13 > details:nth-of-type(1) { grid-row: 7; }
  .tool.u13 > details:nth-of-type(2) { grid-row: 8; }
  .tool.u13 > .tool-cta { grid-row: 9; }
      .tool .u13-chips.u13-steps { grid-auto-flow: row; grid-auto-columns: auto; gap: 6px; }
  .tool .u13-steps button { min-height: 40px; text-align: left; padding: 0 16px; }
  .tool .u13-depthrow { flex-direction: column; align-items: stretch; }
  .tool .u13-chips:not(.u13-steps) { gap: 6px; }
  .tool .u13-chips:not(.u13-steps) button { min-height: 34px; padding: 0 12px; font-size: 13px; }
  .tool .u13-depth { max-width: none; }
  .tool .u13-depth button { padding: 0 2px; font-size: 13px; }
  .tool .u13-select { max-width: none; width: 100%; }
  .tool .u13-card { min-height: 232px; }
  .tool .u13-q { font-size: 27px; line-height: 35px; }
  .tool .u13-card.is-long .u13-q { font-size: 23px; line-height: 31px; }
}

/* Spin result: the topic it landed on, big and upright, before the card shows */
.tool .u13-landed { position: absolute; z-index: 2; padding: 8px 18px; border-radius: 20px; background: rgb(var(--ink)); color: var(--surface); font-size: 20px; line-height: 28px; font-weight: 900; animation: u13-pop .4s var(--ease-out) both; }
/* Topic chips: one row on phones, with a next arrow while more topics are off screen */
.tool .u13-chipwrap { position: relative; }
.tool .u13-more-chips {
  position: absolute; right: 12px; top: 50%; translate: 0 -50%; width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center;
  background: var(--surface); color: rgb(var(--ink)); box-shadow: 0 2px 8px rgb(0 0 0 / .14); transition: opacity .2s ease;
}
.tool .u13-more-chips .tool-icon { width: 18px; height: 18px; }
.tool .u13-chipwrap:not(.fade-r) .u13-more-chips { opacity: 0; pointer-events: none; }
.tool .u13-chips:not(.u13-steps) { padding-right: 52px; }
.tool .u13-chipwrap.fade-r .u13-chips:not(.u13-steps) { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 72px), transparent calc(100% - 40px)); mask-image: linear-gradient(90deg, #000 calc(100% - 72px), transparent calc(100% - 40px)); }
@media (min-width: 600px) { .tool .u13-more-chips { right: 26px; } }
@media (min-width: 900px) { .tool .u13-more-chips { display: none; } .tool .u13-chips:not(.u13-steps) { padding-right: 0; } }
/* Play together: three tiles under the thumb row */
.tool .u13-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tool .u13-modes button {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 6px; border-radius: 16px; white-space: nowrap;
  background: rgb(var(--accent) / .1); font-size: 14px; font-weight: 800; color: var(--link); transition: background-color .15s ease, transform .2s var(--ease-out);
}
.tool .u13-modes button .tool-icon { width: 18px; height: 18px; flex: none; }
.tool .u13-modes button:hover { background: rgb(var(--accent) / .16); }
.tool .u13-modes button:active { transform: scale(.96); }
.tool .u13-modes button[aria-expanded="true"] { background: var(--surface); box-shadow: inset 0 0 0 2px rgb(var(--accent) / .45); }
.tool .u13-modes button:focus-visible, .tool .u13-more-chips:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; }
@media (max-width: 599px) { .tool .u13-modes button { flex-direction: column; gap: 2px; min-height: 52px; padding: 6px 2px; font-size: 13px; line-height: 16px; } }
.tool .u13-ask { position: relative; z-index: 1; min-height: 198px; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 16px 18px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.tool .u13-ask-q { font-size: 20px; line-height: 27px; font-weight: 850; color: rgb(var(--ink)); text-wrap: balance; }
.tool .u13-ask .tool-chips { gap: 6px; }
.tool .u13-ask .tool-chips button { min-height: 36px; padding: 0 13px; }
@media (prefers-color-scheme: dark) { .tool .u13-ask { background: var(--surface-2); } }
@media (prefers-reduced-motion: reduce) { .tool .u13-landed { animation: none; } }

/* Reflow at 320 px (WCAG 1.4.10): rows wrap instead of pushing past the screen edge. Wider screens are unchanged. */
@media (max-width: 374px) {
  .tool .u13-actions, .tool .u13-depthrow { flex-wrap: wrap; }
  .tool .u13-select { max-width: 100%; }
}
