.team-next-case, .team-next-case * { box-sizing: border-box; min-width: 0; }
.team-next-case [hidden] { display: none !important; }
.team-next-case { margin: clamp(16px, 3vw, 30px); overflow: hidden; border: 2px solid #704a36; border-radius: 9px; color: #392e28; background: #f7ead5; box-shadow: 5px 6px 0 #cfb59a; }
.team-next-case :is(p, h3, h4, h5) { overflow-wrap: anywhere; }
.team-next-case :is(button, h4):focus-visible { outline: 3px solid #087d9a; outline-offset: 3px; }
.team-next-case button { font-family: Inter, ui-sans-serif, sans-serif; cursor: pointer; }
.team-next-case button:disabled { cursor: not-allowed; opacity: .55; }
.team-next-case-head { display: flex; justify-content: space-between; gap: 20px; padding: clamp(20px, 3vw, 29px); color: #fff7e9; background: #7c4936; }
.team-next-case-head span:first-child, .team-next-case-chooser button span, .team-next-case-predict span, .team-next-case-result-top > span, .team-next-case-paper span, .team-next-case-rules article > span { font: 850 .65rem/1.4 ui-monospace, Menlo, monospace; letter-spacing: .075em; }
.team-next-case-head h3 { margin: 7px 0 8px; font-size: clamp(1.55rem, 3vw, 2.4rem); line-height: 1.08; letter-spacing: -.045em; }
.team-next-case-head p { max-width: 65ch; margin: 0; font-size: .82rem; line-height: 1.5; }
.team-next-case-head-mark { flex: none; align-self: start; padding: 9px 12px; border: 2px dashed #f6ce92; border-radius: 50%; color: #f6ce92; font: 900 .7rem/1.15 ui-monospace, Menlo, monospace; text-align: center; transform: rotate(8deg); }
.team-next-case-chooser { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; padding: clamp(17px, 3vw, 25px); background: radial-gradient(circle at 20% 20%, #fcefd6, transparent 50%), #f1dfc6; }
.team-next-case-chooser button { position: relative; display: grid; align-content: center; gap: 6px; min-height: 145px; padding: 22px 17px 15px; overflow: hidden; border: 2px solid #956449; border-radius: 3px; color: #4c3529; background: #fff7e8; text-align: left; box-shadow: 4px 5px 0 #d5b89c; transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease; }
.team-next-case-chooser button::before { content: ""; position: absolute; top: 0; right: 0; width: 0; height: 0; border-top: 22px solid #d3a979; border-left: 22px solid transparent; }
.team-next-case-chooser button:hover { transform: translateY(-3px); }
.team-next-case-chooser button[aria-pressed="true"] { border-color: #78402d; background: #fff0d9; box-shadow: 4px 5px 0 #a66347; transform: translateY(-3px) rotate(-1deg); }
.team-next-case-chooser button strong { font-size: 1rem; line-height: 1.22; }
.team-next-case-chooser button small { font-size: .74rem; line-height: 1.4; }
.team-next-case-predict { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) auto; align-items: center; gap: 14px; padding: 18px clamp(17px, 3vw, 25px); border-top: 2px dashed #b99475; background: #fff8e9; }
.team-next-case-predict h4 { margin: 4px 0; font-size: 1.08rem; }
.team-next-case-predict p { margin: 0; font-size: .74rem; line-height: 1.4; }
.team-next-case-predict-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.team-next-case-predict-buttons button { min-height: 45px; padding: 8px; border: 2px solid #926b51; border-radius: 4px; color: #59402e; background: #fffdf5; font-size: .77rem; font-weight: 800; }
.team-next-case-predict-buttons button[aria-pressed="true"] { color: #fff8ed; background: #7c4936; }
#team-next-case-reveal { min-height: 47px; padding: 9px 15px; border: 2px solid #653c2d; border-radius: 4px; color: #fff8ed; background: #653c2d; font-size: .78rem; font-weight: 850; }
.team-next-case-result { border-top: 2px solid #704a36; background: #fff8ea; scroll-margin-top: 20px; }
.team-next-case-result-top { padding: 19px clamp(17px, 3vw, 25px); color: #fff7e9; background: #684c3d; }
.team-next-case-result[data-decision="stop"] .team-next-case-result-top { background: #873e38; }
.team-next-case-result[data-decision="pause"] .team-next-case-result-top { background: #815b32; }
.team-next-case-result-top h4 { margin: 6px 0; font-size: clamp(1.25rem, 2.4vw, 1.8rem); line-height: 1.2; letter-spacing: -.025em; }
.team-next-case-result-top p { margin: 0; font-size: .78rem; line-height: 1.45; }
.team-next-case-paper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: clamp(17px, 3vw, 25px); background: repeating-linear-gradient(0deg, #ecddc4 0 23px, #e7d5ba 23px 24px); }
.team-next-case-paper > div { position: relative; padding: 18px; border: 1px solid #ab9076; border-top: 5px solid #657e63; color: #342f29; background: #fffdf5; box-shadow: 3px 4px 0 #d0bba0; }
.team-next-case-paper p { margin: 12px 0 0; font-size: .83rem; line-height: 1.55; }
.team-next-case-helper { border-top-color: #ad5343 !important; background: #fff0e2 !important; transform: rotate(1deg); }
.team-next-case-helper strong { display: block; margin: 14px 0 58px; font-size: 1rem; line-height: 1.35; }
.team-next-case-helper em { position: absolute; right: 14px; bottom: 12px; padding: 5px 9px; border: 3px double #a13f39; border-radius: 3px; color: #a13f39; font: 900 .7rem/1.2 ui-monospace, Menlo, monospace; text-align: center; transform: rotate(-10deg); animation: team-next-stamp 450ms cubic-bezier(.2,.9,.2,1.2) both; }
.team-next-case-helper em::after { content: ""; position: absolute; left: -8px; right: -8px; top: 48%; border-top: 2px solid currentColor; transform: rotate(-13deg); }
#team-next-case-human-step { border-top-color: #4a7961; }
.team-next-case-count-line { display: flex; align-items: center; gap: 16px; padding: 14px clamp(17px, 3vw, 25px); border-top: 2px solid #94745c; border-bottom: 1px solid #d0baa0; background: #f8edd7; }
.team-next-case-count-line strong { flex: none; padding: 7px 10px; border: 2px solid #754d3a; border-radius: 4px; font: 900 .78rem/1.4 ui-monospace, Menlo, monospace; text-align: center; }
.team-next-case-count-line p { margin: 0; font-size: .78rem; line-height: 1.5; }
.team-next-case-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: clamp(17px, 3vw, 25px); }
.team-next-case-result[data-stage="first"] .team-next-case-rules { grid-template-columns: minmax(0, 1fr); }
.team-next-case-rules article { padding: 17px; border: 2px solid #8c826e; border-radius: 6px; background: #fffdf6; }
.team-next-case-rules #team-next-case-current-rule { border-color: #547185; background: #eff5f5; box-shadow: 3px 4px 0 #b7ced0; }
.team-next-case-rules h5 { margin: 8px 0; font-size: 1.1rem; }
.team-next-case-rules article > strong { display: block; padding: 8px 9px; border-radius: 4px; font-size: .87rem; }
.team-next-case-rules article[data-decision="continue"] > strong { color: #245740; background: #e0efdf; }
.team-next-case-rules article[data-decision="stop"] > strong { color: #843c36; background: #f8e2da; }
.team-next-case-rules article[data-decision="pause"] > strong { color: #785323; background: #f7edce; }
.team-next-case-rules p { margin: 9px 0 0; font-size: .78rem; line-height: 1.5; }
.team-next-case-boundary { margin: 0; padding: 15px clamp(17px, 3vw, 25px); border-top: 1px dashed #b49a7b; color: #5d5245; background: #fffaf0; font-size: .76rem; line-height: 1.55; }
@keyframes team-next-stamp { from { opacity: 0; transform: rotate(15deg) scale(1.6); } to { opacity: 1; transform: rotate(-10deg) scale(1); } }
@media (max-width: 800px) { .team-next-case-predict { grid-template-columns: minmax(0, 1fr); } .team-next-case-chooser { grid-template-columns: minmax(0, 1fr); } .team-next-case-chooser button { min-height: 95px; } .team-next-case-paper { grid-template-columns: minmax(0, 1fr); } .team-next-case-result-top { scroll-margin-top: 12px; } }
@media (max-width: 600px) { .team-next-case-head-mark { display: none; } .team-next-case-count-line { display: grid; } .team-next-case-rules { grid-template-columns: minmax(0, 1fr); } .team-next-case-predict-buttons button { min-height: 48px; } #team-next-case-reveal { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .team-next-case *, .team-next-case *::before, .team-next-case *::after { animation: none !important; transition: none !important; } }
