* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Mulish", sans-serif;
  background: #000;
  color: #ccc;
  height: 100dvh;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  padding: 0 12px max(12px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}

/* ===== Header Line 1 ===== */

#header-line1 {
  display: flex;
  align-items: center;
  padding: 10px 0 0;
  gap: 4px;
}

#app-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 20px;
  color: #A0A69E;
  letter-spacing: 1px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

#btn-grid-restart,
#btn-grid-loop,
#btn-lyrics,
#btn-burger {
  padding: 0 6px;
  height: 36px;
  border: 1px solid #555;
  border-radius: 6px;
  background: #2a2a2a;
  color: #ccc;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  touch-action: manipulation;
  flex-shrink: 0;
}

#btn-grid-play {
  padding: 0 6px;
  height: 36px;
  border: 1px solid #555;
  border-radius: 6px;
  background: #2a2a2a;
  color: #ccc;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  touch-action: manipulation;
  flex-shrink: 0;
}

#btn-grid-play .material-symbols-outlined {
  font-variation-settings: 'FILL' 1;
}

#btn-grid-play.active {
  color: #A0A69E;
  border-color: #A0A69E;
}

#btn-grid-loop.active {
  color: #A0A69E;
  border-color: #A0A69E;
}

/* ===== Header Line 2 ===== */

#header-line2 {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 0 0;
}

#key-display {
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 6px;
  color: #ccc;
  font-family: "Mulish", sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 0 10px;
  height: 36px;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
  flex-shrink: 0;
}

#song-title {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: "Mulish", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  min-width: 0;
  height: 36px;
  padding: 0 4px;
}

#song-title::placeholder {
  color: #ccc;
}

/* ===== Key Picker Overlay ===== */

#key-picker-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
}

#key-picker-overlay.visible {
  display: block;
}

#key-picker-veil {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
}

#key-picker {
  position: absolute;
  top: 92px;
  left: 10px;
  right: 10px;
  background: #222;
  border: 1px solid #555;
  border-radius: 12px;
  padding: 16px;
  z-index: 101;
}

#key-picker-line1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

#key-root-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

#key-picker-line2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

#bpm-display {
  width: 52px;
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  height: 36px;
  padding: 0 4px;
  font-family: "Mulish", sans-serif;
  -moz-appearance: textfield;
  outline: none;
}

#bpm-display::-webkit-inner-spin-button,
#bpm-display::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

#bpm-display:focus {
  border-color: #A0A69E;
}

#bpm-label {
  color: #ccc;
  font-size: 14px;
  font-weight: 600;
}

#instrument-toggle {
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ===== Grid ===== */

#grid-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  overflow-y: auto;
  padding: 10px 0 max(16px, env(safe-area-inset-bottom));
}

#grid-container::-webkit-scrollbar {
  display: none;
}

.section-block {
  margin-bottom: 14px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.section-name-select {
  height: 30px;
  padding: 0 8px;
  border: 1px solid #555;
  border-radius: 6px;
  background: #2a2a2a;
  color: #ccc;
  font-family: "Mulish", sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
}

.section-btn {
  width: 28px;
  height: 30px;
  border: 1px solid #555;
  border-radius: 6px;
  background: #2a2a2a;
  color: #999;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  flex-shrink: 0;
}

.section-btn .material-symbols-outlined {
  font-size: 18px;
}

.grid-line {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
}

.grid-cells {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  flex: 1;
}

.grid-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #555;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #222;
  padding: 0 2px;
  height: 36px;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.grid-cell.filled {
  color: #ccc;
}

.grid-cell.empty {
  color: #666;
}

.grid-cell.selected {
  border-color: #A0A69E;
  box-shadow: 0 0 10px rgba(126, 184, 218, 0.25);
  color: #fff;
}

.grid-cell.playing {
  border-color: #A0A69E;
  box-shadow: 0 0 8px rgba(126, 184, 218, 0.15);
}

.grid-cell.disabled {
  pointer-events: none;
  opacity: 0.7;
}

.grid-cell.disabled.playing {
  opacity: 1;
}

.cell-more {
  position: absolute;
  right: 0;
  top: -1px;
  bottom: -1px;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  touch-action: manipulation;
  background: #2a2a2a;
  border-left: 1px solid #555;
  border-radius: 6px;
}

.grid-cell.selected .cell-more {
  background: #2a2a2a;
}

.grid-cell.dragging-cell {
  opacity: 0.85;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

#app.playing .section-header {
  opacity: 0.5;
  pointer-events: none;
}

#app.playing .line-btns {
  pointer-events: none;
}

#app.playing #edit-menu {
  pointer-events: none;
  opacity: 0.5;
}

#app.playing #edit-menu .action-btn:disabled {
  opacity: 1;
}

