:root {
  --ink: #172e2a;
  --muted: #75817d;
  --green: #204d43;
  --accent: #d9eac7;
  --line: #e4e9e5;
  --paper: #fff;
  --bg: #f4f6f3;
  --danger: #a42e3b;
  font:
    16px/1.5 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 15px;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: #edf2eb;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.primary:hover {
  background: #153a31;
}
.soft {
  background: #edf2e8;
  border-color: #edf2e8;
}
.danger {
  color: var(--danger);
}
.ghost {
  border-color: transparent;
  background: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: #2e6a52;
}
.link {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.055em;
}
h2 {
  font-size: 1.22rem;
  letter-spacing: -0.025em;
  font-weight: 650;
}
h3 {
  font-size: 1rem;
  font-weight: 650;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 0.875rem;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 10px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 230px;
  padding: 28px 20px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.1rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  padding: 0 10px 33px;
}
.brand img {
  width: 35px;
  height: 35px;
}
.brand span {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
}
.nav-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9aa39f;
  padding: 16px 13px 10px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  font-size: 0.875rem;
  color: #68756f;
  margin: 3px 0;
  border-radius: 8px;
  font-weight: 500;
}
.nav a:hover {
  background: #f4f6f2;
}
.nav a.active {
  background: #eaf1e4;
  color: #244c36;
  font-weight: 650;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8ebdf;
  color: #466044;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: 650;
  font-size: 0.875rem;
  flex-shrink: 0;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
}
.account small {
  display: block;
  font-size: 0.75rem;
}
.workspace {
  margin-left: 230px;
}
.topbar {
  height: 76px;
  padding: 0 44px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  gap: 16px;
}
.topbar .org {
  display: flex;
  align-items: center;
  gap: 9px;
}
.main {
  max-width: 1600px;
  margin: auto;
  padding: 38px 44px 70px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.page-head p {
  color: var(--muted);
  margin-top: 9px;
  font-size: 0.9375rem;
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.welcome {
  background: #183c36;
  color: #fff;
  border-radius: 16px;
  padding: 32px 36px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}
.welcome:after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border: 40px solid #ffffff08;
  border-radius: 50%;
  right: -30px;
  top: -80px;
  pointer-events: none;
}
.welcome h2 {
  font-size: 1.65rem;
  letter-spacing: -0.045em;
  max-width: 500px;
}
.welcome p {
  color: #b4ccc3;
  margin-top: 12px;
  max-width: 550px;
}
.welcome .eyebrow {
  color: #bdd9a9;
}
.welcome button {
  background: var(--accent);
  border: 0;
  align-self: center;
  z-index: 1;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 30px;
}
.stat {
  padding: 21px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.stat .value {
  font-size: 1.9rem;
  font-weight: 650;
  letter-spacing: -0.05em;
  margin: 8px 0 0;
}
.stat .label {
  font-size: 0.875rem;
  color: var(--muted);
}
.stat-icon {
  float: right;
  color: #668362;
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr);
  gap: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.card.pad {
  padding: 24px;
}
.card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 21px 24px;
  border-bottom: 1px solid var(--line);
}
.card-title small {
  font-size: 0.8125rem;
}
.row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.row:last-child {
  border: 0;
}
.row .grow,
.grow {
  flex: 1;
  min-width: 0;
}
.row small {
  display: block;
  margin-top: 4px;
}
.date-box {
  width: 52px;
  padding: 8px 4px;
  border-radius: 8px;
  text-align: center;
  background: #f2f5ee;
  flex-shrink: 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
}
.date-box span {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a8775;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 0.75rem;
  line-height: 1.4;
  background: #f0f3ef;
  color: #63705f;
  white-space: nowrap;
}
.badge.green {
  background: #e8f4e8;
  color: #34703e;
}
.badge.orange {
  background: #fff2df;
  color: #9a6d2b;
}
.badge.red {
  background: #fceced;
  color: #a0424b;
}
.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 3px 8px;
  background: #f0f2f6;
  border-radius: 4px;
  color: #687385;
  margin: 2px;
}
.empty {
  padding: 55px 25px;
  text-align: center;
  color: var(--muted);
}
.empty svg {
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  color: #9cae99;
}
.empty h3 {
  color: var(--ink);
  margin-bottom: 7px;
}
.empty p {
  max-width: 440px;
  margin: auto;
}
.empty button {
  margin-top: 20px;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.search {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.search svg {
  position: absolute;
  left: 13px;
  top: 12px;
  color: #99a29a;
}
.search input {
  padding-left: 42px;
  width: 100%;
}
input,
select,
textarea {
  border: 1px solid #dfe5df;
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font-size: 0.9rem;
  max-width: 100%;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #829e71;
  outline: 2px solid #bdd4aa55;
}
input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}
textarea {
  resize: vertical;
  min-height: 110px;
  width: 100%;
}
label {
  font-size: 0.875rem;
  color: #53645a;
  display: block;
}
label input,
label select,
label textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
}
label.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
label.check input {
  display: inline-block;
  width: 17px;
  margin: 0;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: #859087;
  background: #fafbf9;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 17px 20px;
  border-bottom: 1px solid #edf0ec;
  font-size: 0.875rem;
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr.clickable:hover {
  background: #f8faf6;
  cursor: pointer;
}
.song-title {
  font-weight: 600;
  font-size: 0.9375rem;
}
.song-title small {
  display: block;
  font-weight: 400;
  font-size: 0.8125rem;
  margin-top: 4px;
}
.song-mark {
  width: 34px;
  height: 34px;
  background: #eef3e7;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #71935b;
  margin-right: 13px;
  vertical-align: middle;
}
.song-cell {
  display: flex;
  align-items: center;
}
.key {
  display: inline-block;
  min-width: 32px;
  padding: 4px 8px;
  background: #f2f4f0;
  border-radius: 5px;
  text-align: center;
  font-weight: 650;
  font-size: 0.8125rem;
}
.favorite {
  padding: 3px;
  border: 0;
  background: none;
  color: #b1bbaf;
}
.favorite.on {
  color: #b18f37;
}
.favorite.on svg {
  fill: #e2c36a;
}
.tabs {
  display: flex;
  gap: 25px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 25px;
}
.tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 13px 0;
  color: var(--muted);
  background: none;
}
.tabs button.active {
  border-bottom-color: var(--green);
  color: var(--green);
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 22px;
}
.song-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
}
.arrangement {
  display: block;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  text-align: left;
  width: 100%;
  margin-bottom: 10px;
  padding: 15px;
}
.arrangement.active {
  border-color: #8aa776;
  background: #edf3e6;
}
.arrangement small {
  display: block;
  margin-top: 5px;
  font-weight: 400;
}
.detail-meta {
  margin-top: 23px;
  font-size: 0.875rem;
}
.detail-meta div {
  padding: 9px 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.chart-tools {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.chart {
  padding: 32px 40px;
  line-height: 1.9;
  font-size: 1rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  min-height: 250px;
}
.chart-title {
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.3;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}
.chart-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 27px;
}
.chart-line {
  min-height: 1.9em;
}
.chart-section {
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 18px;
  margin-bottom: 3px;
}
.chord-part {
  display: inline-flex;
  flex-direction: column;
  vertical-align: bottom;
  min-width: 1ch;
  line-height: 1.5;
  padding-right: 0.15em;
}
.chord-part b {
  color: #4b6c35;
  font-weight: 700;
  min-height: 1.5em;
}
.chart-plain {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
}
.chart-footer {
  font-size: 0.75rem;
  color: #969f95;
  border-top: 1px solid var(--line);
  margin-top: 35px;
  padding-top: 15px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.field-help {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 7px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}
.form-error {
  color: var(--danger);
  background: #fceff0;
  padding: 10px 13px;
  border-radius: 7px;
  font-size: 0.875rem;
  margin: 12px 0;
}
.form-error:empty {
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 30px 100px #102e3033;
  padding: 0;
  width: min(620px, 95vw);
  max-height: 92vh;
  color: var(--ink);
  background: #fff;
}
dialog.wide {
  width: min(1040px, 96vw);
}
dialog::backdrop {
  background: #112e2b66;
  backdrop-filter: blur(3px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}
.modal-body {
  padding: 24px 26px;
}
.modal-head button {
  padding: 6px;
}
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.editor-layout textarea {
  min-height: 370px;
  font-family: ui-monospace, monospace;
  font-size: 0.875rem;
}
.editor-preview {
  background: #f8faf6;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 470px;
  overflow: auto;
}
.editor-preview .chart {
  padding: 22px;
  font-size: 0.9rem;
}
.plan-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 215px;
}
.plan-card:hover {
  border-color: #9bb28c;
}
.plan-card .date {
  font-size: 0.8125rem;
  color: #798771;
}
.plan-card h2 {
  margin-top: 5px;
}
.plan-card .plan-foot {
  border-top: 1px solid var(--line);
  padding-top: 17px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--muted);
}
.plan-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
}
.plan-item.header {
  background: #f4f6f0;
  font-weight: 650;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  padding: 11px 20px;
}
.plan-item.blue {
  border-left-color: #87b7df;
}
.plan-item.green {
  border-left-color: #92bb80;
}
.plan-item.purple {
  border-left-color: #b498cc;
}
.plan-item.orange {
  border-left-color: #e4ba7e;
}
.plan-item.current {
  background: #eff7e6;
}
.drag {
  color: #a7afa5;
  cursor: grab;
  user-select: none;
}
.duration {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.8125rem;
  min-width: 42px;
}
.plan-item .title {
  font-size: 0.9375rem;
  font-weight: 550;
}
.plan-item .note {
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: pre-wrap;
}
.plan-item .edit-actions {
  display: flex;
  opacity: 0.35;
}
.plan-item:hover .edit-actions,
.plan-item:focus-within .edit-actions {
  opacity: 1;
}
.icon-btn {
  padding: 6px;
  border-color: transparent;
  background: transparent;
}
.note-box {
  white-space: pre-wrap;
  color: #647167;
  font-size: 0.875rem;
  padding: 20px 24px;
}
.assignment {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.assignment:last-child {
  border: 0;
}
.assignment small {
  display: block;
}
.assignment button {
  padding: 5px;
}
.conflict {
  font-size: 0.75rem;
  color: #ab622b;
}
.section-space {
  margin-top: 24px;
}
.comment {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.comment p {
  margin-top: 8px;
  white-space: pre-wrap;
  font-size: 0.875rem;
}
.comment-form {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  align-items: flex-end;
}
.comment-form textarea {
  min-height: 70px;
}
.file-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.file-card .file-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #f0f4eb;
  color: #789267;
}
.file-card audio,
.file-card video {
  width: 100%;
  max-width: 420px;
  margin-top: 12px;
}
.file-list {
  display: grid;
  gap: 13px;
}
.list-box {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px;
  max-height: 280px;
  overflow: auto;
}
.team-member {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.team-member:last-child {
  border: 0;
}
.team-member .checks {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.team-member .checks label {
  font-size: 0.8125rem;
}
.notice {
  padding: 16px 20px;
  background: #edf3e7;
  border-radius: 9px;
  color: #516749;
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 20px;
}
.notice.warning {
  background: #fff2dd;
  color: #866933;
}
.matrix th:first-child,
.matrix td:first-child {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
}
.matrix td {
  min-width: 220px;
  vertical-align: top;
}
.matrix td:first-child {
  min-width: 140px;
}
.matrix-item {
  display: block;
  padding: 7px 0;
  border-bottom: 1px solid #edf1e9;
  font-size: 0.8125rem;
}
.matrix-item small {
  display: block;
}
.loading {
  padding: 80px;
  text-align: center;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #183c36;
  color: #fff;
  border-radius: 9px;
  box-shadow: 0 8px 35px #153d3029;
  padding: 12px 22px;
  z-index: 100;
  font-size: 0.875rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  max-width: 90vw;
}
#toast.show {
  opacity: 1;
}
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
}
.auth-art {
  padding: 65px;
  background: #183c36;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-art h1 {
  font-size: 3.3rem;
  letter-spacing: -0.055em;
  line-height: 1.1;
  max-width: 460px;
  margin: 35px 0 25px;
}
.auth-art p {
  color: #b8cdbf;
  max-width: 390px;
}
.auth-art .brand {
  padding: 0;
  color: #fff;
}
.auth-art .brand span {
  color: #c1d4b8;
}
.auth-symbol {
  font-size: 200px;
  line-height: 1;
  color: #a9c59225;
  position: absolute;
  right: 60px;
  bottom: 100px;
  transform: rotate(-15deg);
}
.auth-form {
  padding: 55px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.auth-form > div {
  width: 100%;
  max-width: 390px;
}
.auth-form h2 {
  font-size: 1.7rem;
  margin-bottom: 10px;
}
.auth-form p {
  color: var(--muted);
  margin-bottom: 30px;
  font-size: 0.9375rem;
}
.auth-form label {
  margin-bottom: 17px;
}
.auth-form .primary {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
}
.mobile-menu {
  display: none;
}
.stage {
  background: #14231f;
  color: #eef6e8;
  min-height: 100vh;
  padding: 25px 6vw;
}
.stage .chart {
  font-size: 1.5rem;
  max-width: 1000px;
  margin: auto;
}
.stage .chart-section,
.stage .chord-part b {
  color: #b7da8e;
}
.stage .chart-meta {
  color: #a0b199;
}
.stage .chart-tools {
  position: sticky;
  top: 0;
  background: #14231f;
  z-index: 2;
  border-color: #ffffff20;
}
.stage .chart-footer {
  border-color: #ffffff20;
}
.stage-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}
.stage .chart-title {
  font-size: 2rem;
}
.progress {
  height: 7px;
  border-radius: 6px;
  background: #edf1e8;
  overflow: hidden;
}
.progress > div {
  height: 100%;
  background: #7d9d65;
  transition: width 0.3s;
}
pre.report {
  font-size: 0.8rem;
  white-space: pre-wrap;
  max-height: 300px;
  overflow: auto;
  background: #f6f7f4;
  padding: 15px;
  border-radius: 7px;
}
.inline-fields {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.inline-fields label {
  flex: 1;
}
.spacer {
  height: 22px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.toolbar select {
  min-width: 140px;
}
.print-only {
  display: none;
}
@media (max-width: 1100px) {
  .main {
    padding: 30px 26px;
  }
  .topbar {
    padding: 0 26px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .song-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .chart {
    padding: 25px;
  }
  .sidebar {
    width: 210px;
    padding: 24px 14px;
  }
  .workspace {
    margin-left: 210px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    box-shadow: 10px 0 60px #12332720;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .workspace {
    margin: 0;
  }
  .topbar {
    height: 64px;
    padding: 0 18px;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .main {
    padding: 26px 18px 60px;
  }
  h1 {
    font-size: 1.65rem;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .page-head .actions {
    width: 100%;
  }
  .welcome {
    padding: 24px;
    display: block;
  }
  .welcome h2 {
    font-size: 1.4rem;
  }
  .welcome button {
    margin-top: 20px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .song-layout {
    display: block;
  }
  .song-layout > aside {
    margin-bottom: 20px;
  }
  .arrangement {
    display: inline-block;
    width: auto;
    margin-right: 8px;
    vertical-align: top;
  }
  .detail-meta {
    display: none;
  }
  .chart {
    padding: 22px 18px;
    font-size: 0.9375rem;
  }
  .chart-tools {
    padding: 12px;
  }
  .editor-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  .modal-body {
    padding: 20px;
  }
  .modal-head {
    padding: 18px 20px;
  }
  dialog {
    max-height: 95vh;
  }
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-art {
    min-height: 280px;
    padding: 32px;
  }
  .auth-art h1 {
    font-size: 2rem;
    margin: 30px 0 15px;
  }
  .auth-art > small {
    display: none;
  }
  .auth-form {
    padding: 32px 24px;
  }
  .auth-symbol {
    font-size: 130px;
    right: 20px;
    bottom: 30px;
  }
  .topbar .date-top {
    display: none;
  }
  .tabs {
    gap: 17px;
    overflow: auto;
  }
  .plan-item {
    padding: 14px 12px;
    gap: 8px;
  }
  .plan-item .edit-actions {
    opacity: 1;
  }
  .plan-item .duration {
    min-width: 36px;
  }
  .row {
    padding: 16px;
  }
  .stage {
    padding: 12px;
  }
  .stage .chart {
    font-size: 1.15rem;
  }
  .file-card {
    padding: 16px;
  }
  .chart-tools select {
    max-width: 130px;
  }
}
@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  .sidebar,
  .topbar,
  .page-head,
  .back,
  .tabs,
  .chart-tools,
  .song-layout > aside,
  .no-print,
  #toast,
  dialog,
  .stage-nav {
    display: none !important;
  }
  .workspace {
    margin: 0;
  }
  .main {
    padding: 0;
    max-width: none;
  }
  .song-layout,
  .columns {
    display: block;
  }
  .card {
    border: 0;
    border-radius: 0;
  }
  .chart,
  .stage .chart {
    padding: 0;
    font-size: 11pt;
    line-height: 1.6;
    min-height: 0;
    color: #000;
  }
  .chart-section,
  .chord-part b,
  .stage .chord-part b {
    color: #000 !important;
  }
  .chart-line {
    break-inside: avoid;
  }
  .stage {
    background: #fff;
    color: #000;
    padding: 0;
  }
  .print-only {
    display: block;
  }
  .plan-item {
    break-inside: avoid;
  }
  .chart-title {
    font-size: 20pt;
  }
  .chart-footer {
    font-size: 9pt;
  }
  .card-title {
    padding-left: 0;
  }
  .print-break {
    break-before: page;
  }
  .stage .chart-meta {
    color: #555;
  }
  .chart-plain {
    font-size: 10pt;
  }
  @page {
    size: A4;
    margin: 16mm;
  }
}
@media (max-width: 900px) {
  .sidebar {
    box-shadow: none;
  }
  .sidebar.open {
    box-shadow: 10px 0 60px #12332720;
  }
  .table-wrap td:nth-child(2) {
    min-width: 215px;
  }
  .song-mark {
    flex-shrink: 0;
  }
}
.chart-body {
  column-gap: 40px;
}
.chart-section {
  break-after: avoid;
}
.chart-line {
  break-inside: avoid;
}
@media (max-width: 900px) {
  .chart-body {
    column-count: 1 !important;
  }
}
@media print {
  .chart {
    font-size: 11pt !important;
  }
  .chart-body {
    column-gap: 10mm;
  }
}

.menu-scrim { display: none; }
@media screen and (max-width: 900px) {
  .sidebar { visibility: hidden; overflow-y: auto; }
  .sidebar.open { visibility: visible; }
  .sidebar.open + .menu-scrim {
    display: block; position: fixed; inset: 0; z-index: 19;
    border: 0; border-radius: 0; background: #102c2655;
  }
  .mobile-menu, .icon-btn, .favorite, .nav a, .chart-tools button,
  .chart-tools select, .tabs button { min-height: 44px; min-width: 44px; }
  .columns { grid-template-columns: minmax(0, 1fr); }
  .columns > *, .grow, .form-grid > *, .editor-layout > * { min-width: 0; }
  .card-title, .stage-nav, .form-actions { flex-wrap: wrap; }
  .plan-item { flex-wrap: wrap; }
  .plan-item .edit-actions { flex: 1 0 100%; justify-content: flex-end; }
  .plan-item .drag { display: none; }
  .assignment, .file-card, .row, .plan-item { overflow-wrap: anywhere; }
  input:not([type="checkbox"]), select, textarea { max-width: 100%; font-size: 16px; }
  .auth-art { min-height: auto; padding: 18px 24px; }
  .auth-art > :not(.brand) { display: none; }
  .auth-art .brand { padding: 0; }
  #song-results table, #song-results tbody { display: block; }
  #song-results thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  #song-results tr.clickable {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center; padding: 12px 10px; gap: 5px 8px; border-bottom: 1px solid var(--line);
  }
  #song-results td { padding: 0; border: 0; min-width: 0; }
  #song-results td:nth-child(2) { grid-column: span 2; overflow-wrap: anywhere; }
  #song-results td:nth-child(3), #song-results td:nth-child(5) { grid-column: 2; }
  #song-results td:nth-child(6)::after { content: " аранж."; }
  #song-results .song-mark { display: none; }
  #song-results td:nth-child(n+4) { font-size: 0.8rem; }
}
@media screen and (max-width: 900px) {
  .roster-list table, .roster-list tbody { display: block; }
  .roster-list thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .roster-list tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; padding: 14px; border-bottom: 1px solid var(--line); }
  .roster-list td { padding: 0; border: 0; overflow-wrap: anywhere; }
  .roster-list td:nth-child(2), .roster-list td:nth-child(3) { min-width: 0; grid-column: 1; }
  .roster-list td:last-child { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}

.section-text {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.media-thumbnail {
  display: block;
  width: min(100%, 12rem);
  max-height: 8rem;
  object-fit: contain;
  object-position: left;
  margin-top: .5rem;
}

.stage-player {
  max-width: 900px;
  margin: 1rem auto;
  display: grid;
  gap: .55rem;
}
.stage-player label { min-width: 0; }
.stage-player select, .stage-player audio { max-width: 100%; }
.stage-player audio { display: block; width: 100%; }
.stage-player input[type=checkbox] { width: auto; }
.stage-player [aria-pressed=true] { outline: 2px solid currentColor; }
@media print { .stage-player { display: none; } }
