:root{
  --gd-bg: #FFF8EF;
  --gd-bg-sub: #FFFDF8;
  --gd-card: #FFF7E8;

  --gd-line: #D9B98C;
  --gd-line-soft: #EAD7B8;

  --gd-accent: #F2A65A;
  --gd-accent-hover: #E38B3D;

  --gd-green: #8BCB77;
  --gd-green-hover: #66AF5A;

  --gd-title: #8C5A2B;
  --gd-text: #6E6257;
  --gd-muted: #A2917F;

  --gd-danger-bg: #FCE7E2;
  --gd-danger-line: #E5B4A9;
  --gd-danger-text: #B75E4A;

  --gd-info-bg: #F7F1E4;
  --gd-shadow-sm: 0 8px 18px rgba(140, 90, 43, 0.07);
  --gd-shadow-md: 0 14px 30px rgba(140, 90, 43, 0.10);
  --gd-shadow-lg: 0 18px 36px rgba(140, 90, 43, 0.12);

  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 20px;
  --radius-sm: 16px;
}

*{
  box-sizing: border-box;
}

html,
body{
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body{
  font-family: Pretendard, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--gd-text);
  background:
    radial-gradient(circle at top, rgba(242,166,90,.08), transparent 30%),
    radial-gradient(circle at right bottom, rgba(139,203,119,.08), transparent 24%),
    var(--gd-bg);
}

button,
input,
textarea,
select{
  font: inherit;
}

a{
  color: inherit;
}

.tool-page-wide{
  width: 100%;
}

.tool-page-shell{
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 56px;
  display: grid;
  gap: 20px;
}

.hero{
  margin-bottom: 8px;
}

.hero-card{
  position: relative;
  overflow: hidden;
  display: block;
  padding: 30px;
  border-radius: 24px;
  border: 1px solid var(--gd-line);
  background:
    linear-gradient(180deg, #FFF7E8 0%, #FFF3DF 100%);
  box-shadow: var(--gd-shadow-lg);
}

.hero-card::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(242,166,90,.10), transparent 26%),
    radial-gradient(circle at left bottom, rgba(139,203,119,.08), transparent 22%);
}

.hero-copy{
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 880px;
}

.hero-title{
  margin: 0;
  font-size: 48px;
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--gd-title);
}

.hero-description{
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--gd-text);
  font-size: 15px;
  line-height: 1.75;
}

.hero-guide{
  width: auto;
  max-width: 760px;
  margin-top: 18px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.hero-guide-title{
  margin: 0 0 10px;
  color: var(--gd-title);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
}

.hero-guide-text{
  margin: 0;
  color: var(--gd-text);
  font-size: 14px;
  line-height: 1.85;
}

.dashboard{
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.left-panel,
.right-panel{
  display: grid;
  gap: 20px;
  align-content: start;
  min-width: 0;
}

.panel{
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gd-line);
  background:
    linear-gradient(180deg, #FFF7E8 0%, #FFFCF5 100%);
  box-shadow: var(--gd-shadow-md);
}

.panel::before{
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(217,185,140,.75), rgba(255,255,255,0));
  pointer-events: none;
}

.compact{
  padding: 22px;
}

.panel-section{
  display: grid;
  gap: 0;
}

.section-head{
  margin-bottom: 16px;
}

.section-kicker{
  margin-bottom: 10px;
  color: #A36A36;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.section-title{
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--gd-title);
}

.section-description{
  margin: 10px 0 0;
  color: var(--gd-text);
  font-size: 14px;
  line-height: 1.6;
}

.search-box,
.tool-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.input,
.textarea,
.select{
  width: 100%;
  color: var(--gd-text);
  outline: none;
  border-radius: 14px;
  border: 1px solid var(--gd-line);
  background: var(--gd-bg-sub);
  transition:
    border-color .14s ease,
    box-shadow .14s ease,
    background .14s ease,
    transform .14s ease;
}

.input{
  min-height: 52px;
  padding: 14px 16px;
}