.line-btns {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.line-btn {
  width: 28px;
  height: 36px;
  border: 1px solid #555;
  border-radius: 6px;
  background: #2a2a2a;
  color: #999;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.line-btn .material-symbols-outlined {
  font-size: 18px;
}

.line-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ===== Cell Context Menu ===== */

#cell-context-menu {
  display: none;
  position: fixed;
  background: #2a2a2a;
  border: none;
  border-radius: 6px;
  padding: 2px;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  flex-direction: row;
  gap: 2px;
}

#cell-context-menu.visible {
  display: flex;
}

.ctx-menu-item {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px;
  color: #ccc;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 4px;
  font-family: "Mulish", sans-serif;
  touch-action: manipulation;
}

.ctx-menu-item:active {
  background: #333;
}

.ctx-menu-item .material-symbols-outlined {
  font-size: 18px;
}

/* ===== Grid Popover ===== */

#grid-popover {
  display: none;
  position: fixed;
  background: #2a2a2a;
  border: none;
  border-radius: 6px;
  padding: 2px;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  flex-direction: row;
  gap: 2px;
}

#grid-popover.visible {
  display: flex;
}

.popover-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #ccc;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 4px;
}

.popover-item:active {
  background: #333;
}

.popover-item .material-symbols-outlined {
  font-size: 20px;
}

/* ===== Drag reorder ===== */

.dragging {
  opacity: 0.2;
}

.drag-ghost {
  border-radius: 8px;
  background: #2a2a2a;
}

/* ===== Edit Menu ===== */

#edit-menu {
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#menu-top {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

#btn-place {
  margin-right: 4px;
}

#mode-select {
  flex-shrink: 0;
  height: 36px;
  padding: 0 6px;
  border: 1px solid #555;
  border-radius: 6px;
  background: #2a2a2a;
  color: #ccc;
  font-family: "Mulish", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

#note-display {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  min-width: 28px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
}

#btn-note-up,
#btn-note-down {
  padding: 0;
  width: 36px;
  flex-shrink: 0;
}

#mode-g-content {
  display: contents;
}

#scale-chords-list {
  display: contents;
}

#mode-a-content,
#mode-s-content {
  display: contents;
}

#suggestions-list {
  display: contents;
}

.scale-chord-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  height: 36px;
  border: 1px solid #555;
  border-radius: 8px;
  background: #2a2a2a;
  color: #ccc;
  font-family: "Mulish", sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  min-width: 42px;
}

.scale-chord-chip.selected {
  border-color: #A0A69E;
  background: #2a2a2a;
  color: #fff;
}


#intention-select {
  flex-shrink: 0;
  height: 36px;
  padding: 0 6px;
  border: 1px solid #555;
  border-radius: 6px;
  background: #2a2a2a;
  color: #ccc;
  font-family: "Mulish", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.suggestion-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  height: 36px;
  border: 1px solid #555;
  border-radius: 8px;
  background: #2a2a2a;
  color: #ccc;
  font-family: "Mulish", sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  min-width: 42px;
}

.suggestion-chip.selected {
  border-color: #A0A69E;
  background: #2a2a2a;
  color: #fff;
}

/* ===== Toggle Groups ===== */

.toggle-group {
  display: flex;
  gap: 0;
}

.toggle-btn {
  flex: 0 0 auto;
  padding: 0 8px;
  height: 36px;
  border: 1px solid #555;
  border-radius: 6px;
  background: #2a2a2a;
  color: #ccc;
  font-family: "Mulish", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  text-align: center;
  min-width: 32px;
  line-height: 1.2;
  touch-action: manipulation;
}

.toggle-btn.active {
  background: #2a2a2a;
  color: #fff;
  border-color: #A0A69E;
}

.toggle-group .toggle-btn {
  border-radius: 0;
  border-left: none;
}

.toggle-group .toggle-btn:first-child {
  border-radius: 6px 0 0 6px;
  border-left: 1px solid #555;
}

.toggle-group .toggle-btn:last-child {
  border-radius: 0 6px 6px 0;
}

.toggle-group .toggle-btn.active {
  border-color: #555;
  background: #3a3a3a;
  color: #fff;
}

.toggle-group .action-btn {
  border-radius: 0;
  border-left: none;
}

.toggle-group .action-btn:first-child {
  border-radius: 6px 0 0 6px;
  border-left: 1px solid #555;
}

.toggle-group .action-btn:last-child {
  border-radius: 0 6px 6px 0;
}

.toggle-group #note-display {
  border: 1px solid #555;
  border-left: none;
  border-radius: 0;
  background: #2a2a2a;
  padding: 0 8px;
}

.toggle-group #bpm-display {
  border-radius: 0;
  border-left: none;
}



