html {
  min-height: 100%;
  background-color: #0f0c29;
  background-image:
    radial-gradient(at 20% 30%, hsla(260,70%,25%,0.6) 0px, transparent 50%),
    radial-gradient(at 80% 10%, hsla(270,60%,20%,0.5) 0px, transparent 50%),
    radial-gradient(at 40% 80%, hsla(280,50%,20%,0.5) 0px, transparent 50%),
    radial-gradient(at 90% 60%, hsla(260,65%,22%,0.5) 0px, transparent 50%),
    radial-gradient(at 10% 90%, hsla(290,50%,18%,0.4) 0px, transparent 50%),
    linear-gradient(to bottom, #0f0c29, #1a1a2e);
  background-attachment: fixed;
  background-size: cover;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}
body {
  min-height: 100%;
  background: transparent;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}
.section {
  background-color: transparent !important;
}
.tabs a {
  color: #fff !important;
}
.tabs a:hover {
  color: #000 !important;
}
.tabs li.is-active a {
  border-bottom-color: #000 !important;
  color: #000 !important;
}
.play-page {
  color: #fff;
}
.play-page .title {
  color: #fff;
}
.play-page .subtitle {
  color: #e0e0e0;
}
.glass-box {
  background-color: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(10px);
  border-radius: 6px;
  color: #fff;
}
.glass-box .title,
.glass-box .subtitle,
.glass-box label {
  color: #fff;
}
.glass-box a {
  color: #80bdff;
}
.quest-form-page {
  color: #fff;
}
.quest-form-page .title {
  color: #fff;
}
.quest-form-page label {
  color: #e0e0e0;
}
.play-page .glass-box {
  background-color: rgba(0, 0, 0, 0.2) !important;
}
.play-page .comment-input-wrap .textarea {
  background-color: rgba(100, 100, 100, 0.2) !important;
  color: #fff !important;
}
.play-page .comment-input-wrap .textarea::placeholder {
  color: #ccc;
}
.play-page .has-text-grey {
  color: #ccc !important;
}
.play-page .media-content strong {
  color: #fff;
}
#app { min-height: 100%; display: flex; flex-direction: column; }
.section { flex: 1; }

.quest-card {
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.quest-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}
.new-quest-card .image.is-a4 {
  background: #5e35b1;
}
.new-quest-card:hover .image.is-a4 {
  background: #7e57c2;
}
.rating-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  color: #ffd700;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 4px;
}

.image.is-a4 {
  position: relative;
  padding-top: 141.42%;
}
.image.is-a4 img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.empty-cover {
  border: 2px dashed #dbdbdb;
  background: #fafafa;
}
.quest-edit-grid {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: 1fr auto;
  gap: 2rem;
  justify-content: center;
}
.edit-fields {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 350px;
}
.edit-cover {
  grid-column: 2;
  grid-row: 1;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.cover-a4 {
  margin: 0;
  height: 100%;
  width: auto;
  aspect-ratio: 210 / 297;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}
.cover-a4 img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bdbdbd;
  font-size: 1rem;
  pointer-events: none;
}
.edit-actions {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.viewport {
  position: relative;
  width: 100%;
  height: 600px;
  background: #f5f5f5;
  border: 1px solid #dbdbdb;
  border-radius: 6px;
  overflow: hidden;
  cursor: grab;
}
.viewport:active { cursor: grabbing; }
.field-content {
  position: absolute;
  width: 5000px;
  height: 5000px;
  transform-origin: 0 0;
}
.conn-line {
  position: absolute;
  pointer-events: none;
  overflow: visible;
}
.node-card {
  position: absolute;
  width: 330px;
  background: #fff;
}
.node-card .card-header {
  cursor: move;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.node-colors {
  display: flex;
  align-items: center;
  gap: 4px;
}
.color-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  cursor: pointer;
  border-radius: 2px;
}
.color-swatch:hover {
  transform: scale(1.25);
}
.node-card .card-content {
  padding: 10px;
}

.node-number-input {
  width: 50px;
  font-weight: bold;
  text-align: center;
}

.choice-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
}
.choice-text {
  flex: 1;
}
.choice-target {
  width: 44px;
  text-align: center;
}

.zoom-controls {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 20;
}
.zoom-controls .button {
  width: 32px;
  height: 32px;
  padding: 0;
  font-weight: bold;
}

.button.is-floating {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  z-index: 100;
}

.stars {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
}
.stars .icon {
  margin: 0 -2px;
}
.stars .icon i {
  font-size: 1.8rem;
}

.comment-input-wrap {
  position: relative;
}
.comment-input-wrap .textarea {
  padding-bottom: 44px;
  min-height: 96px;
}
.send-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  border: none;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}
.send-btn:hover, .send-btn:focus, .send-btn:active, .send-btn:focus-visible {
  background: transparent !important;
  transform: scale(1.15);
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}
.no-resize {
  resize: none;
}
.status-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
}
.delete-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  outline: none;
  box-shadow: none;
  padding: 0;
  width: 1.4rem;
  height: 1.4rem;
}
.delete-badge .icon {
  font-size: 0.7rem;
}
.delete-badge:hover, .delete-badge:focus, .delete-badge:active {
  transform: scale(1.1);
  outline: none;
  box-shadow: none;
}
.choices-list {
  margin-top: 8px;
}
.clickable-title {
  cursor: pointer;
}
.clickable-title:hover {
  text-decoration: underline;
}
.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4em;
  height: 2.8em;
}

/* Game mode fullscreen gameplay */
html.game-mode,
body.game-mode {
  overflow: hidden;
  height: 100vh;
}
.game-mode .section {
  padding: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-mode .container {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}
.play-page.game-mode {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bookmark-btn .icon i {
  font-size: 2rem;
}
.game-panel {
  max-height: 80vh;
  overflow-y: auto;
}
.pre-wrap {
  white-space: pre-wrap;
}
.indented-paragraph {
  text-indent: 1.5em;
  margin-bottom: 0;
}
.guide-page,
.guide-page h1,
.guide-page h2,
.guide-page h3,
.guide-page p,
.guide-page li,
.guide-page strong {
  color: #fff !important;
}
.guide-page code {
  color: #80bdff !important;
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: 4px;
}
.donate-input {
  background: rgba(0,0,0,0.6) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,0.2) !important;
}
.donate-input::selection {
  background: #5e35b1;
  color: #fff;
}
.custom-scroll::-webkit-scrollbar {
  width: 8px;
}
.custom-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}
.custom-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.2);
}

.bookmark-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  background: transparent !important;
  border: none !important;
  padding: 4px;
  cursor: pointer;
  outline: none !important;
  box-shadow: none !important;
}
.bookmark-btn:hover,
.bookmark-btn:focus,
.bookmark-btn:active,
.bookmark-btn:focus-visible {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  transform: scale(1.15);
}