.textarea{
  min-height: 104px;
  padding: 14px 16px;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder{
  color: var(--gd-muted);
}

.input:focus,
.textarea:focus,
.select:focus{
  border-color: #D48A44;
  box-shadow: 0 0 0 4px rgba(242,166,90,.16);
  background: #FFFDF8;
}

.search-box .input{
  flex: 1;
  min-width: 0;
}

.search-btn{
  flex: 0 0 auto;
  min-width: 92px;
}

.btn{
  cursor: pointer;
  min-height: 52px;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 900;
  letter-spacing: -0.01em;
  transition:
    transform .12s ease,
    background .12s ease,
    border-color .12s ease,
    box-shadow .12s ease,
    opacity .12s ease,
    color .12s ease;
}

.btn:hover{
  transform: translateY(-1px);
}

.btn:disabled{
  opacity: .56;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary{
  border: 1px solid #D48A44;
  background: linear-gradient(180deg, var(--gd-accent), var(--gd-accent-hover));
  color: #FFFDF8;
  box-shadow: 0 10px 22px rgba(227, 139, 61, 0.18);
}

.btn-primary:hover{
  background: linear-gradient(180deg, #F5AF67, #DD8030);
}

.btn-soft{
  border: 1px solid var(--gd-line);
  background: var(--gd-bg-sub);
  color: var(--gd-title);
}

.btn-soft:hover{
  background: #FFF1D8;
}

.btn-large{
  min-width: 140px;
}

.editor-card{
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--gd-line);
  background: linear-gradient(180deg, #FFF9ED, #FFF5E5);
}

.editor-label{
  display: block;
  color: var(--gd-title);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 900;
}

.empty-box{
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px dashed var(--gd-line);
  background: var(--gd-bg-sub);
  color: var(--gd-muted);
  font-size: 14px;
  line-height: 1.55;
}

.inside-box{
  margin-top: 10px;
}

.is-hidden{
  display: none !important;
}

.guild-select-wrap{
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.guild-select{
  appearance: auto;
  cursor: pointer;
  background: var(--gd-bg-sub);
  color: var(--gd-text);
  border: 1px solid var(--gd-line);
}

.guild-select:focus{
  border-color: #D48A44;
  box-shadow: 0 0 0 4px rgba(242,166,90,.16);
}

.guild-select option{
  background: #FFFFFF;
  color: #4E443A;
}

.guild-select option:checked{
  background: #F2A65A;
  color: #FFFFFF;
}

.guild-select option[disabled],
.guild-select option[value=""]{
  color: #8A7A68;
}

.selected-guild-box{
  margin-bottom: 14px;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid #C9DFAF;
  background:
    linear-gradient(180deg, rgba(139,203,119,.16), rgba(139,203,119,.09));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}

.selected-guild-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.selected-guild-main{
  flex: 1;
  min-width: 200px;
}

.selected-label{
  color: #5F8A47;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 6px;
}

.selected-value{
  font-size: 18px;
  line-height: 1.45;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--gd-title);
}

.participant-editor{
  display: grid;
  gap: 10px;
}

.participant-list-head{
  margin-top: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.participant-list-head-copy{
  display: grid;
  gap: 4px;
}

.mini-title{
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--gd-title);
}

.mini-subtitle{
  color: var(--gd-muted);
  font-size: 13px;
  line-height: 1.5;
}

.card-surface{
  border-radius: 20px;
  border: 1px solid var(--gd-line);
  background: linear-gradient(180deg, #FFFDF8, #FFF7EC);
}

.participant-list-wrap{
  margin-top: 8px;
  min-height: 240px;
  max-height: 360px;
  overflow: auto;
  padding: 10px;
}

.participant-list{
  display: grid;
  gap: 10px;
}

.participant-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid #DFC39A;
  background: #FFFDF8;
  box-shadow: 0 4px 10px rgba(140, 90, 43, 0.05);
}

.participant-main{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.participant-name{
  min-width: 0;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.02em;
  word-break: break-all;
  color: var(--gd-title);
}

.participant-ticket-badge{
  flex: 0 0 auto;
  min-width: 42px;
  padding: 6px 10px;
  text-align: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #7AA8FF, #4877E0);
  border: 1px solid #3D6BCD;
  color: #FFFFFF;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(72,119,224,.18);
}

.participant-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.participant-step-btn{
  cursor: pointer;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  transition:
    transform .12s ease,
    background .12s ease,
    opacity .12s ease,
    border-color .12s ease,
    color .12s ease,
    box-shadow .12s ease;
}

.participant-step-btn:hover{
  transform: translateY(-1px);
}

.participant-step-btn:disabled{
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.participant-step-btn.is-minus{
  color: #B75E4A;
  background: #FCE7E2;
  border: 1px solid #E5B4A9;
  box-shadow: 0 4px 10px rgba(183,94,74,.10);
}

.participant-step-btn.is-minus:hover{
  background: #F8DDD7;
}

.participant-step-btn.is-plus{
  color: #3568D1;
  background: #E7F0FF;
  border: 1px solid #B7CAF1;
  box-shadow: 0 4px 10px rgba(53,104,209,.10);
}

.participant-step-btn.is-plus:hover{
  background: #DCE9FF;
}

.stage-panel{
  min-height: 780px;
  padding: 0;
}

.stage-shell{
  display: grid;
  gap: 0;
}

.stage-topbar{
  padding: 24px 24px 0;
}

.stage-head{
  margin-bottom: 14px;
}

.stage-head-topline{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.stage-head-main{
  min-width: 0;
}

.stage-description{
  max-width: 620px;
}

.stage-mode-switch{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid var(--gd-line);
  background: #FFFDF8;
}

.mode-tab{
  cursor: pointer;
  min-width: 112px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 900;
  color: var(--gd-title);
  background: var(--gd-bg-sub);
  border: 1px solid var(--gd-line);
  transition:
    transform .12s ease,
    background .12s ease,
    border-color .12s ease,
    opacity .12s ease,
    box-shadow .12s ease,
    color .12s ease;
}

.mode-tab:hover{
  transform: translateY(-1px);
  background: #FFF1D8;
}

.mode-tab.is-active{
  background: linear-gradient(180deg, var(--gd-accent), var(--gd-accent-hover));
  border-color: #D48A44;
  color: #FFFDF8;
  box-shadow: 0 0 0 3px rgba(242,166,90,.14);
}

.mode-tab:disabled,
.mode-tab.is-disabled{
  cursor: not-allowed;
  opacity: .42;
  transform: none !important;
  background: #F2E9D9;
  border-color: #E3D1B2;
  box-shadow: none;
}

.stage-mode-notice{
  margin: -2px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #E7D19D;
  background: #FFF5DD;
  color: var(--gd-text);
  font-size: 13px;
  line-height: 1.65;
}

.draw-stage{
  position: relative;
  min-height: 640px;
  margin: 18px 24px 24px;
  padding: 20px;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid var(--gd-line);
  background: linear-gradient(180deg, #FFF8EC, #FFFDF8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), var(--gd-shadow-sm);
}

.stage-orb{
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(12px);
  opacity: .45;
}

.stage-orb-a{
  top: -50px;
  right: -20px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(242,166,90,.22), rgba(242,166,90,0));
}

.stage-orb-b{
  bottom: -80px;
  left: -40px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(139,203,119,.20), rgba(139,203,119,0));
}

.stage-placeholder{
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  gap: 18px;
}

.stage-main-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 18px;
  align-items: stretch;
}

.stage-main-left{
  min-width: 0;
}

.stage-preview-wrap{
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  min-height: 500px;
  padding: 18px 18px 20px;
  border-radius: 24px;
  border: 1px solid var(--gd-line);
  background: linear-gradient(180deg, #FFFDF8, #FFF7EC);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

.stage-preview-topline{
  width: 100%;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.stage-preview-badge{
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #E7D19D;
  background: #FFF3D6;
  color: #A36A36;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}

.stage-preview{
  width: 100%;
  max-width: none;
  min-height: 420px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin: 0 auto;
}

.roulette-preview,
.slot-preview{
  width: 100%;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: flex-start;
}

.roulette-canvas-wrap{
  position: relative;
  width: min(440px, 100%);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  padding: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.72), rgba(255,255,255,0) 58%),
    radial-gradient(circle at 50% 50%, rgba(242,166,90,.10), rgba(242,166,90,0) 72%),
    #FFF9EF;
  box-shadow:
    inset 0 0 0 1px #E7D3B2,
    0 12px 24px rgba(140, 90, 43, 0.12);
}

.roulette-canvas-wrap::before{
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid #E7D3B2;
  pointer-events: none;
}

.roulette-pointer{
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 17px solid transparent;
  border-right: 17px solid transparent;
  border-top: 30px solid #8C5A2B;
  z-index: 3;
  filter: drop-shadow(0 4px 8px rgba(140, 90, 43, 0.18));
}

.roulette-canvas{
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(140, 90, 43, 0.12));
}

.roulette-status,
.slot-status{
  min-height: 24px;
  color: var(--gd-title);
  font-weight: 900;
  font-size: 14px;
  text-align: center;
  letter-spacing: -0.01em;
}

.roulette-empty{
  width: min(430px, 100%);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px dashed var(--gd-line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--gd-muted);
  text-align: center;
  line-height: 1.7;
  background: #FFFDF8;
}

.slot-machine{
  width: min(530px, 100%);
  padding: 16px;
  border-radius: 28px;
  border: 1px solid var(--gd-line);
  background: linear-gradient(180deg, #FFFDF8, #FFF6E7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 12px 24px rgba(140, 90, 43, 0.10);
}

.slot-machine.is-spinning{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),
    0 16px 30px rgba(140, 90, 43, 0.14),
    0 0 0 1px rgba(242,166,90,.12);
}

.slot-machine-window{
  position: relative;
  height: 204px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid #E7D3B2;
  background:
    linear-gradient(
      180deg,
      #F5ECDD 0%,
      #FFF8EC 16%,
      #FFFDF8 34%,
      #FFFDF8 66%,
      #FFF8EC 84%,
      #F5ECDD 100%
    );
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}

.slot-machine-window::before,
.slot-machine-window::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 58px;
  pointer-events: none;
  z-index: 2;
}

.slot-machine-window::before{
  top: 0;
  background: linear-gradient(180deg, rgba(245,236,221,.96), rgba(245,236,221,0));
}

.slot-machine-window::after{
  bottom: 0;
  background: linear-gradient(0deg, rgba(245,236,221,.96), rgba(245,236,221,0));
}

.slot-machine-track{
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  will-change: transform, filter;
}

.slot-machine-item{
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
}

.slot-machine-name{
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-size: 24px;
  color: #B49A84;
  transform: scale(.92);
  transition:
    color .14s ease,
    opacity .14s ease,
    transform .14s ease,
    text-shadow .14s ease,
    filter .14s ease;
}

.slot-machine-item.is-center .slot-machine-name{
  color: var(--gd-title);
  transform: scale(1);
  text-shadow: 0 2px 8px rgba(242,166,90,.14);
  filter: none;
}

.slot-machine-item.is-near .slot-machine-name{
  color: #927B66;
  transform: scale(.96);
}

.slot-machine-highlight{
  position: absolute;
  left: 10px;
  right: 10px;
  top: 68px;
  height: 68px;
  border-radius: 16px;
  border: 1px solid #E7D19D;
  background: linear-gradient(180deg, rgba(242,166,90,.14), rgba(242,166,90,.06));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.34), 0 10px 20px rgba(227,139,61,.08);
  pointer-events: none;
  z-index: 3;
}

.slot-machine.is-spinning .slot-machine-highlight{
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.40), 0 12px 24px rgba(227,139,61,.12);
}

.slot-note{
  margin-top: 12px;
  color: var(--gd-text);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.stage-side-controls{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
}

.stage-control-card{
  width: 100%;
  text-align: left;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--gd-line);
  background: linear-gradient(180deg, #FFFDF8, #FFF4E3);
  box-shadow: 0 10px 22px rgba(140,90,43,.08);
}

.stage-control-head{
  margin-bottom: 12px;
}

.stage-control-title{
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--gd-title);
}

.stage-control-subtitle{
  margin-top: 8px;
  color: var(--gd-muted);
  font-size: 12px;
  line-height: 1.5;
}

.stage-control-body{
  display: grid;
  gap: 10px;
}

.stage-select{
  max-width: none;
}

.stage-start-btn{
  width: 100%;
  min-width: 0;
}

.stage-control-help{
  margin: 0;
  color: var(--gd-muted);
  font-size: 12px;
  line-height: 1.55;
}

.stage-control-help.is-error{
  color: #B75E4A;
  font-weight: 800;
}

.stage-select[type="number"]::-webkit-outer-spin-button,
.stage-select[type="number"]::-webkit-inner-spin-button{
  margin: 0;
}

.stage-select.is-invalid{
  border-color: #D59587;
  box-shadow: 0 0 0 4px rgba(213,149,135,.16);
}

.stage-action-controls{
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.stage-action-btn{
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  text-align: center;
  line-height: 1.4;
  white-space: normal;
  font-size: 12px;
  border-radius: 14px;
  border: 1px solid var(--gd-line);
  background: var(--gd-bg-sub);
  color: var(--gd-title);
  font-weight: 800;
}

.stage-action-btn:hover{
  background: #FFF1D8;
}

.stage-result-section{
  padding: 18px 18px 0;
  border-top: 1px dashed #E6CC9C;
  text-align: left;
}

.stage-result-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.stage-result-head-copy{
  display: grid;
  gap: 6px;
}

.stage-result-title{
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--gd-title);
}

.stage-result-subtitle{
  margin: 0;
  color: var(--gd-muted);
  font-size: 13px;
  line-height: 1.55;
}

.stage-result-pill{
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #E7D19D;
  background: #FFF3D6;
  color: #A36A36;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}

.result-list,
.result-history-wrap{
  display: grid;
  gap: 12px;
}

.result-round-card{
  position: relative;
  overflow: hidden;
  border: 1px solid var(--gd-line);
  border-radius: 18px;
  padding: 14px;
  background: #FFFDF8;
  box-shadow: 0 6px 14px rgba(140,90,43,.05);
}

.result-round-card.is-latest{
  background: linear-gradient(180deg, #FFF8E6, #FFFDF8);
  border-color: #D9B16D;
}

.result-round-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.result-round-title{
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: var(--gd-title);
}

.result-round-meta{
  color: var(--gd-muted);
  font-size: 12px;
  font-weight: 700;
}

.result-round-winners{
  display: grid;
  gap: 8px;
}

.result-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #E8D5B8;
  background: #FFF7EA;
}

.result-rank{
  flex: 0 0 auto;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gd-accent), var(--gd-accent-hover));
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 900;
}

.result-name{
  min-width: 0;
  color: var(--gd-title);
  font-weight: 900;
  word-break: break-all;
}

.stage-result-empty{
  margin-top: 0;
}

@media (max-width: 1180px){
  .dashboard{
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .stage-main-layout{
    grid-template-columns: minmax(0, 1fr);
  }

  .stage-side-controls{
    max-width: 320px;
  }
}

@media (max-width: 920px){
  .tool-page-shell{
    width: min(100%, calc(100% - 24px));
    padding-bottom: 40px;
  }

  .dashboard{
    grid-template-columns: 1fr;
  }

  .hero-title{
    font-size: 38px;
  }

  .stage-topbar{
    padding: 20px 20px 0;
  }

  .draw-stage{
    margin: 16px 20px 20px;
  }

  .stage-mode-switch{
    width: 100%;
  }

  .mode-tab{
    flex: 1 1 0;
    min-width: 0;
  }
}

@media (max-width: 640px){
  .tool-page-shell{
    width: calc(100% - 20px);
    gap: 16px;
  }

  .hero-card,
  .panel{
    padding: 18px;
    border-radius: 22px;
  }

  .compact{
    padding: 18px;
  }

  .hero-title{
    font-size: 30px;
  }

  .section-title{
    font-size: 24px;
  }

  .stage-topbar{
    padding: 16px 16px 0;
  }

  .draw-stage{
    margin: 14px 16px 16px;
    padding: 14px;
    border-radius: 22px;
  }

  .stage-preview-wrap{
    min-height: 380px;
    padding: 14px;
  }

  .stage-preview{
    min-height: 300px;
  }

  .roulette-canvas-wrap{
    width: min(320px, 100%);
    padding: 14px;
  }

  .slot-machine{
    width: 100%;
    padding: 12px;
  }

  .slot-machine-window{
    height: 176px;
  }

  .slot-machine-item{
    height: 58px;
  }

  .slot-machine-highlight{
    top: 59px;
    height: 58px;
  }

  .slot-machine-name{
    font-size: 20px;
  }

  .participant-item{
    gap: 8px;
  }

  .participant-step-btn{
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .participant-ticket-badge{
    min-width: 38px;
    padding: 5px 8px;
  }
}