/* One quiet completion composition, from the first room to the ending.
   Long text and actions share a single scroll flow on short screens. */
.completion-shade,
.shade:has(>.campaign-completion){
  position:fixed;
  inset:0;
  z-index:30;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:max(20px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));
  overflow:hidden;
  background:linear-gradient(0deg,#090d15f5 0%,#101820eb 55%,#101820b8 100%);
  backdrop-filter:none;
}
.stage-completion,
.campaign-completion.panel{
  display:flex;
  flex-direction:column;
  width:min(520px,100%);
  max-width:100%;
  max-height:100%;
  min-height:0;
  flex-shrink:1;
  padding:20px 8px;
  margin:0;
  border:0;
  border-radius:0;
  box-shadow:none;
  background:none;
  color:#e8e3d6;
  text-align:center;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  scroll-padding-block:14px;
  -webkit-overflow-scrolling:touch;
}
.stage-completion>.completion-kicker,
.campaign-completion.panel .completion-kicker{
  flex-shrink:0;
  margin:0 0 8px;
  color:#b9baa9;
  font-size:12px;
  line-height:1.5;
  letter-spacing:.12em;
}
.stage-completion>h2,
.campaign-completion.panel h2{
  flex-shrink:0;
  margin:0 0 20px;
  color:#f3ead7;
  font:400 clamp(24px,3.5vw,34px)/1.45 Nanum,sans-serif;
  letter-spacing:.04em;
  word-break:keep-all;
  overflow-wrap:anywhere;
}
.stage-completion>.completion-note,
.campaign-completion.panel>.panel-content>p:not(.completion-kicker){
  flex-shrink:0;
  width:100%;
  max-width:32em;
  margin:0 auto;
  font-size:15px;
  line-height:1.85;
  text-align:left;
  color:#c7cec9;
  word-break:keep-all;
  overflow-wrap:anywhere;
}
.campaign-completion.panel>.panel-content{
  flex:0 0 auto;
  width:100%;
  min-height:0;
  padding:0;
  overflow:visible;
  display:block;
}
.campaign-completion.panel>.panel-content>p:not(.completion-kicker){text-align:center}
.stage-completion>.transition-actions,
.campaign-completion.panel>.panel-actions{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px 16px;
  width:100%;
  padding:0;
  margin:28px 0 0;
  border:0;
  background:none;
}
.stage-completion .transition-actions button.action,
.campaign-completion.panel>.panel-actions button{
  min-width:44px;
  min-height:44px;
  max-width:100%;
  padding:8px 10px;
  margin:0;
  font:14px/1.6 Nanum,sans-serif;
  color:#aeb8bd;
  text-align:center;
  white-space:normal;
  word-break:keep-all;
  overflow-wrap:anywhere;
  border:0;
  border-radius:0;
  box-shadow:none;
  background:none;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.stage-completion .transition-actions button:first-child,
.campaign-completion.panel>.panel-actions button:first-child{
  grid-column:1/-1;
  color:#edd6a5;
  font-size:16px;
  letter-spacing:.02em;
  padding:10px 16px;
}
.stage-completion .transition-actions button:nth-child(4):last-child,
.campaign-completion.panel>.panel-actions button:nth-child(4):last-child{grid-column:1/-1}
.stage-completion .transition-actions button:focus-visible,
.campaign-completion.panel>.panel-actions button:focus-visible{
  outline:2px solid #d6bc85;
  outline-offset:-2px;
  color:#f8e5bb;
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:5px;
}
@media(hover:hover){
  .stage-completion .transition-actions button:hover,
  .campaign-completion.panel>.panel-actions button:hover{color:#f8e5bb;text-decoration:underline;text-underline-offset:5px}
}
@media(max-height:500px) and (orientation:landscape){
  .completion-shade,
  .shade:has(>.campaign-completion){padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
  .stage-completion,
  .campaign-completion.panel{width:min(660px,100%);padding:12px 8px}
  .stage-completion>.completion-kicker,
  .campaign-completion.panel .completion-kicker{font-size:11px;line-height:1.4}
  .stage-completion>h2,
  .campaign-completion.panel h2{font-size:24px;line-height:1.35;margin-bottom:12px}
  .stage-completion>.completion-note,
  .campaign-completion.panel>.panel-content>p:not(.completion-kicker){max-width:38em;font-size:14px;line-height:1.75}
  .stage-completion>.transition-actions,
  .campaign-completion.panel>.panel-actions{margin-top:20px;gap:4px 14px}
  .stage-completion .transition-actions button:first-child,
  .campaign-completion.panel>.panel-actions button:first-child{font-size:15px}
}