/* ===== Action Buttons ===== */

.action-btn {
  padding: 0 10px;
  height: 36px;
  border: 1px solid #555;
  border-radius: 6px;
  background: #2a2a2a;
  color: #ccc;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  touch-action: manipulation;
}

.action-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.action-btn:not(:disabled):active {
  background: #2a2a2a;
  color: #fff;
  border-color: #999;
}

/* ===== Burger Menu (full screen) ===== */

#burger-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1a1a1a;
  z-index: 300;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}

#burger-menu.visible {
  display: flex;
}

#burger-menu-header {
  display: flex;
  justify-content: flex-end;
  padding: 10px 10px 0;
  max-width: 500px;
  width: 100%;
}

.burger-menu-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 10px 0;
  gap: 14px;
  max-width: 500px;
  width: 100%;
}

.burger-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  color: #ccc;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: "Mulish", sans-serif;
}

.burger-menu-item:active {
  background: #1a1a1a;
}

.burger-menu-item .material-symbols-outlined {
  font-size: 22px;
  color: #666;
}

.burger-menu-item.danger {
  color: #e74c3c;
}

.burger-menu-item.danger .material-symbols-outlined {
  color: #e74c3c;
}

#examples-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: 6px;
}

#examples-submenu .song-list-item {
  padding: 10px 20px 10px 54px;
  border-bottom: none;
  cursor: pointer;
  color: #ccc;
}

#examples-submenu .song-list-item:active {
  background: #2a2a2a;
}

#examples-submenu .song-list-title {
  font-size: 15px;
  font-weight: 600;
  font-family: "Mulish", sans-serif;
}

.burger-separator {
  height: 1px;
  background: #2a2a2a;
  margin: 4px 20px;
}

/* ===== Auth Screen (full screen) ===== */

.screen-content {
  max-width: 500px;
  width: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

#auth-screen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1a1a1a;
  z-index: 400;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  user-select: text;
  -webkit-user-select: text;
}

#auth-screen.visible {
  display: flex;
}

#auth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

#auth-title,
#open-modal-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 20px;
  color: #A0A69E;
  letter-spacing: 1px;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-field label {
  display: block;
  color: #ccc;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.auth-field input {
  width: 100%;
  height: 40px;
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 6px;
  color: #fff;
  font-family: "Mulish", sans-serif;
  font-size: 16px;
  padding: 0 10px;
  outline: none;
}

.auth-field input:focus {
  border-color: #A0A69E;
}

#auth-info {
  color: #ccc;
  font-size: 15px;
  line-height: 1.6;
  padding: 10px 0;
}

#auth-info a {
  color: #A0A69E;
  text-decoration: underline;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  color: #ccc;
  font-size: 15px;
}

.auth-checkbox input[type="checkbox"] {
  accent-color: #A0A69E;
}

#auth-submit-btn {
  width: 100%;
  height: 44px;
  background: #A0A69E;
  border: none;
  border-radius: 6px;
  color: #000;
  font-family: "Mulish", sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 28px;
}

#auth-submit-btn:active {
  opacity: 0.8;
}

#auth-submit-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.auth-field-error {
  display: block;
  color: #e57373;
  font-size: 13px;
  margin-top: 4px;
}

.auth-field-error:empty {
  display: none;
}

#auth-error {
  color: #e57373;
  font-size: 15px;
  margin-top: 8px;
  min-height: 18px;
}

#auth-sent-msg {
  color: #A0A69E;
  font-size: 15px;
  margin-top: 12px;
  text-align: center;
}

/* ===== Lyrics View (full screen) ===== */

#guide-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1a1a1a;
  z-index: 400;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}

#guide-modal.visible {
  display: flex;
}

#guide-modal-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 20px;
  color: #A0A69E;
  letter-spacing: 1px;
}

#guide-modal .video-container {
  margin-bottom: 0;
}

#guide-modal .guide-placeholder {
  background: #2a2a2a;
  color: #aaa;
  text-align: center;
  padding: 60px 20px;
  border-radius: 8px;
  font-size: 1.1rem;
}

#guide-support a {
  color: #A0A69E;
  text-decoration: underline;
}

#lyrics-view {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  z-index: 300;
  flex-direction: column;
  padding: 10px;
}

#lyrics-view.visible {
  display: flex;
}

#lyrics-header {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 8px;
}

#btn-syllable-toggle {
  padding: 0 10px;
  height: 36px;
  border: 1px solid #555;
  border-radius: 6px;
  background: #2a2a2a;
  color: #ccc;
  font-family: "Mulish", sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

#btn-syllable-toggle.active {
  color: #A0A69E;
  border-color: #A0A69E;
}

