:root{
  --bg-image: url("../Creator 2_0/Background.png");
  --overlay: rgba(0,0,0,0);
  --text: #f2e6cf;
  --maxw: 1220px;

  --btn-normal: url("../Creator 2_0/menu-btn-normal.png");
  --btn-hover: url("../Creator 2_0/menu-btn-hover.png");
  --btn-pressed: url("../Creator 2_0/menu-btn-pressed.png");
  --btn-disabled: url("../Creator 2_0/menu-btn-disabled.png");
}

*{ box-sizing:border-box; }

html, body{
  height:100%;
  margin:0;
  color:var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

#background{
  position:fixed;
  inset:0;
  z-index:0;
  background-image:var(--bg-image);
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}

#overlay{
  position:fixed;
  inset:0;
  z-index:1;
  background:var(--overlay);
}

#app{
  position:relative;
  z-index:2;
  min-height:100%;
  display:flex;
  justify-content:center;
  padding:18px 14px 40px;
}

.page{
  width:100%;
  max-width:var(--maxw);
}

#dm-panel{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:16px;
  align-items:start;
}

#dm-title{
  grid-column:1;
  margin:0 0 10px 0;
}

#dm-left{
  grid-column:1;
  display:flex;
  flex-direction:column;
  gap:12px;
}

#dm-right{
  grid-column:2;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.box{
  border:1px solid rgba(255,255,255,0.12);
  border-radius:14px;
  background:rgba(0,0,0,0.22);
  padding:12px 12px 14px;
}

.box-title{
  font-weight:900;
  margin-bottom:8px;
}

.small{
  font-size:13px;
  opacity:0.9;
}

.page-msg{
  margin-top:8px;
  min-height:20px;
  opacity:0.95;
}

.tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.tab-btn{
  padding:12px 16px;
  min-height:46px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(0,0,0,0.22);
  color:var(--text);
  cursor:pointer;
  font-size:16px;
  font-weight:700;
}

.tab-btn.active{
  outline:2px solid rgba(255, 200, 120, 0.45);
  outline-offset:2px;
}

#dm-sections{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.dm-section{
  display:none;
}

.dm-section.active{
  display:block;
}

.field-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
}

.field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.field.full{
  grid-column:1 / -1;
}

.field label{
  font-weight:700;
}

.field input,
.field select,
.field textarea{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.16);
  background:rgba(0,0,0,0.25);
  color:var(--text);
  font:inherit;
}

.field textarea{
  min-height:110px;
  resize:vertical;
}

.helper-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  margin-top:10px;
}

.helper-row .menu-btn{
  width:auto;
  min-width:240px;
  max-width:100%;
  display:inline-flex;
}

.readout{
  margin-top:10px;
  padding:10px 12px;
  border-radius:10px;
  background:rgba(255,255,255,0.05);
  line-height:1.45;
}

.check-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:8px 14px;
}

.check-item{
  display:flex;
  align-items:center;
  gap:8px;
}

.option-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
}

.option-btn{
  -webkit-appearance:none;
  appearance:none;
  border:none;
  background:none;

  width:100%;
  min-height:88px;
  padding:14px 16px;
  font-size:16px;
  font-family:"Georgia","Times New Roman",serif;
  font-weight:800;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  color:#f2e6cf;
  text-align:center;
  text-shadow:0 1px 0 rgba(0,0,0,0.55);
  cursor:pointer;

  background-repeat:no-repeat;
  background-position:center;
  background-size:100% 100%;
  background-image:var(--btn-normal);

  box-shadow:none;
}

.option-btn:hover{
  background-image:var(--btn-hover);
}

.option-btn:active{
  background-image:var(--btn-pressed);
}

.option-btn.off{
  background-image:var(--btn-disabled);
  opacity:1;
}

.option-btn.off:hover{
  background-image:var(--btn-disabled);
}

.option-btn.off:active{
  background-image:var(--btn-disabled);
}

@media (max-width: 900px){
  .option-grid{
    grid-template-columns:1fr;
  }
}

button.menu-btn{
  -webkit-appearance:none;
  appearance:none;
  border:none;
  background:none;

  width:100%;
  min-height:88px;
  padding:14px 16px;
  font-size:16px;
  font-family:"Georgia","Times New Roman",serif;
  font-weight:800;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  color:#f2e6cf;
  text-align:center;
  text-shadow:0 1px 0 rgba(0,0,0,0.55);
  cursor:pointer;

  background-repeat:no-repeat;
  background-position:center;
  background-size:100% 100%;
  background-image:var(--btn-normal);

  box-shadow:none;
}

button.menu-btn:hover{ background-image:var(--btn-hover); }
button.menu-btn:active{ background-image:var(--btn-pressed); }
button.menu-btn:disabled{
  background-image:var(--btn-disabled);
  cursor:not-allowed;
}

#dm-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
}

@media (max-width: 900px){
  #dm-panel{ grid-template-columns:1fr; }
  #dm-right{ grid-column:1; }
  .field-grid,
  .check-grid{ grid-template-columns:1fr; }
}