:root {
  color-scheme: dark;
  font-family: "Segoe UI", "Yu Gothic UI", sans-serif;
  background: #101418;
  color: #f5f7fb;
}
.desk { max-width: 52rem; margin: 8vh auto; padding: 0 1.5rem; }
.desk section { padding: 1.5rem 0; border-top: 1px solid #354250; }
.desk nav, .desk p, .desk form { margin: 1rem 0; }
.desk label, .desk input { display: block; }
.desk input { padding: 0 .8rem; margin: .5rem 0 1rem; }
a { color: #93d7ff; }
.primary, .launch { display: inline-block; background: #225878; color: white; border-radius: 6px; padding: .8rem 1rem; }

body {
  margin: 0;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: .5rem 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #354250;
}
.site-header nav { margin: 0; }
.site-header > nav:first-of-type { text-align: end; }
.site-header .account-links {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  font-size: .9rem;
}
.account-links strong { min-width: 0; overflow-wrap: anywhere; }
.account-links a { white-space: nowrap; }
.site-header .account-links[hidden] { display: none; }
.site-header .operation-code { grid-column: 1 / -1; }
.landing .entry-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 46rem;
  margin: clamp(1.75rem, 6vh, 4rem) auto 0;
  padding: 0;
  border: 0;
}
.entry-options > div {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.5rem;
  padding: clamp(1rem, 3vw, 2rem);
  text-align: center;
  background: #18222c;
  border: 1px solid #354250;
  border-radius: 12px;
}
.entry-options h2 { margin: 0 0 auto; font-size: 1.15rem; }
.entry-options form { margin: 0; }
.entry-options :is(.launch, .primary) {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  border: 1px solid #477a98;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}
.entry-options :is(.launch, .primary):hover { background: #306b8e; }
.landing :is(a, button):focus-visible { outline: 2px solid #93d7ff; outline-offset: 3px; }
@media (max-width: 38rem) {
  .landing { margin-block: 2rem; }
  .landing .entry-options { grid-template-columns: 1fr; }
}

.shell {
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #303842;
}

h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

p {
  margin: 6px 0 0;
  color: #aab4c0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

select,
input,
button {
  min-height: 44px;
  border: 1px solid #46515f;
  border-radius: 6px;
  background: #1b222a;
  color: #f5f7fb;
  font-size: 15px;
}

select {
  min-width: 220px;
  padding: 0 10px;
}

input {
  width: 96px;
  padding: 0 10px;
  text-transform: uppercase;
  letter-spacing: 0;
}

button {
  padding: 0 16px;
  cursor: pointer;
}

button:hover {
  background: #26313c;
}

button.is-active {
  border-color: #7dd3fc;
  background: #123041;
  color: #e8f8ff;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  padding-top: 16px;
}

.cue-button {
  position: relative;
  overflow: hidden;
  min-height: 92px;
  text-align: left;
  padding: 12px;
  background: #18222c;
}

.cue-button.is-pending {
  border-color: #facc15;
  background: #252515;
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.36), 0 0 0 1px rgba(250, 204, 21, 0.16);
}

.cue-button.is-pending::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(250, 204, 21, 0.28), transparent);
  transform: translateX(-100%);
  animation: pending-sweep 900ms linear infinite;
  pointer-events: none;
}

.cue-button.is-pending::after {
  content: "まもなく再生";
  position: absolute;
  right: 10px;
  bottom: 8px;
  padding: 3px 7px;
  border-radius: 4px;
  background: #facc15;
  color: #1b1b12;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}

@keyframes pending-sweep {
  to {
    transform: translateX(100%);
  }
}

.cue-name {
  display: block;
  font-size: 18px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.cue-kind {
  display: block;
  margin-top: 8px;
  color: #aab4c0;
  font-size: 13px;
}

.empty {
  color: #aab4c0;
}

.projection-panel { margin: clamp(12px, 3vh, 28px) auto; padding: 0 clamp(12px, 3vw, 24px); }
.projection-panel p { margin: 0; }
.operation-code strong { color: #f5f7fb; font-family: monospace; letter-spacing: .08em; }
.projection-panel section { padding: 12px 0; }
.projection-panel h2 { margin: 0 0 7px; font-size: 1.05rem; }
.projection-panel .asset-help, .projection-panel #hint:not(:empty) { margin-top: 6px; font-size: .875rem; }
.projection-panel .asset-picker {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  box-sizing: border-box; padding: 0 12px; border: 1px solid #46515f;
  border-radius: 6px; background: #1b222a; cursor: pointer; font-size: 15px;
}
.asset-picker:hover { background: #26313c; }
.asset-picker:focus-within { outline: 2px solid #93d7ff; outline-offset: 2px; }
.projection-panel .asset-picker input {
  position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0;
  border: 0; clip-path: inset(50%); overflow: hidden;
}
.projection-panel select { min-width: 0; max-width: 100%; }
.projection-panel .primary { padding: 0 16px; }
.projection-panel .content-grid:empty, .projection-panel p:empty { display: none; }

saticraft-announcements { display: block; }
saticraft-announcements aside, saticraft-announcements details {
  margin-block: .75rem; padding: .8rem 1rem; border-inline-start: 3px solid currentColor;
}
saticraft-announcements p { white-space: pre-wrap; overflow-wrap: anywhere; }
saticraft-announcements summary { cursor: pointer; font-weight: 600; }

/* Operator chrome stays outside the projected media surface. */
.desk, .shell { --edge: #35495a; --accent: #a9ecd9; }
body:has(.desk) { min-height: 100vh; display: flow-root; background: radial-gradient(ellipse at top right, #1a333b, transparent 48rem), #0e141c; }
.site-header { align-items: center; border-color: var(--edge); }
.site-header h1 { margin: .3rem 0; line-height: 1.25; letter-spacing: -.035em; }
.service-brand { color: #b4efdf; font-weight: 700; text-decoration: none; }
.service-brand:hover { text-decoration: underline; text-underline-offset: .2em; }
.entry-options > div { text-align: start; border-color: var(--edge); border-top: 3px solid #77c8b6; background: linear-gradient(150deg,#21343e,#18202d); box-shadow: 0 14px 35px #05080e40; }
.entry-options > div:nth-child(2) { border-top-color: #90a9d7; }
.entry-options :is(.launch,.primary) { color: #102129; background: var(--accent); border-color: transparent; }
.entry-options :is(.launch,.primary):hover { background: #cdfbeb; }

.desk:not(.landing) > section {
  margin-block: .85rem; padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid var(--edge); border-radius: .85rem;
  background: linear-gradient(110deg, #1c2934, #161f29);
}
.desk:not(.landing) h2 { margin-block: 0 .75rem; }
.operation-code strong { display: inline-block; padding: .1rem .55rem; color: var(--accent); background: #243d40; border-radius: .35rem; }
.desk button:disabled { opacity: .55; cursor: default; }
.desk :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.desk #join button, .projection-panel .primary { color: #102129; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.desk .cue-button:not(.is-active,.is-pending) { background: #20323f; }
@media (max-width: 38rem) {
  .desk:not(.landing) { margin-block: 1rem; padding-inline: .85rem; }
  .site-header .account-links { justify-content: flex-start; }
}