#lyrics-textarea {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: "Mulish", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  padding: 12px;
  resize: none;
  outline: none;

}

/* ===== Open / Examples Modal ===== */

#open-modal {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 350;
}

#open-modal.visible {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 80px;
}

#open-modal-veil {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
}

#open-modal-content {
  position: relative;
  z-index: 1;
  background: #222;
  border: 1px solid #555;
  border-radius: 12px;
  max-height: 70vh;
  width: 90%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
}

#open-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #2a2a2a;
}



#open-modal-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  list-style: none;
}

.song-list-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #2a2a2a;
  cursor: pointer;
}

.song-list-item:active {
  background: #2a2a2a;
}

.song-list-info {
  flex: 1;
  min-width: 0;
}

.song-list-title {
  color: #ccc;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-list-date {
  color: #999;
  font-size: 12px;
  margin-top: 2px;
}

.song-delete-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: none;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.song-delete-btn:active {
  color: #e57373;
}

.song-list-empty {
  padding: 30px 16px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

/* ===== Save Toast ===== */

#save-toast {
  position: absolute;
  top: 12px;
  left: 12px;
  transform: translateY(-8px);
  background: #A0A69E;
  border: none;
  border-radius: 6px;
  color: #000;
  font-family: "Mulish", sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

#save-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Confirm Modal ===== */

#confirm-modal {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
}

#confirm-modal.visible {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}

#confirm-modal-veil {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
}

#confirm-modal-box {
  position: relative;
  z-index: 1;
  background: #1a1a1a;
  border: 1px solid #555;
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 340px;
}

#confirm-modal-msg {
  color: #ccc;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 16px;
}

#confirm-modal-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.confirm-btn {
  width: 100%;
  height: 40px;
  border: 1px solid #555;
  border-radius: 6px;
  background: #2a2a2a;
  color: #ccc;
  font-family: "Mulish", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.confirm-btn:active {
  background: #333;
}

.confirm-btn.primary {
  background: #A0A69E;
  color: #000;
  border-color: #A0A69E;
}

/* ===== Save-As Modal ===== */

#saveas-modal {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
}

#saveas-modal.visible {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}

#saveas-modal-veil {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
}

#saveas-modal-box {
  position: relative;
  z-index: 1;
  background: #1a1a1a;
  border: 1px solid #555;
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 340px;
}

#saveas-input {
  width: 100%;
  height: 40px;
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 6px;
  color: #fff;
  font-family: "Mulish", sans-serif;
  font-size: 15px;
  padding: 0 10px;
  outline: none;
  margin-bottom: 12px;
}

#saveas-input:focus {
  border-color: #A0A69E;
}

#saveas-btns {
  display: flex;
  gap: 8px;
}

#saveas-btns .confirm-btn {
  flex: 1;
}

/* ===== Forgot Password ===== */

#forgot-screen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1a1a1a;
  z-index: 410;
  flex-direction: column;
  align-items: center;
}

#forgot-screen.visible {
  display: flex;
}

#forgot-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

#forgot-submit-btn {
  width: 100%;
  height: 44px;
  background: #A0A69E;
  border: none;
  border-radius: 6px;
  color: #000;
  font-family: "Mulish", sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
}

#forgot-submit-btn:active {
  opacity: 0.8;
}

#forgot-msg {
  color: #A0A69E;
  font-size: 13px;
  margin-top: 8px;
  min-height: 18px;
}

/* ===== Accords Static Pages ===== */

body.accords-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px;
  line-height: 1.8;
  height: auto;
  overflow: visible;
  user-select: text;
  -webkit-user-select: text;
}

.accords-page h1 {
  font-family: "Bebas Neue", sans-serif;
  color: #A0A69E;
  font-size: 28px;
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.accords-page h2 {
  color: #ccc;
  font-size: 18px;
  margin-top: 24px;
  margin-bottom: 12px;
}

.accords-page p {
  margin-bottom: 14px;
  color: #ccc;
  font-size: 15px;
}

.accords-page ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.accords-page li {
  color: #ccc;
  font-size: 15px;
  margin-bottom: 4px;
}

.accords-page a {
  color: #A0A69E;
}

.accords-page .video-container {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  background: #111;
  border-radius: 12px;
  overflow: hidden;
}

.accords-page .video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.accords-page .placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #555;
  font-size: 16px;
}

.accords-page .material-symbols-outlined {
  font-size: 18px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.accords-page .guide-btn {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  margin: 0 4px;
  height: 28px;
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 6px;
  color: #ccc;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.accords-page .guide-btn .material-symbols-outlined {
  font-size: 20px;
  vertical-align: unset;
  position: unset;
  top: unset;
}

.accords-page .guide-btn svg {
  display: block;
}
