@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css");

html {
    font-size: 16px;
}

body {
    margin: 0 auto;
    padding: 0 5px;
    background: #f5f5f5;
    font-family: "Pretendard Variable", Pretendard, Arial, sans-serif;
    max-width: 1110px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.login-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 350px;
    text-align: center;
    margin: 50px auto;
}

h2 {
    margin-bottom: 20px;
    color: #ff77b2;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

input {
    width: 90%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ffccde;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
}

input:focus {
    border-color: #ff77b2;
}

input.error {
    border: 2px solid red;
}

button {
    width: 90%;
    padding: 9px 16px;
    background-color: #ff77b2;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

button:hover {
    background-color: #ff3366;
}

#refreshProfile, #toggleSegaCredentials {
    width: 150px;
    height: 32px;
    padding: 6px 12px;
    font-size: 12px;
    background-color: #9d63f0;
    border-radius: 4px;
    line-height: 20px;
    font-weight: 600;
}

#refreshProfile:hover, #toggleSegaCredentials:hover {
    background-color: #7a4cc0;
}


#sega-credentials-form button {
    width: 100px;
    height: 32px;
    padding: 6px 12px;
    font-size: 12px;
}

p {
    margin-top: 10px;
    font-size: 14px;
}

a {
    color: #ff77b2;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

.error-message, #error-message {
    color: red;
    font-size: 14px;
    margin-top: 5px;
    text-align: center;
    width: 90%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}



.rating-summary {
    font-size: 50px;
    color: #888;
    margin-left: auto;
    margin-right: 8px;
    font-weight: 800;
}
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.rating-summary-box {
  text-align: right;
  height: 4px;
  font-size: 17px;
  color: #888;
  margin-bottom: -10px;
  margin-top: 20px;
  padding-right: 8px;
}












*, *::before, *::after { box-sizing: border-box; }

.container {
    max-width: 1110px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.profile-section {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 20px;
    margin: 12px 0;
    color: #fff;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.2);
    object-fit: cover;
    flex-shrink: 0;
}


.profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.friend-code {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    gap: 6px;
}

.username {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
}

.rating-container {
    position: relative;
    min-width: 120px;
    height: 46px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 4px 8px;
    overflow: visible;
}
.rating-frame-img {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 100%;
    width: auto;
    max-width: none;
    object-fit: contain;
    z-index: 1;
    pointer-events: none;
}

.rating {
    font-size: 1.3rem;
    font-weight: 900;
    color: #f5a623;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    padding-left: 63px;
    letter-spacing: 3.3px;
}

.trophy-block {
    margin: 2px 0;
}

.update-time {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

.play-count {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

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

#howToUpdateBtn {
    width: auto;
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
#howToUpdateBtn:hover { background: rgba(255,255,255,0.25); }

#myPageBtn {
    width: auto;
    padding: 8px 16px;
    background: rgba(157,99,240,0.6);
    border: none;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
#myPageBtn:hover { background: rgba(157,99,240,0.9); }

.game-switch-btn {
    width: auto;
    padding: 8px 16px;
    background: rgba(78,204,163,0.25);
    border: 1px solid rgba(78,204,163,0.5);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}
.game-switch-btn:hover { background: rgba(78,204,163,0.4); }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-box h3 { font-size: 1.2rem; margin-bottom: 16px; color: #1a1a2e; }
.modal-box ol { margin: 0 0 16px 20px; line-height: 1.8; color: #444; }
.modal-box a  { color: #9d63f0; }
.modal-note   { font-size: 0.82rem; color: #888; margin: 12px 0 0; }
.modal-box button {
    width: auto;
    margin-top: 20px;
    padding: 10px 24px;
    background: #9d63f0;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.bookmarklet-box {
    background: #f7f5fb;
    border: 1px dashed #9d63f0;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 4px;
}
.bookmarklet-drag-btn {
    display: inline-block;
    width: auto;
    background: #9d63f0;
    color: #fff !important;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    cursor: grab;
    margin-bottom: 12px;
}
.bookmarklet-drag-btn:hover { background: #8a4de0; }
.bookmarklet-code-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.bookmarklet-code-input {
    flex: 1;
    width: auto;
    min-width: 0;
    font-family: monospace;
    font-size: 11px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #555;
}
.bookmarklet-code-row button {
    width: auto;
    margin: 0;
    padding: 8px 14px;
    font-size: 13px;
    flex-shrink: 0;
}
.bookmarklet-copy-msg {
    font-size: 0.78rem;
    color: #2e9e4f;
    margin: 8px 0 0;
    min-height: 1em;
}

.share-section { padding: 16px 0; }
.share-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.share-url-box { display: flex; gap: 8px; }
.share-url-box input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.85rem;
    background: #f9f9f9;
    outline: none;
    width: auto;
}
.share-url-box button {
    width: auto;
    padding: 10px 20px;
    background: #9c27b0;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 0;
}
#shareMsg { font-size: 0.8rem; color: #4caf50; margin-top: 8px; }

.share-section + .share-section { border-top: 1px solid #eee; margin-top: 4px; }
.share-desc { font-size: 0.8rem; color: #888; margin: -4px 0 12px; line-height: 1.5; }
.share-img-msg { font-size: 0.8rem; color: #4caf50; margin-top: 8px; min-height: 1em; }
.share-img-msg.error { color: #e53935; }
.share-preview-wrap { margin-top: 12px; }
.share-preview-img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    display: block;
}
.level-range-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.level-range-picker input[type="number"] {
    width: 90px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.level-summary-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.level-summary-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f5f5f7;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 0.82rem;
    cursor: pointer;
    user-select: none;
}
.level-summary-checkbox input { width: auto; margin: 0; cursor: pointer; }
.level-summary-checkbox.checked { background: #f3e5f9; border-color: #9c27b0; color: #7b1fa2; font-weight: 700; }

.empty-msg {
    text-align: center;
    color: #aaa;
    padding: 40px 20px;
    font-size: 0.9rem;
}

.toggle-label {
    font-size: 14px;
    color: #333;
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #cdaaff;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.refresh-button {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background-color: #9d63f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
    width: 100px;
    height: 32px;
    line-height: 20px;
}

.refresh-button:hover {
    background-color: #7a4cc0;
}

#loadMore {
    display: block;
    text-align: center;
    padding: 10px;
    margin: 10px 0;
}
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    text-align: center;
    display: block;
    font-size: 16px;
    color: #fff;
    padding: 20px;
    background: #333;
    border-radius: 10px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.tab-menu {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.tab-link {
    padding: 8px 15px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.3s;
    cursor: pointer;
}

.tab-link:hover {
    background-color: #c0c0c0;
    color: #000;
}

.tab-link.active {
    background-color: #d3d3d3;
    color: #000;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section-title {
    display: flex;
    align-items: center;
    margin: 30px 0 20px;
}

.title-text {
    background: #ffffff;
    color: #181818;
    padding: 5px;
    border-radius: 20px;
    font-weight: 700;
    width: 100px;
    height: 20px;
    text-align: center;
    line-height: 19px;
    position: relative;
    top: -2px;
    box-shadow: 0px 2px 5px rgba(153, 153, 153, 0.3);
}

.right-title-line {
    flex: 1;
    height: 7px;
    background: #e4e4e4;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}

.left-title-line {
    flex: 1;
    height: 7px;
    background: #e4e4e4;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}




.sort-search-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-controls label {
    font-size: 14px;
    text-align: right;
    width: 70px;
    color: #333;
}

.sort-controls select {
    padding: 5px;
    margin-left: 2px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.sort-order-btn {
    width: 80px;
    padding: 5px;
    font-size: 14px;
    border-radius: 5px;
    margin-bottom: 10px;
    margin-left: 2px;
    border: 1px solid #ccc;
    background-color: #f5f5f5;
    cursor: pointer;
    color: black;
}

.sort-order-btn:hover {
    background-color: #c0c0c0;
}

.search-container {
    display: flex;
    align-items: center;
}

.search-container input {
    padding: 5px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 200px;
}

.record-blocks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
@media (min-width: 1000px) {
    .record-blocks {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px 14px;
    }
    .record-blocks > * {
        min-width: 0;
    }
}

.record-block {
    display: flex;
    align-items: center;
    min-width: 0;
    box-sizing: border-box;
    max-width: 100%;
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
    min-height: 84px;
}

.record-block:hover {
    background: #f0f0f0;
}

.record-jacket {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 10px;
    align-self: center;
}
.record-marks {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 10px;
    align-self: center;
}

.record-clear-mark,
.record-sync-mark {
    width: 38px;
    height: 37px;
    object-fit: contain;
}

.record-constant-box {
    width: 50px;
    height: 76px;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    margin-right: 20px;
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    text-align: center;
    box-sizing: border-box;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    align-self: center;
}


.record-constant-box span {
    margin: 0;
    padding: 0;
    display: inline-block;
    line-height: normal;
}

.basic-constant-box {
    background: #78c954;
}

.advanced-constant-box {
    background: #f8d548;
}

.expert-constant-box {
    background: #ff6060;
}

.master-constant-box {
    background: #9d63f0;
}

.remaster-constant-box {
    background: #cdaaff;
}

.record-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-left: 0px;
    padding-top: 5px;
    align-self: center;
}

.record-song-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-top: 5px;
}

.record-song-type {
    height: 13px;
    width: 45px;
}

.record-stats {
    display: flex;
    align-items: center;
    gap: 10px;
}

.record-song-score {
    font-size: 16px;
    font-weight: 700;
    color: #27005e;
}

.record-rank {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.record-rate {
    font-size: 12px;
    color: #888;
}

.master-song-type,
.remaster-song-type,
.basic-song-type,
.advanced-song-type,
.expert-song-type
 {
    display: flex;
    position: absolute;
    bottom: 7px;
    left: 7px;
    z-index: 5;
    height: 13px;
    width: 45px;
}

@keyframes rainbow-border {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.no-border::after {
    display: none !important;
}

.no-border {
    box-shadow: none;
}

.song-name {
    position: absolute;
    margin-top: 15px;
    font-weight: 600;
    margin-right: 3px;
    font-size: 11px;
    text-shadow: 0px 1px 4px rgb(0, 0, 0);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    text-align: left;
    max-width: 90%;
}

.song-rank {
    display: flex;
    position: absolute;
    margin-top: 25px;
    font-weight: 600;
    margin-right: 3px;
    font-size: 10px;
    text-shadow: 0px 1px 4px rgb(0, 0, 0);
}

.song-score {
    display: flex;
    position: absolute;
    margin-top: 35px;
    font-weight: 500;
    margin-right: 3px;
    font-size: 7px;
    text-shadow: 0px 1px 4px rgb(0, 0, 0);
}

.jacket_img {
    width: 100%;
    height: 99%;
    object-fit: cover;
    border-radius: 18px;
    position: relative;
    z-index: 1;
}

.song-info {
    position: absolute;
    height: 60px;
    bottom: 0;
    left: 0;
    width: 70%;
    padding: 0px;
    box-sizing: border-box;
    color: white;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.no-border .advanced-score-info,
.no-border .basic-score-info,
.no-border .expert-score-info,
.no-border .master-score-info,
.no-border .remaster-score-info {
    margin-right: -2px;
    margin-bottom: -2px;
}


.master-card-container.border-black::after,
.basic-card-container.border-black::after,
.advanced-card-container.border-black::after,
.expert-card-container.border-black::after,
.remaster-card-container.border-black::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 4px;
  pointer-events: none;
  background: black;
  mask:
    linear-gradient(white, white) content-box,
    linear-gradient(white, white);
  mask-composite: exclude;
}



.advanced-score-info,
.basic-score-info,
.expert-score-info,
.master-score-info,
.remaster-score-info {
    margin-right: 0;
    margin-bottom: 0;
}

.advanced-card-container {
    position: relative;
    border-radius: 16px;
    width: 170px;
    height: 120px;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 0 20px #f8d548;
}

.advanced-card-container::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 4px;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0) 10%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.7) 70%),
        linear-gradient(135deg,
            #0aff60, #85e1e1, #ff002b, #ea29a0, #ff50a8, #FF4500, #ffd446,
            #e430e4, #c28ee7, #1313ff, #2f73fc, #698cf5, #e430e4, #c28ee7,
            #FF4500, #ffd446, #0aff60, #85e1e1);
    background-size: 1000% 1000%;
    animation: rainbow-border 3s ease-in-out infinite;
    mask: linear-gradient(white, white) content-box, linear-gradient(white, white);
    mask-composite: exclude;
}

.advanced-song-info-bg {
    position: absolute;
    left: 0;
    width: 129%;
    height: 50%;
    background: linear-gradient(to top, rgba(112, 90, 0, 0.9), rgba(112, 90, 0, 0.4), rgba(112, 90, 0, 0));
    z-index: 2;
    pointer-events: none;
    bottom: 0;
}

.advanced-score-info {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 26%;
    height: 43%;
    padding: 5px;
    box-sizing: border-box;
    background: #f8d548;
    border-top-left-radius: 16px;
    border-bottom-right-radius: 12px;
    margin-right: 4px;
    margin-bottom: 4px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

.advanced-constant {
    color: #705a00;
    font-size: 10px;
    margin-bottom: 0;
    margin: 0;
    display: flex;
    position: absolute;
    margin-bottom: 15px;
    margin-right: 2px;
    font-weight: 700;
}

.advanced-song-rating {
    color: #705a00;
    font-size: 16px;
    display: flex;
    position: absolute;
    margin-bottom: 3px;
    margin-right: 3px;
    font-weight: 900;
}

.basic-card-container {
    position: relative;
    border-radius: 16px;
    width: 170px;
    height: 120px;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 0 20px #78c954;
}

.basic-card-container::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 4px;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0) 10%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.7) 70%),
        linear-gradient(135deg,
            #0aff60, #85e1e1, #ff002b, #ea29a0, #ff50a8, #FF4500, #ffd446,
            #e430e4, #c28ee7, #1313ff, #2f73fc, #698cf5, #e430e4, #c28ee7,
            #FF4500, #ffd446, #0aff60, #85e1e1);
    background-size: 1000% 1000%;
    animation: rainbow-border 3s ease-in-out infinite;
    mask: linear-gradient(white, white) content-box, linear-gradient(white, white);
    mask-composite: exclude;
}

.basic-song-info-bg {
    position: absolute;
    left: 0;
    width: 129%;
    height: 50%;
    background: linear-gradient(to top, rgba(25, 65, 7, 0.9), rgba(25, 65, 7, 0.4), rgba(25, 65, 7, 0));
    z-index: 2;
    pointer-events: none;
    bottom: 0;
}

.basic-score-info {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 26%;
    height: 43%;
    padding: 5px;
    box-sizing: border-box;
    background: #78c954;
    border-top-left-radius: 16px;
    border-bottom-right-radius: 12px;
    margin-right: 4px;
    margin-bottom: 4px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

.basic-constant {
    color: #194107;
    font-size: 10px;
    margin-bottom: 0;
    margin: 0;
    display: flex;
    position: absolute;
    margin-bottom: 15px;
    margin-right: 2px;
    font-weight: 700;
}

.basic-song-rating {
    color: #194107;
    font-size: 16px;
    display: flex;
    position: absolute;
    margin-bottom: 3px;
    margin-right: 3px;
    font-weight: 900;
}

.expert-card-container {
    position: relative;
    border-radius: 16px;
    width: 170px;
    height: 120px;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 0 20px #ff6060;
}

.expert-card-container::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 4px;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0) 10%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.7) 70%),
        linear-gradient(135deg,
            #0aff60, #85e1e1, #ff002b, #ea29a0, #ff50a8, #FF4500, #ffd446,
            #e430e4, #c28ee7, #1313ff, #2f73fc, #698cf5, #e430e4, #c28ee7,
            #FF4500, #ffd446, #0aff60, #85e1e1);
    background-size: 1000% 1000%;
    animation: rainbow-border 3s ease-in-out infinite;
    mask: linear-gradient(white, white) content-box, linear-gradient(white, white);
    mask-composite: exclude;
}

.expert-song-info-bg {
    position: absolute;
    left: 0;
    width: 129%;
    height: 50%;
    background: linear-gradient(to top, rgba(103, 7, 7, 0.9), rgba(103, 7, 7, 0.4), rgba(103, 7, 7, 0));
    z-index: 2;
    pointer-events: none;
    bottom: 0;
}

.expert-score-info {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 26%;
    height: 43%;
    padding: 5px;
    box-sizing: border-box;
    background: #ff6060;
    border-top-left-radius: 16px;
    border-bottom-right-radius: 12px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    margin-right: 4px;
    margin-bottom: 4px;
}

.expert-constant {
    color: #670707;
    font-size: 10px;
    margin-bottom: 0;
    margin: 0;
    display: flex;
    position: absolute;
    margin-bottom: 15px;
    margin-right: 2px;
    font-weight: 700;
}

.expert-song-rating {
    color: #670707;
    font-size: 16px;
    display: flex;
    position: absolute;
    margin-bottom: 3px;
    margin-right: 3px;
    font-weight: 900;
}

.master-card-container {
    position: relative;
    border-radius: 16px;
    width: 170px;
    height: 120px;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 0 20px #9d63f0;
}

.master-card-container::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 4px;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0) 10%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.7) 70%),
        linear-gradient(135deg,
            #0aff60, #85e1e1, #ff002b, #ea29a0, #ff50a8, #FF4500, #ffd446,
            #e430e4, #c28ee7, #1313ff, #2f73fc, #698cf5, #e430e4, #c28ee7,
            #FF4500, #ffd446, #0aff60, #85e1e1);
    background-size: 1000% 1000%;
    animation: rainbow-border 3s ease-in-out infinite;
    mask: linear-gradient(white, white) content-box, linear-gradient(white, white);
    mask-composite: exclude;
}

.master-song-info-bg {
    position: absolute;
    left: 0;
    width: 129%;
    height: 50%;
    background: linear-gradient(to top, rgba(39, 0, 94, 0.9), rgba(39, 0, 94, 0.4), rgba(39, 0, 94, 0));
    z-index: 2;
    pointer-events: none;
    bottom: 0;
}

.master-score-info {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 26%;
    height: 43%;
    padding: 5px;
    box-sizing: border-box;
    background: #9d63f0;
    border-top-left-radius: 16px;
    border-bottom-right-radius: 12px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    margin-right: 4px;
    margin-bottom: 4px;
}

.master-constant {
    color: #27005e;
    font-size: 10px;
    margin-bottom: 0;
    margin: 0;
    display: flex;
    position: absolute;
    margin-bottom: 15px;
    margin-right: 2px;
    font-weight: 700;
}

.master-song-rating {
    color: #27005e;
    font-size: 16px;
    display: flex;
    position: absolute;
    margin-bottom: 3px;
    margin-right: 3px;
    font-weight: 900;
}

.remaster-card-container {
    position: relative;
    border-radius: 16px;
    width: 170px;
    height: 120px;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 0 20px rgba(205, 170, 255, 0.9);
}

.remaster-card-container::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 4px;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0) 10%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.7) 70%),
        linear-gradient(135deg,
            #0aff60, #85e1e1, #ff002b, #ea29a0, #ff50a8, #FF4500, #ffd446,
            #e430e4, #c28ee7, #1313ff, #2f73fc, #698cf5, #e430e4, #c28ee7,
            #FF4500, #ffd446, #0aff60, #85e1e1);
    background-size: 1000% 1000%;
    animation: rainbow-border 3s ease-in-out infinite;
    mask: linear-gradient(white, white) content-box, linear-gradient(white, white);
    mask-composite: exclude;
}

.remaster-song-info-bg {
    position: absolute;
    left: 0;
    width: 129%;
    height: 50%;
    background: linear-gradient(to top, rgba(157, 99, 240, 0.9), rgba(157, 99, 240, 0.4), rgba(157, 99, 240, 0));
    z-index: 2;
    pointer-events: none;
    bottom: 0;
}

.remaster-score-info {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 26%;
    height: 43%;
    padding: 5px;
    box-sizing: border-box;
    background: #cdaaff;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    border-top-left-radius: 16px;
    border-bottom-right-radius: 12px;
    margin-right: 4px;
    margin-bottom: 4px;
}

.remaster-constant {
    color: #27005e;
    font-size: 10px;
    margin-bottom: 0;
    margin: 0;
    display: flex;
    position: absolute;
    margin-bottom: 15px;
    margin-right: 2px;
    font-weight: 700;
}

.remaster-song-rating {
    color: #27005e;
    font-size: 16px;
    display: flex;
    position: absolute;
    margin-bottom: 3px;
    margin-right: 3px;
    font-weight: 900;
}










.master-card-container.border-copper::after,
.master-card-container.border-silver::after,
.master-card-container.border-gold::after,
.master-card-container.border-gold-light::after {
  padding: 4px;   
  background-image:
    radial-gradient(circle,
      rgba(255,255,255,0)   10%,
      rgba(255,255,255,0.2) 50%,
      rgba(255,255,255,0.4) 70%
    ),
    linear-gradient(135deg,
      #9c5f25 0%, #af6f2a 25%, #9c5f25 50%, #af6f2a 75%, #9c5f25 100%
    );
}

  
.master-card-container.border-copper::after,
.remaster-card-container.border-copper::after,
.basic-card-container.border-copper::after,
.advanced-card-container.border-copper::after,
.expert-card-container.border-copper::after
 {
  padding: 4px;   
  background-image:
    radial-gradient(circle,
      rgba(255,255,255,0)   5%,
      rgba(255,255,255,0.1) 20%,
      rgba(255,255,255,0.2) 35%,
      rgba(255,255,255,0)   40%
    ),
    linear-gradient(135deg,
      #9c5f25 0%, #af6f2a 25%, #9c5f25 50%, #af6f2a 75%, #9c5f25 100%
    );
}

.master-card-container.border-silver::after,
.remaster-card-container.border-silver::after,
.basic-card-container.border-silver::after,
.advanced-card-container.border-silver::after,
.expert-card-container.border-silver::after {
  padding: 4px;   
  background-image:
    radial-gradient(circle,
      rgba(255,255,255,0)   5%,
      rgba(255,255,255,0.1) 20%,
      rgba(255,255,255,0.2) 35%,
      rgba(255,255,255,0)   40%
    ),
    linear-gradient(135deg,
      #A8A8A8 0%, #C0C0C0 25%, #A8A8A8 50%, #C0C0C0 75%, #A8A8A8 100%
    );
}

.master-card-container.border-gold::after,
.remaster-card-container.border-gold::after,
.basic-card-container.border-gold::after,
.advanced-card-container.border-gold::after,
.expert-card-container.border-gold::after {
  padding: 4px;   
  background:
    radial-gradient(circle,
      rgba(255,255,255,0)    5%,
      rgba(255,255,255,0.01) 20%,
      rgba(255,255,255,0)   40%
    ),
    #ffe553dc;
  background-size:
    300% 300%,
    auto;
  animation:
    shine-highlight 1.5s linear infinite,
    metal-shine    6s ease-in-out infinite;
}



.master-card-container.border-gold-light::after,
.remaster-card-container.border-gold-light::after,
.basic-card-container.border-gold-light::after,
.advanced-card-container.border-gold-light::after,
.expert-card-container.border-gold-light::after{
  padding: 4px;   
  background-image:
    radial-gradient(circle,
      rgba(255,255,255,0)    5%,
      rgba(255,255,255,0.05) 15%,
      rgba(255,255,255,0)   25%
    ),
    linear-gradient(135deg,
      #ffe992 0%,
      #FFE066 25%,
      #ffe992 50%,
      #FFD54F 75%,
      #FFE066 100%
    );
}
.master-card-container.border-rainbow-static::after,
.remaster-card-container.border-rainbow-static::after,
.basic-card-container.border-rainbow-static::after,
.advanced-card-container.border-rainbow-static::after,
.expert-card-container.border-rainbow-static::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 4px;
  pointer-events: none;
  background:
    radial-gradient(circle,
      rgba(255,255,255,0)   5%,
      rgba(255,255,255,0.2) 20%,
      rgba(255,255,255,0)   25%
    ),
    conic-gradient(
      red   0%,
      orange 14%,
      yellow 28%,
      green  42%,
      blue   56%,
      indigo 70%,
      violet 84%,
      red   100%
    );
  background-size: cover;
  animation: none !important;
  mask:
    linear-gradient(white, white) content-box,
    linear-gradient(white, white);
  mask-composite: exclude;
}



@keyframes rainbow-border {
  0%   { background-position:   0%   0%; }
  50%  { background-position: 100% 100%; }
  100% { background-position:   0%   0%; }
}
@keyframes shine-highlight {
  0%   { background-position:   0% 50%, 0% 0%; }
  50%  { background-position: 100% 50%, 0% 0%; }
  100% { background-position:   0% 50%, 0% 0%; }
}
@keyframes metal-shine {
  0%   { background-position:   0%   0%; }
  50%  { background-position: 200% 200%; }
  100% { background-position:   0%   0%; }
}


.sega-credentials-section {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    display: none;
}

.sega-credentials-section h3 {
    margin: 0 0 10px;
    font-size: 1.2em;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.history-block {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
    min-height: 84px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

.history-block:hover {
    background: #f0f0f0;
}

.history-changes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #333;
    max-width: 350px;
    margin-left: 10px;
}

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

.history-change-item img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

#sega-credentials-message {
    margin-top: 10px;
    font-size: 0.9em;
    color: #333;
}

.history-blocks {
    margin: 20px 0;
    min-height: 100px;
    width: 100%;
}

#loadMoreHistory {
    display: block;
    text-align: center;
    padding: 10px;
    margin: 20px 0;
    font-size: 16px;
    color: #007bff;
    cursor: pointer;
}

#loadMoreHistory:hover {
    text-decoration: underline;
}

.new-label {
    color: #ff4d4d;
    font-weight: bold;
    font-size: 12px;
    margin-left: 8px;
}

.version-label {
    display: inline-block;
    width: fit-content;
    align-self: flex-start;
    white-space: nowrap;
    color: #9d63f0;
    background: rgba(157, 99, 240, 0.12);
    border: 1px solid rgba(157, 99, 240, 0.4);
    font-weight: 600;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 999px;
    margin-left: 0;
    vertical-align: middle;
}


.logout-button {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}
.logout-button:hover {
    background-color: #d32f2f;
}


.friend-add-section, .friend-requests-section, .friend-list-section {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.friend-add-section h3,
.friend-requests-section h3,
.friend-list-section h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.friend-add-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.friend-add-section h3 {
    width: 100%;
}
.friend-add-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}
.friend-add-heading-row h3 {
    width: auto;
    margin: 0;
}
.my-id-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #888;
    flex: 0 0 auto;
}
.my-id-display strong {
    color: #333;
    font-size: 13px;
}

.friend-add-section input {
    width: 220px;
    max-width: 100%;
    flex: 0 1 220px;
    padding: 8px 10px;
    margin: 0;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.friend-add-section button {
    width: auto;
    flex: 0 0 auto;
    padding: 8px 16px;
    margin: 0;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
}
.friend-add-section button:hover {
    background-color: #45a049;
}

.friend-add-section .error-message {
    flex-basis: 100%;
    width: auto;
    margin: 4px 0 0;
    text-align: left;
}

.incoming-request, .friend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    background: #fafafa;
    padding: 8px 10px;
    border-radius: 8px;
}
.incoming-request:last-child, .friend-item:last-child {
    margin-bottom: 0;
}
.incoming-request img, .friend-item img {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0;
}
.incoming-request .request-info, .friend-item .friend-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}
.incoming-request .request-info strong,
.friend-item .friend-info strong {
    font-size: 14px;
}
.friend-item .friend-name-link {
    cursor: pointer;
}
.friend-item .friend-name-link:hover {
    text-decoration: underline;
}

.incoming-request button,
.friend-item button {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
}
.incoming-request .accept-btn {
    background-color: #4CAF50;
    color: white;
}
.incoming-request .decline-btn {
    background-color: #f44336;
    color: white;
}
.friend-item .vs-btn {
    background-color: #2196F3;
    color: white;
}
.friend-item .delete-btn {
    background-color: #f44336;
    color: white;
}


.record-toggle-container {
    display: flex;
    flex-wrap: nowrap; 
    align-items: center;
    gap: 8px;
  }
  
  .record-toggle-label {
    font-size: 14px;
    flex-wrap: nowrap;
    text-align: left !important; 
    color: #333;
    line-height: 1;
    padding-top: 1px;
    display: inline-block;
  }
  
  .record-toggle-switch {
    position: relative;
    width: 50px !important;
    height: 18px !important;
    display: inline-block;
    flex-shrink: 0;
  }
  
  .record-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .record-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 999px;
  }
  
  .record-slider:before {
    content: "";
    position: absolute;
    height: 14px !important;
    width: 14px !important;
    left: 2px;
    top: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
  }
  
  .record-toggle-switch input:checked + .record-slider {
    background-color: #9d63f0;
  }
  
  .record-toggle-switch input:checked + .record-slider:before {
    transform: translateX(32px);
  }
  
.note-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  padding: 16px;
}
.note-modal-box {
  background: #1a1a2e;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  width: 560px; max-width: 98vw;
  max-height: 90vh; max-height: 90dvh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  overflow: hidden;
}
.note-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.note-modal-title {
  font-size: 1rem; font-weight: 800; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; margin-right: 12px;
}
.note-modal-close {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.1);
  border: none; border-radius: 8px;
  color: #fff; cursor: pointer;
  font-size: 1rem; display: flex;
  align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 0; padding: 0;
}
.note-modal-close:hover { background: rgba(255,255,255,0.2); }
.note-modal-body {
  overflow-y: auto; padding: 16px 20px;
  flex: 1;
}
.note-modal-loading, .note-modal-empty {
  text-align: center; color: rgba(255,255,255,0.45);
  padding: 32px 0; font-size: 0.9rem; line-height: 1.8;
}
.note-record-item {
  background: rgba(255,255,255,0.05);
  border-radius: 12px; padding: 14px;
  margin-bottom: 12px;
}
.note-record-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.note-record-rate {
  font-size: 1.3rem; font-weight: 900;
  background: linear-gradient(45deg,#ffeb3b,#ff9800);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.note-record-date {
  font-size: 0.78rem; color: rgba(255,255,255,0.4);
}
.note-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.82rem;
}
.note-table th, .note-table td {
  padding: 5px 8px; text-align: center;
  border: 1px solid rgba(255,255,255,0.08);
}
.note-table th { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.7); }
.note-table .note-loss { color: #ff8a65; font-weight: 700; font-size: 0.7rem; white-space: nowrap; }
.note-table .loss-h { color: #ff8a65; }
.note-table .note-loss-total td { background: rgba(255,138,101,0.08); }
.note-table .note-loss-total .note-loss { font-size: 0.78rem; }
.note-table .nt { color: rgba(255,255,255,0.6); font-weight: 700; text-align: left; }
.note-table .nc { font-size: 0.72rem; }
.note-table .crit  { background: rgba(255,249,196,0.15); color: #fff9c4; }
.note-table .perf  { background: rgba(255,235,59,0.15);  color: #ffeb3b; }
.note-table .great { background: rgba(248,187,217,0.15); color: #f8bbd9; }
.note-table .good  { background: rgba(165,214,167,0.15); color: #a5d6a7; }
.note-table .miss  { background: rgba(117,117,117,0.15); color: #bbb; }
.note-table td { color: #eee; }

.note-list-item:hover { background: rgba(255,255,255,0.1) !important; }

.note-delete-btn,
.note-back-btn,
.note-analyzer-btn {
  width: auto !important;
  margin-top: 0 !important;
}
.challenge-hint {
    color: #888;
    font-size: 13px;
    margin-bottom: 14px;
}
.challenge-hint-inline {
    color: #999;
    font-size: 12px;
    font-weight: 400;
}
.card-sort-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.card-sort-row label {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}
.card-sort-select {
    max-width: 180px;
    font-size: 12px;
    padding: 4px 6px;
}
.set-sort-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.set-sort-row label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
}
.set-sort-select {
    max-width: 200px;
    font-size: 13px;
    padding: 5px 8px;
}
.challenge-subtab-menu {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.challenge-subtab-link {
    padding: 6px 14px;
    background: #f5f5f5;
    color: #555;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.challenge-subtab-link.active {
    background: #ff77b2;
    color: #fff;
}
.challenge-subtab-content { display: none; }

.challenge-form-box {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.challenge-form-box h3 { margin-top: 0; }
.challenge-form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0;
}
.challenge-form-row label {
    font-size: 13px;
    color: #555;
    min-width: 70px;
}
.challenge-form-row input[type="text"],
.challenge-form-row input[type="number"] {
    flex: 1;
    min-width: 160px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}
.challenge-form-row select {
    padding: 6px;
    border-radius: 5px;
    border: 1px solid #ccc;
}
.challenge-form-box > button {
    width: auto;
    padding: 8px 18px;
    margin-top: 4px;
}
.challenge-form-msg {
    font-size: 13px;
    color: #ff3366;
    min-height: 16px;
}

.song-search-results {
    max-height: 340px;
    overflow-y: auto;
    border-radius: 6px;
    padding: 2px;
}
.song-search-empty,
.song-search-more-hint {
    padding: 10px;
    font-size: 13px;
    color: #999;
    text-align: center;
}

.song-pick-block {
    cursor: pointer;
    border: 2px solid transparent;
}
.song-pick-block.is-selected {
    border-color: #ff77b2;
    background: #fff0f6;
}

.song-pick-diff-tag {
    display: inline-block;
    align-self: flex-start;
    width: auto;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    padding: 1px 8px;
    border-radius: 8px;
    margin-top: 2px;
}
.basic-diff-tag     { background: #78c954; }
.advanced-diff-tag  { background: #f0b300; }
.expert-diff-tag    { background: #ff6060; }
.master-diff-tag    { background: #9d63f0; }
.remaster-diff-tag  { background: #b98cf2; }

.song-picked-info {
    margin-top: 8px;
    padding: 8px 10px;
    background: #fdf1f6;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
}
.song-picked-info .picked-song-name { font-weight: 700; font-size: 14px; color: #333; }
.song-picked-info .picked-type-diff { margin-left: 6px; color: #ff77b2; font-weight: 600; }

.challenge-grade-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 6px;
}
.grade-preset-btn {
    width: auto;
    padding: 3px 10px;
    font-size: 12px;
    background: #eee;
    color: #333;
    border-radius: 14px;
    margin: 0;
}
.grade-preset-btn:hover { background: #ffccde; }

.diff-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 8px;
}
.diff-filter-btn {
    width: auto;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 14px;
    border: 2px solid transparent;
    background: #eee;
    color: #888;
    margin: 0;
    cursor: pointer;
}
.diff-filter-btn.basic-diff-filter    { color: #78c954; }
.diff-filter-btn.advanced-diff-filter { color: #d69900; }
.diff-filter-btn.expert-diff-filter   { color: #ff6060; }
.diff-filter-btn.master-diff-filter   { color: #9d63f0; }
.diff-filter-btn.remaster-diff-filter { color: #b98cf2; }

.diff-filter-btn.basic-diff-filter.is-active    { background: #78c954; color: #fff; border-color: #78c954; }
.diff-filter-btn.advanced-diff-filter.is-active { background: #f0b300; color: #fff; border-color: #f0b300; }
.diff-filter-btn.expert-diff-filter.is-active   { background: #ff6060; color: #fff; border-color: #ff6060; }
.diff-filter-btn.master-diff-filter.is-active   { background: #9d63f0; color: #fff; border-color: #9d63f0; }
.diff-filter-btn.remaster-diff-filter.is-active { background: #b98cf2; color: #fff; border-color: #b98cf2; }

.assignee-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.assignee-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 14px;
    cursor: pointer;
}

.challenge-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.challenge-card {
    background: #fff;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border-left: 4px solid #ccc;
}
.challenge-card.is-done { border-left-color: #4CAF50; }
.challenge-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
.challenge-card-jacket {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.challenge-song-info { flex: 1; min-width: 0; }
.challenge-song-info strong { font-size: 15px; }
.challenge-diff-tag {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}
.challenge-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.challenge-badge.done { background: #e6f7e9; color: #2e9e47; }
.challenge-badge.pending { background: #f5f5f5; color: #888; }
.challenge-target-line, .challenge-current-line {
    font-size: 13px;
    color: #555;
    margin-top: 6px;
}
.challenge-cond {
    display: inline-block;
    font-size: 11px;
    background: #f0e6ff;
    color: #7a4cc0;
    border-radius: 8px;
    padding: 1px 6px;
    margin-left: 4px;
}
.challenge-by {
    font-size: 12px;
    color: #ff77b2;
    font-weight: 600;
    margin-top: 6px;
}
.challenge-note-text {
    font-size: 12px;
    color: #777;
    margin-top: 6px;
    font-style: italic;
}
.challenge-del-btn {
    width: auto;
    padding: 4px 10px;
    font-size: 11px;
    background: #f44336;
    margin-top: 8px;
}

.challenge-subheading {
    margin: 18px 0 6px;
    font-size: 14px;
    color: #555;
}

.set-wizard-active-header {
    background: #fdf1f6;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 6px;
    font-size: 14px;
}
.set-wizard-active-header .admin-set-note {
    margin-left: 8px;
}
.set-wizard-final-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}
.set-wizard-final-actions button {
    width: auto;
    margin: 0;
}
#createSetBtn, #addToSetBtn, #saveSetBtn {
    width: auto;
    padding: 8px 18px;
    margin-top: 4px;
}
.secondary-btn {
    background: #e0e0e0 !important;
    color: #555 !important;
}
.secondary-btn:hover {
    background: #cfcfcf !important;
}

.song-cart-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.song-cart-empty {
    padding: 14px;
    text-align: center;
    color: #999;
    font-size: 13px;
}
.song-cart-item {
    cursor: default;
    position: relative;
    padding-right: 70px;
}
.song-cart-remove-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 5px 10px;
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.admin-sets-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.admin-set-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.admin-set-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}
.admin-set-name { font-size: 16px; }

.hw-set-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    user-select: none;
}
.hw-set-toggle:hover { opacity: 0.85; }
.hw-set-toggle-arrow {
    font-size: 11px;
    color: #999;
    transition: transform 0.15s ease;
}
.hw-set-body { margin-top: 10px; }
.admin-set-note {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}
.admin-set-delete-btn {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
    padding: 6px 12px;
    font-size: 12px;
    background: #f44336;
}
.admin-set-share-btn {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
    padding: 6px 12px;
    font-size: 12px;
    background: #4c8bf5;
}
.admin-set-copy-btn {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
    padding: 6px 12px;
    font-size: 12px;
    background: #4caf50;
}

.admin-set-items {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.admin-set-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 10px;
    background: #fafafa;
    border-radius: 6px;
    font-size: 13px;
}
.admin-set-item-song { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.admin-set-item-target { color: #777; flex: 1; }
.admin-set-item-jacket {
    width: 32px;
    height: 32px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
    vertical-align: middle;
}
.admin-set-item-del-btn {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
    padding: 4px 10px;
    font-size: 11px;
    background: #f44336;
}

.set-progress-table-wrap {
    margin-top: 14px;
    overflow-x: auto;
}
.set-progress-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.set-progress-table th,
.set-progress-table td {
    padding: 6px 10px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}
.set-progress-table th {
    color: #888;
    font-weight: 600;
    font-size: 12px;
}
.set-progress-song {
    text-align: left !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.diff-mini {
    font-size: 10px;
    color: #999;
    margin-left: 4px;
}
.set-progress-table td.is-done { background: #e6f7e9; }
.set-progress-ach {
    display: inline-block;
    font-size: 11px;
    color: #888;
    margin-right: 4px;
}
.set-progress-table td.is-done .set-progress-ach { color: #2e9e47; font-weight: 600; }

.admin-set-assignees {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.admin-set-assignee-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 12px;
}
.admin-set-unassign-btn {
    width: auto;
    margin: 0;
    padding: 0 4px;
    font-size: 11px;
    background: transparent;
    color: #f44336;
    border: none;
}

.admin-set-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}
.admin-set-toggle-btn {
    width: auto;
    margin: 0;
    padding: 6px 12px;
    font-size: 12px;
    background: #9d63f0;
}
.admin-set-toggle-btn:hover { background: #7a4cc0; }

.admin-set-inline-panel {
    margin-top: 12px;
    padding: 12px;
    background: #fdf1f6;
    border-radius: 8px;
}
.inline-add-target-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}
.inline-add-target-row input,
.inline-add-target-row select {
    margin: 0;
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 5px;
    border: 1px solid #ccc;
}
.inline-add-target-row input { width: 140px; }
.inline-add-presets { margin-bottom: 8px; }
.inline-add-msg {
    font-size: 12px;
    color: #ff3366;
    min-height: 14px;
    margin: 6px 0 0;
}
.inline-assign-btn {
    width: auto;
    margin-top: 4px;
    padding: 6px 14px;
    font-size: 13px;
    background: #4CAF50;
}
.inline-assignee-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.my-hw-sets-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.my-hw-set-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.my-hw-set-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.my-hw-set-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    cursor: pointer;
}
.my-hw-set-header strong { font-size: 16px; }
.my-hw-set-delete-btn {
    width: auto;
    margin: 0;
    padding: 6px 12px;
    font-size: 12px;
    background: #f44336;
    flex: 0 0 auto;
}
.my-hw-set-progress {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: #9d63f0;
    padding: 3px 10px;
    border-radius: 12px;
}
.my-hw-set-from {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}
.my-hw-set-items {
    margin-top: 12px;
}

.admin-view-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.admin-view-heading { margin: 0; }
.admin-view-toggle {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
}
.admin-view-toggle-btn {
    width: auto;
    margin: 0;
    padding: 6px 14px;
    font-size: 13px;
    background: #f0f0f0;
    color: #666;
}
.admin-view-toggle-btn.active {
    background: #9d63f0;
    color: #fff;
}

.admin-by-person-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.admin-person-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.admin-person-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.admin-person-name { font-size: 16px; }
.admin-person-total-progress {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: #9d63f0;
    padding: 3px 10px;
    border-radius: 12px;
}
.admin-person-set-block {
    margin-top: 12px;
    padding-top: 10px;
}
.admin-person-set-block:not(:first-of-type) {
    border-top: 1px dashed #eee;
}
.admin-person-set-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 6px;
}
.admin-person-set-progress {
    font-size: 11px;
    color: #9d63f0;
    font-weight: 700;
    background: #f6f0fd;
    padding: 2px 8px;
    border-radius: 10px;
}

.free-goals-person-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 16px;
}
.free-goals-person-chip {
    width: auto;
    margin: 0;
    padding: 7px 14px;
    font-size: 13px;
    background: #f0f0f0;
    color: #555;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.free-goals-person-chip.active {
    background: #9d63f0;
    color: #fff;
}
.free-goals-person-count {
    font-size: 11px;
    font-weight: 700;
    background: rgba(0,0,0,0.08);
    padding: 1px 7px;
    border-radius: 10px;
}
.free-goals-person-chip.active .free-goals-person-count {
    background: rgba(255,255,255,0.25);
}

.achievement-levels-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
}
.level-achievement {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.level-title {
    font-size: 17px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 10px;
}
.achv-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.achv-bar-row:last-of-type { margin-bottom: 0; }
.achv-bar-label {
    flex: 0 0 66px;
    font-size: 11px;
    font-weight: 700;
    color: #666;
}
.achievement-bar {
    position: relative;
    flex: 1;
    height: 22px;
    background: #f0f0f0;
    border-radius: 11px;
    overflow: hidden;
}
.achievement-bar .progress {
    height: 100%;
    background: #9d63f0;
    border-radius: 11px;
    transition: width 0.3s ease;
}
.achievement-bar .progress.bar-play     { background: #6db4f2; }
.achievement-bar .progress.bar-s        { background: #8bc98f; }
.achievement-bar .progress.bar-splus    { background: #5fae8f; }
.achievement-bar .progress.bar-ss       { background: #d7c34a; }
.achievement-bar .progress.bar-ssplus   { background: #e0a83a; }
.achievement-bar .progress.bar-sss      { background: #f5a623; }
.achievement-bar .progress.bar-sssplus  { background: linear-gradient(90deg,#ff6ec4,#9d63f0); }
.achievement-bar .progress.bar-ap       { background: #7ec9e0; }
.achievement-bar .progress.bar-applus   { background: linear-gradient(90deg,#4fd1e8,#7a5cf0); }
.achievement-bar .progress-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #333;
    text-shadow: 0 1px 2px rgba(255,255,255,0.6);
    white-space: nowrap;
}
.toggle-thresholds {
    width: auto;
    margin-top: 10px;
    padding: 6px 14px;
    font-size: 12px;
    background: #f0f0f0;
    color: #666;
}
.toggle-thresholds:hover { background: #e4e4e4; }
.achv-detail-list {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #eee;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.achv-detail-block { padding-left: 4px; }
.achv-detail-title {
    font-size: 13px;
    font-weight: 700;
    color: #9d63f0;
    margin-bottom: 6px;
}

.record-filter-panel { margin: 10px 0 16px; }
.filter-toggle-btn {
    width: auto;
    padding: 8px 16px;
    margin: 0;
    background: #f0f0f0;
    color: #555;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.filter-toggle-btn:hover { background: #e4e4e4; }
.filter-toggle-btn.active { background: #ecdcfb; color: #7b1fa2; }
.record-filter-body {
    margin-top: 10px;
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.filter-group-title {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    margin-bottom: 8px;
}
.filter-checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f5f5f7;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 0.82rem;
    cursor: pointer;
    user-select: none;
}
.filter-checkbox input { width: auto; margin: 0; cursor: pointer; }
.filter-checkbox.checked { background: #f3e5f9; border-color: #9c27b0; color: #7b1fa2; font-weight: 700; }
.filter-range-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.82rem;
    color: #777;
}
.filter-range-input {
    width: 90px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 13px;
}
.filter-select {
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 13px;
}
.filter-reset-btn { width: auto; align-self: flex-start; padding: 8px 16px; margin: 0; }

@media (max-width: 900px) {
    .container { padding: 0 10px; }

    .tab-menu {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        margin-bottom: 14px;
        gap: 8px;
    }
    .tab-link { white-space: nowrap; flex-shrink: 0; }
}

@media (max-width: 600px) {
    body { padding: 0 4px; }
    .container { padding: 0 6px; }

    .profile-section { flex-direction: column; align-items: stretch; padding: 14px; }
    .profile-left { gap: 10px; }
    .profile-pic { width: 84px; height: 84px; }
    .username { font-size: 1.1rem; }
    .rating-container { min-width: 0; height: 40px; }
    .rating { font-size: 1.3rem; padding-left: 60px; letter-spacing: 2px; }
    .friend-code { font-size: 11px; flex-wrap: wrap; }

    .tab-link { font-size: 0.75rem; padding: 6px 10px; }

    .sort-search-container { flex-direction: column; align-items: stretch; gap: 10px; }
    .sort-controls { flex-wrap: wrap; }
    .sort-controls label { width: auto; text-align: left; }
    .search-container { width: 100%; }
    .search-container input { width: 100%; box-sizing: border-box; }

    .cards {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .record-block { padding: 8px; gap: 4px; min-height: 64px; }
    .record-jacket { width: 58px; height: 58px; margin-right: 6px; }
    .record-constant-box { width: 38px; height: 58px; min-height: 58px; font-size: 13px; margin-right: 10px; }
    .record-marks { margin-left: 4px; }
    .record-clear-mark, .record-sync-mark { width: 28px; height: 27px; }
    .record-song-name { font-size: 13px; margin-top: 0; }
    .record-song-score { font-size: 13px; }
    .record-rank { font-size: 12px; }
    .record-rate { font-size: 11px; }
    .record-stats { flex-wrap: wrap; gap: 6px; }

    .modal-box { padding: 18px; width: 92%; }
    .note-modal-box { width: 96vw; max-height: 94vh; max-height: 94dvh; }
    .note-table { font-size: 0.7rem; }
    .note-table th, .note-table td { padding: 3px 4px; }

    .achv-bar-row { gap: 6px; }
    .achv-bar-label { flex-basis: 58px; font-size: 11px; }
    .achievement-bar .progress-text { font-size: 10px; }
    .level-achievement { padding: 12px; }

    .share-url-box { flex-direction: column; }
    .share-url-box input, .share-url-box button { width: 100%; box-sizing: border-box; }
    .level-summary-checkboxes { gap: 6px; }

    .challenge-list { grid-template-columns: 1fr; }
    .challenge-form-row label { min-width: 0; width: 100%; }
    .challenge-form-row input[type="text"],
    .challenge-form-row input[type="number"] { min-width: 0; }

    .friend-add-section input { width: 100%; flex-basis: 100%; }

    .admin-view-toggle-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .set-progress-table th, .set-progress-table td { padding: 4px 6px; font-size: 12px; }

    .bookmarklet-code-row { flex-direction: column; align-items: stretch; }

    .record-filter-body { padding: 12px; gap: 12px; }
    .filter-range-row { flex-wrap: wrap; }
    .filter-range-input { width: 80px; }

    .share-preview-img { max-width: 100%; }
}

@media (max-width: 380px) {
    .cards .advanced-card-container,
    .cards .basic-card-container,
    .cards .expert-card-container,
    .cards .master-card-container,
    .cards .remaster-card-container {
        transform: scale(0.9);
        margin: -6px -9px;
    }
}

.container {
    padding-bottom: 140px;
}

.admin-set-cards,
.my-goal-set-cards,
.free-goals-set-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
}
.admin-set-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.admin-set-card.expanded {
    grid-column: 1 / -1;
}
.admin-set-card .admin-set-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.admin-set-card .admin-set-name {
    display: block;
    word-break: break-word;
}
@media (max-width: 420px) {
    .admin-set-cards,
    .my-goal-set-cards,
    .free-goals-set-cards {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .admin-set-card {
        padding: 12px;
    }
}

.admin-set-header-btns {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
}
.admin-set-header-btns .admin-set-share-btn,
.admin-set-header-btns .admin-set-copy-btn,
.admin-set-header-btns .admin-set-delete-btn {
    margin: 0;
}

.admin-set-assignee-chip.is-pending {
    background: #fff4dd;
    color: #a06a00;
    border: 1px dashed #e0b060;
}

.form-actions-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}
.btn-compact {
    width: auto;
    padding: 8px 22px;
}
.form-box-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.form-box-header-row h3 { margin: 0; }
.form-box-header-row button {
    margin-top: 0;
    font-size: 12px;
    padding: 7px 12px;
    white-space: nowrap;
}

.pending-hw-requests-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}
.pending-hw-request-card {
    background: #fffaf0;
    border: 1px solid #f0d9a0;
    border-radius: 10px;
    padding: 12px 14px;
}
.pending-hw-request-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.pending-hw-request-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
    cursor: pointer;
}
.pending-hw-request-info .hw-set-toggle-arrow {
    color: #c99a3a;
}
.pending-hw-request-actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}
.pending-hw-request-actions button {
    width: auto;
    padding: 6px 16px;
}
.pending-hw-accept-btn { background: #4CAF50; }
.pending-hw-decline-btn { background: #999; }
.pending-hw-request-card .hw-set-body {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e0c98a;
}

.admin-view-toggle-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.song-list-view-btn {
    width: auto;
    margin: 0;
    padding: 6px 14px;
    font-size: 13px;
    background: #f0f0f0;
    color: #666;
}
.song-list-view-btn.active {
    background: #9d63f0;
    color: #fff;
}
.admin-set-item-current {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
}
.challenge-badge.mini {
    font-size: 11px;
    padding: 2px 8px;
}

.note-modal-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  flex-shrink: 0;
}
.note-howto-btn {
  padding: 9px 16px;
  background: rgba(157,99,240,0.22);
  border: 1px solid rgba(157,99,240,0.55);
  border-radius: 10px;
  color: #e5d6ff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0;
  width: auto;
}
.note-howto-btn:hover { background: rgba(157,99,240,0.38); }

.note-custom-btn {
  padding: 6px 12px;
  margin: 0 8px 0 0;
  width: auto;
  background: rgba(76,175,80,0.2);
  border: 1px solid rgba(76,175,80,0.55);
  border-radius: 8px;
  color: #b9f6ca;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}
.note-custom-btn:hover { background: rgba(76,175,80,0.35); }
.custom-input-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  display: none; align-items: center; justify-content: center;
  z-index: 10002;
  padding: 12px;
}
.custom-input-box {
  position: relative;
  width: 1120px; max-width: 100%;
  height: 92vh;
  background: #0a0a0a;
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
}
.custom-input-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; flex-shrink: 0;
  background: #1a1a2e; color: #fff; font-size: 0.85rem; font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.custom-input-box iframe { width: 100%; flex: 1; border: 0; display: block; min-height: 0; }
.custom-input-close {
  padding: 5px 12px; margin: 0; width: auto;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px; color: #fff; cursor: pointer;
  font-size: 0.8rem; font-weight: 700;
}

.note-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.note-toolbar-all { font-size: 0.82rem; color: #fff; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.note-toolbar-count { font-size: 0.78rem; color: rgba(255,255,255,0.55); flex: 1; }
.note-toolbar-btn {
  padding: 6px 12px; margin: 0; width: auto;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px; color: #fff; cursor: pointer; font-size: 0.78rem; font-weight: 700;
}
.note-toolbar-btn.danger { background: rgba(239,68,68,0.28); border-color: rgba(239,68,68,0.6); color: #fecaca; }
.note-toolbar-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.note-mini-btn {
  padding: 4px 8px; margin: 0 0 0 8px; width: auto; flex-shrink: 0;
  background: rgba(255,255,255,0.1); border: none; border-radius: 7px;
  color: #fff; cursor: pointer; font-size: 0.75rem; white-space: nowrap;
}
.note-mini-btn.ok { background: rgba(76,175,80,0.45); }

.achievement-container { --achv-empty: #e6e8ee; }
.achv-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
    margin-bottom: 10px;
}
.achv-switch {
    display: inline-flex; background: #eceef3; border-radius: 10px; padding: 3px;
}
.achv-switch button {
    border: 0; background: transparent; padding: 7px 16px; border-radius: 8px;
    font-size: 13px; font-weight: 700; color: #667; cursor: pointer;
}
.achv-switch button.active { background: #fff; color: #1a1a2e; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.achv-filter { display: flex; align-items: center; gap: 8px; }
.achv-filter-label, .achv-minconst { font-size: 12px; font-weight: 700; color: #667; }
.achv-fchips { display: flex; gap: 4px; flex-wrap: wrap; }
.achv-fchip {
    border: 1px solid #d5d8e0; background: #fff; border-radius: 14px; padding: 4px 10px;
    font-size: 12px; font-weight: 700; color: #667; cursor: pointer;
}
.achv-fchip.active { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
.achv-minconst select { margin-left: 4px; padding: 5px 8px; border-radius: 8px; border: 1px solid #d5d8e0; }

.achv-legend {
    display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px;
    font-size: 11px; color: #667;
}
.achv-legend-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.achv-legend-group b { width: 44px; color: #333; }
.achv-chip { display: inline-flex; align-items: center; gap: 4px; }
.achv-chip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.achievement-levels-list.achv-mode-bars { gap: 0; margin-top: 0; }
.achv-group { background: #fff; border-bottom: 1px solid #eceef3; }
.achv-mode-bars > .achv-group:first-child { border-radius: 10px 10px 0 0; }
.achv-mode-bars > .achv-group:last-child { border-radius: 0 0 10px 10px; border-bottom: 0; }
.achv-group-head {
    display: grid; grid-template-columns: 190px 1fr 22px; align-items: center; gap: 14px;
    padding: 12px 16px;
}
.achv-group-head.has-children { cursor: pointer; }
.achv-group-head.has-children:hover { background: #f7f8fb; }
.achv-g-label { font-size: 20px; font-weight: 800; color: #1a1a2e; line-height: 1.15; }
.achv-g-sub { font-size: 11px; color: #889; margin: 2px 0 5px; }
.achv-g-avg { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #333; font-variant-numeric: tabular-nums; }
.achv-grade {
    display: inline-block; min-width: 38px; text-align: center; padding: 2px 8px;
    border-radius: 12px; color: #fff; font-size: 11px; font-weight: 800;
}
.achv-g-bars { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.achv-bar-line { display: flex; align-items: center; gap: 8px; }
.achv-bar-tag { flex: 0 0 38px; font-size: 10px; font-weight: 700; color: #99a; text-align: right; }
.achv-bar-track {
    flex: 1; height: 14px; display: flex; background: var(--achv-empty);
    border-radius: 7px; overflow: hidden; gap: 0;
}
.achv-seg { min-width: 2px; height: 100%; cursor: default; }
.achv-seg:hover { filter: brightness(1.15); }
.achv-seg + .achv-seg { box-shadow: -1px 0 0 rgba(255,255,255,.55); }
.achv-seg-empty { background: var(--achv-empty); }
.achv-chev { color: #99a; transition: transform .15s; text-align: center; }
.achv-group.open > .achv-group-head .achv-chev { transform: rotate(180deg); }
.achv-children { background: #fafbfd; border-top: 1px solid #eceef3; }
.achv-sub { background: transparent; }
.achv-sub .achv-group-head { padding: 8px 16px 8px 34px; grid-template-columns: 170px 1fr 22px; }
.achv-sub .achv-g-label { font-size: 15px; }
.achv-sub .achv-bar-track { height: 10px; border-radius: 5px; }
.achv-sub .achv-g-sub { margin-bottom: 2px; }

.achv-tip {
    position: fixed; z-index: 9999; display: none; pointer-events: none;
    background: rgba(20,20,35,.95); color: #fff; font-size: 12px; line-height: 1.5;
    padding: 7px 10px; border-radius: 8px; white-space: pre-line; max-width: 280px;
    box-shadow: 0 4px 14px rgba(0,0,0,.3);
}

.achievement-levels-list.achv-mode-chart { gap: 0; margin-top: 0; }
.achv-ct-block {
    display: flex; gap: 14px; padding: 14px 16px; background: #fff;
    border-bottom: 1px solid #eceef3;
}
.achv-mode-chart > .achv-ct-block:first-child { border-radius: 10px 10px 0 0; }
.achv-mode-chart > .achv-ct-block:last-child { border-radius: 0 0 10px 10px; border-bottom: 0; }
.achv-ct-head { flex: 0 0 76px; }
.achv-ct-const { font-size: 22px; font-weight: 800; color: #1a1a2e; }
.achv-ct-count { font-size: 11px; color: #889; line-height: 1.4; }
.achv-ct-count span { color: #aab; }
.achv-ct-rows { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.achv-ct-row { display: flex; gap: 8px; align-items: flex-start; }
.achv-ct-rank {
    flex: 0 0 46px; min-height: 38px; border-radius: 8px; color: var(--rt, #888); font-size: 12px; font-weight: 800;
    border: 1.5px solid transparent; --ct-bg: #fff;
    background: linear-gradient(var(--ct-bg), var(--ct-bg)) padding-box, var(--rc, #888) border-box;
    display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15;
    text-align: center; padding: 2px;
}
.achv-ct-rank small { font-size: 11px; font-weight: 600; opacity: .85; }
.achv-ct-tiles { flex: 1; display: flex; flex-wrap: wrap; gap: 3px; min-width: 0; }
.achv-tile {
    position: relative; width: 38px; height: 38px; border-radius: 5px; overflow: hidden;
    border: 1px solid rgba(255,255,255,.55); background: #222; flex: 0 0 auto; --dc: #999;
}
.achv-tile::before {
    content: ''; position: absolute; top: 0; right: 0; width: 36%; height: 36%; z-index: 2;
    background: linear-gradient(225deg, var(--dc) 50%, transparent 50%);
}
.achv-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.achv-tile::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.05) 25%, rgba(0,0,0,.72));
}
.achv-tile.unplayed img { filter: grayscale(1) brightness(.75); }
.achv-tile.d-basic { --dc: #5fcf4a; }
.achv-tile.d-advanced { --dc: #f7c22a; }
.achv-tile.d-expert { --dc: #f2566a; }
.achv-tile.d-master { --dc: #9a4be8; }
.achv-tile.d-re_master { --dc: #e3c7ff; }
.achv-tile .t-type {
    position: absolute; top: 0; left: 0; z-index: 3; font-size: 7px; font-weight: 800; color: #fff;
    background: rgba(0,0,0,.6); padding: 0 2px; border-bottom-right-radius: 3px; line-height: 1.3;
}
.achv-tile .t-score {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; text-align: center;
    font-size: 8px; line-height: 1; font-weight: 700; color: #fff; letter-spacing: -.2px;
    text-shadow: 0 0 2px #000; padding-bottom: 1px; font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
    .achv-group-head { grid-template-columns: 1fr 18px; gap: 8px; padding: 10px 12px; }
    .achv-g-info { grid-column: 1 / 2; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
    .achv-g-sub { margin: 0; }
    .achv-g-bars { grid-column: 1 / 3; grid-row: 2; }
    .achv-chev { grid-column: 2; grid-row: 1; }
    .achv-sub .achv-group-head { grid-template-columns: 1fr 18px; padding-left: 20px; }
    .achv-ct-block { flex-direction: column; gap: 8px; padding: 12px; }
    .achv-ct-head { flex: none; display: flex; align-items: baseline; gap: 10px; }
    .achv-tile { width: 32px; height: 32px; }
    .achv-tile .t-score { font-size: 7px; }
    .achv-ct-rank { flex-basis: 40px; }
}
.achv-switch button, .achv-fchip { width: auto; margin: 0; flex: 0 0 auto; }
.achv-switch button { background: transparent; color: #667; }
.achv-switch button:hover { background: rgba(255,255,255,.6); }
.achv-switch button.active, .achv-switch button.active:hover { background: #fff; color: #1a1a2e; }
.achv-fchip { background: #fff; color: #667; padding: 4px 10px; border-radius: 14px; }
.achv-fchip:hover { background: #f1f2f6; }
.achv-fchip.active, .achv-fchip.active:hover { background: #1a1a2e; color: #fff; }
.achv-ct-rank { flex: 0 0 54px; white-space: nowrap; font-size: 13px; }
@media (max-width: 720px) { .achv-ct-rank { flex-basis: 48px; } }
.achv-minconst { display: flex; align-items: center; gap: 6px; }
.achv-minconst select, .achv-minconst input { padding: 5px 8px; border-radius: 8px; border: 1px solid #d5d8e0; font-size: 13px; width: auto; }
.achv-minconst input { width: 68px; }
.achv-tile { width: 50px; height: 50px; border-radius: 6px; }
.achv-tile .t-type { font-size: 8px; }
.achv-tile .t-score { font-size: 10px; line-height: 1.05; }
.achv-ct-rank { min-height: 50px; }
@media (max-width: 720px) {
    .achv-tile { width: 42px; height: 42px; }
    .achv-tile .t-score { font-size: 8.5px; }
    .achv-ct-rank { min-height: 42px; }
}
.achv-tile .sx-dot {
    position: absolute; bottom: 3px; left: 3px; z-index: 3; width: 9px; height: 9px;
    border-radius: 50%; border: 1px solid #fff;
}

.record-info { min-width: 0; }
.record-song-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-set-item-song .version-label,
.set-progress-song .version-label { margin-left: 6px; vertical-align: middle; }
.challenge-song-info .version-label { margin-top: 3px; }

.tool-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 14px; }
.tool-shots figure { margin: 0; }
.tool-shots img { width: 100%; display: block; border-radius: 10px; border: 1px solid #ddd; }
.tool-shots figcaption { font-size: 12px; color: #666; line-height: 1.5; margin-top: 6px; }
@media (max-width: 560px) { .tool-shots { grid-template-columns: 1fr; } }


.note-summary { padding: 12px 18px 4px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.note-summary:empty { display: none; }
.ns-level { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ns-type { background: #fff; color: #111; font-size: 0.7rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; }
.ns-diff { color: #fff; font-size: 0.78rem; font-weight: 800; padding: 2px 8px; border-radius: 4px; background: #8b5cf6; }
.ns-diff-basic { background: #3aa655; } .ns-diff-advanced { background: #e0a100; }
.ns-diff-expert { background: #e5484d; } .ns-diff-master { background: #9b5de5; }
.ns-diff-remaster, .ns-diff-re_master { background: #c9b6f2; color: #3b1d6e; }
.ns-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ns-grade { color: #fff; font-weight: 900; font-size: 0.95rem; padding: 3px 14px; border-radius: 999px; min-width: 64px; text-align: center; }
.ns-score { font-size: 1.9rem; font-weight: 800; line-height: 1; color: #fff; }
.ns-score small { font-size: 1.15rem; opacity: 0.7; font-weight: 700; }
.ns-chip { color: #fff; font-weight: 800; font-size: 0.8rem; padding: 3px 10px; border-radius: 999px; }
.ns-chip-sync { background: transparent; border: 1px solid rgba(255,255,255,0.35); color: rgba(255,255,255,0.8); }
.ns-dx { display: flex; align-items: center; gap: 8px; margin: 8px 0 10px; color: #fff; font-size: 0.95rem; }
.ns-star { font-weight: 800; font-size: 0.8rem; padding: 2px 14px; border-radius: 999px; color: #fff; }
.ns-dxpct { color: rgba(255,255,255,0.55); font-size: 0.8rem; }
.ns-empty { color: rgba(255,255,255,0.5); font-size: 0.85rem; padding-bottom: 10px; }

.ns-max { color: rgba(255,255,255,0.45); font-size: 0.8rem; font-weight: 700; }

.record-stats { flex-direction: column; align-items: flex-start; gap: 5px; }
.record-stats-row { display: flex; align-items: center; gap: 10px; }
.record-dx { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #555; line-height: 1.2; }
span.record-dx { display: inline-flex; vertical-align: middle; margin-left: 4px; }
.record-dx-pct { color: #999; font-size: 11px; }
.dx-chip { font-weight: 800; font-size: 11px; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.dx-target-wrap { margin: 4px 0; }
.inline-add-dx { max-width: 140px; }
@media (max-width: 640px) { .record-stats-row { flex-wrap: wrap; gap: 6px; } }

.achv-tile .t-score .t-dim { color: #9aa1ab; font-weight: 600; }

.achv-bar-tag { white-space: nowrap; }

.achv-avg-label { font-size: 11px; font-weight: 600; color: #777; white-space: nowrap; }
.achv-g-avg-dx { margin-top: 2px; }
.achv-g-avg { flex-wrap: wrap; row-gap: 2px; }
.achv-group-head { grid-template-columns: 215px 1fr 22px; }
@media (max-width: 720px) { .achv-group-head { grid-template-columns: 1fr 18px; } }

.ns-max-toggle { cursor: pointer; border-bottom: 1px dotted rgba(255,255,255,0.35); user-select: none; }

.admin-set-header-btns .admin-set-edit-btn { margin: 0; }
.admin-set-edit-btn {
    width: auto; flex: 0 0 auto; margin: 0; padding: 6px 12px;
    font-size: 12px; background: #f08a24;
}
.set-edit-box { max-width: 720px; width: 94%; padding: 22px; display: flex; flex-direction: column; max-height: 90vh; }
.set-edit-box h3 { margin-bottom: 10px; }
.set-edit-scroll { overflow-y: auto; flex: 1 1 auto; min-height: 0; padding-right: 4px; }
.set-edit-meta { display: flex; flex-direction: column; gap: 6px; }
.set-edit-meta input, .set-edit-box .song-search-input {
    width: 100%; margin: 0; padding: 8px 10px; font-size: 14px;
    border: 1px solid #ccc; border-radius: 6px; box-sizing: border-box;
}
.set-edit-section-title { font-size: 13px; font-weight: 700; color: #444; margin: 16px 0 6px; }
.set-edit-section-title span { font-weight: 400; color: #999; font-size: 11px; }
.set-edit-bulk { background: #fdf1f6; border-radius: 8px; padding: 10px; }
.set-edit-box .se-apply-all, .set-edit-box .set-edit-actions button {
    margin-top: 8px; padding: 7px 16px; font-size: 13px;
}
.set-edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.set-edit-actions button { margin-top: 0 !important; }
.set-edit-actions .se-cancel { background: #aaa; }
.set-edit-actions .se-save { background: #4CAF50; }
.se-row { border: 1px solid #e6e1ef; border-radius: 8px; padding: 8px; margin-bottom: 6px; background: #fff; }
.se-row-head { display: flex; align-items: center; gap: 8px; }
.se-jacket { width: 40px; height: 40px; border-radius: 5px; object-fit: cover; flex: 0 0 auto; }
.se-title { flex: 1 1 auto; min-width: 0; }
.se-song-name { font-size: 13px; font-weight: 700; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-song-sub { display: flex; align-items: center; gap: 5px; margin-top: 2px; flex-wrap: wrap; }
.se-type { height: 14px; }
.se-const { font-size: 11px; color: #777; }
.set-edit-box .se-del {
    margin: 0; padding: 5px 10px; font-size: 12px; background: #e5484d; flex: 0 0 auto;
}
.se-row-targets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.se-row-targets input, .se-row-targets select {
    margin: 0; padding: 6px 8px; font-size: 13px; border: 1px solid #ccc; border-radius: 5px;
}
.se-row-targets input { width: 100px; }
.set-edit-box .song-pick-block.is-picked { opacity: .45; }
@media (max-width: 600px) {
    .set-edit-box { padding: 14px; }
    .se-row-targets input { width: calc(50% - 3px); box-sizing: border-box; }
    .se-row-targets select { flex: 1 1 calc(50% - 6px); }
}
.set-edit-box .grade-preset-btn,
.set-edit-box .diff-filter-btn {
    margin: 0; border-radius: 14px; font-size: 12px; font-weight: 700;
}
.set-edit-box .grade-preset-btn { padding: 3px 10px; background: #eee; color: #333; font-weight: 600; }
.set-edit-box .grade-preset-btn:hover { background: #ffccde; }
.set-edit-box .diff-filter-btn { padding: 3px 12px; }
.set-edit-box .diff-filter-btn:not(.is-active) { background: #eee; }
.set-edit-box .diff-filter-row { margin: 8px 0; }
.set-edit-box .challenge-grade-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; font-size: 12px; color: #666; }
.set-edit-box .se-apply-all { margin-top: 6px; }
.set-edit-box .sdvx-challenge-score-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.admin-set-actions .admin-set-edit-btn { padding: 6px 14px; }

.achv-tile .t-combo {
    position: absolute; top: 10px; left: 0; z-index: 3; font-size: 7px; font-weight: 800; color: #fff;
    padding: 0 2px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; line-height: 1.3; letter-spacing: -.2px;
    text-shadow: 0 0 2px rgba(0,0,0,.6);
}
@media (max-width: 720px) { .achv-tile .t-combo { font-size: 6px; padding: 0 1px; } }

@media (max-width: 600px) {
    .rating-container { min-width: 120px; width: max-content; height: 46px; flex: none; }
    .rating { font-size: 1.3rem; padding-left: 63px; letter-spacing: 3.3px; white-space: nowrap; }
}

.achv-source { max-width: 100%; }
.achv-source .achv-switch { flex-wrap: wrap; }
.achv-source-admin { display: flex; gap: 6px; flex-wrap: wrap; }
.tier-admin-btn {
    width: auto; margin: 0; padding: 6px 12px; font-size: 12px; font-weight: 700;
    background: #f08a24; color: #fff; border: 0; border-radius: 8px; cursor: pointer;
}
.tier-block .tier-title { font-size: 1.1rem; }
.tier-empty { font-size: 12px; color: #999; padding: 8px 4px; }
.tier-missing { font-size: 12px; color: #c0392b; margin: 8px 0 0; }

.tier-edit-box { max-width: 860px; }
.te-name { width: 100%; margin: 0 0 4px; padding: 8px 10px; font-size: 14px; border: 1px solid #ccc; border-radius: 6px; box-sizing: border-box; }
.te-tier { border: 1px solid #e6e1ef; border-radius: 8px; margin-bottom: 8px; background: #fff; overflow: hidden; }
.te-tier-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #f7f5fb; }
.te-tier-head input[type=color] { width: 32px; height: 28px; padding: 0; border: 1px solid #ccc; border-radius: 5px; background: #fff; margin: 0; flex: 0 0 auto; }
.te-tier-head .te-tname { flex: 1 1 auto; min-width: 0; margin: 0; padding: 6px 8px; font-size: 14px; font-weight: 700; border: 1px solid #ccc; border-radius: 5px; }
.te-count { font-size: 12px; color: #777; flex: 0 0 auto; }
.tier-edit-box .te-tier-head button {
    margin: 0; padding: 4px 9px; font-size: 12px; background: #9aa1ab; flex: 0 0 auto;
}
.tier-edit-box .te-tier-head button:disabled { opacity: .35; cursor: default; }
.tier-edit-box .te-tier-head .te-del-tier { background: #e5484d; }
.te-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; min-height: 40px; }
.te-chip {
    position: relative; width: 62px; border: 2px solid #999; border-radius: 6px; overflow: hidden;
    background: #222; cursor: pointer; user-select: none;
}
.te-chip img, .te-chip .te-noimg { width: 100%; height: 58px; object-fit: cover; display: block; }
.te-chip .te-noimg { display: flex; align-items: center; justify-content: center; color: #fff; background: #555; }
.te-chip.d-basic { border-color: #3cb06a; } .te-chip.d-advanced { border-color: #f0a020; }
.te-chip.d-expert { border-color: #ee5a6a; } .te-chip.d-master { border-color: #a24bd6; }
.te-chip.d-re_master { border-color: #e8c6fb; }
.te-chip-type { position: absolute; top: 0; right: 0; font-size: 8px; font-weight: 800; color: #fff; background: rgba(0,0,0,.6); padding: 0 2px; border-bottom-left-radius: 3px; }
.te-chip-const { position: absolute; top: 0; left: 0; font-size: 8px; font-weight: 800; color: #fff; background: rgba(0,0,0,.6); padding: 0 2px; border-bottom-right-radius: 3px; }
.te-chip-name { display: block; font-size: 9px; line-height: 1.2; color: #fff; background: rgba(0,0,0,.8); padding: 2px 3px; height: 22px; overflow: hidden; }
.te-chip.sel { outline: 3px solid #4c8bf5; outline-offset: -1px; }
.te-chip.sel::after { content: '✓'; position: absolute; right: 2px; bottom: 24px; font-size: 14px; font-weight: 900; color: #fff; background: #4c8bf5; border-radius: 50%; width: 18px; height: 18px; line-height: 18px; text-align: center; }
.te-chip.missing { opacity: .6; border-style: dashed; }
.tier-edit-box .te-add-tier { margin: 0 0 6px; padding: 7px 14px; font-size: 13px; background: #6c7a96; }
.te-add-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 6px; font-size: 12px; color: #555; }
.te-add-row input, .te-add-row select { margin: 0; padding: 5px 7px; font-size: 13px; border: 1px solid #ccc; border-radius: 5px; }
.te-add-row input[type=number] { width: 70px; }
.te-selbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; margin-top: 6px;
    background: #eaf1ff; border-radius: 8px; font-size: 13px; font-weight: 700; color: #2b4a8a;
}
.te-selbar select { margin: 0; padding: 5px 7px; border: 1px solid #b8c8ea; border-radius: 5px; }
.tier-edit-box .te-selbar button { margin: 0; padding: 6px 12px; font-size: 12px; background: #4c8bf5; }
.tier-edit-box .te-selbar .te-remove { background: #e5484d; }
.tier-edit-box .te-selbar .te-unsel { background: #9aa1ab; }
.tier-edit-box .set-edit-actions { align-items: center; }
.tier-edit-box .te-delete-list { background: #e5484d; margin: 0; }
@media (max-width: 600px) { .te-chip { width: 56px; } .te-chip img, .te-chip .te-noimg { height: 52px; } }
.tier-levels { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.tier-levels .achv-fchip { width: auto; margin: 0; }
.te-levels { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.te-levels .achv-fchip { width: auto; margin: 0; }
.te-level-edit { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.te-level-edit .te-lname { flex: 1 1 auto; min-width: 0; margin: 0; padding: 6px 8px; font-size: 14px; font-weight: 700; border: 1px solid #ccc; border-radius: 5px; }
.tier-edit-box .te-level-edit button { margin: 0; padding: 5px 10px; font-size: 12px; background: #9aa1ab; flex: 0 0 auto; }
.tier-edit-box .te-level-edit button:disabled { opacity: .35; cursor: default; }
.tier-edit-box .te-level-edit .te-ldel { background: #e5484d; }
.tier-edit-box .achv-fchip { background: #fff; color: #667; padding: 4px 12px; margin: 0; }
.tier-edit-box .achv-fchip.active { background: #1a1a2e; color: #fff; }
.tier-edit-box .achv-fchip.te-add-level { background: #f0f2f7; }
.te-chip { cursor: grab; }
.te-chip.dragging { opacity: .35; }
.te-chip.drop-before { box-shadow: -4px 0 0 0 #4c8bf5; }
.te-chip.drop-after { box-shadow: 4px 0 0 0 #4c8bf5; }
.te-chips.drop-end { background: #eaf1ff; }
.tier-edit-box .te-selbar .te-shift-l, .tier-edit-box .te-selbar .te-shift-r { background: #6c7a96; }
.te-hide-placed { display: block; font-size: 12px; color: #555; margin: 4px 0 6px; cursor: pointer; }
.te-hide-placed input { margin: 0 4px 0 0; vertical-align: middle; }
.tier-edit-box .te-hide-placed {
    display: flex; align-items: center; gap: 6px; width: auto; margin: 6px 0 8px;
    font-size: 12px; color: #555; cursor: pointer; text-align: left;
}
.tier-edit-box .te-hide-placed input[type=checkbox] {
    width: 16px; height: 16px; min-width: 16px; margin: 0; padding: 0; flex: 0 0 auto;
}

.achv-checkbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px;
    padding: 8px 12px; background: #fff3f3; border: 1px solid #f3c6c6; border-radius: 10px;
    font-size: 12px; font-weight: 700; color: #7a2b2b;
}
.achv-checkbar label { display: inline-flex; align-items: center; gap: 4px; margin: 0; width: auto; }
.achv-checkbar input[type=number] { width: 78px; margin: 0; padding: 5px 7px; font-size: 13px; border: 1px solid #d9b3b3; border-radius: 6px; }
.achv-checkbar select { margin: 0; padding: 5px 7px; font-size: 13px; border: 1px solid #d9b3b3; border-radius: 6px; width: auto; }
.achv-ck-title { flex: 1 1 100%; color: #b23a3a; }
/* 라이벌 대비 → 체크 기준 */
.achv-checkbar:not(.rv-ck) .achv-ck-title-rv { display: none; }
.achv-checkbar.rv-ck .achv-ck-title:not(.achv-ck-title-rv) { display: none; }
.achv-tile .t-ckv { position: absolute; z-index: 3; bottom: 2px; left: calc(2px + var(--i, 0) * 14px); width: 12px; height: 12px; border-radius: 50%; box-sizing: border-box; border: 2px solid var(--c, #f55); background: rgba(10,12,20,.82); color: #fff; font-size: 6px; line-height: 8px; font-weight: 900; text-align: center; pointer-events: none; }
.achv-tile .t-ckv.me { color: #8ce99a; }
.achv-tile .t-ckv.rv { color: #ff8787; }
.achv-tile .t-ckv.one { color: #ffd43b; font-size: 7px; }
@media (max-width: 720px) { .achv-tile .t-ckv { width: 11px; height: 11px; line-height: 7px; left: calc(1px + var(--i, 0) * 12px); } }
.ckv-sum { display: block; font-size: .72rem; font-weight: 800; letter-spacing: -.2px; }
.ckv-sum b.me { color: #2f9e44; } .ckv-sum b.rv { color: #e03131; } .ckv-sum b.both { color: #868e96; }
.achv-ck-summary { flex: 1 1 100%; font-weight: 600; color: #8a5a5a; }
.achv-tile .t-check {
    position: absolute; inset: 2px; z-index: 3; border: 3px solid #ff2a2a; border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.35); pointer-events: none;
}
@media (max-width: 720px) { .achv-tile .t-check { border-width: 2px; inset: 1px; } }
.achv-ck-reset { width: auto; margin: 0; padding: 4px 10px; font-size: 12px; font-weight: 700; background: #b23a3a; color: #fff; border: 0; border-radius: 8px; cursor: pointer; }
.te-check { background: #fff3f3; border: 1px solid #f3c6c6; border-radius: 8px; padding: 8px 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12px; font-weight: 700; color: #7a2b2b; }
.te-check label { display: inline-flex; align-items: center; gap: 4px; margin: 0; width: auto; }
.te-check input[type=number] { width: 80px; margin: 0; padding: 5px 7px; font-size: 13px; border: 1px solid #d9b3b3; border-radius: 6px; }
.te-check select { margin: 0; padding: 5px 7px; font-size: 13px; border: 1px solid #d9b3b3; border-radius: 6px; width: auto; }
.te-check-presets { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.tier-edit-box .te-check-presets button { margin: 0; padding: 4px 12px; font-size: 12px; background: #b23a3a; border-radius: 14px; }
.tier-edit-box .te-check-presets button[data-ck="clear"] { background: #9aa1ab; }

.achv-ck-add2 { width: auto; margin: 0; padding: 4px 10px; font-size: 12px; font-weight: 700; background: #fff; color: #b23a3a; border: 1px dashed #b23a3a; border-radius: 8px; cursor: pointer; }
.achv-ck-row2 { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 8px; border-top: 1px dashed #e3b8b8; }
.achv-ck-title2 { font-weight: 800; color: #b23a3a; }
.achv-checkbar input[type=color] { width: 34px; height: 26px; padding: 0; margin: 0; border: 1px solid #d9b3b3; border-radius: 6px; background: #fff; cursor: pointer; }
.achv-ck-del2 { width: auto; margin: 0; padding: 4px 10px; font-size: 12px; font-weight: 700; background: #7b8794; color: #fff; border: 0; border-radius: 8px; cursor: pointer; }
.achv-tile .t-check.inner { inset: 7px; }
@media (max-width: 720px) { .achv-tile .t-check.inner { inset: 5px; } }
.ck-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 3px; border: 1.5px solid #fff; vertical-align: -1px; box-sizing: border-box; }

.achv-ck-extra { flex: 1 1 100%; display: flex; flex-direction: column; gap: 6px; }
.achv-ck-extra .achv-ck-row2 { flex: 1 1 100%; }
.achv-tile .t-check { inset: calc(2px + var(--i, 0) * 5px); }
@media (max-width: 720px) { .achv-tile .t-check { inset: calc(1px + var(--i, 0) * 3.5px); } }

.achv-sortopt { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-size: 12px; font-weight: 700; color: #667; cursor: pointer; width: auto; white-space: nowrap; }
.achv-sortopt input[type=checkbox] { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: #4a7bd6; }

.tier-img-row { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 10px; }
.tier-img-row label { display: inline-flex; align-items: center; gap: 6px; margin: 0; width: auto; font-size: 13px; font-weight: 700; }
.tier-img-ck { margin: 0 0 10px; }
.tier-ck-note { font-weight: 600; color: #8a5a5a; font-size: 12px; }
.tier-img-row select { width: auto; margin: 0; padding: 6px 8px; border-radius: 8px; border: 1px solid #d5d8e0; font-size: 13px; }

.ic.ok { color: #2fb86a; }
.ic.off { color: #c3c8d4; }
.hw-set-toggle-arrow { display: inline-flex; align-items: center; }
.hw-set-toggle-arrow .ic { width: 14px; height: 14px; transition: transform .18s ease; }
.hw-set-toggle-arrow.open .ic { transform: rotate(90deg); }
.achv-ck-title .ic, .achv-ct-count .ic { color: #e0334a; }
.achv-chev .ic { width: 16px; height: 16px; }
.filter-toggle-btn .ic { width: 14px; height: 14px; vertical-align: -0.15em; }
.note-modal-close .ic { width: 16px; height: 16px; }
.set-edit-box h3 .ic, .modal-box h3 .ic { color: #9d63f0; vertical-align: -0.17em; }
td.is-done .ic.ok, td .ic.off { width: 18px; height: 18px; }
.ck-dot { box-shadow: 0 0 0 1px rgba(0,0,0,.08); }

.toggle-container .game-switch-btn,
.toggle-container #howToUpdateBtn,
.toggle-container #sdvxHowToUpdateBtn,
.toggle-container #openToolsBtn,
.toggle-container #myPageBtn,
.toggle-container #sdvxMyPageBtn,
.toggle-container #openSettingsBtn,
.toggle-container .logout-button {
    display: inline-flex; align-items: center; gap: 7px; width: auto; margin: 0;
    padding: 8px 14px; font-size: 13px; font-weight: 600; line-height: 1.2; color: #fff;
    background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); border-radius: 10px;
    text-decoration: none; cursor: pointer; box-shadow: none;
    transition: background .18s ease, transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.toggle-container .game-switch-btn:hover,
.toggle-container #howToUpdateBtn:hover,
.toggle-container #sdvxHowToUpdateBtn:hover,
.toggle-container #openToolsBtn:hover,
.toggle-container #myPageBtn:hover,
.toggle-container #sdvxMyPageBtn:hover,
.toggle-container #openSettingsBtn:hover,
.toggle-container .logout-button:hover {
    background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.32); transform: translateY(-1px);
}
.toggle-container #howToUpdateBtn,
.toggle-container #sdvxHowToUpdateBtn {
    background: linear-gradient(135deg, #ff77b2, #9d63f0); border-color: transparent;
    box-shadow: 0 4px 14px rgba(157,99,240,.35);
}
.toggle-container #howToUpdateBtn:hover,
.toggle-container #sdvxHowToUpdateBtn:hover { background: linear-gradient(135deg, #ff6aa9, #8d52e6); box-shadow: 0 6px 18px rgba(157,99,240,.45); }
.toggle-container #myPageBtn,
.toggle-container #sdvxMyPageBtn { background: rgba(157,99,240,.35); border-color: rgba(157,99,240,.55); }
.toggle-container .logout-button { background: transparent; color: #ff9aa2; border-color: rgba(255,120,130,.4); font-size: 12px; }
.toggle-container .logout-button:hover { background: rgba(255,90,100,.18); color: #ffb3b8; }

.tab-link {
    background: transparent; color: #5b6073; border-radius: 999px; padding: 8px 16px; font-weight: 600;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.tab-link:hover:not(.active) { background-color: #eceef6; color: #222; }
.tab-link.active {
    background: linear-gradient(135deg, #ff77b2, #9d63f0); color: #fff;
    box-shadow: 0 4px 12px rgba(157,99,240,.32);
}

button:active:not(:disabled) { transform: translateY(1px); }
.song-cart-remove-btn:active:not(:disabled) { transform: translateY(-50%); }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible {
    outline: 2px solid rgba(157,99,240,.55); outline-offset: 2px;
}
button:disabled { opacity: .5; cursor: not-allowed; }

input[type=checkbox]:not(.toggle-switch input) {
    -webkit-appearance: none; appearance: none;
    width: 18px; height: 18px; min-width: 18px; margin: 0; padding: 0; flex: none;
    display: inline-grid; place-content: center; vertical-align: middle; cursor: pointer;
    background: #fff; border: 1.6px solid #b8bed0; border-radius: 6px;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
input[type=checkbox]:not(.toggle-switch input)::after {
    content: ""; width: 11px; height: 11px; transform: scale(0); transition: transform .14s ease;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
input[type=checkbox]:not(.toggle-switch input):hover { border-color: #9d63f0; }
input[type=checkbox]:not(.toggle-switch input):checked {
    background: linear-gradient(135deg, #ff77b2, #9d63f0); border-color: transparent;
    box-shadow: 0 2px 6px rgba(157,99,240,.35);
}
input[type=checkbox]:not(.toggle-switch input):checked::after { transform: scale(1); }
input[type=checkbox]:not(.toggle-switch input):disabled { opacity: .45; cursor: not-allowed; }
.proxy-toggle-row input[type="checkbox"] { width: 18px !important; height: 18px !important; }
.achv-sortopt input[type=checkbox], .tier-edit-box .te-hide-placed input[type=checkbox] { width: 18px; height: 18px; min-width: 18px; }

.slider { transition: background-color .25s ease; }
.slider:before { transition: transform .25s ease; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
input:checked + .slider { background: linear-gradient(135deg, #b77dff, #9d63f0); }

.filter-checkbox { transition: background .15s ease, border-color .15s ease, color .15s ease; }
.filter-checkbox:hover { border-color: #c9a6e6; }
.achv-sortopt { padding: 4px 10px 4px 8px; border: 1px solid #e0e3ec; border-radius: 999px; background: #fff; transition: border-color .15s ease; }
.achv-sortopt:hover { border-color: #c9a6e6; }

.toggle-label, .toggle-container label { white-space: nowrap; }

button.achv-ck-add2, #achvCheckBar button.achv-ck-add2, #sxCheckBar button.achv-ck-add2 {
  width: auto !important; margin: 0 !important; padding: 4px 11px !important; font-size: 12px; font-weight: 700;
  background: #fff !important; color: #b23a3a !important; border: 1.5px dashed #d98a8a !important; border-radius: 999px !important;
  box-shadow: none !important; display: inline-flex; align-items: center; gap: 5px;
}
button.achv-ck-add2:hover { background: #fff3f3 !important; border-color: #b23a3a !important; transform: none; }

.filter-checkbox, .achv-sortopt {
  position: relative; display: inline-flex; align-items: center; gap: 0;
  background: #fff; border: 1px solid #d5d8e0; border-radius: 14px;
  padding: 4px 11px; font-size: 12px; font-weight: 700; color: #667;
  cursor: pointer; user-select: none; transition: background .15s, color .15s, border-color .15s;
}
.filter-checkbox:hover, .achv-sortopt:hover { background: #f1f2f6; border-color: #d5d8e0; }
.filter-checkbox input[type=checkbox], .achv-sortopt input[type=checkbox] {
  position: absolute !important; opacity: 0; width: 0 !important; height: 0 !important; min-width: 0 !important;
  margin: 0 !important; padding: 0 !important; pointer-events: none; border: 0 !important;
}
.filter-checkbox input[type=checkbox]::after, .achv-sortopt input[type=checkbox]::after { display: none; }
.filter-checkbox.checked, .filter-checkbox:has(input:checked),
.achv-sortopt:has(input:checked) {
  background: #1a1a2e; color: #fff; border-color: #1a1a2e; font-weight: 700;
}
.filter-checkbox.checked:hover, .filter-checkbox:has(input:checked):hover, .achv-sortopt:has(input:checked):hover { background: #2a2a44; }
.filter-checkbox:has(input:focus-visible), .achv-sortopt:has(input:focus-visible) { outline: 2px solid #b77dff; outline-offset: 2px; }
.filter-checkbox-list { gap: 6px; }

.delete-btn, .challenge-del-btn, .my-hw-set-delete-btn, .admin-set-delete-btn, .admin-set-item-del-btn,
.admin-set-share-btn, .se-del, .achv-ck-del2, .te-del-tier, .note-delete-btn, #copyMyIdBtn, #sdvxCopyMyIdBtn, #chuniCopyMyIdBtn, .song-cart-remove-btn {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 0;
}
.admin-set-delete-btn, .my-hw-set-delete-btn, .admin-set-share-btn, .admin-set-item-del-btn,
.challenge-del-btn, .delete-btn, .se-del, .song-cart-remove-btn, .note-delete-btn {
  width: 32px !important; height: 32px; padding: 0 !important; border-radius: 9px; font-size: 15px;
}
.admin-set-delete-btn, .my-hw-set-delete-btn, .admin-set-item-del-btn, .challenge-del-btn, .delete-btn { background: #fff0f0 !important; color: #e5484d !important; border: 1px solid #f6c9cb !important; }
.admin-set-delete-btn:hover, .my-hw-set-delete-btn:hover, .admin-set-item-del-btn:hover, .challenge-del-btn:hover, .delete-btn:hover { background: #e5484d !important; color: #fff !important; }
.admin-set-share-btn { background: #eef4ff !important; color: #3b6fd8 !important; border: 1px solid #c9daf8 !important; }
.admin-set-share-btn:hover { background: #4c8bf5 !important; color: #fff !important; }
.achv-ck-del2, .te-del-tier { width: 30px !important; height: 30px; padding: 0 !important; border-radius: 8px; }
#copyMyIdBtn, #sdvxCopyMyIdBtn, #chuniCopyMyIdBtn { width: 34px !important; height: 34px; padding: 0 !important; }
.song-cart-remove-btn { background: #fff0f0 !important; color: #e5484d !important; border: 1px solid #f6c9cb !important; }
.note-delete-btn { background: rgba(239,68,68,.2) !important; color: #fca5a5 !important; border: 0 !important; }

.record-layout { display: flex; flex-direction: column-reverse; gap: 12px; }
.record-main { min-width: 0; }
.record-side { display: flex; flex-direction: column; gap: 12px; }
.record-layout .record-blocks { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 1000px) {
  .record-layout { flex-direction: row; align-items: flex-start; gap: 18px; }
  .record-main { flex: 1 1 0; }
  .record-side {
    flex: 0 0 290px; width: 290px; position: sticky; top: 12px;
    max-height: calc(100vh - 24px); overflow-y: auto; scrollbar-width: thin;
  }
}
.record-side-card, .record-side .record-filter-body {
  background: #fff; border-radius: 14px; box-shadow: 0 1px 6px rgba(26,26,46,.08); padding: 14px;
}
.record-side-card { display: flex; flex-direction: column; gap: 10px; }
.record-search { position: relative; }
.record-search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #99a; width: 16px; height: 16px; pointer-events: none; }
.record-search input {
  width: 100%; box-sizing: border-box; margin: 0; padding: 9px 12px 9px 34px; font-size: 14px;
  border: 1px solid #e0e3ec; border-radius: 10px; background: #f7f8fb;
}
.record-search input:focus { outline: none; border-color: #b77dff; background: #fff; box-shadow: 0 0 0 3px rgba(183,125,255,.15); }
.record-sort-row { display: flex; gap: 8px; }
.record-sort-row select {
  flex: 1 1 auto; min-width: 0; margin: 0; padding: 8px 10px; font-size: 14px;
  border: 1px solid #e0e3ec; border-radius: 10px; background: #f7f8fb; color: #1a1a2e;
}
.record-side .sort-order-btn {
  flex: 0 0 38px; width: 38px !important; height: 38px; margin: 0 !important; padding: 0 !important;
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
  border: 1px solid #e0e3ec !important; border-radius: 10px !important; background: #f7f8fb !important; color: #1a1a2e !important;
}
.record-side .sort-order-btn:hover { background: #ecdcfb !important; border-color: #c9a6e6 !important; }
.record-played-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: #333; cursor: pointer; margin: 0; padding: 2px 2px 0; }
.record-side .record-filter-panel { margin: 0; }
.record-side .record-filter-body { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.record-side .filter-group-title { font-size: 12px; color: #889; letter-spacing: .02em; margin-bottom: 7px; }
.record-side .filter-range-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: #889; }
.record-side .filter-range-row > span:first-child { display: none; }
.record-side .filter-range-input { flex: 1 1 0; min-width: 0; width: auto; padding: 6px 8px; border: 1px solid #e0e3ec; border-radius: 8px; box-sizing: border-box; }
.record-side .filter-reset-btn { width: 100%; margin: 0; }
.record-side .filter-toggle-btn { display: none; }
@media (max-width: 999px) {
  .record-side .filter-toggle-btn { display: inline-flex; align-items: center; gap: 4px; }
  .record-side .record-filter-body { display: none; margin-top: 10px; }
}

.admin-set-copy-btn { display: inline-flex !important; align-items: center; justify-content: center; width: 32px !important; height: 32px; padding: 0 !important; border-radius: 9px; font-size: 15px;
  background: #f3ecff !important; color: #7b3fd0 !important; border: 1px solid #dac6f7 !important; }
.admin-set-copy-btn:hover { background: #9d63f0 !important; color: #fff !important; }

.share-img-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.share-img-head h3 { margin: 0; }
.share-kind-sel { min-width: 200px; padding: 9px 12px; font-size: 14px; font-weight: 700; color: #1a1a2e; background: #f7f8fb; border: 1px solid #e0e3ec; border-radius: 10px; cursor: pointer; }
.share-kind-sel:focus { outline: none; border-color: #b77dff; box-shadow: 0 0 0 3px rgba(183,125,255,.15); }
.share-kind-sec > h3 { display: none; }
.share-kind-sec { border-top: 0 !important; margin-top: 0 !important; }

.note-chartinfo { margin: 8px 16px 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.note-chartinfo .nci-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,.65); margin-bottom: 8px; }
.note-chartinfo .nci-head b { color: #fff; font-size: 14px; margin-left: 2px; }
.note-chartinfo .nci-row { display: flex; flex-wrap: wrap; gap: 6px; }
.note-chartinfo .nci-cell { display: inline-flex; flex-direction: column; align-items: center; min-width: 58px; padding: 5px 8px; border-radius: 9px; background: rgba(255,255,255,.07); }
.note-chartinfo .nci-cell i { font-style: normal; font-size: 10px; letter-spacing: .04em; color: rgba(255,255,255,.55); }
.note-chartinfo .nci-cell b { font-size: 14px; color: #fff; }
.note-chartinfo .nci-cell b .nci-real { font-style: normal; font-size: 11px; font-weight: 600; color: rgba(255,255,255,.62); white-space: nowrap; cursor: default; position: relative; }
.note-chartinfo .nci-cell b .nci-real:hover::after { content: attr(data-tip); position: absolute; right: -6px; bottom: calc(100% + 7px); background: #0d0f16; color: #fff; font-size: 12px; font-weight: 600; line-height: 1; padding: 7px 10px; border-radius: 7px; white-space: nowrap; pointer-events: none; z-index: 10050; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.note-chartinfo .nci-break b { color: #ffb74d; }
.note-chartinfo .nci-slide b { color: #7ec8ff; }
.note-chartinfo .nci-hold b { color: #ffd166; }
.note-chartinfo .nci-touch b { color: #7ee0a8; }

.secret-num { cursor: pointer; border-radius: 4px; padding: 0 2px; transition: background .15s; }
.secret-num:hover { background: rgba(127,127,127,.18); }
.secret-num.secret-hidden { letter-spacing: 1px; }
.secret-num:not(.secret-locked) { font-weight: 800; color: #e8e9ff; text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.secret-num:not(.secret-locked)::after { content: ""; display: inline-block; width: 13px; height: 13px; margin-left: 4px; vertical-align: -2px; background: currentColor; opacity: .7; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat; }
.secret-num.secret-hidden:not(.secret-locked)::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.9 10.9 0 0 1 12 19C5 19 1 12 1 12a18.5 18.5 0 0 1 5.06-5.94M9.9 4.24A9.1 9.1 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19M14.12 14.12a3 3 0 1 1-4.24-4.24'/%3E%3Cpath d='M1 1l22 22'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.9 10.9 0 0 1 12 19C5 19 1 12 1 12a18.5 18.5 0 0 1 5.06-5.94M9.9 4.24A9.1 9.1 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19M14.12 14.12a3 3 0 1 1-4.24-4.24'/%3E%3Cpath d='M1 1l22 22'/%3E%3C/svg%3E"); }
.secret-num:not(.secret-locked):focus-visible { outline: 2px solid #9d63f0; outline-offset: 2px; }

.share-img-sels { display: flex; gap: 8px; flex-wrap: wrap; }
.share-img-sels .share-kind-sel { min-width: 140px; }
html[data-theme="dark"] .share-kind-sel { color: #e8e9ef; background: #181a28; border-color: #3a3d58; }

.hist-subtab-menu { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.hist-subtab-link { padding: 6px 14px; background: #f5f5f5; color: #555; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; }
.hist-subtab-link.active { background: #ff77b2; color: #fff; }
.growth-box { background: #fff; border-radius: 14px; box-shadow: 0 1px 6px rgba(26,26,46,.08); padding: 14px; }
.growth-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.growth-title { font-weight: 800; font-size: 15px; color: #1a1a2e; }
.growth-xsw { display: inline-flex; gap: 4px; background: #f0f0f4; border-radius: 9px; padding: 3px; }
.growth-xbtn { margin: 0; width: auto; padding: 5px 12px; border: none; border-radius: 7px; background: transparent; color: #667; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.growth-xbtn.active { background: #fff; color: #7b1fa2; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.growth-chart { width: 100%; }
.growth-chart svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.growth-chart .g-grid { stroke: #e6e8ef; stroke-width: 1; }
.growth-chart .g-axis { fill: #889; font-size: 11px; }
.growth-chart .g-line { fill: none; stroke: #9d63f0; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.growth-chart .g-dot { fill: #fff; stroke: #9d63f0; stroke-width: 2; }
.growth-chart .g-hover { fill: #ff77b2; stroke: #fff; stroke-width: 2; }
.growth-chart .g-cross { stroke: #c9a6e6; stroke-dasharray: 3 3; }
.growth-info { min-height: 38px; margin-top: 8px; font-size: 13px; color: #556; line-height: 1.5; }
.growth-info b { color: #7b1fa2; font-size: inherit; }
.growth-note { margin: 8px 0 0; font-size: 11.5px; color: #99a; }
@media (max-width: 480px) { .growth-box { padding: 12px 10px; } }

.achvh-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.achvh-controls select { margin: 0; width: auto; min-width: 96px; padding: 7px 10px; border: 1px solid #e0e3ec; border-radius: 9px; background: #f7f8fb; color: #1a1a2e; font-size: 13.5px; }
.achvh-legend { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }
.achvh-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; border: 1.5px solid var(--c); color: #445; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; user-select: none; }
.achvh-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.achvh-chip.on { background: var(--c); color: #fff; }
.achvh-chip.on .dot { background: #fff; }
.growth-chart .g-line2 { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.achvh-table-wrap { margin-top: 10px; overflow-x: auto; }
.achvh-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.achvh-table th, .achvh-table td { padding: 6px 8px; border-bottom: 1px solid #eceef5; text-align: right; white-space: nowrap; }
.achvh-table th:first-child, .achvh-table td:first-child { text-align: left; font-weight: 700; }
.achvh-table th { color: #889; font-weight: 600; }
.achvh-up { color: #1a9d57; font-weight: 700; }
.achvh-zero { color: #99a; }

.plate-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.plate-card { background: #fff; border-radius: 14px; box-shadow: 0 1px 6px rgba(26,26,46,.08); padding: 12px 12px 8px; }
.plate-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.plate-kanji { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 9px; background: linear-gradient(135deg, #ff77b2, #9d63f0); color: #fff; font-weight: 900; font-size: 17px; }
.plate-vname { font-weight: 800; font-size: 14px; color: #1a1a2e; flex: 1; min-width: 0; }
.plate-total { font-size: 11.5px; color: #99a; flex: none; }
.plate-row { border-top: 1px solid #eceef5; }
.plate-row > summary { list-style: none; display: grid; grid-template-columns: 38px 1fr auto; grid-template-rows: auto 6px; column-gap: 8px; row-gap: 4px; align-items: center; padding: 8px 2px; cursor: pointer; }
.plate-row > summary::-webkit-details-marker { display: none; }
.plate-badge { grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; height: 28px; border-radius: 8px; color: #fff; font-weight: 900; font-size: 12.5px; }
.plate-kname { font-size: 13px; font-weight: 700; color: #1a1a2e; }
.plate-kname small { color: #99a; font-weight: 600; margin-left: 4px; }
.plate-count { font-size: 12.5px; font-weight: 800; color: #556; }
.plate-bar { grid-column: 2 / span 2; height: 6px; border-radius: 99px; background: #eceef5; overflow: hidden; }
.plate-bar i { display: block; height: 100%; border-radius: 99px; }
.plate-done .plate-count { color: #1a9d57; }
.plate-left { padding: 2px 2px 8px 46px; max-height: 260px; overflow-y: auto; }
.plate-left-item { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 3px 0; border-bottom: 1px dashed #eceef5; }
.plate-left-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334; }
.plate-left-meta { flex: none; color: #889; }
.plate-note { grid-column: 1 / -1; font-size: 11.5px; color: #99a; margin: 4px 2px 0; line-height: 1.5; }
@media (max-width: 480px) { .plate-wrap { grid-template-columns: 1fr; } .plate-left { padding-left: 4px; } }
.plate-row > summary { grid-template-rows: auto auto 6px; }
.plate-img, .frame-img { grid-column: 1 / -1; grid-row: 1; width: 100%; height: auto; display: block; border-radius: 8px; filter: grayscale(.85) opacity(.5); transition: filter .2s; }
.frame-img { aspect-ratio: 720 / 301; object-fit: cover; }
.plate-img { aspect-ratio: 720 / 116; }
.plate-done .plate-img, .plate-done .frame-img { filter: none; }
.plate-row > summary .plate-badge { grid-row: 2 / span 2; }
.plate-section { grid-column: 1 / -1; margin: 14px 2px 0; font-size: 16px; font-weight: 800; color: #1a1a2e; }
.frame-card .plate-head { margin-bottom: 4px; }
@media (max-width: 480px) { .plate-img, .frame-img { border-radius: 6px; } }
.frame-row > summary { grid-template-columns: 52px 1fr auto; }
.frame-row .plate-badge { white-space: nowrap; font-size: 11.5px; }
.frame-row .plate-left { padding-left: 60px; }
@media (max-width: 480px) { .frame-row .plate-left { padding-left: 4px; } }
.achv-seg-jump { cursor: pointer; }
.plate-bar { display: flex; height: 8px; }
.plate-bar .achv-seg { height: 100%; }
.plate-bar .achv-seg:first-child { border-radius: 99px 0 0 99px; }
.plate-bar .achv-seg:last-child { border-radius: 0 99px 99px 0; }
.plate-bar .achv-seg:only-child { border-radius: 99px; }
.plate-bar .achv-seg-empty { background: #eceef5; }
.plate-diffs { padding: 2px 2px 6px 4px; display: grid; gap: 6px; }
.plate-diff-row { display: grid; grid-template-columns: 44px 1fr 44px; gap: 8px; align-items: center; }
.plate-diff-name { font-size: 11.5px; font-weight: 800; color: #667; }
.plate-diff-count { font-size: 11.5px; font-weight: 700; color: #667; text-align: right; }
.plate-bar-diff { height: 8px; }
.plate-total-jump { cursor: pointer; color: #6a5bd6; font-weight: 700; }
.plate-total-jump:hover { text-decoration: underline; }
.plate-filter-note { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #efeafd; color: #4b3a99; font-size: 12.5px; font-weight: 700; }
.plate-filter-note button { border: 0; background: transparent; color: inherit; font-weight: 800; cursor: pointer; font-size: 12.5px; white-space: nowrap; }
.plate-diff-row .plate-bar { grid-column: auto; }
.record-filter-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.record-result-count { font-size: 13px; font-weight: 800; color: #6a5bd6; }

.srating-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 8px; padding: 0 4px; }
.srating-main { min-width: 0; }
.srating-label { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: #8a8fa8; }
.srating-total { font-size: 44px; font-weight: 900; line-height: 1.1; color: #e08a00; font-variant-numeric: tabular-nums; }
.srating-sub { font-size: 13px; color: #777b92; margin-top: 2px; }
.srating-btn { padding: 9px 16px; border-radius: 10px; border: 1px solid #c9ccdd; background: #fff; color: #333; font-weight: 700; cursor: pointer; }
.srating-btn:hover { background: #f3f4fa; }
.srating-desc { font-size: 13px; color: #6b6f86; margin: 4px 4px 10px; line-height: 1.5; }
@media (max-width: 600px) {
  .srating-total { font-size: 36px; }
  .srating-btn { width: 100%; }
}
#sratingCards [class$="song-rating"] { font-size: 13px !important; letter-spacing: -.2px; }
@media (max-width: 600px) { #sratingCards [class$="song-rating"] { font-size: 11px !important; } }
.song-rank-ap { color: #ffcf33; font-weight: 900; font-size: 11px; margin-top: 23px; text-shadow: 0 0 6px rgba(255, 196, 0, .55), 0px 1px 4px rgb(0, 0, 0); }

#sratingCards.cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.srating-card { cursor: pointer; line-height: 0; }
.srating-card canvas { width: 100%; height: auto; display: block; }
@media (max-width: 900px) { #sratingCards.cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { #sratingCards.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; } }

.record-pot-switch { display: flex; width: 100%; }
.record-pot-kind { margin-bottom: 6px; }
.record-pot-switch button { flex: 1; white-space: nowrap; }
.record-pot { margin-top: 4px; display: flex; flex-direction: column; gap: 1px; }
.record-pot-row { display: grid; grid-template-columns: 56px 82px 44px; gap: 8px; align-items: baseline; font-size: 12px; font-variant-numeric: tabular-nums; color: #666; text-align: right; }
.record-pot-target { text-align: right; }
.record-pot-target.is-ap { color: #c98a00; font-weight: 700; }
.record-pot-gap { color: #999; }
.record-pot-gain { color: #1f9d55; font-weight: 800; }

.friend-search { width: 100%; box-sizing: border-box; margin: 0 0 12px; padding: 9px 14px; font-size: 14px; border: 1px solid #d9d9e3; border-radius: 10px; background: #fff; color: #222; }
.friend-search:focus { outline: 2px solid #c9a7f5; border-color: #9d63f0; }
.friend-search-empty { color: #888; font-size: 13px; }

.history-block {
    flex-wrap: wrap; gap: 12px 14px; padding: 14px 16px; border-radius: 14px;
    border: 1px solid #ececf3; border-left: 4px solid #9d63f0;
    box-shadow: 0 2px 10px rgba(30,20,60,.06); transition: box-shadow .18s ease, transform .18s ease, background-color .18s ease;
}
.history-block:hover { background: #fff; box-shadow: 0 6px 18px rgba(30,20,60,.12); transform: translateY(-1px); }
.history-block .record-jacket { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.history-block .record-info { flex: 1 1 160px; min-width: 0; padding-top: 0; gap: 6px; }
.history-block .record-song-name { margin-top: 0; font-size: 15px; }
.history-block .history-changes {
    flex: 2 1 330px; max-width: none; margin-left: 0; font-size: 13px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px;
}
.hc-cell { background: #f6f5fb; border-radius: 10px; padding: 7px 10px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hc-wide { grid-column: 1 / -1; }
.hc-label { font-size: 10px; font-weight: 700; letter-spacing: .4px; color: #8b8da3; }
.hc-val { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.hc-old { color: #9a9cb0; font-size: 12px; }
.hc-arrow { color: #b9bbcc; font-size: 11px; }
.hc-new-v { color: #2a2a40; font-size: 14px; font-weight: 800; }
.hc-val img { width: 26px; height: 26px; object-fit: contain; }
.hc-badge { align-self: flex-start; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; }
.hc-up { background: #dff5e6; color: #1f8a4c; }
.hc-down { background: #fde3e6; color: #c23a4a; }
.hc-new { background: #ece0ff; color: #7a3fd0; }
@media (max-width: 600px) {
    .history-block { padding: 12px; }
    .history-block .history-changes { flex-basis: 100%; grid-template-columns: repeat(2, 1fr); }
    .hc-cell { padding: 6px 8px; }
    .hc-val { gap: 4px; flex-wrap: nowrap; }
    .hc-old { font-size: 11px; }
    .hc-new-v { font-size: 13px; }
}

.note-growth { padding: 0 18px; }
.sg-box { background: rgba(255,255,255,.05); border-radius: 12px; padding: 12px 14px; margin: 10px 0 12px; }
.sg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sg-title { font-size: .85rem; font-weight: 800; color: #fff; }
.sg-sum { font-size: .75rem; color: rgba(255,255,255,.65); }
.sg-sum b { color: #ffeb3b; }
.sg-spark { width: 100%; height: 44px; margin-top: 8px; display: block; }
.sg-spark path { fill: none; stroke: #b98cf2; stroke-width: 2; vector-effect: non-scaling-stroke; }
.sg-spark circle { fill: #ffeb3b; }
.sg-list { margin-top: 10px; max-height: 260px; overflow-y: auto; padding-right: 4px; }
.sg-item { display: flex; gap: 10px; padding: 0 0 12px; position: relative; }
.sg-item:not(:last-child)::before { content: ''; position: absolute; left: 4px; top: 12px; bottom: 0; width: 2px; background: rgba(255,255,255,.12); }
.sg-dot { width: 10px; height: 10px; border-radius: 50%; background: #9d63f0; margin-top: 4px; flex: 0 0 auto; }
.sg-dot-first { background: #ffeb3b; }
.sg-body { min-width: 0; flex: 1; }
.sg-date { font-size: .72rem; color: rgba(255,255,255,.5); }
.sg-first { margin-left: 8px; font-size: .65rem; font-weight: 800; color: #3b2a00; background: #ffeb3b; border-radius: 999px; padding: 1px 7px; }
.sg-cells { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.sg-cell { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.07); border-radius: 8px; padding: 4px 9px; font-size: .78rem; color: #fff; }
.sg-label { font-size: .65rem; font-weight: 800; color: rgba(255,255,255,.45); }
.sg-val { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.sg-old { color: rgba(255,255,255,.55); }
.sg-arrow { color: rgba(255,255,255,.35); font-size: .7rem; }
.sg-badge { font-size: .68rem; font-weight: 800; border-radius: 999px; padding: 0 7px; }
.sg-up { background: rgba(63,191,127,.2); color: #6fe3a0; }
.sg-down { background: rgba(255,90,100,.2); color: #ff8c9a; }
.sg-empty { font-size: .78rem; color: rgba(255,255,255,.5); padding: 10px 0 4px; }

.growth-head .growth-xsw { flex-wrap: wrap; }

.gr-controls { margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.gr-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gr-label { font-size: 12px; font-weight: 800; color: #889; width: 34px; flex: 0 0 auto; }
.gr-controls select, .gr-custom { margin: 0; width: auto; padding: 7px 10px; border: 1px solid #e0e3ec; border-radius: 9px; background: #fff; font-size: 13px; color: #222; }
.gr-custom { flex: 0 0 64px; width: 64px; min-width: 0; text-align: center; }
.gr-or { font-size: 12px; color: #8b8da3; margin-left: 4px; }
.gr-tilde { color: #99a; }
.gr-hint { font-size: 11.5px; color: #99a; }
.gr-err { font-size: 12px; color: #d33; }
.gr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gr-card { min-width: 0; }
.gr-card .growth-info { min-height: 34px; font-size: 12px; margin-top: 4px; }
.gr-card .growth-head { margin-bottom: 4px; }
.gr-card .achvh-legend { margin: 2px 0 2px; }
.gr-card .achvh-chip { padding: 2px 8px; font-size: 11px; }
.gr-details { margin-top: 4px; font-size: 12px; }
.gr-details summary { cursor: pointer; color: #889; font-weight: 600; }
.growth-chart .g-avg { fill: none; stroke: #ffb300; stroke-width: 2.4; stroke-dasharray: 5 3; stroke-linejoin: round; stroke-linecap: round; }
.growth-chart .g-axis-r { fill: #d99200; }
.achvh-avg-row td { color: #c27f00; font-weight: 700; }
@media (max-width: 760px) { .gr-grid { grid-template-columns: minmax(0, 1fr); } }
.growth-chart .g-avg-halo { fill: none; stroke: #fff; stroke-width: 5; stroke-opacity: .85; stroke-linejoin: round; stroke-linecap: round; }
.growth-chart .g-avg { stroke-width: 2.6; }
.growth-chart .g-avg-dot { stroke: #fff; stroke-width: 1; }
.growth-chart .g-axis-rline { stroke: #ffb300; stroke-width: 1; opacity: .55; }
.growth-chart .g-axis-rt { font-weight: 700; font-size: 9px; }
.growth-chart .g-line2 { transition: opacity .12s; }

.history-block.hb {
    --dc: #9d63f0; --dcs: rgba(157,99,240,.10);
    display: flex; flex-wrap: nowrap; align-items: stretch; gap: 14px; padding: 14px 16px 14px 14px;
    border: 1px solid #ececf3; border-left: 0; border-radius: 16px; position: relative; overflow: hidden;
    background: linear-gradient(100deg, var(--dcs) 0%, #fff 46%);
}
.history-block.hb::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--dc); }
.hb-d-basic { --dc: #78c954; --dcs: rgba(120,201,84,.12); }
.hb-d-advanced { --dc: #f0c020; --dcs: rgba(248,213,72,.16); }
.hb-d-expert { --dc: #ff6060; --dcs: rgba(255,96,96,.11); }
.hb-d-master { --dc: #9d63f0; --dcs: rgba(157,99,240,.11); }
.hb-d-remaster { --dc: #cdaaff; --dcs: rgba(205,170,255,.2); }
.hb-art { position: relative; flex: 0 0 auto; width: 84px; height: 84px; margin-left: 4px; align-self: center; }
.hb-jacket { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; background: #e9e7f3; box-shadow: 0 3px 10px rgba(30,20,60,.22); outline: 2px solid var(--dc); outline-offset: -2px; display: block; }
.history-block.hb .hb-const { position: absolute; left: -6px; bottom: -6px; width: auto; height: auto; min-height: 0; margin: 0; padding: 2px 8px; border-radius: 8px; font-size: 12px; font-weight: 800; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); line-height: 1.4; }
.history-block.hb .hb-const.advanced-constant-box { color: #4a3b00; }
.history-block.hb .hb-const.remaster-constant-box { color: #4a2a86; }
.hb-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.hb-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.hb-title { font-size: 16px; font-weight: 800; color: #25253a; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-when { font-size: 11px; color: #9a9cb0; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.hb-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hb-tags .record-song-type { height: 15px; width: auto; }
.hb-diff { font-size: 10.5px; font-weight: 800; letter-spacing: .3px; color: var(--dc); border: 1.5px solid var(--dc); border-radius: 999px; padding: 0 7px; line-height: 1.5; }
.hb-d-advanced .hb-diff { color: #a07c00; border-color: #e0b400; }
.hb-d-remaster .hb-diff { color: #8a5fd0; }
.hb-hero { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.hb-grade { font-size: 12px; font-weight: 900; color: #fff; background: var(--gc, #7b8794); border-radius: 7px; padding: 2px 8px; text-shadow: 0 1px 1px rgba(0,0,0,.25); letter-spacing: .3px; }
.hb-score { font-size: 24px; font-weight: 900; color: #25253a; font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: -.3px; }
.hb-score small { font-size: 13px; font-weight: 800; margin-left: 1px; color: #6e7088; }
.hb-from { font-size: 12px; color: #9a9cb0; font-variant-numeric: tabular-nums; }
.hb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hb-chip { display: flex; align-items: center; gap: 6px; background: #f3f2fa; border-radius: 999px; padding: 4px 11px 4px 10px; font-size: 13px; font-variant-numeric: tabular-nums; min-height: 28px; box-sizing: border-box; }
.hb-chip b { color: #25253a; font-weight: 800; }
.hb-chip-l { font-size: 10px; font-weight: 800; letter-spacing: .4px; color: #8b8da3; }
.hb-chip img { width: 22px; height: 22px; object-fit: contain; }
.hb-chip.hb-same { opacity: .55; }
.hb-chip.hb-changed { background: #ece3ff; box-shadow: inset 0 0 0 1.5px #c9a7f5; }
.hb-dxn { font-size: 12px; color: #6e7088; }
.hb-chip .hc-badge { align-self: center; padding: 0 7px; }
@media (max-width: 600px) {
    .history-block.hb { gap: 11px; padding: 12px 12px 12px 10px; }
    .hb-art, .hb-jacket { width: 64px; height: 64px; }
    .hb-art { margin-left: 2px; align-self: flex-start; }
    .hb-title { font-size: 14.5px; }
    .hb-score { font-size: 21px; }
    .hb-chip { padding: 3px 9px 3px 8px; font-size: 12px; min-height: 26px; }
}

.hb-sd-NOVICE { --dc: #2f6fe0; --dcs: rgba(47,111,224,.10); }
.hb-sd-ADVANCED { --dc: #d19a00; --dcs: rgba(209,154,0,.13); }
.hb-sd-EXHAUST { --dc: #e8415f; --dcs: rgba(232,65,95,.10); }
.hb-sd-MAXIMUM { --dc: #7a7a82; --dcs: rgba(122,122,130,.12); }
.hb-sd-INFINITE { --dc: #e05a97; --dcs: rgba(224,90,151,.11); }
.hb-sd-GRAVITY { --dc: #e0801f; --dcs: rgba(224,128,31,.12); }
.hb-sd-HEAVENLY { --dc: #2f93e0; --dcs: rgba(47,147,224,.11); }
.hb-sd-VIVID { --dc: #e0529a; --dcs: rgba(224,82,154,.11); }
.hb-sd-EXCEED { --dc: #2f93e0; --dcs: rgba(47,147,224,.11); }
.hb-sd-NOVEL { --dc: #2fa360; --dcs: rgba(47,163,96,.11); }
.hb-sd-ULTIMATE { --dc: #c99a10; --dcs: rgba(201,154,16,.13); }
.hb-sd-EXTRA { --dc: #8a8a90; --dcs: rgba(138,138,144,.11); }
.history-block.hb-sx .hb-const { background: var(--dc); color: #fff; }
.hb-sx .hb-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hb-artist { font-size: 11.5px; color: #9a9cb0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.hb-clr { font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; line-height: 1.5; }
.hb-sx .hb-score { font-size: 22px; }

.toggle-container #snapPickBtn {
    display: inline-flex; align-items: center; gap: 7px; width: auto; margin: 0;
    padding: 8px 14px; font-size: 13px; font-weight: 600; line-height: 1.2; color: #fff;
    background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; cursor: pointer;
    transition: background .18s ease, transform .18s ease, border-color .18s ease;
}
.toggle-container #snapPickBtn:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.32); transform: translateY(-1px); }
.toggle-container #snapPickBtn.on { background: rgba(255,193,7,.28); border-color: rgba(255,193,7,.6); }
.snap-box { max-width: 440px; width: calc(100% - 32px); max-height: 80vh; display: flex; flex-direction: column; }
.snap-list { overflow-y: auto; margin: 4px 0 12px; display: flex; flex-direction: column; gap: 6px; padding-right: 2px; }
.snap-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(127,127,150,.28); background: rgba(127,127,150,.08); color: inherit; font: inherit; cursor: pointer; }
.snap-item:hover { background: rgba(157,99,240,.14); border-color: rgba(157,99,240,.5); }
.snap-item.sel { border-color: #9d63f0; background: rgba(157,99,240,.2); }
.snap-item .sn-date { font-weight: 800; font-size: 14px; flex: 1; min-width: 0; }
.snap-item .sn-meta { font-size: 12px; opacity: .7; white-space: nowrap; }
.snap-item .sn-tag { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 999px; background: #9d63f0; color: #fff; white-space: nowrap; }
.snap-item .sn-tag.rs { background: rgba(127,127,150,.5); }
.snap-close { align-self: flex-end; padding: 8px 16px; border-radius: 10px; border: 1px solid rgba(127,127,150,.35); background: transparent; color: inherit; cursor: pointer; }
.asof-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: rgba(255,193,7,.16); border: 1px solid rgba(255,193,7,.5); font-size: 13px; font-weight: 600; }
.asof-banner button { padding: 6px 12px; border-radius: 8px; border: 0; background: #ffb300; color: #1a1a2e; font-weight: 800; cursor: pointer; }

.sg-chart { margin-top: 10px; }
.sg-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.sg-chips .sg-chip { width: auto; margin: 0; flex: 0 0 auto; }
.sg-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; border: 1px solid rgba(127,127,150,.5); background: transparent; color: #eceef8; font-size: 12px; font-weight: 700; cursor: pointer; opacity: .7; }
.sg-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.sg-chip.on { opacity: 1; color: #fff; border-color: var(--c); background: color-mix(in srgb, var(--c) 30%, #1a1a2e); }
.sg-chip:hover, .sg-chip:active { color: #fff; }
.sg-chart-wrap { position: relative; }
.sg-chart-svg { width: 100%; height: auto; display: block; touch-action: none; }
.sgc-grid { stroke: rgba(127,127,150,.25); stroke-width: 1; }
.sgc-axis { font-size: 10px; font-weight: 700; }
.sgc-x { fill: rgba(160,162,185,.9); }
.sgc-line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.sgc-dot { stroke: #1d2030; stroke-width: 1; }
.sgc-cross { stroke: rgba(200,200,220,.6); stroke-width: 1; stroke-dasharray: 3 3; }
.sg-tip { position: absolute; top: 0; z-index: 2; pointer-events: none; padding: 6px 9px; border-radius: 8px; background: rgba(20,22,34,.95); color: #fff; font-size: 11.5px; line-height: 1.5; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.sg-tip i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }

.note-modal-box { overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; overscroll-behavior: contain; }
.note-modal-box > * { flex-shrink: 0; }
.note-modal-box > .note-modal-header { position: sticky; top: 0; z-index: 5; background: #1a1a2e; }
.note-modal-box > .note-modal-footer { position: sticky; bottom: 0; z-index: 5; background: #1a1a2e; }
.note-modal-box .note-modal-body { overflow: visible; flex: none; }
.note-modal-box .sg-list { max-height: none; overflow: visible; padding-right: 0; }

.dan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 10px; }
.dan-head-title { font-size: 18px; font-weight: 900; color: #2b2d42; }
.dan-create-btn { padding: 9px 14px; border: none; border-radius: 10px; background: #9d63f0; color: #fff; font-weight: 800; font-size: 13px; cursor: pointer; width: auto; }
.dan-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.dan-tools input { flex: 1; min-width: 160px; height: 38px; padding: 0 12px; border: 1.5px solid #d6d8e6; border-radius: 10px; font-size: 14px; background: #fff; color: #222; box-sizing: border-box; margin: 0; }
.dan-sort { display: flex; gap: 6px; }
.dan-sort button { width: auto; padding: 8px 12px; border: 1.5px solid #d6d8e6; background: #fff; color: #666; border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer; }
.dan-sort button.is-on { background: #9d63f0; border-color: #9d63f0; color: #fff; }
.dan-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.dan-card { background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 6px rgba(0,0,0,.09); cursor: pointer; border-left: 4px solid #9d63f0; }
.dan-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.16); }
.dan-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dan-name { font-size: 15px; font-weight: 900; color: #2b2d42; min-width: 0; overflow-wrap: anywhere; }
.dan-mode { flex: none; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; color: #fff; background: #7c4dff; }
.dan-mode-life { background: #e5484d; } .dan-mode-dx { background: #1b9aaa; }
.dan-my { margin-left: auto; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; }
.dan-my.is-pass { background: #d9f7e3; color: #17803d; } .dan-my.is-try { background: #fff0d1; color: #b26a00; }
.dan-cond { font-size: 12.5px; color: #666; margin: 6px 0 8px; }
.dan-songs { display: flex; flex-direction: column; gap: 6px; }
.dan-song { display: flex; gap: 8px; align-items: center; }
.dan-song-jk { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; flex: none; background: #e6e6ee; }
.dan-song-info { min-width: 0; }
.dan-song-name { font-size: 13px; font-weight: 700; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dan-song-sub { display: flex; gap: 5px; align-items: center; font-size: 11px; margin-top: 2px; }
.dan-diff { padding: 1px 6px; border-radius: 5px; color: #fff; font-weight: 800; background: #888; }
.dan-diff-BASIC { background: #3cb371; } .dan-diff-ADVANCED { background: #f0a41e; } .dan-diff-EXPERT { background: #e5484d; } .dan-diff-MASTER { background: #8e44d6; } .dan-diff-RE_MASTER { background: #d9a7ff; color: #5a2a8a; }
.dan-type { color: #888; font-weight: 700; } .dan-lv { color: #555; font-weight: 800; }
.dan-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: #888; margin-top: 9px; font-weight: 600; }
.dan-heart.is-on { color: #e5484d; font-weight: 800; }
.dan-modal { width: 560px; }
.dan-detail, .dan-form { padding: 14px 18px 18px; overflow-y: auto; color: #e8e8f0; }
.dan-detail .dan-name, .dan-detail .dan-song-name { color: #fff; } .dan-detail .dan-cond { color: #b9bbd0; margin: 0; }
.dan-detail .dan-meta { color: #9a9cb5; } .dan-detail .dan-lv { color: #ddd; } .dan-detail .dan-type { color: #9a9cb5; }
.dan-desc { margin: 8px 0; font-size: 13px; color: #c8cadd; }
.dan-actions { display: flex; gap: 8px; margin: 12px 0; }
.dan-like-btn, .dan-btn { width: auto; padding: 8px 14px; border-radius: 10px; border: 1.5px solid #4a4c6a; background: transparent; color: #ddd; font-weight: 800; cursor: pointer; }
.dan-like-btn.is-on { background: #e5484d; border-color: #e5484d; color: #fff; }
.dan-btn-del { border-color: #e5484d; color: #ff8a8f; }
.dan-rank-title { font-size: 13px; font-weight: 800; color: #b9bbd0; margin: 6px 0; }
.dan-rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.05); margin-bottom: 5px; }
.dan-rank-row.is-me { outline: 1.5px solid #9d63f0; }
.dan-rank-no { width: 22px; text-align: center; font-weight: 900; color: #ffd34d; }
.dan-rank-name { flex: 1; min-width: 0; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dan-rank-rt { font-size: 12px; color: #9a9cb5; } .dan-rank-val { color: #ffb84d; font-variant-numeric: tabular-nums; }
.dan-form label { display: block; font-size: 12px; font-weight: 700; color: #b9bbd0; margin-bottom: 10px; }
.dan-form input[type=text], .dan-form input[type=number] { display: block; width: 100%; box-sizing: border-box; height: 38px; margin: 4px 0 0; padding: 0 10px; border-radius: 8px; border: 1.5px solid #4a4c6a; background: #12122a; color: #fff; font-size: 14px; }
.dan-form-lab { font-size: 12px; font-weight: 800; color: #b9bbd0; margin: 10px 0 6px; } .dan-opt { font-weight: 500; color: #8a8ca5; }
.dan-mode-pick { display: flex; gap: 6px; } .dan-mode-pick button { flex: 1; width: auto; padding: 9px 4px; border-radius: 9px; border: 1.5px solid #4a4c6a; background: transparent; color: #ccc; font-weight: 800; font-size: 13px; cursor: pointer; }
.dan-mode-pick button.is-on { background: #9d63f0; border-color: #9d63f0; color: #fff; }
.dan-params { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; margin-top: 10px; } .dan-hint { grid-column: 1 / -1; font-size: 11.5px; color: #8a8ca5; margin-bottom: 6px; }
.dan-slot { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.dan-slot-no { width: 24px; height: 24px; border-radius: 50%; background: #9d63f0; color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; flex: none; margin-top: 7px; font-size: 13px; }
.dan-slot-body { flex: 1; min-width: 0; position: relative; }
.dan-slot-res { max-height: 260px; overflow-y: auto; }
.dan-form-msg { color: #ff8a8f; font-size: 13px; min-height: 18px; margin: 8px 0 0; }
.dan-submit { width: 100%; margin-top: 6px; padding: 12px; border: none; border-radius: 10px; background: #9d63f0; color: #fff; font-weight: 900; font-size: 15px; cursor: pointer; }
.dan-submit:disabled { opacity: .5; }
@media (max-width: 600px) { .dan-list { grid-template-columns: 1fr; } .dan-params { grid-template-columns: 1fr 1fr; } }
html[data-theme="dark"] .dan-head-title, html[data-theme="dark"] .dan-name { color: #ececf5; }
html[data-theme="dark"] .dan-card { background: #222332; }
html[data-theme="dark"] .dan-tools input, html[data-theme="dark"] .dan-sort button { background: #222332; border-color: #3d3f5c; color: #ddd; }
html[data-theme="dark"] .dan-sort button.is-on { background: #9d63f0; border-color: #9d63f0; color: #fff; }
html[data-theme="dark"] .dan-song-name { color: #e3e3ef; } html[data-theme="dark"] .dan-cond { color: #a9abc4; } html[data-theme="dark"] .dan-lv { color: #ccc; }
html[data-theme="dark"] .dan-song-jk { background: #33344a; }
.dan-views { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dan-views button { width: auto; margin: 0; padding: 8px 14px; border: 1.5px solid #d6d8e6; background: #fff; color: #666; border-radius: 10px; font-weight: 800; font-size: 13px; cursor: pointer; }
.dan-views button.is-on { background: #2b2d42; border-color: #2b2d42; color: #fff; }
.dan-ch-btn { margin: 0 0 0 auto; width: auto; padding: 4px 12px; border-radius: 8px; border: 1.5px solid #9d63f0; background: transparent; color: #9d63f0; font-weight: 800; font-size: 12px; cursor: pointer; }
.dan-ch-btn.is-on { background: #9d63f0; color: #fff; }
.dan-ch-big { padding: 8px 16px; font-size: 14px; border-radius: 10px; margin-left: auto; }
.dan-like-static { padding: 8px 4px; color: #9a9cb5; font-weight: 800; }
.dan-bcard { background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 1px 8px rgba(0,0,0,.1); border-left: 5px solid #9d63f0; margin-bottom: 14px; }
.dan-bcard .dan-name { font-size: 17px; }
.dan-bsongs { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.dan-bsong { display: flex; align-items: center; gap: 12px; }
.dan-bsong-jk { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; background: #e6e6ee; }
.dan-bsong-info { flex: 1; min-width: 0; }
.dan-bsong-name { font-size: 15px; font-weight: 800; color: #2b2d42; overflow-wrap: anywhere; }
.dan-bsong-rec { text-align: right; flex: none; display: flex; flex-direction: column; gap: 2px; }
.dan-bsong-rec b { font-size: 16px; color: #e08a00; font-variant-numeric: tabular-nums; } .dan-bsong-rec span { font-size: 11.5px; color: #888; } .dan-none { color: #aaa !important; }
.dan-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 6px; }
.dan-stat { background: #f4f3fa; border-radius: 10px; padding: 10px 12px; }
.dan-stat.is-pass { background: #e3f7ea; }
.dan-stat-l { font-size: 11.5px; font-weight: 700; color: #888; } .dan-stat-v { font-size: 19px; font-weight: 900; color: #2b2d42; font-variant-numeric: tabular-nums; margin: 2px 0; } .dan-stat-s { font-size: 11.5px; color: #777; }
.dan-rank-item { margin-bottom: 5px; } .dan-rank-item .dan-rank-row { margin-bottom: 0; cursor: pointer; }
.dan-rank-row.is-open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.dan-rank-songs { background: rgba(255,255,255,.08); border-radius: 0 0 8px 8px; padding: 8px 12px; }
.dan-rank-songs[hidden] { display: none; }
.dan-rs { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; }
.dan-rs-no { width: 18px; height: 18px; border-radius: 50%; background: #9d63f0; color: #fff; font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; flex: none; }
.dan-rs-name { flex: 1; min-width: 0; color: #ddd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dan-rs-val { color: #ffb84d; font-variant-numeric: tabular-nums; } .dan-rs-dx { color: #9a9cb5; font-size: 11.5px; }
.dan-rank-nodata { font-size: 12px; color: #9a9cb5; }
html[data-theme="dark"] .dan-views button { background: #222332; border-color: #3d3f5c; color: #ddd; }
html[data-theme="dark"] .dan-views button.is-on { background: #ececf5; border-color: #ececf5; color: #1a1a2e; }
html[data-theme="dark"] .dan-bcard { background: #222332; } html[data-theme="dark"] .dan-bsong-name, html[data-theme="dark"] .dan-stat-v { color: #ececf5; }
html[data-theme="dark"] .dan-stat { background: #2c2d42; } html[data-theme="dark"] .dan-stat.is-pass { background: #1d3b2a; } html[data-theme="dark"] .dan-bsong-jk { background: #33344a; }
html[data-theme="dark"] .dan-stat-l, html[data-theme="dark"] .dan-stat-s { color: #a9abc4; }
@media (max-width: 600px) { .dan-bcard { padding: 12px; } .dan-bsong-jk { width: 46px; height: 46px; } .dan-bsong-rec b { font-size: 14px; } }
.dan-detail .dan-songs { margin-top: 10px; }
.dan-rank-btn { margin: 0 0 0 auto; width: auto; padding: 4px 12px; border-radius: 8px; border: 1.5px solid #e08a00; background: transparent; color: #e08a00; font-weight: 800; font-size: 12px; cursor: pointer; }
.dan-rank-btn.is-on { background: #e08a00; color: #fff; }
.dan-rank-btn + .dan-ch-btn { margin-left: 6px; }
.dan-bcard-rank { margin-top: 12px; padding: 12px; border-radius: 10px; background: #1a1a2e; }
.dan-bcard-rank[hidden] { display: none; }
.dan-bcard-rank .dan-rank-title { margin-top: 0; }
.rank-open-btn { width: auto; margin: 0; padding: 8px 14px; border-radius: 10px; border: 1.5px solid #e08a00; background: transparent; color: #e08a00; font-weight: 800; font-size: 13px; cursor: pointer; }
.rank-open-btn:hover { background: #e08a00; color: #fff; }
.rank-modal { width: 520px; }
.rank-body { padding: 10px 14px 16px; overflow-y: auto; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: rgba(255,255,255,.05); margin-bottom: 5px; text-decoration: none; color: inherit; }
.rank-row.is-me { outline: 1.5px solid #9d63f0; }
.rank-no { width: 28px; text-align: center; font-weight: 900; color: #b9bbd0; flex: none; }
.rank-no-1 { color: #ffd34d; font-size: 18px; } .rank-no-2 { color: #d4d8e4; font-size: 17px; } .rank-no-3 { color: #e0975a; font-size: 16px; }
.rank-av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: #33344a; }
.rank-name { flex: 1; min-width: 0; font-weight: 800; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-name small { display: block; font-size: 11px; font-weight: 600; color: #9a9cb5; }
.rank-val { color: #ffb84d; font-variant-numeric: tabular-nums; font-size: 15px; }
.rank-lv-bar { display: flex; gap: 8px; margin: 8px 0; }
.rank-lv-bar select { flex: 1; min-width: 0; }
.rank-me-label { font-size: 12px; font-weight: 800; color: #b9bbd0; margin: 8px 2px 6px; }


.settings-box { max-width: 380px; padding: 24px; }
.settings-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.settings-box .settings-list > a,
.settings-box .settings-list > button {
    display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; box-sizing: border-box;
    padding: 12px 14px !important; font-size: 14px; font-weight: 700; color: #2b2b3d !important; text-decoration: none;
    background: #f4f1fb !important; border: 1px solid #e6dff5 !important; border-radius: 10px; cursor: pointer; text-align: left;
    box-shadow: none !important; transform: none !important;
}
.settings-box .settings-list > a:hover,
.settings-box .settings-list > button:hover { background: #ebe4fa !important; }
.settings-box .settings-list .ic { width: 18px; height: 18px; color: #9d63f0; flex: none; }
.settings-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; border: 1px solid #e6dff5; border-radius: 10px; background: #fff;
}
.settings-row-label { font-size: 14px; font-weight: 700; color: #2b2b3d; }
.settings-row .toggle-switch { flex: none; }
.settings-msg { min-height: 18px; margin: 8px 2px 0; font-size: 12.5px; color: #7a7a8c; }
.settings-msg.err { color: #d33; }
.settings-box a.logout-button { color: #fff !important; }
.settings-box .logout-button {
    display: block; width: 100%; box-sizing: border-box; margin-top: 10px; padding: 11px 14px;
    text-align: center; font-size: 14px; font-weight: 700; border-radius: 10px;
}
.private-notice {
    margin: 40px auto; max-width: 420px; padding: 28px 20px; text-align: center;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 14px;
    color: #e7e7f3; font-size: 15px; font-weight: 700; line-height: 1.6;
}
.private-notice .sub { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 500; color: #a9aac2; }

.dan-rs { flex-wrap: wrap; }
.dan-rs-life { flex: 0 0 100%; padding-left: 26px; font-size: 12.5px; color: #a9abc4; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.dan-rs-life b { color: #ff7a8a; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.dan-rs-life em { font-style: normal; color: #9a9cb5; }
.dan-rs-life i { font-style: normal; color: #7ee0a0; font-variant-numeric: tabular-nums; }
.dan-lifebox { margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(255,255,255,.04); }
.dan-lifebox-t { font-size: 12.5px; font-weight: 800; color: #cfd0e3; margin-bottom: 6px; }
.dan-lifebox-t small { font-weight: 600; color: #9a9cb5; }

.dan-stat.is-click { cursor: pointer; transition: filter .15s; }
.dan-stat.is-click:hover { filter: brightness(1.12); }
.dan-stat-hint { margin-left: 4px; font-size: 10.5px; font-weight: 700; color: #9d63f0; }
.dan-stat.is-open .dan-stat-hint { opacity: .6; }
.dan-best-songs { margin-top: 8px; border-radius: 10px; }
.dan-bcard-att { margin-top: 12px; padding: 12px; border-radius: 10px; background: #1a1a2e; }
.dan-bcard-att[hidden] { display: none; }
.dan-bcard-att .dan-rank-title { margin-top: 0; }
.dan-att-time { font-size: 12.5px; color: #b9bbd0; font-variant-numeric: tabular-nums; flex: none; }
.dan-att-badge { flex: 1; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; flex: none; }
.dan-att-badge.is-pass { background: #e3f7ea; color: #1c7a45; }
.dan-att-badge.is-fail { background: #fde4e7; color: #b3283b; }
.dan-att-badge.is-pend { background: #fff2d6; color: #8a6200; }
.dan-att-row .dan-rank-val { margin-left: auto; }

.dan-rank-no.dan-rank-fail { width: auto; flex: none; font-size: 10.5px; font-weight: 800; color: #ff8a98; background: rgba(255,90,110,.14); border-radius: 999px; padding: 2px 7px; }

.dan-by { color: #9a9cb5; }
.dan-by b { color: #e3e3ef; font-weight: 800; }
html:not([data-theme="dark"]) .dan-by b { color: #2b2d42; }
html .dan-detail .dan-by b { color: #e3e3ef; }

#customdan .dan-list { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; align-items: start; }
#customdan .dan-list > .empty-msg { grid-column: 1 / -1; }
#customdan .dan-bcard { margin-bottom: 0; }
@media (max-width: 800px) { #customdan .dan-list { grid-template-columns: 1fr; } }

.gc-tools { display: flex; gap: 8px; align-items: center; margin: 4px 0 12px; flex-wrap: wrap; }
.gc-tools input { flex: 1; min-width: 160px; height: 38px; padding: 0 12px; border: 1.5px solid #d6d8e6; border-radius: 10px; font-size: 14px; background: #fff; color: #222; box-sizing: border-box; margin: 0; }
.gc-sort { display: flex; gap: 6px; }
.gc-sort button { width: auto; padding: 8px 12px; border: 1.5px solid #d6d8e6; background: #fff; color: #666; border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer; }
.gc-sort button.is-on { background: #9d63f0; border-color: #9d63f0; color: #fff; }
html[data-theme="dark"] .gc-tools input, html[data-theme="dark"] .gc-sort button { background: #222332; border-color: #3d3f5c; color: #ddd; }
html[data-theme="dark"] .gc-sort button.is-on { background: #9d63f0; border-color: #9d63f0; color: #fff; }
.gc-by { font-size: 12.5px; font-weight: 700; color: #9d63f0; white-space: nowrap; }
.gc-like, .gc-like-static { width: auto; height: auto; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.gc-like { border: 1.5px solid #c9cbe0; background: transparent; color: #8d8fa8; cursor: pointer; }
.gc-like.is-on { background: #e5484d; border-color: #e5484d; color: #fff; }
.gc-like:disabled { opacity: .6; cursor: default; }
.gc-like-static { color: #9a9cb5; padding-left: 4px; padding-right: 4px; }
html[data-theme="dark"] .gc-like { border-color: #4a4c6a; color: #aab; }
html[data-theme="dark"] .gc-like.is-on { background: #e5484d; border-color: #e5484d; color: #fff; }
.gc-more-row { text-align: center; margin: 10px 0 4px; }
.gc-more { width: auto; padding: 9px 22px; border-radius: 10px; border: 1.5px solid #9d63f0; background: transparent; color: #9d63f0; font-weight: 800; cursor: pointer; }

#goalCommList, #sdvxGoalCommList, #chuniGoalCommList { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
#goalCommList > .empty-msg, #sdvxGoalCommList > .empty-msg, #chuniGoalCommList > .empty-msg { grid-column: 1 / -1; }
#goalCommList .admin-set-card, #sdvxGoalCommList .admin-set-card, #chuniGoalCommList .admin-set-card { margin: 0; min-width: 0; }
#goalCommList .admin-set-card.is-open, #sdvxGoalCommList .admin-set-card.is-open, #chuniGoalCommList .admin-set-card.is-open { grid-column: 1 / -1; }
@media (max-width: 1000px) { #goalCommList, #sdvxGoalCommList, #chuniGoalCommList { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { #goalCommList, #sdvxGoalCommList, #chuniGoalCommList { grid-template-columns: 1fr; } }

@media (min-width: 1001px) {
  .my-goal-set-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.friend-search { max-width: 360px; }
.gc-tools input, .dan-tools input { flex: 0 1 340px; }
.challenge-form-row input[type="text"] { max-width: 440px; }
.share-url-box { max-width: 560px; }
.share-url-box input { min-width: 0; }

.admin-set-card > .admin-set-header { flex-wrap: nowrap; align-items: flex-start; }
.admin-set-card > .admin-set-header > .admin-set-title-row { flex: 1 1 0; min-width: 0; }
.admin-set-card > .admin-set-header > .admin-set-header-btns { flex: 0 0 auto; align-items: center; }
.admin-set-card .admin-set-header-btns .gc-like, .admin-set-card .admin-set-header-btns .gc-like-static { align-self: center; }
@media (max-width: 640px) {
  .admin-set-cards .admin-set-card > .admin-set-header,
  .my-goal-set-cards .admin-set-card > .admin-set-header,
  .free-goals-set-cards .admin-set-card > .admin-set-header { flex-direction: column; gap: 8px; }
  .admin-set-cards .admin-set-card > .admin-set-header > .admin-set-header-btns,
  .my-goal-set-cards .admin-set-card > .admin-set-header > .admin-set-header-btns,
  .free-goals-set-cards .admin-set-card > .admin-set-header > .admin-set-header-btns { order: 2; flex-wrap: wrap; min-height: 0; }
  .admin-set-cards .admin-set-card > .admin-set-header > .admin-set-title-row,
  .my-goal-set-cards .admin-set-card > .admin-set-header > .admin-set-title-row,
  .free-goals-set-cards .admin-set-card > .admin-set-header > .admin-set-title-row { flex: 0 0 auto; width: 100%; }
}

.gc-vis { width: auto; height: auto; margin: 0; padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1.2; white-space: nowrap; cursor: pointer; border: 1.5px solid #c9cbe0; background: transparent; color: #8d8fa8; }
.gc-vis.is-public { border-color: #9d63f0; color: #9d63f0; background: rgba(157,99,240,.10); }
.gc-vis:disabled { opacity: .6; cursor: default; }
html[data-theme="dark"] .gc-vis { border-color: #4a4c6a; color: #aab; }
html[data-theme="dark"] .gc-vis.is-public { border-color: #9d63f0; color: #c9a7f5; background: rgba(157,99,240,.16); }
.admin-set-card > .admin-set-header > .admin-set-header-btns { min-height: 32px; }

#newCards.cards, #otherCards.cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
#newCards.cards > .rating-canvas-card, #otherCards.cards > .rating-canvas-card { zoom: 1 !important; transform: none !important; margin: 0 !important; width: 100%; }
@media (max-width: 900px) {
  #newCards.cards, #otherCards.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


.rank-row:hover { background: rgba(157,99,240,.16); }
a.dan-rank-name { color: inherit; text-decoration: none; }
a.dan-rank-name:hover { text-decoration: underline; color: #9d63f0; }
.toggle-container #friendReqBtn {
    display: inline-flex; align-items: center; gap: 7px; width: auto; margin: 0;
    padding: 8px 14px; font-size: 13px; font-weight: 700; line-height: 1.2; color: #fff;
    background: linear-gradient(135deg, #ff77b2, #9d63f0); border: 1px solid transparent; border-radius: 10px; cursor: pointer; box-shadow: none;
}
.toggle-container #friendReqBtn:hover { filter: brightness(1.08); }
.toggle-container #friendReqBtn:disabled { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.18); color: #cfd2e6; cursor: default; filter: none; }
.dan-long-tag { display: inline-block; align-self: flex-start; width: fit-content; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: #ff9f43; color: #fff; font-size: 10px; font-weight: 800; line-height: 1.5; vertical-align: middle; }
.dan-slot-no.is-long { width: auto; min-width: 24px; padding: 0 7px; border-radius: 12px; font-size: 12px; }
.dan-dxhelp { margin: 4px 0 8px; padding: 10px 12px; border-radius: 12px; background: rgba(157,99,240,.12); border: 1px solid rgba(157,99,240,.35); }
.dan-dxhelp[hidden] { display: none; }
.dan-dx-line { font-size: 13px; color: #c3c5d6; margin-bottom: 8px; line-height: 1.5; }
.dan-dx-line b { color: #cf90ea; font-size: 15px; }
.dan-dx-line span, .dan-dx-note { font-size: 12px; color: #8a8ca5; }
.dan-dx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dan-dx-chip { width: auto; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 10px; border-radius: 10px; border: 1.5px solid #4a4c6a; background: transparent; color: #ddd; cursor: pointer; line-height: 1.3; }
.dan-dx-chip b { font-size: 12px; color: #cf90ea; }
.dan-dx-chip span { font-weight: 800; font-size: 13px; }
.dan-dx-chip:hover { background: rgba(157,99,240,.22); border-color: #9d63f0; }

.blank-title { opacity: .55; font-style: italic; }

.dan-rating-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: rgba(224,138,0,.1); border: 1px solid rgba(224,138,0,.35); }
.dan-rating-lab { font-size: 13px; font-weight: 800; color: #b26a00; }
.dan-rating-val { font-size: 20px; font-weight: 900; color: #e08a00; font-variant-numeric: tabular-nums; }
.dan-rating-sub { font-size: 12px; font-weight: 700; color: #888; }
.dan-rating-bar .rank-open-btn { margin-left: auto; padding: 6px 12px; }
html[data-theme="dark"] .dan-rating-lab { color: #f0b34a; }
html[data-theme="dark"] .dan-rating-sub { color: #9a9cb5; }
.dan-rated { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 6px; color: #fff; background: linear-gradient(135deg, #e08a00, #ff5fa8); }
.dan-rated b { font-weight: 900; letter-spacing: .5px; }
.dan-rated span + span { padding-left: 6px; border-left: 1px solid rgba(255,255,255,.5); }
.dan-unrated { margin-left: auto; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: #eee; color: #777; }
html[data-theme="dark"] .dan-unrated { background: #2c2e45; color: #9a9cb5; }
.dan-sort { flex-wrap: wrap; }
.dan-sort .dan-order { min-width: 38px; padding: 8px 10px; font-size: 15px; line-height: 1; }
.dan-vote, .dan-admin { margin-top: 14px; }
.dan-vote-row { display: flex; flex-wrap: wrap; gap: 6px; }
.dan-vote-btn { width: 38px; margin: 0; padding: 8px 0; border-radius: 9px; border: 1.5px solid #4a4c6a; background: transparent; color: #ddd; font-weight: 800; font-size: 14px; cursor: pointer; }
.dan-vote-btn:hover { border-color: #9d63f0; }
.dan-vote-btn.is-on { background: #9d63f0; border-color: #9d63f0; color: #fff; }
.dan-admin { padding: 12px 14px; border-radius: 12px; border: 1px dashed rgba(224,138,0,.55); background: rgba(224,138,0,.06); }
.dan-admin-sum { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; font-weight: 700; color: #ddd; margin-bottom: 8px; }
.dan-dist { display: flex; flex-direction: column; gap: 3px; margin-bottom: 12px; }
.dan-dist-row { display: grid; grid-template-columns: 22px 1fr 34px; align-items: center; gap: 8px; font-size: 12px; color: #b9bbd0; }
.dan-dist-row i { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #9d63f0, #ff5fa8); min-width: 2px; }
.dan-dist-row b { text-align: right; font-weight: 800; }
.dan-admin-rate { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.dan-admin-rate label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: #b9bbd0; }
.dan-admin-rate input { width: 120px; margin: 0; padding: 8px 10px; border-radius: 9px; border: 1.5px solid #4a4c6a; background: #14152a; color: #fff; font-size: 14px; box-sizing: border-box; }
.dan-admin-rate .dan-btn { margin: 0; }
.dan-adm-card { border-left-color: #e08a00; }
@media (max-width: 520px) {
  .dan-sort button { padding: 7px 10px; font-size: 12.5px; }
  .dan-admin-rate input { width: 100px; }
}

.dan-notices { display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px; }
.dan-notices:empty { display: none; }
.dan-notice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 14px; border-radius: 12px; background: linear-gradient(135deg, rgba(255,214,107,.18), rgba(255,95,168,.14)); border: 1px solid rgba(255,190,90,.55); }
.dan-notice-main { flex: 1; min-width: 180px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; font-weight: 700; color: #3a2e1a; }
.dan-notice-main b { font-size: 14px; font-weight: 900; overflow-wrap: anywhere; }
.dan-notice-acts { display: flex; gap: 6px; }
.dan-notice-acts .dan-btn { margin: 0; padding: 6px 12px; font-size: 12.5px; border-color: rgba(224,138,0,.7); color: #b26a00; }
.dan-notice-all { align-self: flex-end; margin: 0; width: auto; padding: 5px 12px; border-radius: 9px; border: 1px solid #d6d8e6; background: transparent; color: #888; font-weight: 700; font-size: 12px; cursor: pointer; }
html[data-theme="dark"] .dan-notice { background: linear-gradient(135deg, rgba(255,214,107,.14), rgba(255,95,168,.12)); }
html[data-theme="dark"] .dan-notice-main { color: #f4e9d2; }
html[data-theme="dark"] .dan-notice-acts .dan-btn { color: #f0b34a; }
.dan-card.is-mine-rated { position: relative; border-left-color: transparent; box-shadow: 0 0 0 1px rgba(255,190,90,.35), 0 6px 22px rgba(255,95,168,.22); background-image: linear-gradient(135deg, rgba(255,214,107,.16), rgba(255,95,168,.08) 55%, rgba(157,99,240,.10)); }
.dan-card.is-mine-rated::before { content: ''; position: absolute; inset: 0; border-radius: 12px; padding: 2px; pointer-events: none; background: linear-gradient(120deg, #ffd66b, #ff5fa8, #9d63f0, #4fc3ff, #ffd66b); background-size: 300% 300%; animation: danShine 7s linear infinite; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; }
.dan-card.is-mine-rated .dan-rated { box-shadow: 0 0 10px rgba(255,150,90,.65); }
.dan-card.is-mine-rated .dan-name { background: linear-gradient(90deg, #e08a00, #ff5fa8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dan-detail.is-mine-rated .dan-rated { box-shadow: 0 0 12px rgba(255,150,90,.7); }
.dan-detail.is-mine-rated { box-shadow: inset 0 2px 0 #ffd66b, inset 0 -2px 0 #ff5fa8; }
@keyframes danShine { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
@media (prefers-reduced-motion: reduce) { .dan-card.is-mine-rated::before { animation: none; } }
.dan-btn-req { border-color: #f59e0b; color: #b45309; background: rgba(245, 158, 11, .12); }
html[data-theme="dark"] .dan-btn-req { color: #fcd34d; background: rgba(245, 158, 11, .16); }
.dan-req-state { display: inline-flex; align-items: center; padding: 0 10px; min-height: 32px; border-radius: 8px; font-size: 12px; font-weight: 800; background: rgba(245, 158, 11, .15); color: #b45309; }
html[data-theme="dark"] .dan-req-state { color: #fcd34d; }
.dan-req-flag { margin: 6px 0; padding: 7px 10px; border-radius: 8px; font-size: 13px; font-weight: 800; background: rgba(245, 158, 11, .15); color: #b45309; }
html[data-theme="dark"] .dan-req-flag { color: #fcd34d; }
.dan-notice-by { font-weight: 600; opacity: .8; }

.record-song-artist { font-size: 12px; font-weight: 500; color: #8a8ca6; margin-top: 1px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme="dark"] .record-song-artist { color: #9a9cb5; }
@media (max-width: 600px) { .record-song-artist { font-size: 11px; } }

.plate-wrap { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.plate-card, .plate-row, .plate-row > summary { min-width: 0; }
.plate-left { overflow-x: hidden; overscroll-behavior: contain; }
.plate-left-name { overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .plate-wrap { grid-template-columns: minmax(0, 1fr); }
  .plate-left-item { align-items: flex-start; }
  .plate-left-name { white-space: normal; }
}
.plate-holders-btn { display: inline-flex; align-items: center; width: auto; margin: 2px 2px 8px 4px; padding: 5px 12px; border-radius: 999px; border: 1.5px solid #9d63f0; background: transparent; color: #7a4bd0; font-size: 12px; font-weight: 800; cursor: pointer; }
.plate-holders-btn:hover { background: #9d63f0; color: #fff; }
.frame-row .plate-holders-btn { margin-left: 4px; }
.achv-rank-btn { margin-left: auto; }
.rank-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rank-tabs::-webkit-scrollbar { display: none; }
.rank-tabs button { flex: 0 0 auto; width: auto; margin: 0; padding: 7px 12px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.18); background: transparent; color: #c9cbe0; font-size: 12.5px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.rank-tabs button.active { background: #9d63f0; border-color: #9d63f0; color: #fff; }
.rank-tabs.rank-levels button { padding: 6px 11px; min-width: 38px; }
.rank-cap { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 11.5px; font-weight: 700; color: #9a9cb5; margin: 2px 2px 8px; }
.rank-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 2px 10px; color: #fff; font-size: 14px; }
.rank-sub span { font-size: 12px; font-weight: 600; color: #9a9cb5; }
.rank-modal { display: flex; flex-direction: column; overflow: hidden; max-height: 92vh; max-height: min(92dvh, 780px); }
.rank-modal > .rank-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.rank-modal > .rank-body { padding-top: 0; }
.rank-ctl { position: sticky; top: 0; z-index: 3; background: #1a1a2e; margin: 0 -14px; padding: 10px 14px 8px; }
.rank-modal .rank-sub { margin-top: 12px; }
.rank-modal .rank-body > .empty-msg:first-child { margin-top: 14px; }

.rank-tabs { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.28) transparent; cursor: grab; }
.rank-tabs::-webkit-scrollbar { display: block; height: 5px; }
.rank-tabs::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); border-radius: 99px; }
.rank-tabs.dragging { cursor: grabbing; user-select: none; }
.rank-tabs.dragging button { pointer-events: none; }
.rank-tabs button { cursor: pointer; }

.achv-g-pies { display: grid; grid-template-columns: repeat(4, minmax(0, 84px)); gap: 12px; justify-content: start; align-items: center; }
.achv-sub .achv-g-pies { grid-template-columns: repeat(4, minmax(0, 62px)); gap: 10px; }
.achv-pie-cell { min-width: 0; }
.achv-pie { display: block; width: 100%; height: auto; overflow: visible; }
.achv-pie .achv-seg { height: auto; min-width: 0; stroke: #fff; stroke-width: 1; stroke-linejoin: round; box-shadow: none; }
.achv-pie .achv-seg + .achv-seg { box-shadow: none; }
.achv-pie .achv-seg-empty { fill: var(--achv-empty); }
.achv-pie-tag { fill: #667; font-size: 14px; font-weight: 800; pointer-events: none; }
.achv-sub .achv-pie-tag { font-size: 15px; }
@media (max-width: 720px) {
  .achv-g-pies { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 360px; gap: 8px; }
  .achv-sub .achv-g-pies { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 280px; }
}

.achv-legend .achv-metric-switch { align-self: flex-start; margin-bottom: 6px; }
.achievement-levels-list.achv-pies-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.achv-pies-grid > .achv-group, .achv-pies-grid > .achv-group:first-child, .achv-pies-grid > .achv-group:last-child { border: 1px solid #eceef3; border-radius: 14px; overflow: hidden; }
.achv-pies-grid .achv-group-head { grid-template-columns: minmax(0, 1fr) 22px; gap: 6px; padding: 14px; align-items: start; }
.achv-pies-grid .achv-g-info { display: block; grid-column: 1; grid-row: 1; }
.achv-pies-grid .achv-chev { grid-column: 2; grid-row: 1; }
.achv-pies-grid .achv-g-bars { grid-column: 1 / 3; grid-row: 2; }
.achv-pies-grid .achv-g-pies { grid-template-columns: minmax(0, 170px); justify-content: center; max-width: none; margin-top: 4px; }
.achv-pies-grid .achv-g-sub { margin: 2px 0 6px; }
.achv-pies-grid .achv-children { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.achv-pies-grid .achv-children[hidden] { display: none; }
.achv-pies-grid .achv-sub .achv-group-head { grid-template-columns: minmax(0, 1fr); padding: 12px; }
.achv-pies-grid .achv-sub .achv-chev { display: none; }
.achv-pies-grid .achv-sub .achv-g-bars { grid-column: 1; grid-row: auto; }
.achv-pies-grid .achv-sub .achv-g-pies { grid-template-columns: minmax(0, 104px); }
.achv-pies-grid .achv-sub .achv-g-label { font-size: 14px; }
.achv-pies-grid .achv-pie-tag { font-size: 13px; }
@media (max-width: 560px) {
  .achievement-levels-list.achv-pies-grid { gap: 8px; }
  .achv-pies-grid .achv-group-head { padding: 10px; }
  .achv-pies-grid .achv-g-label { font-size: 17px; }
  .achv-pies-grid .achv-g-avg { font-size: 11px; gap: 4px; }
  .achv-pies-grid .achv-g-pies { grid-template-columns: minmax(0, 128px); }
  .achv-pies-grid .achv-sub .achv-g-pies { grid-template-columns: minmax(0, 84px); }
  .achv-pies-grid .achv-sub .achv-group-head { padding: 8px; }
  .achv-pies-grid .achv-sub .achv-avg-label { font-size: 9px; }
  .achv-pies-grid .achv-sub .achv-g-avg { font-size: 10px; min-width: 0; }
}

.record-art { position: relative; flex: 0 0 auto; width: 76px; height: 76px; margin: 0 16px 0 6px; align-self: center; }
.record-art .record-jacket { width: 100%; height: 100%; margin: 0; display: block; border-radius: 12px; background: #e9e7f3; box-shadow: 0 3px 10px rgba(30,20,60,.22); outline: 2px solid var(--dc); outline-offset: -2px; }
.record-art .hb-const { position: absolute; left: -6px; bottom: -6px; width: auto; height: auto; min-height: 0; margin: 0; padding: 2px 8px; border-radius: 8px; font-size: 12px; font-weight: 800; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); line-height: 1.4; text-shadow: none; }
.record-art .hb-const.advanced-constant-box { color: #4a3b00; }
.record-art .hb-const.remaster-constant-box { color: #4a2a86; }
@media (max-width: 600px) {
  .record-art { width: 58px; height: 58px; margin: 0 12px 0 4px; }
  .record-art .record-jacket { border-radius: 10px; }
}
.record-art .new-label { position: absolute; left: -6px; top: -6px; margin: 0; padding: 0; font-size: 14px; font-weight: bold; line-height: 1.2; color: #ff4d4d; background: none; border-radius: 0; box-shadow: none; text-shadow: -1px -1px 0 rgba(0,0,0,.28), 1px -1px 0 rgba(0,0,0,.28), -1px 1px 0 rgba(0,0,0,.28), 1px 1px 0 rgba(0,0,0,.28); z-index: 1; }
.record-block .version-label { margin-left: -1px; }
@media (max-width: 600px) { .record-art .new-label { font-size: 12px; left: -6px; top: -6px; } }

.rating-section-title .title-text { line-height: 11px; }

.rating-canvas-card { position: relative; }

.note-video-btn {
  padding: 6px 12px; margin: 0 8px 0 0; width: auto; background: transparent;
  border: 1.5px solid #ff3b3b; border-radius: 8px; color: #ff3b3b; cursor: pointer;
  font-size: 0.8rem; font-weight: 800; white-space: nowrap; flex-shrink: 0;
}
.note-video-btn:hover { background: rgba(255,59,59,0.14); }
.hb-art .new-label { position: absolute; left: -6px; top: -6px; margin: 0; padding: 0; font-size: 14px; font-weight: bold; line-height: 1.2; color: #ff4d4d; background: none; border-radius: 0; box-shadow: none; text-shadow: -1px -1px 0 rgba(0,0,0,.28), 1px -1px 0 rgba(0,0,0,.28), -1px 1px 0 rgba(0,0,0,.28), 1px 1px 0 rgba(0,0,0,.28); z-index: 1; }
@media (max-width: 600px) { .hb-art .new-label { font-size: 12px; left: -6px; top: -6px; } }
.note-video-wrap { display: inline-flex; align-items: center; gap: 6px; margin: 0 8px 0 0; flex-shrink: 0; }
.note-video-wrap .note-video-btn { margin: 0; }
/* 모바일 곡 팝업 머리: 제목·× 는 윗줄, 영상/링크 버튼은 아랫줄로 내려서 제목이 세로로 꺾이지 않게 한다 */
@media (max-width: 600px) {
  .note-modal-header { flex-wrap: wrap; }
  .note-modal-header > .note-modal-title { flex: 1 1 0; min-width: 0; }
  .note-modal-header > .note-video-wrap { order: 3; flex: 1 1 100%; flex-wrap: wrap; margin: 10px 0 0; }
  .note-modal-header > .note-modal-close { order: 2; flex: 0 0 32px; }
}
.note-video-btn.edit { border-color: rgba(255,59,59,.55); color: rgba(255,59,59,.85); font-weight: 700; }
.note-modal-footer { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.note-modal-footer .note-custom-btn { padding: 9px 16px; margin: 0; font-size: 0.82rem; font-weight: 700; border-radius: 10px; }

.tab-link.tab-link-hidden { display: none !important; }
.toggle-container #friendTabBtn {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer;
    background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.22); width: auto; margin: 0;
}
.toggle-container #friendTabBtn:hover { background: rgba(255,255,255,.2); }
.toggle-container #friendTabBtn.on { background: rgba(157,99,240,.5); border-color: rgba(157,99,240,.8); }
.srating-inline-total { color: #e08a00; font-weight: 900; margin-left: 8px; font-variant-numeric: tabular-nums; }
.rank-page-menu { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.rank-page-menu button { width: auto; margin: 0; padding: 7px 16px; border-radius: 999px; border: 1.5px solid #d6d8e6; background: #fff; color: #5b6073; font-weight: 700; font-size: 13px; cursor: pointer; }
.rank-page-menu button.active { background: linear-gradient(135deg, #ff77b2, #9d63f0); border-color: transparent; color: #fff; }
.rank-panel { background: #1a1a2e; border-radius: 14px; padding: 12px 14px 16px; min-height: 120px; }
.rank-panel .rank-ctl { margin: 0 -14px; border-radius: 14px 14px 0 0; }
@media (max-width: 900px) {
    .tab-menu { flex-wrap: wrap; overflow-x: visible; justify-content: center; gap: 6px; padding-bottom: 0; }
    .tab-link { flex-shrink: 1; }
}
@media (max-width: 600px) {
    .tab-menu { gap: 5px; }
    .tab-link { font-size: 0.74rem; padding: 6px 9px; }
}
html[data-theme="dark"] .rank-page-menu button { background: #222332; border-color: #3a3d58; color: #c9cbe0; }
html[data-theme="dark"] .rank-page-menu button.active { background: linear-gradient(135deg, #ff77b2, #9d63f0); border-color: transparent; color: #fff; }
.section-title .title-text { white-space: nowrap; }
.section-title .title-text .srating-inline-total { display: inline; line-height: inherit; }
.section-title .title-text:has(.srating-inline-total) { width: auto; min-width: 100px; padding: 5px 16px; box-sizing: content-box; }
.cf-host { display: contents; }
.cf-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 8px 0; }
.cf-lab { font-size: 12px; font-weight: 800; color: #667; }
.cf-fld { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #667; }
.cf-fld select { width: auto; margin: 0; padding: 5px 8px; border-radius: 8px; border: 1px solid #d5d8e0; font-size: 13px; }
.cf-reset { width: auto; margin: 0; padding: 5px 10px; border-radius: 8px; border: 1px solid #d5d8e0; background: transparent; color: #667; font-size: 12px; font-weight: 700; cursor: pointer; }
.cf-reset[hidden] { display: none; }
.achv-toolbar > .cf-host .cf-row { margin: 0; }
html[data-theme="dark"] .cf-lab, html[data-theme="dark"] .cf-fld { color: #b9bbd0; }
html[data-theme="dark"] .cf-fld select, html[data-theme="dark"] .cf-reset { background: #222332; border-color: #3a3d58; color: #e8e9ef; }
.cpk { margin: 8px 0; }
.cpk-toggle { width: auto; margin: 0; padding: 8px 14px; border-radius: 10px; border: 1.5px solid #9d63f0; background: transparent; color: #9d63f0; font-weight: 800; font-size: 13px; cursor: pointer; }
.cpk-toggle:hover, .cpk-toggle.is-on { background: #9d63f0; color: #fff; }
.cpk-panel { margin-top: 8px; border: 1px solid #d5d8e0; border-radius: 12px; padding: 10px; background: rgba(127,127,160,.06); }
.cpk-panel[hidden] { display: none; }
.cpk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.cpk-fld { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #667; }
.cpk-fld select, .cpk-custom input { width: auto; margin: 0; padding: 5px 8px; border-radius: 8px; border: 1px solid #d5d8e0; font-size: 13px; }
.cpk-custom { display: inline-flex; align-items: center; gap: 4px; }
.cpk-custom[hidden] { display: none; }
.cpk-custom input { width: 64px; }
.cpk-body { max-height: 380px; overflow-y: auto; overscroll-behavior: contain; }
.cpk-grp { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.cpk-const { flex: none; width: 38px; padding-top: 4px; font-weight: 900; font-size: 13px; color: #9d63f0; text-align: right; }
.cpk .achv-tile { position: relative; }
.cpk .achv-tile.is-picked { outline: 3px solid #ff2a6d; outline-offset: -3px; }
.cpk .achv-tile.is-picked::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,42,109,.35); color: #fff; font-weight: 900; font-size: 20px; }
html[data-theme="dark"] .cpk-panel { border-color: #3a3d58; }
html[data-theme="dark"] .cpk-fld { color: #b9bbd0; }
html[data-theme="dark"] .cpk-fld select, html[data-theme="dark"] .cpk-custom input { background: #222332; border-color: #3a3d58; color: #e8e9ef; }
.cpk-toggle, .cf-reset { width: auto; margin: 0; padding: 6px 14px; border-radius: 8px; border: 1.5px solid #9d63f0; background: transparent; color: #9d63f0; font-weight: 800; font-size: 12.5px; line-height: 1.3; cursor: pointer; box-shadow: none; transform: none; }
.cpk-toggle:hover, .cpk-toggle.is-on, .cf-reset:hover { background: rgba(157,99,240,.10); color: #9d63f0; box-shadow: none; transform: none; }
html[data-theme="dark"] .cf-reset { background: transparent; border-color: #9d63f0; color: #b98bff; }
html[data-theme="dark"] .cpk-toggle { color: #b98bff; }
html[data-theme="dark"] .cpk-toggle:hover, html[data-theme="dark"] .cpk-toggle.is-on, html[data-theme="dark"] .cf-reset:hover { background: rgba(157,99,240,.18); }
.song-search-results:empty { display: none; }
.cpk { margin: 4px 0 8px; }
.cpk > .cpk-toggle, .cf-row > .cf-reset { width: auto; margin: 0; padding: 6px 14px; border-radius: 8px; border: 1.5px solid #9d63f0; background: transparent; color: #9d63f0; font-weight: 800; font-size: 12.5px; line-height: 1.3; min-height: 0; box-shadow: none; transform: none; }
.cpk > .cpk-toggle:hover, .cpk > .cpk-toggle.is-on, .cf-row > .cf-reset:hover { background: rgba(157,99,240,.10); color: #9d63f0; box-shadow: none; }
html[data-theme="dark"] .cpk > .cpk-toggle, html[data-theme="dark"] .cf-row > .cf-reset { background: transparent; color: #b98bff; border-color: #9d63f0; }
html[data-theme="dark"] .cpk > .cpk-toggle:hover, html[data-theme="dark"] .cpk > .cpk-toggle.is-on, html[data-theme="dark"] .cf-row > .cf-reset:hover { background: rgba(157,99,240,.18); }
.pn-ov { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8,9,20,.72); }
.pn-box { width: min(520px, 100%); max-height: min(86dvh, 720px); display: flex; flex-direction: column; border-radius: 16px; background: #1a1a2e; color: #fff; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 20px 60px rgba(0,0,0,.5); overflow: hidden; }
.pn-head { padding: 16px 18px 10px; font-size: 17px; font-weight: 900; }
.pn-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 18px 8px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pn-note { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.1); }
.pn-top { display: flex; align-items: baseline; gap: 10px; }
.pn-title { flex: 1; min-width: 0; font-weight: 800; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.pn-date { flex: none; font-size: 12px; color: #9a9cb5; font-variant-numeric: tabular-nums; }
.pn-body { margin-top: 8px; font-size: 13.5px; line-height: 1.75; color: #c9cee8; white-space: pre-wrap; overflow-wrap: anywhere; }
.pn-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.pn-imgs img { width: 100%; height: auto; border-radius: 10px; display: block; }
.pn-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid rgba(255,255,255,.1); }
.pn-more { font-size: 12.5px; color: #b98bff; text-decoration: underline; }
.pn-ok { width: auto; margin: 0; padding: 10px 22px; border: none; border-radius: 12px; background: linear-gradient(135deg, #ff77b2, #9d63f0); color: #fff; font-weight: 900; font-size: 14px; cursor: pointer; }
.hw-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 12px; flex-wrap: wrap; }
.hw-head .dan-create-btn { width: auto; margin: 0; padding: 9px 14px; border: none; border-radius: 10px; background: #9d63f0; color: #fff; font-weight: 800; font-size: 13px; }
.lr-rail { position: fixed; top: 84px; left: calc(50% + 555px + 28px); z-index: 40; width: min(300px, calc(50vw - 555px - 56px)); max-height: calc(100dvh - 104px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.lr-rail[hidden] { display: none; }
.lr-rail > h3 { margin: 0 0 10px; font-size: 14px; font-weight: 900; letter-spacing: .5px; color: #6b6f8d; }
.lr-list { display: flex; flex-direction: column; gap: 12px; }
.lr-item { display: block; width: 100%; min-width: 0; background: #fff; border: 1px solid #e2e3ee; border-radius: 12px; overflow: hidden; color: #2b2d42; }
.lr-item:hover { border-color: rgba(229,72,77,.7); }
.lr-item.is-v { width: min(100%, 210px); align-self: flex-start; }
.lr-th { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; cursor: pointer; overflow: hidden; }
.lr-item.is-v .lr-th { aspect-ratio: 9 / 16; }
.lr-th img, .lr-th iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; display: block; }
.lr-tag { position: absolute; left: 8px; top: 8px; z-index: 1; padding: 2px 7px; border-radius: 4px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 900; pointer-events: none; }
.lr-view { position: absolute; left: 8px; bottom: 8px; z-index: 1; padding: 2px 7px; border-radius: 4px; background: rgba(0,0,0,.72); color: #fff; font-size: 11.5px; font-weight: 800; pointer-events: none; }
.lr-body { display: flex; gap: 10px; align-items: center; padding: 10px; color: inherit; text-decoration: none; min-width: 0; }
.lr-av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: #d9daea; }
.lr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lr-title { font-weight: 800; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lr-sub { font-size: 12px; color: #7b7f9c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-empty { padding: 16px; background: #fff; border: 1px solid #e2e3ee; border-radius: 12px; color: #7b7f9c; font-size: 13.5px; text-align: center; }
html[data-theme="dark"] .lr-rail > h3 { color: #98a0c0; }
html[data-theme="dark"] .lr-item, html[data-theme="dark"] .lr-empty { background: #171a2b; border-color: rgba(255,255,255,.09); color: #eef0fa; }
html[data-theme="dark"] .lr-sub, html[data-theme="dark"] .lr-empty { color: #98a0c0; }
html[data-theme="dark"] .lr-av { background: #2a2d45; }

.hw-head-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hw-head-btns .btn-compact { margin: 0; }
.lr-fab { position: fixed; left: 12px; bottom: 16px; z-index: 9000; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(23,26,43,.94); border: 1px solid rgba(255,255,255,.16); box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.lr-fab[hidden], .lr-sheet[hidden], .lr-back[hidden] { display: none; }
.lr-fab button { margin: 0; width: auto; border: none; background: transparent; color: #fff; font-weight: 900; cursor: pointer; }
.lr-fab-open { display: flex; align-items: center; gap: 7px; padding: 7px 10px 7px 12px; font-size: 13px; }
.lr-fab-x { width: 28px; height: 28px; padding: 0; border-radius: 50%; font-size: 12px; color: #aab; }
.lr-dot { width: 9px; height: 9px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 0 rgba(229,72,77,.7); animation: lrPulse 1.6s infinite; }
@keyframes lrPulse { 70% { box-shadow: 0 0 0 7px rgba(229,72,77,0); } 100% { box-shadow: 0 0 0 0 rgba(229,72,77,0); } }
.lr-back { position: fixed; inset: 0; z-index: 10030; background: rgba(8,9,20,.6); }
.lr-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10031; max-height: 78dvh; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px calc(18px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: #fff; color: #2b2d42; box-shadow: 0 -10px 40px rgba(0,0,0,.4); }
.lr-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lr-sheet-head h3 { margin: 0; font-size: 15px; font-weight: 900; }
.lr-sheet-x { margin: 0; width: 34px; height: 34px; padding: 0; border-radius: 10px; background: transparent; border: 1.5px solid #9d63f0; color: #9d63f0; font-size: 14px; font-weight: 800; cursor: pointer; }
.lr-sheet .lr-item.is-v { width: min(100%, 210px); }
html[data-theme="dark"] .lr-sheet { background: #171a2b; color: #eef0fa; }
@media (min-width: 560px) { .lr-sheet { left: 50%; right: auto; width: 440px; transform: translateX(-50%); } }
.hw-head-btns > .secondary-btn { background: transparent; border: 1.5px solid #9d63f0; color: #9d63f0; font-weight: 800; }
.te-priv { display: inline-flex; align-items: center; gap: 5px; width: auto; margin: 2px 0 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
.te-priv input { margin: 0; width: auto; }
.te-level-edit .te-priv { margin: 0; white-space: nowrap; flex: 0 0 auto; }
.tier-levels .achv-fchip .ic, .achv-source-switch button .ic { margin-right: 2px; }
.nodata-notice { max-width: 460px; text-align: center; }
.nodata-notice .nd-title { font-size: 17px; font-weight: 800; }
.nodata-notice .nd-steps { text-align: left; margin: 16px auto 4px; padding-left: 22px; max-width: 380px; font-size: 13.5px; font-weight: 500; color: #d7d8ea; line-height: 1.7; }
.nodata-notice .nd-steps li { margin: 4px 0; }
.nodata-notice .nd-btns { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.nodata-notice .nd-btns button { width: auto; padding: 9px 18px; }

.mai-trophy {
    box-sizing: content-box; width: 268px; max-width: calc(100% - 6px); height: 25px; padding: 3px; margin: 2px 0 0;
    white-space: nowrap; overflow: hidden; background-repeat: no-repeat; background-size: 100% 100%;
}
.mai-trophy-normal { background-image: url(/img/net/trophy_normal.png); }
.mai-trophy-bronze { background-image: url(/img/net/trophy_bronze.png); }
.mai-trophy-silver { background-image: url(/img/net/trophy_silver.png); }
.mai-trophy-gold { background-image: url(/img/net/trophy_gold.png); }
.mai-trophy-rainbow { background-image: url(/img/net/trophy_rainbow.png); }
.mai-trophy-inner {
    height: 24px; line-height: 24px; margin: 0 2px; overflow: hidden; white-space: nowrap;
    display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; color: #fff;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, 0 1px 0 #000, 0 -1px 0 #000, -1px 0 0 #000, 1px 0 0 #000;
}
.mai-ranks { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 3px 0; }
.mai-ranks:empty { display: none; }
.mai-rank-img { height: 35px; width: auto; display: block; }
.mai-stars { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; font-weight: 700; color: #fff; }
.mai-stars img { height: 26px; width: auto; }

.mai-collection { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
.mai-coll-card {
    flex: 1 1 280px; max-width: 420px; box-sizing: border-box; padding: 12px 14px; border-radius: 14px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: #fff;
}
.mai-coll-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .5px; color: rgba(255,255,255,.7); margin-bottom: 8px; }
.mai-coll-head em { font-style: normal; font-weight: 600; color: rgba(255,255,255,.55); }
.mai-coll-img { display: block; width: 100%; height: auto; border-radius: 8px; margin-bottom: 8px; }
.mai-coll-name { font-size: 14px; font-weight: 800; word-break: break-word; }
.mai-coll-desc { font-size: 12px; color: rgba(255,255,255,.65); margin-top: 2px; word-break: break-word; }

.achv-sum-diffs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.achv-sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; align-items: start; }
.achv-sum-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.achv-sum-row {
    display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; min-height: 40px;
    border-radius: 10px; background: #eef4ff; border: 1px solid #d9e4fa; box-sizing: border-box;
}
.achv-sum-icon { flex: 0 0 52px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #456; }
.achv-sum-icon img { max-height: 30px; max-width: 52px; width: auto; height: auto; }
.achv-sum-val { flex: 1; min-width: 0; text-align: right; font-variant-numeric: tabular-nums; line-height: 1.2; }
.achv-sum-val b { display: block; font-size: 14px; font-weight: 800; color: #1a1a2e; white-space: nowrap; }
.achv-sum-val span { display: block; font-size: 11px; font-weight: 700; color: #6b7a99; }
.achv-sum-note { font-size: 11px; color: #8a90a6; margin: 10px 0 0; }
@media (max-width: 520px) {
    .achv-sum-grid { gap: 6px; }
    .achv-sum-col { gap: 6px; }
    .achv-sum-row { padding: 5px 8px 5px 4px; gap: 6px; }
    .achv-sum-icon { flex-basis: 42px; }
    .achv-sum-icon img { max-width: 42px; }
    .achv-sum-val b { font-size: 12.5px; }
}

.mc-wrap { display: flex; flex-direction: column; gap: 14px; }
.mc-preview { max-width: 640px; width: 100%; position: relative; }
.mc-banner-prev { max-width: 100%; min-height: 120px; border-radius: 16px; background-color: #1a1a2e; background-image: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: #fff; padding: 20px; box-sizing: border-box; text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.mc-prev-in { display: flex; align-items: center; gap: 14px; }
.mc-prev-in img { width: 72px; height: 72px; border-radius: 12px; border: 2px solid rgba(255,255,255,.55); object-fit: cover; flex: none; }
.mc-prev-in div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mc-prev-in b { font-size: 1.2rem; font-weight: 800; }
.mc-prev-in span { font-size: 13px; opacity: .9; }
.mc-prev-in i { font-style: normal; font-size: 13px; padding: 7px 14px; border-radius: 10px; background: linear-gradient(135deg, #ff77b2, #ff5c9d); box-shadow: 0 2px 6px rgba(0,0,0,.25); text-shadow: none; }
.mc-rngs { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; }
.mc-rng { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; margin: 0; }
.mc-rng input[type=range] { width: 150px; max-width: 40vw; }
.mc-rng output { min-width: 26px; text-align: right; font-variant-numeric: tabular-nums; opacity: .8; }
/* 프레임을 배너 배경으로 쓸 때: 글씨가 그림 위에서도 읽히게 */
.profile-section.ps-bg { background-color: #1a1a2e; text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.profile-section.ps-bg .profile-pic { border-color: rgba(255,255,255,.6); }
.profile-section.ps-bg > .profile-radar { background: rgba(8,10,30,.32); border-radius: 14px; }
.mc-card { border: 1px solid rgba(128,128,160,.3); border-radius: 12px; padding: 12px 14px; }
.mc-card h4 { margin: 0 0 8px; font-size: 14px; }
.mc-toggles { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.mc-toggles label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.mc-pick { display: flex; gap: 8px; flex-wrap: wrap; max-height: 360px; overflow-y: auto; padding: 2px; }
.mc-item { width: 190px; max-width: calc(50% - 4px); border: 2px solid transparent; border-radius: 8px; padding: 3px; cursor: pointer; background: rgba(128,128,160,.1); box-sizing: border-box; }
.mc-item img { width: 100%; height: auto; display: block; border-radius: 5px; }
.mc-item.sel { border-color: #3b82f6; }
.mc-item .mc-n { font-size: 11px; margin-top: 2px; word-break: break-word; }
.mc-sel { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.mc-sel b { font-size: 14px; }
.mc-sel label { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.mc-sel button, .mc-presets button, .mc-add button { width: auto; padding: 6px 12px; font-size: 13px; }
.mc-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.mc-presets { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mc-presets .mc-pre { opacity: .75; }
.mc-presets .mc-pre.on { opacity: 1; outline: 2px solid #3b82f6; }
.mc-presets input { width: 160px; max-width: 100%; padding: 6px 8px; font-size: 13px; }
.mc-sel input[type=range] { width: 200px; max-width: 100%; }
.mc-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mc-msg { font-size: 13px; min-height: 18px; }
.mc-kinds { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; opacity: .8; }
.mc-kinds span { padding: 2px 8px; border-radius: 10px; background: rgba(128,128,160,.15); }
.mc-tchip { box-sizing: border-box; width: 100%; height: 30px; padding: 3px 6px; background-size: 100% 100%; background-repeat: no-repeat; display: flex; align-items: center; justify-content: center; }
.mc-tchip span { font-size: 12px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000; }
.mc-pick-t .mc-item { width: 270px; max-width: 100%; }
.mc-pick-t .mc-rand { border-color: rgba(236,72,153,.45); }
.mc-pick-t .mc-rand.sel { border-color: #3b82f6; }
.mc-item.off { opacity: .5; cursor: default; }
.mc-rand .mc-n { text-align: center; }
.mc-rand .mc-n b { margin-right: 3px; }

.mc-btns button { width: auto; padding: 8px 16px; }
.mc-pick-i .mc-item { width: 92px; max-width: calc(33% - 6px); }

/* 탭 메뉴: 영어/일본어에서도 글자가 줄바꿈되며 뚱뚱해지지 않게 */
.tab-menu { flex-wrap: wrap; row-gap: 6px; }
.tab-menu .tab-link { white-space: nowrap; flex-shrink: 0; }
html[lang="en"] .tab-menu, html[lang="ja"] .tab-menu { gap: 3px; }
html[lang="en"] .tab-menu .tab-link { padding: 8px 11px; font-size: 13px; }
html[lang="ja"] .tab-menu .tab-link { padding: 8px 12px; font-size: 13px; }
@media (max-width: 600px) {
    html[lang="en"] .tab-menu .tab-link, html[lang="ja"] .tab-menu .tab-link { padding: 6px 9px; font-size: 0.74rem; }
}

/* ───── 단위인정 UI 다듬기 (모달 · 버튼 · 랭킹) ───── */
.dan-modal { width: 600px; }
.dan-modal .note-modal-header { padding: 16px 20px; background: linear-gradient(135deg, rgba(157,99,240,.22), rgba(255,95,168,.10)); }
.dan-modal .note-modal-title { font-size: 1.08rem; letter-spacing: .01em; }
.dan-detail, .dan-form { padding: 16px 20px 22px; }
.dan-detail .dan-card-top { gap: 8px; }
.dan-detail .dan-cond { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.07); }
.dan-desc { margin: 12px 0 4px; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.05); border-left: 3px solid #9d63f0; line-height: 1.55; }
.dan-detail .dan-songs { gap: 8px; margin-top: 14px; }
.dan-detail .dan-song { padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); gap: 12px; }
.dan-detail .dan-song-jk { width: 46px; height: 46px; border-radius: 9px; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.dan-detail .dan-song-name { font-size: 14px; }
.dan-detail .dan-meta { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.04); gap: 6px 16px; }

/* 버튼 공통 */
.dan-actions { flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 6px; }
.dan-like-btn, .dan-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0;
  padding: 10px 18px; min-height: 40px; border-radius: 999px; font-size: 13.5px; font-weight: 800; line-height: 1;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: #e9e9f4;
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
}
.dan-like-btn:hover, .dan-btn:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.32); transform: translateY(-1px); }
.dan-like-btn:active, .dan-btn:active, .dan-ch-btn:active { transform: translateY(0) scale(.98); }
.dan-like-btn.is-on { background: linear-gradient(135deg, #ff5f7e, #e5484d); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(229,72,77,.35); }
.dan-btn-del { background: rgba(229,72,77,.12); border-color: rgba(229,72,77,.55); color: #ff9aa0; }
.dan-btn-del:hover { background: rgba(229,72,77,.24); border-color: #e5484d; }
.dan-btn-req { background: linear-gradient(135deg, #f0a41e, #ff7a45); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(240,140,30,.32); }
.dan-btn-req:hover { background: linear-gradient(135deg, #f7b13a, #ff8a5a); }
.dan-req-state { font-size: 12.5px; font-weight: 800; padding: 8px 12px; border-radius: 999px; background: rgba(240,164,30,.14); color: #ffc46b; }
.dan-like-static { padding: 8px 10px; border-radius: 999px; background: rgba(255,255,255,.05); }
/* 도전 버튼: 기본은 강조, 도전중이면 차분하게 */
.dan-ch-btn { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; font-weight: 800; transition: background .15s, transform .12s, box-shadow .15s; }
.dan-ch-big { padding: 11px 24px; min-height: 42px; font-size: 14.5px; border: none; color: #fff; background: linear-gradient(135deg, #9d63f0, #ff5fa8); box-shadow: 0 6px 18px rgba(157,99,240,.42); }
.dan-ch-big:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(157,99,240,.55); }
.dan-ch-big.is-on { background: rgba(157,99,240,.18); color: #d9c2ff; border: 1.5px solid #9d63f0; box-shadow: none; }
.dan-ch-big.is-on::before { content: '✓'; font-weight: 900; }
.dan-card .dan-ch-btn { padding: 5px 14px; font-size: 12.5px; }
.dan-card .dan-ch-btn.is-on { background: #9d63f0; color: #fff; }

/* 난이도 투표 */
.dan-vote { padding: 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.dan-vote .dan-rank-title { margin-top: 0; }
.dan-vote-row { gap: 7px; }
.dan-vote-btn { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); transition: background .15s, transform .12s, border-color .15s; }
.dan-vote-btn:hover { transform: translateY(-2px); border-color: #b48bff; background: rgba(157,99,240,.2); }
.dan-vote-btn.is-on { background: linear-gradient(135deg, #9d63f0, #ff5fa8); border-color: transparent; box-shadow: 0 4px 12px rgba(157,99,240,.45); }

/* 관리자 영역 */
.dan-admin-rate input { border-radius: 10px; }
.dan-admin-rate .dan-btn { padding: 10px 18px; }

/* 랭킹: 줄 전체가 펼치기 영역, 이름 글자만 프로필 링크 */
.dan-rank-title { font-size: 13.5px; margin: 16px 0 8px; display: flex; align-items: center; gap: 8px; }
.dan-rank-title::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, #9d63f0, #ff5fa8); }
.dan-rank-item { margin-bottom: 7px; }
.dan-rank-row { gap: 12px; padding: 0 14px; min-height: 56px; border-radius: 12px; border: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.055); }
.dan-rank-item .dan-rank-row { cursor: pointer; transition: background .15s, border-color .15s; user-select: none; }
.dan-rank-item .dan-rank-row:hover { background: rgba(157,99,240,.16); border-color: rgba(157,99,240,.45); }
.dan-rank-row.is-open { background: rgba(157,99,240,.2); border-color: rgba(157,99,240,.55); }
.dan-rank-row.is-me { outline: none; border-color: #9d63f0; box-shadow: inset 3px 0 0 #9d63f0; }
.dan-rank-no { width: 28px; height: 28px; line-height: 28px; flex: none; border-radius: 50%; background: rgba(255,255,255,.08); font-size: 13px; }
.dan-rank-item:nth-child(1) .dan-rank-no:not(.dan-rank-fail) { background: rgba(255,211,77,.2); }
.dan-rank-item:nth-child(2) .dan-rank-no:not(.dan-rank-fail) { background: rgba(212,216,228,.18); color: #dfe3ee; }
.dan-rank-item:nth-child(3) .dan-rank-no:not(.dan-rank-fail) { background: rgba(224,151,90,.2); color: #eaa56c; }
.dan-rank-no.dan-rank-fail { height: auto; line-height: 1.4; }
.dan-rank-name { flex: 0 1 auto; max-width: 50%; padding: 6px 4px; margin: -6px -4px; color: #fff; text-decoration: none; border-radius: 6px; cursor: pointer; }
.dan-rank-name:hover { color: #c9a6ff; text-decoration: underline; text-underline-offset: 3px; }
.dan-rank-sp { flex: 1 1 0; align-self: stretch; min-width: 8px; }
.dan-rank-chev { flex: none; width: 9px; height: 9px; margin: 0 2px 0 4px; border-right: 2px solid #9a9cb5; border-bottom: 2px solid #9a9cb5; transform: rotate(45deg) translateY(-2px); transition: transform .2s, border-color .15s; }
.dan-rank-row.is-open .dan-rank-chev { transform: rotate(-135deg) translateY(-2px); border-color: #c9a6ff; }
.dan-rank-row:hover .dan-rank-chev { border-color: #c9a6ff; }
.dan-rank-val { font-size: 14.5px; font-weight: 800; }
.dan-rank-songs { margin-top: -1px; padding: 10px 14px; border-radius: 0 0 12px 12px; background: rgba(157,99,240,.09); border: 1px solid rgba(157,99,240,.35); border-top: 0; }
.dan-rs { padding: 5px 0; font-size: 13.5px; }
.dan-att-row { cursor: pointer; }

/* 코스 목록 */
.dan-card { border-radius: 14px; transition: transform .15s, box-shadow .15s; }
.dan-card:hover { transform: translateY(-2px); }
.dan-views button, .dan-sort button { border-radius: 999px; transition: background .15s, transform .12s; }
.dan-views button:hover:not(.is-on), .dan-sort button:hover:not(.is-on) { background: rgba(157,99,240,.1); }
.dan-create-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px; background: linear-gradient(135deg, #9d63f0, #ff5fa8); box-shadow: 0 4px 14px rgba(157,99,240,.35); transition: transform .12s, box-shadow .15s; }
.dan-create-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(157,99,240,.5); }

/* 코스 만들기/수정 폼 */
.dan-form input[type=text], .dan-form input[type=number] { height: 42px; border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.dan-form input[type=text]:focus, .dan-form input[type=number]:focus { outline: none; border-color: #9d63f0; box-shadow: 0 0 0 3px rgba(157,99,240,.25); }
.dan-mode-pick { gap: 8px; }
.dan-mode-pick button { padding: 11px 6px; border-radius: 12px; font-weight: 800; transition: background .15s, border-color .15s, transform .12s; }
.dan-mode-pick button:hover:not(.is-on) { background: rgba(157,99,240,.15); border-color: #9d63f0; }
.dan-mode-pick button.is-on { background: linear-gradient(135deg, #9d63f0, #ff5fa8); border-color: transparent; box-shadow: 0 4px 14px rgba(157,99,240,.4); }
.dan-submit { padding: 14px; border-radius: 999px; background: linear-gradient(135deg, #9d63f0, #ff5fa8); box-shadow: 0 6px 18px rgba(157,99,240,.4); transition: transform .12s, box-shadow .15s; }
.dan-submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(157,99,240,.55); }
.dan-slot { padding: 10px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
@media (max-width: 600px) {
  .dan-detail, .dan-form { padding: 14px 14px 20px; }
  .dan-rank-row { padding: 0 11px; gap: 9px; min-height: 54px; }
  .dan-rank-name { max-width: 42%; }
  .dan-actions .dan-ch-big { flex: 1 1 100%; order: -1; margin-left: 0; }
}
.dan-tr-modal input[readonly] { opacity: .6; cursor: default; background: rgba(255,255,255,.04); }
.dan-tr-hint { margin: 2px 0 10px; }
.dan-btn-tr { border-color: rgba(157,99,240,.55); color: #d9c2ff; background: rgba(157,99,240,.12); }

/* 난이도표에서 고르기: 범용 타일 (서열표 · 예측 레이팅) */
.cpk-tile { position: relative; width: 66px; height: 66px; border-radius: 8px; overflow: hidden; cursor: pointer; background: rgba(127,127,150,.25); border: 2px solid var(--dc, #9d63f0); box-sizing: border-box; flex: none; }
.cpk-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cpk-tile .cpk-tl-d { position: absolute; left: 0; top: 0; padding: 1px 5px; font-size: 9.5px; font-weight: 900; color: #fff; background: var(--dc, #9d63f0); border-bottom-right-radius: 6px; line-height: 1.3; }
.cpk-tile .cpk-tl-t { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 3px 2px; font-size: 9px; font-weight: 700; color: #fff; line-height: 1.15; background: linear-gradient(transparent, rgba(0,0,0,.82)); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; }
.cpk-tile:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.cpk-tile.is-picked { outline: 3px solid #2fa360; outline-offset: -1px; }
.cpk-tile.is-picked::after { content: '✓'; position: absolute; right: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #2fa360; color: #fff; font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; }

/* 단계 끌어서 순서 바꾸기 */
.tier-grip { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 28px; flex: none; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; font-size: 15px; font-weight: 900; letter-spacing: -2px; opacity: .55; border-radius: 6px; }
.tier-grip:hover { opacity: 1; background: rgba(157,99,240,.2); }
.tier-grip:active { cursor: grabbing; }
.tier-dragging { opacity: .45; }
.tier-drop-before { box-shadow: 0 -3px 0 0 #9d63f0; }
.tier-drop-end { box-shadow: 0 3px 0 0 #9d63f0; }
.cpk-alt-lab { cursor: pointer; }
.cpk-alt-lab input { width: auto; margin: 0 2px 0 0; }

/* 기록 공개 범위 (공개 / 친구공개 / 비공개) */
.settings-row-col { flex-direction: column; align-items: stretch; gap: 8px; }
.settings-seg { display: flex; gap: 4px; background: #f1ecfa; border-radius: 10px; padding: 3px; }
.settings-seg button { flex: 1; margin: 0; padding: 8px 4px; border: 0; border-radius: 8px; background: transparent; color: #55557a; font-size: 13px; font-weight: 800; cursor: pointer; box-shadow: none; transform: none; }
.settings-seg button.is-on { background: #9d63f0; color: #fff; box-shadow: 0 1px 4px rgba(157,99,240,.35); }
.settings-seg button:disabled { opacity: .6; cursor: default; }
.settings-row-desc { margin: 0; font-size: 12px; color: #7a7a8c; line-height: 1.5; }
html[data-theme="dark"] .settings-seg { background: #2a2c40; }
html[data-theme="dark"] .settings-seg button { color: #b9bbd8; }
html[data-theme="dark"] .settings-seg button.is-on { background: #9d63f0; color: #fff; }

/* 츄니즘 점수 표기: 앞자리(100 등)는 회색으로 흐리게, 뒤 4자리를 또렷하게 */
.achv-tile .t-score .t-s0 { font-style: normal; color: #aeb3c2; }
.ut-tile .sc .sc0, .sc .sc0 { font-style: normal; color: #aeb3c2; }

/* 랭크 글씨 효과: SSS+·SSS 무지개 / SS+·SS 금색 / S+·S 은색 */
.rk-rainbow, .rk-gold, .rk-silver, .rk-prism { display: inline-block; -webkit-background-clip: text; background-clip: text; color: transparent !important; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 .6px rgba(0,0,0,.45)); }
.rk-prism { background-image: linear-gradient(100deg, #ff8fcf, #ffe38a 20%, #9af0a6 40%, #7fe3ff 58%, #9aa8ff 76%, #e7a0ff); }
.rk-rainbow { background-image: linear-gradient(90deg, #ff4d6d, #ffb020, #ffd21f, #35d46a, #2f9bff, #a95cf0); }
.rk-gold { background-image: linear-gradient(180deg, #ffe27a, #e2a900 55%, #9a6a00); }
.rk-silver { background-image: linear-gradient(180deg, #d9deea, #99a2b4 55%, #5f687b); }
/* 칩/배지 배경 버전 (히스토리·난이도표 평균 랭크 배지) */
.bd-prism { background: linear-gradient(100deg, #ff8fcf, #ffe38a 20%, #9af0a6 40%, #7fe3ff 58%, #9aa8ff 76%, #e7a0ff) !important; color: #3b2f66 !important; text-shadow: 0 1px 0 rgba(255,255,255,.5) !important; }
.bd-rainbow { background: linear-gradient(90deg, #ff4d6d, #ffb020, #ffd21f, #35d46a, #2f9bff, #a95cf0) !important; color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,.45) !important; }
.bd-gold { background: linear-gradient(180deg, #ffe27a, #e2a900 60%, #b98200) !important; color: #4a3200 !important; text-shadow: 0 1px 0 rgba(255,255,255,.35) !important; }
.bd-silver { background: linear-gradient(180deg, #eef1f7, #b4bccb 60%, #8d96a8) !important; color: #2d3340 !important; text-shadow: 0 1px 0 rgba(255,255,255,.45) !important; }

/* 츄니즘 점수 뒤 4자리: 랭크 효과 (타일 위에서 또렷하게) */
.t-score .rk-rainbow, .t-score .rk-gold, .t-score .rk-silver, .t-score .rk-prism,
.t-s .rk-rainbow, .t-s .rk-gold, .t-s .rk-silver, .t-s .rk-prism,
.sc .rk-rainbow, .sc .rk-gold, .sc .rk-silver, .sc .rk-prism { text-shadow: none; filter: drop-shadow(0 0 1px rgba(0,0,0,.9)) drop-shadow(0 1px 1px rgba(0,0,0,.6)); }

/* 마이마이 채보 레이더 */
.mrd { margin-top: 10px; }
.mrd-svg { display: block; width: 100%; max-width: 290px; margin: 2px auto 0; overflow: visible; }
.mrd-grid { fill: none; stroke: rgba(255,255,255,0.2); stroke-width: 0.6; }
.mrd-ring { stroke: rgba(255,255,255,0.5); stroke-width: 0.9; }
.mrd-shape { fill: rgba(255,126,179,0.28); stroke: #ff7eb3; stroke-width: 1.6; stroke-linejoin: round; }
.mrd-lab { font-size: 8.5px; font-weight: 700; fill: rgba(255,255,255,0.85); }
.mrd-val { font-size: 8.5px; font-weight: 800; fill: #ffc6dd; }
.mrd-val.over { fill: #ffd84a; }
.mrd-note { margin-top: 2px; text-align: center; font-size: 0.68rem; color: rgba(255,255,255,0.45); }
.mrd-adminrow { margin-top: 8px; text-align: right; }
.mrd-admin-ov { position: fixed; inset: 0; z-index: 100000; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; padding: 12px; }
.mrd-admin-box { width: min(560px, 100%); max-height: 92vh; overflow: auto; background: #1d1b2b; color: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
.mrd-admin-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.mrd-admin-head span { font-size: 0.78rem; opacity: 0.7; flex: 1; min-width: 0; }
.mrd-x { background: none; border: 0; color: inherit; cursor: pointer; }
.mrd-ta { width: 100%; box-sizing: border-box; height: 150px; resize: vertical; background: #12101c; color: #eee; border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; padding: 8px; font: 12px/1.4 monospace; }
.mrd-admin-btns { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.mrd-admin-meta { text-align: center; font-size: 0.8rem; margin: 4px 0; }
.mrd-admin-tb { width: 100%; font-size: 0.78rem; border-collapse: collapse; }
.mrd-admin-tb td { padding: 2px 6px; border-top: 1px solid rgba(255,255,255,0.1); }
.mrd-admin-ok { color: #7be08f; font-weight: 700; text-align: center; }


/* CHUNITHM ULTIMA: 검정 + #CF3842 빨간 사선 (난이도표·레이팅표·추천·선택 타일 공통) */
.rsim .rs-row[style*="--dc:#000000"], .rsim .rs-row.mod[style*="--dc:#000000"] { border-left-color: transparent; background: repeating-linear-gradient(135deg, #cf3842 0 4px, #0a0a0a 4px 8px) left top / 5px 100% no-repeat border-box, var(--rs-soft); }
.rsim .rs-row.mod[style*="--dc:#000000"] { background: repeating-linear-gradient(135deg, #cf3842 0 4px, #0a0a0a 4px 8px) left top / 5px 100% no-repeat border-box, rgba(157,99,240,.15); }
.rsim .rs-row[style*="--dc:#000000"] .rs-df, .prec .prec-it[style*="--dc:#000000"] .prec-lv, .ut .ut-df[style*="--dc:#000000"] { background: repeating-linear-gradient(135deg, #050505 0 5px, #cf3842 5px 7px); color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.prec .prec-it[style*="--dc:#000000"] { border-left-color: transparent; background: repeating-linear-gradient(135deg, #cf3842 0 4px, #0a0a0a 4px 8px) left top / 4px 100% no-repeat border-box, rgba(127,127,150,.10); }
.ut .ut-it[style*="--dc:#000000"] .jk { border-bottom-color: transparent; background-image: repeating-linear-gradient(135deg, #cf3842 0 4px, #0a0a0a 4px 8px); background-origin: border-box; background-clip: border-box; }
.cpk-tile[style*="--dc:#000000"] { border-color: transparent; background-image: repeating-linear-gradient(135deg, #cf3842 0 4px, #0a0a0a 4px 8px); background-origin: border-box; background-clip: border-box; }
.cpk-tile[style*="--dc:#000000"] .cpk-tl-d { background: repeating-linear-gradient(135deg, #050505 0 5px, #cf3842 5px 7px); text-shadow: 0 0 2px #000; }
.achv-tile[style*="--dc:#cf3842"]::before, .achv-tile[style*="--dc:#000000"]::before { background: repeating-linear-gradient(135deg, #cf3842 0 3px, #050505 3px 6px); clip-path: polygon(100% 0, 0 0, 100% 100%); }
.chuni-tile[style*="#cf3842"] .t-d { width: 17px; height: 17px; border: 0; filter: none; background: repeating-linear-gradient(135deg, #cf3842 0 3px, #050505 3px 6px); clip-path: polygon(0 0, 100% 0, 0 100%); }

.mai-trophy-inner > .mai-fit { display: block; flex: none; white-space: nowrap; line-height: 24px; }

/* SSS+ 파스텔 프리즘: 얇은 '+'도 또렷하게 보이도록 어두운 외곽을 한 겹 더 */
.rk-prism { font-weight: 900; filter: drop-shadow(0 0 .7px rgba(40,24,80,.85)) drop-shadow(0 0 1.2px rgba(40,24,80,.55)); }
.t-score .rk-prism, .t-s .rk-prism, .sc .rk-prism { filter: drop-shadow(0 0 1px rgba(0,0,0,.9)) drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.rsim .rs-gr .rk-prism { letter-spacing: .02em; }

/* 레이팅 탭: 동일 레이팅 정렬 선택 */
.rating-tie-sort { width: auto; padding: 5px 8px; border-radius: 8px; border: 1px solid rgba(157,99,240,.55); background: rgba(157,99,240,.12); color: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.rating-tie-sort option { color: #222; background: #fff; }

/* 단위인정 모바일: 스크롤 시 헤더 뒤로 내용이 비치던 문제(헤더 배경이 반투명) + 곡 검색 목록이 좁던 문제 */
.dan-modal .note-modal-header { background: linear-gradient(135deg, rgba(157,99,240,.22), rgba(255,95,168,.10)), #1a1a2e; background-clip: padding-box; box-shadow: 0 6px 14px -8px rgba(0,0,0,.6); }
.dan-slot-res { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.dan-slot-search { scroll-margin-top: 84px; }
@media (max-width: 600px) {
  .dan-modal { width: 100%; }
  .dan-modal .note-modal-header { padding: 12px 14px; }
  .dan-modal .note-modal-title { font-size: 1rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dan-modal .note-modal-close { flex: none; margin-left: 8px; }
  .dan-form label, .dan-form-lab { scroll-margin-top: 70px; }
  .dan-mode-pick { gap: 6px; }
  .dan-mode-pick button { padding: 10px 2px; font-size: 12.5px; line-height: 1.25; min-height: 44px; }
  .dan-slot { padding: 8px; gap: 6px; }
  .dan-slot-no { margin-top: 9px; }
  .dan-slot-search { font-size: 16px !important; }            /* iOS 확대 방지 */
  .dan-slot-res { max-height: min(52dvh, 360px); margin-top: 6px; border-radius: 10px; }
  .dan-slot-res .song-pick-block, .dan-slot-res .record-card { margin-bottom: 6px; }
  .dan-slot-res .record-jacket { width: 46px; height: 46px; }
  .dan-form input[type=number], .dan-form input[type=text] { font-size: 16px; }
  .dan-song-name { overflow-wrap: anywhere; }
}

/* 이미지 다운로드 버튼 통일 (maimai / SDVX / CHUNITHM 공유 탭 전부 같은 모양) */
.share-section button.share-dl-btn,
.share-section button.share-dl-btn:hover,
.share-section button.share-dl-btn:active { color: #fff; }
.share-section button.share-dl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: auto; min-height: 44px; padding: 10px 20px; margin-top: 6px;
  border: none; border-radius: 10px; background: #9d63f0; font-size: 14px; font-weight: 700; line-height: 1.2;
  box-shadow: 0 3px 10px rgba(157,99,240,.28); cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.share-section button.share-dl-btn:hover:not(:disabled) { background: #8d50e6; box-shadow: 0 4px 14px rgba(157,99,240,.4); }
.share-section button.share-dl-btn:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }
.share-section button.share-dl-btn .ic { width: 18px; height: 18px; flex: none; }
@media (max-width: 600px) { .share-section button.share-dl-btn { width: 100%; } }

/* 모바일 전체 점검 (360px 기준) */
@media (max-width: 600px) {
  .profile-left { min-width: 0; }
  .profile-info { min-width: 0; flex: 1 1 0; }
  .profile-info .mai-trophy { max-width: calc(100% - 6px); }
}

/* 플레이트 탭: 난이도 색 범례 */
.plate-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 2px 10px; font-size: 12px; font-weight: 700; color: #667; }
.plate-legend span { display: inline-flex; align-items: center; gap: 5px; }
.plate-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
html[data-theme="dark"] .plate-legend { color: #a9abc4; }

/* 모달이 화면보다 길 때(특히 모바일 설정창) 위아래가 잘려 닫기 버튼에 닿지 못하던 문제:
   모달 안에서 스크롤되게 하고, 닫기 버튼은 항상 보이게 고정, 바깥(어두운 영역)을 누를 여백을 남긴다 */
.modal-box { max-height: 90vh; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; }
.settings-box { position: relative; }
.settings-box .modal-x {
  position: sticky; top: 0; float: right; z-index: 3; width: 34px; height: 34px; margin: -10px -8px 0 8px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  background: rgba(127,127,150,.18); color: inherit; font-size: 20px; line-height: 1; border: none; cursor: pointer;
}
.settings-box .modal-x:hover { background: rgba(157,99,240,.28); }
html[data-theme="dark"] .settings-box .modal-x { color: #eaeaf0; background: rgba(255,255,255,.12); }
html:not([data-theme="dark"]) .settings-box .modal-x { color: #333; }
@media (max-width: 600px) {
  .modal-box { width: 92%; padding: 20px 16px; max-height: 88vh; max-height: 88dvh; }
  .settings-box { padding: 18px 16px 14px; }
  .settings-box h3 { margin-bottom: 12px; }
}

/* 단위인정 모바일: 띄어쓰기 없는 긴 제목/곡명이 카드를 옆으로 밀어내던 문제 (grid 1fr 은 최소 너비가 내용 기준이라 minmax(0,1fr) 필요) */
#customdan .dan-list, .dan-list { min-width: 0; }
@media (max-width: 800px) { #customdan .dan-list, .dan-list { grid-template-columns: minmax(0, 1fr); } }
.dan-card, .dan-bcard, .dan-detail, .dan-form { min-width: 0; max-width: 100%; box-sizing: border-box; }
.dan-card-top > *, .dan-bsong-info, .dan-song-info { min-width: 0; }
.dan-name, .dan-bsong-name, .dan-song-name, .dan-cond, .dan-desc, .dan-by b { overflow-wrap: anywhere; word-break: break-word; }
.dan-card-top { row-gap: 4px; }
.dan-cond, .dan-desc { white-space: normal; }
@media (max-width: 600px) {
  .dan-card, .dan-bcard { padding: 12px; }
  .dan-meta { gap: 6px 10px; }
  .dan-bsong { gap: 8px; }
  .dan-bsong-rec { max-width: 42%; }
  .dan-tools input { min-width: 0; flex: 1 1 100%; }
  .dan-tools { gap: 6px; }
}

/* 프로필 헤더: 360px 이하에서 칭호(268px) 때문에 헤더가 화면 밖으로 밀리던 문제 (wrap 컨테이너의 줄 폭이 내용 기준으로 잡힘) */
@media (max-width: 600px) {
  .profile-section { flex-wrap: nowrap; }
  .profile-section > *, .profile-left { max-width: 100%; min-width: 0; }
  .profile-pic { max-width: 42%; height: auto; aspect-ratio: 1 / 1; }
}

/* 아주 좁은 화면(320~360px): 달성 탭 스위치 / 상수 범위 입력이 옆으로 삐져나가던 곳 줄바꿈 */
@media (max-width: 380px) {
  .achv-switch { flex-wrap: wrap; max-width: 100%; }
  .achv-minconst { flex-wrap: wrap; row-gap: 6px; max-width: 100%; }
  .achv-minconst input, .achv-minconst select { min-width: 0; max-width: 100%; }
}

/* 닫기 버튼: 글자가 들어간 버튼(Close / 閉じる)은 32px 정사각형에 갇혀 글자가 꽉 차거나 잘렸음 → 글자 길이에 맞게 늘림 (아이콘만 있는 버튼은 그대로 정사각형) */
.note-modal-close[data-x], .note-modal-close:not(:has(.ic)) {
  width: auto; min-width: 32px; height: auto; min-height: 34px; padding: 6px 14px;
  white-space: nowrap; font-size: .85rem; font-weight: 700; line-height: 1.2;
}
.custom-input-close, .snap-close, .art-close-btn, .lr-sheet-x { white-space: nowrap; }
.custom-input-close { padding: 6px 14px; }

/* 단위인정 번역 편집창: 설명 칸 */
.dan-tr-ta { display: block; width: 100%; box-sizing: border-box; margin: 4px 0 0; padding: 8px 10px; border-radius: 10px; border: 1.5px solid #4a4c6a; background: #12122a; color: #fff; font-size: 14px; font-family: inherit; line-height: 1.4; resize: vertical; }
.dan-tr-ta[readonly] { opacity: .7; }

/* 플레이트 정렬 선택 */
.plate-legend .plate-sort { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.plate-legend .plate-sort select { width: auto; padding: 4px 8px; border-radius: 8px; border: 1px solid rgba(157,99,240,.5); background: rgba(157,99,240,.1); color: inherit; font-size: 12px; font-weight: 700; }
.plate-legend .plate-sort select option { color: #222; background: #fff; }

/* 플레이트/프레임 행: 달성 막대가 이름 칸(2열)부터 시작해서 왼쪽이 비어 보이던 것 → 막대를 행 전체 폭으로 */
.plate-row > summary .plate-badge { grid-row: 2; }
.plate-row > summary .plate-bar { grid-column: 1 / -1; grid-row: 3; }
.plate-legend .plate-sort { margin-left: 0; flex: 0 0 100%; order: -1; }

/* ===== 비공개 단위인정 (공유 코드) / 클리어 시각 ===== */
.dan-private { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: rgba(157,99,240,.16); color: #7a3fd0; border: 1px solid rgba(157,99,240,.45); white-space: nowrap; }
html[data-theme="dark"] .dan-private { color: #d2b4ff; background: rgba(157,99,240,.22); }
.dan-vis-hint { margin: 6px 2px 2px; font-size: 12px; opacity: .75; line-height: 1.5; }
.dan-share { margin: 10px 0 4px; padding: 10px 12px; border: 1.5px dashed rgba(157,99,240,.55); border-radius: 12px; background: rgba(157,99,240,.07); }
.dan-share-lab { font-size: 12px; font-weight: 800; margin-bottom: 6px; }
.dan-share-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dan-share-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; font-weight: 800; letter-spacing: 2px; padding: 5px 10px; border-radius: 8px; background: rgba(127,127,150,.16); user-select: all; word-break: break-all; }
.dan-share-row .dan-btn { width: auto; margin: 0; padding: 6px 10px; font-size: 12.5px; white-space: nowrap; }
.dan-share-hint { margin: 6px 0 0; font-size: 11.5px; opacity: .7; line-height: 1.5; }
.dan-code-row { display: flex; gap: 8px; margin: 0 0 10px; }
.dan-code-row input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 1.5px solid #d6d8e6; border-radius: 10px; font-size: 14px; background: #fff; color: #222; box-sizing: border-box; text-transform: uppercase; letter-spacing: 1px; }
.dan-code-row input::placeholder { text-transform: none; letter-spacing: 0; }
.dan-code-row button { width: auto; margin: 0; height: 38px; padding: 0 14px; border-radius: 10px; font-size: 13px; font-weight: 800; white-space: nowrap; }
html[data-theme="dark"] .dan-code-row input { background: #222332; border-color: #3d3f5c; color: #ddd; }
.dan-clear-time { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin: 6px 2px 4px; font-size: 12px; opacity: .85; }
.dan-clear-time b { font-weight: 800; font-variant-numeric: tabular-nums; }
.dan-rank-songs > .dan-clear-time { margin: 2px 4px 8px; }
@media (max-width: 420px) { .dan-share-code { font-size: 14px; letter-spacing: 1px; } }

/* 단위인정: 일본 전용곡이 든 코스 표시 (내수판에서만 보임) */
.dan-jponly { margin-left: 4px; }

/* 플레이트 탭: 난이도 색 범례/정렬 줄이 그리드 첫 칸을 차지해 왼쪽이 비던 것 → 한 줄 전체 폭으로 */
.plate-wrap > .plate-legend { grid-column: 1 / -1; }

/* 곡 상세: 채보영상(유튜브 검색) 버튼 + 마이마이 요약 오른쪽 칸 */
.ns-body { display: flex; align-items: flex-end; gap: 12px; }
.ns-left { flex: 1 1 auto; min-width: 0; }
.ns-side { flex: 0 0 auto; margin-left: auto; padding-bottom: 10px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.chart-video-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,59,59,.6); background-color: rgba(255,59,59,.14); color: #ff6b6b; font-size: 12.5px; font-weight: 800; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; }
.chart-video-btn:hover { background-color: rgba(255,59,59,.26); color: #ff8a8a; }
.chart-video-btn .cv-ic { width: 13px; height: 13px; flex: none; }
html[data-theme="light"] .chart-video-btn { color: #d62f2f; }
@media (max-width: 480px) { .ns-body { flex-wrap: wrap; align-items: flex-start; } .ns-side { margin-left: 0; padding-bottom: 8px; } }

/* ── 평면채보 시뮬레이터 ── */
.chart-sim-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(74,168,255,.6); background-color: rgba(74,168,255,.14); color: #2f8de0; font-size: 12.5px; font-weight: 800; line-height: 1.2; white-space: nowrap; cursor: pointer; width: auto; margin: 0; }
.chart-sim-btn:hover { background-color: rgba(74,168,255,.28); }
html[data-theme="dark"] .chart-sim-btn { color: #7cc0ff; }
.csim-wrap { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 20px; }
.csim-sim { display: grid; grid-template-columns: minmax(0, 560px) minmax(280px, 1fr); gap: 16px; align-items: start; }
.csim-main, .csim-panel { min-width: 0; }
.csim-left, .csim-right { min-width: 0; }
.csim-head { min-height: 26px; }
.csim-title { font-size: 15px; line-height: 1.5; word-break: break-word; overflow-wrap: anywhere; }
.csim-ph { color: #888; }
.csim-tag, .csim-dtag, .csim-const { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 800; color: #fff; background: #888; vertical-align: 1px; }
.csim-tag { background: #4b5fd6; }
.csim-const { background: #555a70; }
.csim-d-basic { background: #3aa655; } .csim-d-advanced { background: #e0a100; } .csim-d-expert { background: #e5484d; } .csim-d-master { background: #9b5de5; } .csim-d-remaster { background: #c9b6f2; color: #2a1850; }
.csim-stage { position: relative; background: #1a1a33; border-radius: 12px; overflow: hidden; line-height: 0; }
.csim-cv { display: block; margin: 0 auto; max-width: 100%; touch-action: manipulation; outline: none; cursor: pointer; }
.csim-cv.csim-draw { touch-action: none; }
.csim-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: #cfd2e6; font-size: 14px; line-height: 1.5; pointer-events: none; }
.csim-stage.has-chart .csim-msg { display: none; }
.csim-ctl { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.csim-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.csim-b, .csim-t { width: auto; margin: 0; padding: 6px 12px; border-radius: 8px; border: 1px solid #c9c9d6; background-color: #fff; color: #333; font-size: 13px; font-weight: 700; cursor: pointer; }
.csim-play { min-width: 52px; background-color: #6c4be0; border-color: #6c4be0; color: #fff; }
.csim-t { display: inline-flex; align-items: center; gap: 5px; }
.csim-t i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.csim-t.on { background-color: #6c4be0; border-color: #6c4be0; color: #fff; }
.csim-time { font-size: 13px; font-variant-numeric: tabular-nums; color: #555; }
.csim-bar { font-size: 12.5px; color: #888; }
.csim-seek { width: 100%; margin: 0; padding: 0; border: 0; }
.csim-opts label { font-size: 12.5px; color: #555; display: inline-flex; align-items: center; gap: 6px; }
.csim-opts select { width: auto; padding: 4px 6px; margin: 0; }
.csim-tl { font-size: 12.5px; color: #555; font-weight: 700; }
.csim-hint { font-size: 12px; color: #888; line-height: 1.5; }
.csim-q { width: 100%; box-sizing: border-box; margin: 0 0 8px; }
.csim-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 560px; overflow-y: auto; }
.csim-item { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; background: #fff; border: 1px solid #e3e3ec; }
.csim-jk { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; background: #ddd; }
.csim-nm { min-width: 0; flex: 1; }
.csim-sn { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csim-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.csim-chip { width: auto; margin: 0; padding: 2px 9px; border-radius: 12px; border: 2px solid transparent; font-size: 11.5px; font-weight: 800; color: #fff; cursor: pointer; opacity: .85; }
.csim-chip.on { opacity: 1; border-color: #222; }
html[data-theme="dark"] .csim-chip.on { border-color: #fff; }
html[data-theme="dark"] .csim-item { background: #222332; border-color: #343650; }
html[data-theme="dark"] .csim-b, html[data-theme="dark"] .csim-t { background-color: #222332; border-color: #3d3f5c; color: #ddd; }
html[data-theme="dark"] .csim-play, html[data-theme="dark"] .csim-t.on { background-color: #6c4be0; border-color: #6c4be0; color: #fff; }
html[data-theme="dark"] .csim-time, html[data-theme="dark"] .csim-opts label, html[data-theme="dark"] .csim-tl { color: #c3c4d5; }
@media (max-width: 860px) { .csim-sim { grid-template-columns: minmax(0, 1fr); } .csim-list { max-height: 420px; } }
@media (max-width: 480px) { .csim-b, .csim-t { padding: 6px 9px; } }
/* 평면채보: 센서 표시 줄 */
.csim-sbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; min-height: 28px; margin-bottom: 8px; font-size: 13px; color: #555; }
.csim-sw, .csim-pd { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.csim-sw input { width: auto; margin: 0; }
.csim-pd[hidden] { display: none; }
.csim-pd select, .csim-sw select { width: auto; max-width: 150px; padding: 3px 6px; margin: 0; }
.csim-sw span, .csim-pd span { white-space: nowrap; }
html[data-theme="dark"] .csim-sbar { color: #c3c4d5; }
/* 평면채보: 재생 버튼 줄 / 오른쪽 패널 / 타임라인 / 속도 슬라이더 / 자르기·공유 */
.csim-tr { display: flex; gap: 6px; margin-top: 10px; align-items: stretch; }
.csim-tr .csim-b { flex: 1 1 0; min-width: 0; padding: 8px 4px; text-align: center; font-weight: 800; letter-spacing: -1px; }
.csim-tr .csim-rs { flex: 0 0 44px; background-color: #14b8c8; border-color: #14b8c8; color: #fff; font-size: 18px; letter-spacing: 0; }
.csim-tr .csim-play { flex: 2 1 0; background-color: #22b35a; border-color: #22b35a; color: #fff; font-size: 16px; }
.csim-info { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 8px; font-size: 13px; color: #555; }
.csim-ii b { color: #222; font-variant-numeric: tabular-nums; }
.csim-yt { margin-left: auto; font-size: 12.5px; font-weight: 700; color: #d93025; text-decoration: none; padding: 3px 10px; border: 1px solid #d93025; border-radius: 12px; }
.csim-panel { display: flex; flex-direction: column; gap: 9px; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid #e3e3ec; }
.csim-tlwrap { border-radius: 8px; overflow: hidden; background: #14172b; line-height: 0; }
.csim-tlcv { display: block; width: 100%; height: 84px; cursor: pointer; touch-action: none; }
.csim-tlrow { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: #666; }
.csim-leg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: #777; }
.csim-leg i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.csim-clipbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.csim-clipbar [hidden], .csim-form[hidden], .csim-shared[hidden] { display: none !important; }
.csim-scis.on { background-color: #f5b800; border-color: #f5b800; color: #222; }
.csim-ers.on { background-color: #ff465a; border-color: #ff465a; color: #fff; }
.csim-erbar, .csim-undo { padding: 9px 10px; border-radius: 10px; background: #fff0f1; border: 1px solid #f4c3c8; display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.csim-undo { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px 10px; background: #f4f4fa; border-color: #e0e0ec; }
.csim-erbar[hidden], .csim-undo[hidden] { display: none !important; }
.csim-erinfo b + span { margin-left: 2px; }
.csim-erdo { background-color: #ff465a; border-color: #ff465a; color: #fff; }
.csim-erdo:disabled { opacity: .45; cursor: default; }
html[data-theme="dark"] .csim-erbar { background: #3a2329; border-color: #7a3a44; }
html[data-theme="dark"] .csim-undo { background: #25263a; border-color: #3d3f5c; }
html[data-theme="dark"] .csim-ers.on { background-color: #ff465a; border-color: #ff465a; color: #fff; }
.csim-clipinfo { font-size: 12.5px; color: #555; }
.csim-clipinfo b { color: #222; }
.csim-clipinfo small { color: #888; }
.csim-loop { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: #555; }
.csim-loop input { width: auto; margin: 0; }
.csim-form, .csim-shared { padding: 9px 10px; border-radius: 10px; background: #f4f4fa; border: 1px solid #e0e0ec; display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.csim-ftitle, .csim-fvideo { width: 100%; box-sizing: border-box; margin: 0; }
a.csim-vid { text-decoration: none; display: inline-flex; align-items: center; background: #ff0000; color: #fff; border-color: #ff0000; }
.csim-hasv { color: #e00; font-size: .8em; }
.csim-fmsg { font-size: 12.5px; color: #c0392b; }
.csim-shared { background: #fff8e1; border-color: #f0d98a; }
.csim-shared.flash { box-shadow: 0 0 0 3px #f5b800; }
.csim-sh-s { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.csim-sh-t small, .csim-set small { color: #888; }
.csim-warn { color: #b8860b; font-size: 12.5px; }
.csim-spd { display: grid; grid-template-columns: 74px 28px minmax(0, 1fr) 28px 46px; align-items: start; gap: 6px; }
.csim-sl { font-size: 12.5px; font-weight: 700; color: #555; padding-top: 5px; }
.csim-pm { width: 28px; height: 28px; margin: 0; padding: 0; border-radius: 50%; border: 1px solid #c9c9d6; background-color: #fff; color: #333; font-size: 17px; line-height: 1; cursor: pointer; }
.csim-vv { font-size: 12.5px; padding-top: 5px; text-align: right; font-variant-numeric: tabular-nums; color: #222; }
.csim-rg { min-width: 0; }
.csim-rg input[type=range] { width: 100%; margin: 4px 0 0; padding: 0; border: 0; height: 20px; }
.csim-rt { position: relative; height: 12px; margin: 0 8px; }
.csim-rt span { position: absolute; top: 0; transform: translateX(-50%); font-size: 10px; line-height: 12px; color: #999; font-variant-numeric: tabular-nums; }
.csim-hint { margin-top: -2px; }
.csim-sets-h { font-size: 12.5px; font-weight: 800; color: #555; margin-bottom: 4px; }
.csim-sets.empty, .csim-recent.empty { display: none; }
.csim-set { display: flex; gap: 4px; margin-bottom: 4px; }
.csim-set-go { flex: 1; width: auto; margin: 0; min-width: 0; text-align: left; padding: 6px 10px; border-radius: 8px; border: 1px solid #e0e0ec; background-color: #fafafe; color: #333; font-size: 12.5px; cursor: pointer; line-height: 1.6; }
.csim-set-del { width: 30px; flex: none; margin: 0; padding: 0; border-radius: 8px; border: 1px solid #e0e0ec; background-color: #fff; color: #c0392b; font-size: 16px; cursor: pointer; }
.csim-pickbox { border: 1px solid #e3e3ec; border-radius: 12px; padding: 0 12px; background: #fff; }
.csim-pickbox > summary { cursor: pointer; padding: 10px 0; font-weight: 800; font-size: 14px; color: #444; }
.csim-pickin { padding-bottom: 12px; }
.csim-recent { margin-top: 14px; }
html[data-theme="dark"] .csim-panel, html[data-theme="dark"] .csim-pickbox { background: #1d1e2c; border-color: #343650; }
html[data-theme="dark"] .csim-info, html[data-theme="dark"] .csim-tlrow, html[data-theme="dark"] .csim-clipinfo, html[data-theme="dark"] .csim-loop, html[data-theme="dark"] .csim-sl, html[data-theme="dark"] .csim-sets-h, html[data-theme="dark"] .csim-pickbox > summary { color: #c3c4d5; }
html[data-theme="dark"] .csim-ii b, html[data-theme="dark"] .csim-clipinfo b, html[data-theme="dark"] .csim-vv { color: #f0f0fa; }
html[data-theme="dark"] .csim-pm, html[data-theme="dark"] .csim-set-del { background-color: #222332; border-color: #3d3f5c; color: #ddd; }
html[data-theme="dark"] .csim-form { background: #25263a; border-color: #3d3f5c; }
html[data-theme="dark"] .csim-shared { background: #3a3320; border-color: #7a6a30; }
html[data-theme="dark"] .csim-set-go { background-color: #25263a; border-color: #3d3f5c; color: #ddd; }
html[data-theme="dark"] .csim-scis.on { color: #222; background-color: #f5b800; border-color: #f5b800; }
html[data-theme="dark"] .csim-tr .csim-play { background-color: #22b35a; border-color: #22b35a; color: #fff; }
html[data-theme="dark"] .csim-tr .csim-rs { background-color: #14b8c8; border-color: #14b8c8; color: #fff; }
b + span.csim-u, .csim-clipinfo b + span, .csim-sh-s b + span, .csim-set-go b + span, .csim-bar span, .csim-ii span { margin-left: 2px; }
@media (max-width: 480px) { .csim-spd { grid-template-columns: 60px 26px minmax(0, 1fr) 26px 42px; gap: 4px; } .csim-pm { width: 26px; height: 26px; } .csim-tr .csim-b { padding: 8px 2px; font-size: 12px; } .csim-panel { padding: 10px; } }
.chart-sim-none { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px dashed #999; color: #999; font-size: 12.5px; font-weight: 700; white-space: nowrap; }

/* 곡 상세: 노트 수 오른쪽의 평면채보 자리 */
.note-chartinfo .nci-top { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.note-chartinfo .nci-main { flex: 1 1 auto; min-width: 0; }
.note-chartinfo .nci-main:empty { display: none; }
.note-chartinfo .nci-sim { flex: 0 0 auto; margin-left: auto; display: flex; }
.note-chartinfo .nci-sim:empty { display: none; }
.note-chartinfo .nci-sim .chart-sim-btn, .note-chartinfo .nci-sim .chart-sim-none { flex-direction: column; justify-content: center; gap: 6px; min-width: 116px; padding: 10px 14px; border-radius: 12px; font-size: 12.5px; text-align: center; white-space: normal; }
.note-chartinfo .nci-sim .chart-sim-btn::before { content: ""; width: 34px; height: 34px; border-radius: 50%; border: 3px solid currentColor; box-shadow: inset 0 0 0 7px transparent, 0 0 0 0 transparent; background: radial-gradient(circle at 50% 22%, currentColor 0 5px, transparent 6px), radial-gradient(circle at 78% 62%, currentColor 0 3px, transparent 4px), radial-gradient(circle at 30% 70%, currentColor 0 3px, transparent 4px); opacity: .9; }
.note-chartinfo .nci-sim .chart-sim-none { border-style: dashed; }

/* 업적 탭: 블록 안의 모든 곡 중 가장 낮은 달성률의 랭크에 맞춰 블록 전체를 연하게 칠한다 */
.achv-group-head[class*="achv-fx-"] { position: relative; isolation: isolate; }
.achv-group-head[class*="achv-fx-"]::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .26; pointer-events: none; }
.achv-fx-silver::before { background: linear-gradient(180deg, #e4eefc, #a3c1ee 60%, #6a93d2); }
.achv-fx-gold::before { background: linear-gradient(180deg, #ffe27a, #e2a900 60%, #b98200); }
.achv-fx-rainbow::before { background: linear-gradient(90deg, #ff4d6d, #ffb020, #ffd21f, #35d46a, #2f9bff, #a95cf0); }
.achv-fx-prism::before { background: linear-gradient(100deg, #ff8fcf, #ffe38a 20%, #9af0a6 40%, #7fe3ff 58%, #9aa8ff 76%, #e7a0ff); }
.achv-mode-bars > .achv-group:first-child, .achv-mode-bars > .achv-group:last-child { overflow: hidden; }

/* 무지개 막대 칸: 색이 왼쪽으로 계속 흘러 순환 */
.achv-seg.achv-cyc { background-size: 200% 100% !important; animation: achv-cyc 5s linear infinite; }
@keyframes achv-cyc { from { background-position: 0 0; } to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) { .achv-seg.achv-cyc { animation: none; } }
/* 무지개 원그래프 조각: 색상이 계속 한 바퀴씩 돈다 */
.achv-seg.achv-hue { animation: achv-hue 6s linear infinite; }
@keyframes achv-hue { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .achv-seg.achv-hue { animation: none; } }

/* 채보 글자 박스 */
.csim-txt { margin-top: 6px; }
.csim-txt-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 12.5px; color: #555; }
.csim-txt-h label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; margin: 0; }
.csim-txt-h input { width: auto; margin: 0; }
.csim-txt-b { position: relative; max-height: 190px; overflow: auto; border: 1px solid #e0e0ec; border-radius: 10px; background: #fafafe; padding: 8px 10px; font: 12.5px/1.75 ui-monospace, Menlo, Consolas, monospace; color: #333; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.csim-txb { position: relative; padding-left: 34px; margin-bottom: 2px; }
.csim-txb > i { position: absolute; left: 0; top: 0; width: 28px; text-align: right; font-style: normal; color: #aaa; font-size: 11px; -webkit-user-select: none; user-select: none; }
.csim-txt-b span { cursor: pointer; border-radius: 4px; }
.csim-txt-b span.on { background: #ffd84a; color: #222; font-weight: 800; box-shadow: 0 0 0 2px #ffd84a; }
.csim-txt-n { font-size: 11.5px; color: #999; margin-top: 3px; }
html[data-theme="dark"] .csim-txt-h { color: #c3c4d5; }
html[data-theme="dark"] .csim-txt-b { background: #151722; border-color: #262940; color: #cfd1e4; }
html[data-theme="dark"] .csim-txb > i { color: #6c6f8c; }

/* 나라 GUEST 곡 팝업: 신기록 갱신한 사람 */
.gh-row { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: .84rem; flex-wrap: wrap; }
.gh-row:first-of-type { border-top: 0; }
.gh-row > b { color: #ffd1e6; }
.gh-t { color: rgba(255,255,255,.5); font-size: .75rem; }
.gh-v { margin-left: auto; color: rgba(255,255,255,.75); } .gh-v b { color: #ffeb3b; }
.gh-empty { font-size: .82rem; color: rgba(255,255,255,.55); padding: 4px 0; }
.gh-rk { text-decoration: none; color: inherit; } a.gh-rk:hover { background: rgba(255,255,255,.06); }
.gh-no { width: 22px; text-align: right; color: rgba(255,255,255,.55); font-weight: 800; flex: none; }
.gh-me { background: rgba(255,119,178,.12); border-radius: 8px; }

/* 곡 랭킹 / 랭킹판 지역 표시 (JP · INT) */
.rank-reg { font-style: normal; font-size: .62rem; font-weight: 800; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; vertical-align: middle; margin-left: 2px; }
.rank-reg-jp { background: rgba(239,68,68,.22); color: #fca5a5; }
.rank-reg-int { background: rgba(59,130,246,.22); color: #93c5fd; }
.rank-reg-both { background: rgba(168,85,247,.24); color: #d8b4fe; }
.sr-tabs { margin-left: auto; display: inline-flex; gap: 4px; }
.sr-tab { border: 1px solid rgba(255,255,255,.2); background: transparent; color: rgba(255,255,255,.7); border-radius: 999px; padding: 3px 10px; font-size: .75rem; cursor: pointer; }
.sr-tab.active { background: rgba(255,119,178,.25); color: #fff; border-color: rgba(255,119,178,.6); }
.sr-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-open { width: 100%; }
.csim-vplay { width: 100%; max-height: 260px; border-radius: 8px; background: #000; }
.csim-vnote { font-size: 12.5px; color: #555; padding: 4px 0; } .csim-vnote.bad { color: #c0392b; }

/* 평면채보 난이도표: 채보 없는 곡은 회색 + 더 흐리게 */
.achv-tile.csim-nochart { opacity: .55; cursor: not-allowed !important; }

/* 평면채보: 고스트 노트 옵션 줄 */
.csim-gopt { align-items: center; flex-wrap: wrap; gap: 8px; }
.csim-gopt[hidden] { display: none !important; }
.csim-gopt .csim-gdiv { padding: 4px 8px; border-radius: 8px; }
.csim-ghint { flex: 1 1 260px; font-size: 12px; color: #888; line-height: 1.5; }
.csim-lane{display:block;margin:6px 0 2px;border-radius:8px;cursor:pointer;touch-action:none}
.csim-acts{margin:6px 0;display:flex;flex-direction:column;gap:6px}
.csim-ar{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:8px;padding:6px 8px;font-size:12.5px}
.csim-ar-n{font-size:12px;opacity:.65;padding:4px 2px}
.csim-ah1{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.csim-agrow{flex:1}
.csim-ai{display:flex;align-items:center;gap:6px;margin-top:5px;flex-wrap:wrap}
.csim-ai>.csim-an{opacity:.75;width:16px;text-align:center}
.csim-ai select{font-size:12px}
.csim-ai input[type=range]{width:90px}
.csim-row[hidden], .csim-acts[hidden], .csim-row [hidden] { display: none !important; }
.csim-ah1 { flex-wrap: nowrap; }
.csim-ad { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.csim-at1 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.csim-ah1 .csim-b { padding: 3px 9px; flex: none; font-size: 12px; }
.csim-seg { display: inline-flex; border: 1px solid rgba(160,160,190,.45); border-radius: 8px; overflow: hidden; }
.csim-sg { border: 0; background: transparent; padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer; color: inherit; }
.csim-sg + .csim-sg { border-left: 1px solid rgba(160,160,190,.35); }
.csim-sg.on { background: #8b5cf6; color: #fff; }
.csim-ghint { font-size: 12px; opacity: .8; }
.csim-ffname { font-size: 12px; opacity: .8; word-break: break-all; }

.csim-lane[hidden]{display:none!important}

/* ===== 평면채보 새 배치 (2단계) ===== */
.csim-wrap { position: relative; }
.csim-cmd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 46px; }
.csim-song { min-width: 0; flex: 1 1 220px; }
.csim-title { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; }
.csim-title .csim-tn { font-size: 18px; font-weight: 800; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.csim-find, .csim-sharebtn { display: inline-flex; align-items: center; gap: 8px; width: auto; margin: 0; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid #d6d6e2; background-color: #fff; color: #333; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.csim-find:hover, .csim-sharebtn:hover { border-color: #b9b9cf; }
.csim-find { min-width: 190px; color: #777; justify-content: flex-start; }
.csim-find span { flex: 1; text-align: left; }
.csim-find kbd { font: 700 10.5px/1 inherit; padding: 3px 5px; border-radius: 5px; background: rgba(120,120,160,.16); color: inherit; }
.csim-sharebtn .n { background: rgba(120,120,160,.18); border-radius: 999px; padding: 1px 7px; font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.csim-si { flex: none; }
html[data-theme="dark"] .csim-find, html[data-theme="dark"] .csim-sharebtn { background-color: #222332; border-color: #3d3f5c; color: #ddd; }
html[data-theme="dark"] .csim-find { color: #a4a6c0; }
html[data-theme="dark"] .csim-find:hover, html[data-theme="dark"] .csim-sharebtn:hover { border-color: #5a5d86; }
/* 칩: [STD | MAS 14.2] */
.csim-uc { display: inline-flex; align-items: stretch; height: 22px; border-radius: 999px; overflow: hidden; font-size: 11.5px; font-weight: 700; line-height: 1; white-space: nowrap; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); font-variant-numeric: tabular-nums; vertical-align: middle; flex: none; }
.csim-uc > span { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; }
.csim-uc .uc-t { padding: 0 7px; letter-spacing: .02em; }
.csim-uc .uc-d { color: #fff; }
.csim-uc .uc-d b { font-weight: 800; }
.csim-uc .uc-d.csim-d-remaster { color: #2a1850; }
.uc-std { background: #2b6cb0; color: #fff; }
.uc-dx { background: linear-gradient(100deg, #ff9cbd, #ffc971 52%, #79ebd3); color: #1a1320; }
.csim-chip.csim-uchip { padding: 0; border-radius: 999px; line-height: 0; background: none; }
.csim-chip.csim-uchip:hover { opacity: 1; }
/* 오른쪽 패널 탭 / 아래 도크 */
.csim-ptabs { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: #eeeef6; }
.csim-ptab { flex: 1; width: auto; margin: 0; height: 30px; padding: 0 6px; border-radius: 8px; border: 0; background: none; color: #777; font-size: 13px; font-weight: 700; cursor: pointer; }
.csim-ptab:hover { color: #222; }
.csim-ptab.on { background: #fff; color: #222; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.csim-pane { display: none; flex-direction: column; gap: 9px; }
.csim-pane.on { display: flex; }
html[data-theme="dark"] .csim-ptabs { background: #151722; }
html[data-theme="dark"] .csim-ptab { color: #9a9cb8; }
html[data-theme="dark"] .csim-ptab:hover { color: #fff; }
html[data-theme="dark"] .csim-ptab.on { background: #2f3250; color: #fff; box-shadow: none; }
.csim-dock { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid #e3e3ec; min-width: 0; }
html[data-theme="dark"] .csim-dock { background: #1d1e2c; border-color: #343650; }
.csim-dockrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.csim-dockrow .csim-clipbar { margin-left: auto; }
.csim-dock .csim-lane[hidden] { display: none !important; }
/* 공유 손배치 팝업 */
.csim-sharepop { display: none; position: absolute; right: 0; top: 52px; z-index: 60; width: min(460px, 100%); max-height: min(70dvh, 560px); overflow: auto; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid #d6d6e2; box-shadow: 0 18px 48px rgba(0,0,0,.28); }
.csim-wrap.sp-open .csim-sharepop { display: block; }
.csim-sharepop .csim-recent { margin-top: 12px; }
.csim-sp-e { display: none; font-size: 12.5px; color: #888; padding: 2px 2px 6px; }
.csim-sets.empty + .csim-sp-e { display: block; }
html[data-theme="dark"] .csim-sharepop { background: #1d1e2c; border-color: #3d3f5c; box-shadow: 0 18px 48px rgba(0,0,0,.6); }
/* 곡 고르기 창 */
.csim-pal { position: fixed; inset: 0; z-index: 9600; background: rgba(5,6,12,.62); display: flex; align-items: flex-start; justify-content: center; padding: 7dvh 12px 12px; }
.csim-pal[hidden] { display: none !important; }
.csim-pal-box { width: min(780px, 100%); max-height: 86dvh; display: flex; flex-direction: column; border-radius: 15px; background: #fff; color: #222; box-shadow: 0 24px 70px rgba(0,0,0,.55); overflow: hidden; }
.csim-pal-in { display: flex; align-items: center; gap: 10px; padding: 0 10px 0 14px; height: 54px; border-bottom: 1px solid #e3e3ec; color: #888; flex: none; }
.csim-pal-in .csim-q { flex: 1; width: auto; min-width: 0; margin: 0; padding: 0; border: 0; outline: 0; box-shadow: none; background: none; color: inherit; font-size: 16px; font-weight: 600; }
.csim-pal-x { width: 32px; height: 32px; margin: 0; padding: 0; border-radius: 8px; border: 0; background: none; color: #888; font-size: 15px; cursor: pointer; }
.csim-pal-x:hover { background: rgba(120,120,160,.16); }
.csim-pal-body { overflow: auto; padding: 10px 12px 14px; min-height: 0; }
.csim-pal-body .csim-list { max-height: none; overflow: visible; }
html[data-theme="dark"] .csim-pal-box { background: #1b1d2b; color: #e6e8f0; box-shadow: 0 24px 70px rgba(0,0,0,.75), inset 0 0 0 1px #3d3f5c; }
html[data-theme="dark"] .csim-pal-in { border-bottom-color: #343650; color: #a4a6c0; }
html[data-theme="dark"] .csim-pal-in .csim-q { background: none; color: #e6e8f0; }

/* 폰·좁은 창: 위에서 아래로 (링 → 타임라인 → 도구) */
@media (max-width: 959px) {
  .csim-sim { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  .csim-main { order: 1; display: flex; flex-direction: column; align-items: center; }
  .csim-dock { order: 2; }
  .csim-panel { order: 3; }
  .csim-stage, .csim-tr, .csim-info { width: min(100%, 52dvh); }
  .csim-find { flex: 1 1 150px; min-width: 0; }
  .csim-sharebtn { flex: 0 0 auto; }
  .csim-title .csim-tn { font-size: 16px; }
  .csim-sharepop { top: auto; margin-top: 4px; }
  .csim-pal { padding: 0; align-items: flex-end; }
  .csim-pal-box { width: 100%; max-height: 92dvh; border-radius: 16px 16px 0 0; }
}
/* PC: 스크롤 없는 한 화면 — 링 / 도구 패널 / 아래 타임라인 */
@media (min-width: 960px) {
  html.sn-work .container { max-width: none; padding: 0 14px; }
  html.sn-work .csim-wrap { height: 100dvh; padding: 10px 0; box-sizing: border-box; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
  html.sn-work .csim-sim { grid-template-columns: minmax(0, 1fr) clamp(340px, 36vw, 560px); grid-template-rows: minmax(0, 1fr) auto; align-items: stretch; gap: 10px 14px; min-height: 0; }
  html.sn-work .csim-main { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; gap: 8px; }
  html.sn-work .csim-stage, html.sn-work .csim-tr, html.sn-work .csim-info { width: min(100%, calc(100dvh - 292px)); max-width: 760px; min-width: 260px; }
  html.sn-work .csim-info { justify-content: space-between; margin-top: 0; }
  html.sn-work .csim-spd { grid-template-columns: 92px 28px minmax(0, 1fr) 28px 46px; }
  html.sn-work .csim-panel { grid-column: 2; grid-row: 1; min-height: 0; overflow: auto; scrollbar-width: thin; }
  html.sn-work .csim-dock { grid-column: 1 / -1; grid-row: 2; padding-right: 68px; }
}

/* ===== 평면채보 손 레인 · 빠른 편집 (3단계) ===== */
.csim-xpad { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 2px; }
.csim-xpb { display: flex; align-items: center; justify-content: center; gap: 8px; width: auto; margin: 0; padding: 8px 10px; border-radius: 12px; border: 1px solid #c9c9d6; background: #fff; color: #222; font-size: 15px; font-weight: 800; cursor: pointer; transition: transform .06s, background-color .12s; }
.csim-xpb i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.csim-xpb kbd { font: 700 10px/1 ui-monospace, Consolas, monospace; padding: 2px 5px; border-radius: 5px; background: rgba(120, 120, 150, .16); color: inherit; opacity: .75; }
.csim-xpb b { min-width: 22px; padding: 2px 7px; border-radius: 99px; background: rgba(120, 120, 150, .16); font-size: 12px; font-weight: 800; text-align: center; }
.csim-xpb:active { transform: scale(.97); }
.csim-xpl:hover { background-color: #e8f5ff; border-color: #8fd3ff; }
.csim-xpr:hover { background-color: #ffeaed; border-color: #ff6b7d; }
.csim-xq, .csim-xb, .csim-xw { margin-top: 6px; gap: 6px; }
.csim-xq .csim-tl, .csim-xw .csim-tl { min-width: 60px; }
.csim-xb .csim-b, .csim-xw .csim-b, .csim-xq .csim-b { padding: 5px 9px; font-size: 12px; display: inline-flex; align-items: center; }
.csim-xf { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #555; cursor: pointer; }
.csim-xsc { font-size: 12px; font-weight: 700; color: #6c4be0; margin-left: auto; }
.csim-xwn { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: #e6f7ec; color: #1c8b4a; }
.csim-xwn:empty { display: none; }
.csim-xwn.bad { background: #fff0dc; color: #c2570c; }
.csim-xsp { flex: 1 1 8px; }
.csim-xun, .csim-xre { min-width: 34px; justify-content: center; font-size: 15px !important; line-height: 1; }
.csim-xb .csim-b:disabled, .csim-xw .csim-b:disabled { opacity: .4; cursor: default; }
.csim-xlw { position: relative; margin-top: 8px; }
.csim-xl { display: block; width: 100%; height: 280px; border-radius: 12px; touch-action: none; cursor: crosshair; background: #10131c; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.csim-xz { position: absolute; right: 8px; top: 24px; display: flex; flex-direction: column; gap: 4px; }
.csim-xz button { width: 28px; height: 28px; margin: 0; padding: 0; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(20, 24, 36, .85); color: #fff; font-size: 16px; font-weight: 800; line-height: 1; cursor: pointer; }
.csim-xe { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(16, 19, 28, .86); color: #aab; font-size: 13px; font-weight: 700; text-align: center; padding: 0 16px; pointer-events: none; }
.csim-xe[hidden] { display: none !important; }
.csim-xmsg { position: absolute; left: 8px; right: 44px; bottom: 8px; padding: 6px 10px; border-radius: 9px; background: rgba(32, 28, 64, .92); color: #e6deff; font-size: 12.5px; font-weight: 700; line-height: 1.4; pointer-events: none; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.csim-xmsg:empty { display: none; }
.csim-xk { margin: 8px 2px 0; font-size: 11.5px; color: #888; line-height: 1.5; }
html[data-theme="dark"] .csim-xpb { background-color: #222332; border-color: #3d3f5c; color: #eee; }
html[data-theme="dark"] .csim-xpl:hover { background-color: #1d3140; border-color: #8fd3ff; }
html[data-theme="dark"] .csim-xpr:hover { background-color: #3a1d27; border-color: #ff6b7d; }
html[data-theme="dark"] .csim-xf { color: #bbb; }
html[data-theme="dark"] .csim-xsc { color: #b9a6ff; }
html[data-theme="dark"] .csim-xk { color: #8b8da0; }
html[data-theme="dark"] .csim-xwn { background: #173a27; color: #6ee0a0; }
html[data-theme="dark"] .csim-xwn.bad { background: #3d2a12; color: #ffb36b; }
@media (min-width: 960px) {
  html.sn-work .csim-panel { display: flex; flex-direction: column; min-height: 0; }
  html.sn-work .csim-pane.on { flex: 1 1 auto; min-height: 0; overflow: auto; }
  html.sn-work .csim-pane[data-p="hand"].on { display: flex; flex-direction: column; }
  html.sn-work .csim-pane[data-p="hand"] > * { flex: none; }
  html.sn-work .csim-pane[data-p="hand"] > .csim-xlw { flex: 1 1 240px; min-height: 240px; display: flex; }
  html.sn-work .csim-xl { height: auto; flex: 1 1 auto; min-height: 240px; }
}
@media (max-width: 959px) { .csim-xl { height: 300px; } }
@media (min-width: 960px) and (hover: hover) and (pointer: fine) { .csim-xpad { display: none; } }
.csim-xpad-m { display: none; }
@media (max-width: 959px) {
  .csim-xpb { font-size: 14px; padding: 10px 8px; min-height: 52px; }
  .csim-xpb span { white-space: nowrap; }
  .csim-xpad { display: none; }
  .csim-sim.xp-hand .csim-xpad-m { display: grid; order: 99; position: sticky; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); z-index: 30; margin: 4px -6px 0; padding: 8px 62px 8px 6px; border-radius: 16px; background: rgba(250, 250, 255, .94); box-shadow: 0 -6px 18px rgba(0, 0, 0, .18); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  html[data-theme="dark"] .csim-sim.xp-hand .csim-xpad-m { background: rgba(20, 21, 32, .94); }
}

/* 레이팅 탭 오른쪽 위 공유 버튼 / 공유 탭 레이더 스위치 */
.rank-page-menu.rating-sub-menu { position: relative; padding-right: 46px; }
.rank-page-menu.rating-sub-menu .rating-share-btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; padding: 0; margin: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.rank-page-menu.rating-sub-menu .rating-share-btn .ic { width: 18px; height: 18px; }
.rank-page-menu.rating-sub-menu .rating-share-btn:disabled { opacity: .5; cursor: wait; }
.share-radar-opt { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 700; font-size: 0.9rem; cursor: pointer; flex-wrap: wrap; }
.share-radar-opt input { width: auto; margin: 0; }
.share-radar-opt small { opacity: .6; font-weight: 600; }

/* 프로필 영역 빈 공간의 플레이어 레이더 */
.profile-radar { flex: 0 0 200px; max-width: 200px; align-self: center; cursor: pointer; margin: -6px 0; }
.profile-radar .mrd-svg { max-width: 200px; }
@media (max-width: 760px) { .profile-radar { display: none !important; } }

/* 플레이트/프레임 미달성 곡: 기록 탭 타일을 줄인 미니 카드 */
.plate-left-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 6px; max-height: 320px; padding: 4px 2px 8px 2px; }
.frame-row .plate-left-grid { padding-left: 2px; }
.plate-mini { --dc: #999; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 8px 5px 5px; border-radius: 10px; cursor: pointer;
  background: #f6f7fc; border: 1px solid #e6e8f3; border-left: 3px solid var(--dc); transition: transform .12s, box-shadow .12s; }
.plate-mini:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(80,90,160,.16); }
.plate-mini.d-basic { --dc: #5fcf4a; } .plate-mini.d-advanced { --dc: #f7c22a; } .plate-mini.d-expert { --dc: #f2566a; }
.plate-mini.d-master { --dc: #9a4be8; } .plate-mini.d-re_master { --dc: #d9b3ff; }
.pm-jk { position: relative; flex: none; width: 42px; height: 42px; border-radius: 7px; overflow: hidden; background: #222; border: 1px solid rgba(255,255,255,.6); }
.pm-jk img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plate-mini.unplayed .pm-jk img { filter: grayscale(1) brightness(.78); }
.pm-jk::before { content: ''; position: absolute; top: 0; right: 0; width: 38%; height: 38%; z-index: 2; background: linear-gradient(225deg, var(--dc) 50%, transparent 50%); }
.pm-type { position: absolute; left: 0; bottom: 0; z-index: 3; font-size: 7px; font-weight: 800; color: #fff; background: rgba(0,0,0,.62); padding: 0 3px; border-top-right-radius: 4px; line-height: 1.35; }
.pm-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pm-name { font-size: 12px; font-weight: 700; color: #2b2d44; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.pm-meta { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #7b7f9a; font-variant-numeric: tabular-nums; }
.pm-diff { font-size: 10px; font-weight: 800; color: #fff; background: var(--dc); border-radius: 4px; padding: 0 4px; line-height: 1.5; }
.plate-mini.d-re_master .pm-diff { color: #5a2d86; }
.pm-meta { flex-wrap: wrap; row-gap: 0; }
.pm-score { margin-left: auto; font-weight: 800; color: #e0455c; white-space: nowrap; }
.pm-score i { font-style: normal; font-size: 9px; opacity: .8; }
.pm-score.pm-none { color: #9aa0b8; font-weight: 600; font-size: 10px; }
@media (max-width: 480px) { .plate-left-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; } .plate-mini { padding: 4px 6px 4px 4px; gap: 6px; } .pm-jk { width: 36px; height: 36px; } .pm-name { font-size: 11px; } }
@media (max-width: 340px) { .plate-left-grid { grid-template-columns: minmax(0, 1fr); } }

/* 레이더 항목 설명 버튼(?) + 펼쳐지는 설명 */
.mrd, .prec-rd { position: relative; }
.mrd-help { position: absolute; top: 0; right: 0; z-index: 3; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid currentColor; background: rgba(127,127,150,.16);
  color: inherit; opacity: .75; font: 800 14px/1 inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.prec-rd > .mrd-help { top: 8px; right: 8px; }
/* 버튼이 글자를 가리지 않도록 버튼 자리(우측 상단)를 비워둔다 */
.prec .prec-rd { padding-right: 52px; }
.mrd > .nci-head { padding-right: 36px; }
@media (max-width: 420px) { .prec .prec-rd { padding-right: 46px; } }
.mrd-help:hover, .mrd-help.on { opacity: 1; background: #ff7eb3; border-color: #ff7eb3; color: #fff; }
.mrd-desc { flex: 1 1 100%; width: 100%; box-sizing: border-box; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(127,127,150,.16); text-align: left; }
.mrd-desc[hidden] { display: none; }
.mrd-desc-t { font-size: 12px; font-weight: 800; margin-bottom: 4px; opacity: .9; }
.mrd-desc-i { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 5px 0; border-top: 1px dashed rgba(127,127,150,.35); font-size: 12px; line-height: 1.45; }
.mrd-desc-i b { font-weight: 800; color: #ff7eb3; }
.mrd-desc-i span { opacity: .9; overflow-wrap: anywhere; }
@media (max-width: 480px) { .mrd-desc-i { grid-template-columns: 46px 1fr; font-size: 11.5px; } }

/* 평면채보: 보기 탭 아래 빈 공간에 채보 글자 */
.csim-pane[data-p="view"] > .csim-txt { margin-top: 4px; }
@media (min-width: 960px) {
  html.sn-work .csim-pane[data-p="view"].on { display: flex; flex-direction: column; }
  html.sn-work .csim-pane[data-p="view"] > * { flex: none; }
  html.sn-work .csim-pane[data-p="view"] > .csim-txt:not([hidden]) { flex: 1 1 auto; min-height: 120px; display: flex; flex-direction: column; }
  html.sn-work .csim-pane[data-p="view"] > .csim-txt .csim-txt-b { flex: 1 1 auto; max-height: none; min-height: 0; }
}
.pm-ax b { color: #4a5bd6; }
.pm-axc { font-size: 10px; opacity: .7; font-weight: 400; }

/* 평면채보 즐겨찾기 */
.csim-cw { display: inline-flex; align-items: center; gap: 1px; }
.csim-fav, .csim-tfav, .csim-favonly { width: auto; margin: 0; padding: 0 4px; border: 0; background: none; box-shadow: none; color: #b9bccb; cursor: pointer; line-height: 1; font-weight: 800; }
.csim-fav { font-size: 17px; min-width: 24px; height: 24px; }
.csim-fav.on, .csim-tfav.on { color: #f5b301; }
.csim-fav:hover, .csim-tfav:hover { color: #f5b301; }
.csim-tfav { font-size: 24px; height: 36px; min-width: 36px; flex: none; }
.csim-tfav[hidden] { display: none; }
.csim-favonly { flex: none; font-size: 12.5px; padding: 6px 10px; border-radius: 999px; border: 1px solid #d3d5e2; color: #7b7e96; white-space: nowrap; }
.csim-favonly.on { background: rgba(245,179,1,.16); border-color: #f5b301; color: #c88a00; }
html[data-theme="dark"] .csim-fav, html[data-theme="dark"] .csim-tfav { color: #5d607c; }
html[data-theme="dark"] .csim-fav.on, html[data-theme="dark"] .csim-tfav.on { color: #ffcb3d; }
html[data-theme="dark"] .csim-favonly { border-color: #44476a; color: #a4a6c0; }
html[data-theme="dark"] .csim-favonly.on { background: rgba(255,203,61,.16); border-color: #ffcb3d; color: #ffcb3d; }
.csim-fav, .csim-fav:hover, .csim-fav:active, .csim-fav:focus, .csim-tfav, .csim-tfav:hover, .csim-tfav:active, .csim-tfav:focus { background: none !important; box-shadow: none !important; transform: none !important; outline: none; }
.csim-fav:focus-visible, .csim-tfav:focus-visible { outline: 2px solid #f5b301; outline-offset: 1px; border-radius: 6px; }
.csim-fav:hover, .csim-tfav:hover { color: #f5b301 !important; }

/* 프로필 헤더(마이마이): 넓은 화면(1100px~)에서는 위쪽 줄 오른쪽에 [메뉴 버튼 → 게스트 기록 버튼]을 쌓고,
   그 아래 줄에 [프로필 사진 · 정보 · (친구코드/갱신 시각/크레딧) · 레이더]를 나란히 둔다. 좁은 화면은 기존 배치 그대로. */
.ps-meta { display: contents; }
@media (min-width: 1100px) {
  .profile-section.ps-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 12px; align-items: start; }
  .profile-section.ps-grid > .toggle-container { grid-column: 1 / -1; grid-row: 1; justify-self: end; max-width: none; justify-content: flex-end; }
  .profile-section.ps-grid > .profile-left { grid-column: 1; grid-row: 2; min-width: 0; align-items: flex-start; gap: 20px; }
  .profile-section.ps-grid > .toggle-container > :is(button, a) { min-height: 38px; }
  .profile-section.ps-grid .guest-switch button { padding: 7px 16px; }
  .profile-section.ps-grid > .profile-radar { grid-column: 2; grid-row: 2; justify-self: center; align-self: center; margin: 0; flex: none; width: 240px; max-width: 240px; }
  .profile-section.ps-grid > .profile-radar .mrd-svg { max-width: 240px; }
  .profile-section.ps-grid .profile-pic { width: 180px; height: 180px; max-width: none; }
  .profile-section.ps-grid .profile-info { display: grid; grid-template-columns: max-content minmax(0, 1fr); grid-template-rows: repeat(5, auto) 1fr; column-gap: 24px; row-gap: 4px; flex: 1 1 0; min-width: 0; align-self: stretch; }
  .profile-section.ps-grid .profile-info > * { grid-column: 1; }
  .profile-section.ps-grid .profile-info > .ps-meta { grid-column: 2; grid-row: 1 / -1; align-self: end; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
}

/* 난이도표/서열표 이미지 저장 */
#difftable .achievement-container.cs-host { position: relative; }
#difftable .achv-toolbar { padding-right: 46px; }
.cs-share-btn { position: absolute; top: 0; right: 0; z-index: 3; width: 38px; height: 38px; padding: 0; margin: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border: 1px solid #d5d8e0; background: #fff; color: #5a5f78; }
.cs-share-btn .ic { width: 18px; height: 18px; }
.cs-share-btn:hover { color: #7b3fe4; border-color: #b79af0; }
.cs-ov { position: fixed; inset: 0; z-index: 9600; background: rgba(8, 9, 16, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cs-box { width: min(420px, 100%); max-height: 90dvh; overflow: auto; background: #fff; color: #1a1a2e; border-radius: 16px; padding: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, .3); }
.cs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 16px; }
.cs-x { border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: inherit; padding: 2px 8px; }
.cs-opts { display: grid; gap: 6px; }
.cs-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid #e1e4ec; cursor: pointer; }
.cs-opt:has(input:checked) { border-color: #7b3fe4; background: rgba(123, 63, 228, .08); }
.cs-opt input { margin: 0; accent-color: #7b3fe4; }
.cs-opt span { display: flex; flex-direction: column; gap: 1px; }
.cs-opt b { font-size: 14px; }
.cs-opt small { font-size: 12px; color: #7a7f98; }
.cs-ck { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #f5f6fa; font-size: 13px; }
.cs-ck-sum { display: grid; gap: 4px; margin-bottom: 8px; }
.cs-ck-sum span { display: flex; align-items: center; gap: 6px; }
.cs-ck-sum i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.cs-ck-edit { border: 1px solid #c9b6f3; background: #fff; color: #7b3fe4; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.cs-msg { min-height: 18px; margin: 10px 2px 6px; font-size: 12px; color: #7a7f98; }
.cs-go { width: 100%; }
html[data-theme="dark"] .cs-share-btn { background: #22243a; border-color: #3a3d57; color: #c5c8dc; }
html[data-theme="dark"] .cs-box { background: #1e2035; color: #eceefa; }
html[data-theme="dark"] .cs-opt { border-color: #34374f; }
html[data-theme="dark"] .cs-opt small, html[data-theme="dark"] .cs-msg { color: #9aa0b4; }
html[data-theme="dark"] .cs-ck { background: #272a42; }
html[data-theme="dark"] .cs-ck-edit { background: #1e2035; border-color: #5a4a8c; color: #c9a6ff; }

.cs-box, .cs-box * { text-align: left; }
.cs-head strong { flex: 1; min-width: 0; }
.cs-x { width: auto !important; flex: none; }
.cs-opt { width: 100%; margin: 0; box-sizing: border-box; }
.cs-opt input[type="radio"] { width: 18px !important; height: 18px; flex: none; padding: 0; }
.cs-opt span { flex: 1; min-width: 0; }
.cs-go { display: block; }
.hw-assign-box { max-width: 420px; }
.hw-assign-sub { margin: 0 0 10px; opacity: .75; font-size: 13px; overflow-wrap: anywhere; }
.hw-assign-box .assignee-checkboxes { max-height: 46dvh; overflow: auto; }

/* 레이더 수정 제안창 */
.mre-box { width: min(440px, 100%); }
.mre-box .mrd-admin-head { flex-wrap: wrap; align-items: center; }
.mre-box .mrd-admin-head b { flex: 1 1 0; min-width: 0; }
.mre-box .mrd-admin-head span { order: 3; flex: 1 1 100%; overflow-wrap: anywhere; }
.mre-box .mrd-x { order: 2; margin-left: auto; flex: 0 0 auto; width: auto !important; padding: 4px 6px; }
.mre-hint { font-size: .78rem; opacity: .8; line-height: 1.5; margin-bottom: 8px; }
.mre-mine { font-size: .78rem; color: #ffd87a; background: rgba(255,216,122,.1); border-radius: 8px; padding: 6px 8px; margin-bottom: 8px; }
.mre-mine[hidden] { display: none; }
.mre-rows { display: flex; flex-direction: column; gap: 6px; }
.mre-row { display: grid; grid-template-columns: minmax(64px, auto) 1fr 92px auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid transparent; }
.mre-row.mre-chg { border-color: #ff7eb3; background: rgba(255,126,179,.12); }
.mre-ax { font-weight: 800; font-size: .86rem; }
.mre-cur { font-size: .76rem; opacity: .75; }
.mre-cur b { font-weight: 800; }
.mre-in { width: 92px !important; box-sizing: border-box; padding: 7px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.25); color: #fff; font-size: 16px; font-weight: 800; text-align: right; font-family: inherit; }
.mre-rs { width: auto !important; border: 0; background: transparent; color: #b9a4ff; font-size: .72rem; font-weight: 700; cursor: pointer; padding: 4px; }
.mre-rs[hidden] { display: none; }
.mre-nl { display: block; margin-top: 10px; font-size: .78rem; opacity: .9; }
.mre-note { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; min-height: 56px; padding: 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.25); color: #fff; font-size: 16px; font-family: inherit; resize: vertical; }
.mre-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.mre-cnt { font-size: .8rem; color: #ff9cc7; font-weight: 700; }
.mre-msg { min-height: 1.2em; margin-top: 6px; font-size: .8rem; text-align: center; }
.mre-ok { color: #7be08f; font-weight: 700; } .mre-err { color: #ff8a8a; font-weight: 700; }
@media (max-width: 380px) { .mre-row { grid-template-columns: minmax(56px, auto) 1fr 84px auto; gap: 6px; } .mre-in { width: 84px !important; } }

/* 히스토리 탭: 기간 선택 + 이미지 저장 */
#hist-recent.cs-host { position: relative; }
.hist-period { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.hist-prow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hist-prow:first-child { padding-right: 46px; }
.hist-plab { font-size: 12px; font-weight: 800; color: #8a8fa8; min-width: 30px; }
.hist-tilde { font-weight: 800; color: #8a8fa8; }
.hist-psel { flex: 1 1 130px; min-width: 0; width: auto; padding: 7px 8px; border-radius: 10px; border: 1px solid #d5d8e0; background: #fff; color: #3b3f58; font-size: 12.5px; font-weight: 700; font-family: inherit; }
.hist-pchip { border: 1px solid #d5d8e0; background: #fff; color: #5a5f78; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 800; cursor: pointer; font-family: inherit; width: auto; }
.hist-pchip.on { background: linear-gradient(45deg, #ff6ec4, #b77dff); color: #fff; border-color: transparent; }
.hist-pcnt { font-size: 12px; color: #8a8fa8; font-weight: 700; margin-left: 4px; }
html[data-theme="dark"] .hist-pchip, html[data-theme="dark"] .hist-psel { background: #22243a; border-color: #3a3d57; color: #c5c8dc; }
html[data-theme="dark"] .hist-pchip.on { background: linear-gradient(45deg, #ff6ec4, #b77dff); color: #fff; border-color: transparent; }
.hs-info { font-size: 13px; line-height: 1.5; margin-bottom: 10px; opacity: .85; }
.hs-cnt { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; margin-bottom: 8px; }
.hs-sel { padding: 7px 10px; border-radius: 8px; border: 1px solid #d5d8e0; font-size: 14px; font-family: inherit; width: auto; }
.hs-note { font-size: 12px; color: #8a8fa8; margin-bottom: 8px; line-height: 1.5; }
.hist-brk { flex-basis: 100%; height: 0; }
.hist-schip { padding: 5px 11px; font-size: 12px; }
.hist-schip.on { background: #5a5f78; color: #fff; border-color: transparent; }
html[data-theme="dark"] .hist-schip.on { background: #c9a6ff; color: #1a1a2e; }

.hist-or { font-size: 12px; color: #8b8da3; margin-left: 2px; }
.hist-lvsel { flex: 0 1 110px; }
.hist-lvin { flex: 0 0 58px; width: 58px; min-width: 0; margin: 0; padding: 7px 6px; text-align: center; border-radius: 10px; border: 1px solid #d5d8e0; background: #fff; color: #3b3f58; font-size: 12.5px; font-weight: 700; font-family: inherit; }
.hist-lverr { flex: 1 0 100%; font-size: 12px; color: #d33; }
.hist-lverr:empty { display: none; }
html[data-theme="dark"] .hist-lvin { background: #22243a; border-color: #3a3d57; color: #c5c8dc; }

.hist-fchip { padding: 5px 10px; font-size: 12px; }
.hist-pchip:disabled { opacity: .45; cursor: default; }

.mrd-ref { fill: rgba(52, 190, 112, 0.45); stroke: #3fd380; stroke-width: 1.6; stroke-dasharray: 4 3; stroke-linejoin: round; }
.prec .prec-rcmp { margin: 0 0 8px; }

/* 버전 옆 서열표 티어 칩 (곡 블럭 · 갱신 카드 · 곡 팝업) */
.ver-row { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; max-width: 100%; vertical-align: middle; }
.record-info .ver-row, .hb-tags .ver-row { align-self: flex-start; }
.tier-chips { display: contents; }
.tier-chip { display: inline-block; white-space: nowrap; font-size: 11px; font-weight: 800; line-height: 1.35; padding: 1px 7px; border-radius: 999px; color: color-mix(in srgb, var(--tc) 62%, #000); background: color-mix(in srgb, var(--tc) 16%, transparent); border: 1px solid color-mix(in srgb, var(--tc) 70%, transparent); }
/* 서열표 붙여넣기/복사 창 */
.ti-box .ti-msg { font-size: .82rem; color: #55556f; margin: 4px 0 8px; }
.ti-box .ti-pre, .ti-box .ti-name-l { color: #3b3b55; }
.ti-box .ti-ta { color: #2a2a40; background: #fafafd; border: 1.5px solid #d8d8e6; }
.ti-box .ti-ta { width: 100%; min-height: 130px; resize: vertical; font-size: .72rem; font-family: ui-monospace, Menlo, Consolas, monospace; box-sizing: border-box; padding: 8px; border-radius: 10px; }
.ti-box .ti-pre { font-size: .82rem; margin: 8px 0 2px; }
.ti-box .ti-warn { color: #8a6d1f; font-size: .76rem; }
.ti-box .ti-name-l { display: block; margin: 8px 0 0; font-size: .82rem; font-weight: 700; }
.ti-box .ti-name { width: 100%; box-sizing: border-box; margin-top: 4px; }
.ti-box .ti-err { color: #e5484d; font-size: .8rem; min-height: 1em; margin-top: 6px; }
.ti-box .set-edit-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.ti-box .set-edit-actions button { width: auto; }
html[data-theme="dark"] .tier-chip, .note-summary .tier-chip { color: var(--tc); }

.tier-chip[data-tl] { cursor: pointer; }
.tier-chip[data-tl]:hover { filter: brightness(1.12); }
.achv-tile.achv-flash { animation: achvFlash 1.1s ease-in-out 3; position: relative; z-index: 2; }
@keyframes achvFlash { 0%, 100% { box-shadow: 0 0 0 0 rgba(157,99,240,0); transform: scale(1); } 50% { box-shadow: 0 0 0 4px rgba(157,99,240,.85), 0 0 18px 4px rgba(157,99,240,.55); transform: scale(1.12); } }

/* 단위인정 탭 이벤트 배너 · 관리자 이벤트 도구 창 */
.dan-event { margin: 0 0 10px; }
.dan-event:empty { display: none; }
.dan-ev { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, rgba(255,95,168,.2), rgba(157,99,240,.2)); border: 1px solid rgba(255,120,190,.55); }
.dan-ev-main { flex: 1 1 240px; min-width: 0; }
.dan-ev-title { font-weight: 900; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.dan-ev-text { margin-top: 5px; font-size: 13.5px; line-height: 1.6; opacity: .92; white-space: pre-wrap; overflow-wrap: anywhere; }
.dan-ev-meta { margin-top: 6px; font-size: 12px; opacity: .72; overflow-wrap: anywhere; }
.dan-ev-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.dan-ev-go { background: linear-gradient(135deg, #ff77b2, #9d63f0) !important; color: #fff !important; border: 0 !important; font-weight: 900 !important; }
.dan-ev-admin { display: flex; align-items: center; gap: 10px; font-size: 12.5px; opacity: .8; }
.dan-ev-ov { position: fixed; inset: 0; z-index: 10040; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(8,9,20,.78); }
.dan-ev-frame { position: relative; width: min(820px, 100%); height: min(92dvh, 900px); border-radius: 16px; overflow: hidden; background: #0d0e16; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.dan-ev-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #0d0e16; }
.dan-ev-x { position: absolute; top: 8px; right: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 16px; cursor: pointer; }

/* 레이더 수정됨 표시 (레이더를 고치는 사람 화면에서만) */
.mre-ed { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-style: normal; font-size: .64rem; font-weight: 900; background: rgba(255,126,179,.22); color: #ff9cc7; vertical-align: middle; }
.mrd-edited { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 6px 0 2px; font-size: .74rem; }
.mrd-edited i { font-style: normal; font-weight: 900; color: #ff9cc7; margin-right: 2px; }
.mrd-edited span { padding: 1px 8px; border-radius: 999px; background: rgba(255,126,179,.16); color: #ffb9d6; font-weight: 800; }

/* ── 곡 책갈피 · 메모 ── */
.sm-btn-wrap { display: inline-flex; align-items: center; gap: 6px; margin: 0 8px 0 0; flex-shrink: 0; }
.sm-btn { border-color: #ff77b2; color: #ff77b2; display: inline-flex; align-items: center; gap: 5px; }
.sm-btn:hover { background: rgba(255,119,178,.14); }
.sm-btn.on { background: rgba(255,119,178,.12); }
.sm-dot { display: inline-block; width: 8px; height: 12px; border-radius: 2px 2px 0 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }
@media (max-width: 560px) { .note-modal-header > .sm-btn-wrap { order: 3; flex: 1 1 100%; margin: 10px 0 0; } }
/* 자켓 이미지 둘레에 책갈피 색 테두리 (이미지 바로 뒤에 절대위치로 얹힘, 클릭은 그대로 통과) */
.sm-badge { position: absolute; z-index: 3; pointer-events: none; box-sizing: border-box; --bw: 3px; --rd: 0; --pip: 8px; }
.sm-ring { position: absolute; inset: 0; border-radius: var(--rd); padding: var(--bw); box-sizing: border-box;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.sm-memo { position: absolute; right: calc(var(--bw) + 2px); bottom: calc(var(--bw) + 2px); width: var(--pip); height: var(--pip); border-radius: 50%; background: #fff; border: 1.5px solid rgba(0,0,0,.5); box-sizing: border-box; }
/* 편집 팝업 */
.sm-ov { z-index: 10040; }
.sm-box { width: min(440px, 94vw); max-height: 88vh; overflow-y: auto; padding-bottom: 14px; color: #fff; }
.sm-song { font-weight: 800; padding: 4px 18px 0; overflow-wrap: anywhere; }
.sm-sec { padding: 14px 18px 6px; font-weight: 800; font-size: .9rem; }
.sm-sec small { font-weight: 500; opacity: .6; margin-left: 6px; font-size: .75rem; }
.sm-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px; }
.sm-chip { display: inline-flex; align-items: center; gap: 7px; width: auto; padding: 7px 13px; border-radius: 999px; border: 1.5px solid rgba(128,128,150,.45); background: transparent; color: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.sm-chip i { width: 9px; height: 14px; background: var(--c); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); opacity: .55; }
.sm-chip.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
.sm-chip.on i { opacity: 1; }
.sm-manage { margin: 12px 18px 0; font-size: .85rem; }
.sm-manage summary { cursor: pointer; opacity: .8; padding: 4px 0; }
.sm-def { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.sm-def input[type=color] { width: 36px; height: 30px; padding: 0; border: 1px solid rgba(128,128,150,.5); border-radius: 6px; background: none; cursor: pointer; flex: none; }
.sm-def input[type=text] { flex: 1; min-width: 0; }
.sm-del { width: 30px; height: 30px; padding: 0; border-radius: 8px; flex: none; background: transparent; border: 1px solid rgba(128,128,150,.5); color: inherit; cursor: pointer; }
.sm-add { width: auto; margin-top: 4px; padding: 6px 12px; border-radius: 8px; font-size: .82rem; }
.sm-hint { opacity: .6; font-size: .78rem; margin-top: 6px; }
#smMemo { display: block; width: calc(100% - 36px); margin: 0 18px; box-sizing: border-box; resize: vertical; min-height: 84px; }
.sm-ft { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px 0; }
.sm-msg { font-size: .8rem; opacity: .6; }
.sm-msg.err { color: #ff5c8a; opacity: 1; }
.sm-save { width: auto; margin-left: auto; }

/* 책갈피 탭 (내 공간) */
.smt { max-width: 820px; }
.smt-games, .smt-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.smt-game, .smt-chip { width: auto; padding: 7px 13px; border-radius: 999px; font-size: .85rem; font-weight: 700; background: transparent; color: inherit; border: 1.5px solid rgba(128,128,150,.45); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.smt-game b, .smt-chip b { font-weight: 800; opacity: .65; }
.smt-game.on { background: linear-gradient(135deg, #ff77b2, #9d63f0); border-color: transparent; color: #fff; }
.smt-game.on b { opacity: .85; }
.smt-chip i { width: 9px; height: 14px; background: var(--c); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }
.smt-chip.on { border-color: var(--c, #ff77b2); background: color-mix(in srgb, var(--c, #ff77b2) 18%, transparent); }
.smt-q { display: block; width: 100%; box-sizing: border-box; margin: 4px 0 12px; }
.smt-list { display: flex; flex-direction: column; gap: 10px; }
.smt-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(128,128,150,.28); cursor: pointer; background: rgba(128,128,150,.06); }
.smt-row:hover { background: rgba(128,128,150,.12); }
.smt-jk { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; background: rgba(128,128,150,.25); }
.smt-body { flex: 1; min-width: 0; }
.smt-name { font-weight: 800; overflow-wrap: anywhere; }
.smt-mks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.smt-mk { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid var(--c); }
.smt-mk i { width: 7px; height: 11px; background: var(--c); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }
.smt-memo { margin-top: 6px; font-size: .85rem; opacity: .85; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.smt-edit { width: auto; padding: 6px 12px; border-radius: 8px; font-size: .8rem; flex: none; }
.smt-top { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.smt-manage { width: auto; padding: 6px 12px; border-radius: 8px; font-size: .8rem; }

.smt-types { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(128,128,150,.28); background: rgba(128,128,150,.05); }
.smt-types-h { font-weight: 800; margin-bottom: 8px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.smt-types-h small { font-weight: 500; opacity: .6; font-size: .75rem; }
.smt-saved { margin-left: auto; font-size: .78rem; font-weight: 600; opacity: .7; }
.smt-trow { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.smt-trow input[type=color] { width: 38px; height: 32px; padding: 0; border: 1px solid rgba(128,128,150,.5); border-radius: 6px; background: none; cursor: pointer; flex: none; }
.smt-trow input[type=text] { flex: 1; min-width: 0; max-width: 320px; }
.smt-cnt { min-width: 28px; text-align: right; font-size: .8rem; opacity: .65; font-variant-numeric: tabular-nums; }
.smt-tdel { width: 30px; height: 30px; padding: 0; border-radius: 8px; flex: none; background: transparent; border: 1px solid rgba(128,128,150,.5); color: inherit; cursor: pointer; }
.smt-trow { flex-wrap: wrap; }
.smt-vis { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-left: 46px; margin-top: -1px; }
.smt-vl { font-size: .74rem; opacity: .65; margin-right: 2px; }
.smt-vb { width: auto; min-width: 0; flex: 0 0 auto; margin: 0; padding: 3px 10px; border-radius: 999px; font-size: .76rem; line-height: 1.4; cursor: pointer; background: transparent; color: inherit; border: 1px dashed rgba(128,128,150,.55); opacity: .6; }
.smt-vb.on { opacity: 1; border-style: solid; border-color: var(--accent, #7c6cff); background: rgba(124,108,255,.14); font-weight: 600; }
@media (max-width: 480px) { .smt-vis { padding-left: 0; } }
.smt-tadd { width: auto; margin-top: 6px; padding: 6px 12px; border-radius: 8px; font-size: .82rem; }

/* 콜렉션: 네임플레이트(고정 위치) + 프레임 배너에서 버튼 진하게 */
.ps-plate-host { position: relative; isolation: isolate; }
.ps-plate { position: absolute; left: 0; top: 0; width: 100%; max-width: 520px; z-index: -1; pointer-events: none; }
.profile-section.ps-grid .profile-info > .ps-plate.ps-plate { grid-column: auto; grid-row: auto; }
.ps-plate img { display: block; width: 100%; height: auto; max-width: none; border-radius: 8px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.mc-banner-prev { min-height: 120px; }
.profile-section.ps-bg .toggle-container :is(.game-switch-btn, #howToUpdateBtn, #sdvxHowToUpdateBtn, #openToolsBtn, #myPageBtn, #sdvxMyPageBtn, #openSettingsBtn, #friendTabBtn, #snapPickBtn, .logout-button) {
    background: rgba(14,16,42,.9); border: 1px solid rgba(255,255,255,.38); color: #fff;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); text-shadow: none; box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.profile-section.ps-bg .toggle-container :is(.game-switch-btn, #openToolsBtn, #openSettingsBtn, #friendTabBtn, #snapPickBtn, .logout-button):hover { background: rgba(40,44,92,.95); border-color: rgba(255,255,255,.6); }
.profile-section.ps-bg .toggle-container :is(#myPageBtn, #sdvxMyPageBtn) { background: rgba(98,56,176,.92); border-color: rgba(190,150,255,.7); }
.profile-section.ps-bg .toggle-container .logout-button { color: #ffb3b8; border-color: rgba(255,130,140,.6); }
.profile-section.ps-bg > .profile-radar { background: rgba(8,10,30,.5); }
.mc-prev-in .ps-plate { display: block; flex: none; }
.mc-banner-prev .mc-prev-in > div { min-height: 84px; justify-content: flex-start; }

/* 콜렉션: 아이콘·칭호 고르기 */
.mc-pick-icon .mc-item { width: 84px; max-width: calc(33% - 6px); }
.mc-pick-icon .mc-item-none { width: 100%; max-width: 100%; }
.mc-pick-trophy { gap: 6px; }
.mc-tt { width: auto; margin: 0; padding: 6px 12px; border-radius: 999px; border: 2px solid #8a8fa6; background: rgba(128,128,160,.12); color: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.mc-tt.sel { background: #3b82f6; color: #fff; }
.mc-tq { width: 100%; box-sizing: border-box; margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.mc-prev-in em.mc-prev-title { font-style: normal; align-self: flex-start; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; border: 2px solid #8a8fa6; background: rgba(0,0,0,.35); max-width: 100%; overflow-wrap: anywhere; }

/* 곡 고르기: 공식 서열표 보기 */
.cpk-fld[hidden] { display: none; }
.cpk-const.cpk-tiername { width: 56px; font-size: 12px; line-height: 1.25; word-break: keep-all; overflow-wrap: anywhere; }

/* 숙제 세트 카드: 공유·수정·책갈피·삭제 4개를 네모(2×2)로, 받은 숙제 카드는 한 줄 */
.set-marks-btn { display: inline-flex !important; align-items: center; justify-content: center; width: 32px !important; height: 32px; padding: 0 !important; margin: 0; border-radius: 9px; font-size: 15px; background: #f4ecff !important; color: #8a4fe0 !important; border: 1px solid #dcc7f8 !important; cursor: pointer; }
.set-marks-btn:hover { background: #9d63f0 !important; color: #fff !important; }
html[data-theme="dark"] .set-marks-btn { background: rgba(157,99,240,.18) !important; color: #c9a7f5 !important; border-color: #4a3a6e !important; }
html[data-theme="dark"] .set-marks-btn:hover { background: #9d63f0 !important; color: #fff !important; }
.admin-set-header-btns.has-marks { display: grid; grid-template-columns: repeat(2, 32px); gap: 6px; flex: 0 0 auto; align-self: flex-start; }
.admin-set-header-btns.has-marks > button { width: 32px !important; height: 32px; padding: 0 !important; margin: 0; display: inline-flex !important; align-items: center; justify-content: center; border-radius: 9px; }
.admin-set-card > .admin-set-header > .admin-set-header-btns.has-marks { min-height: 0; }

/* 이미지 저장: 책갈피 표시 켜고 끄기 */
.share-marks-opt { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; font-size: 13px; cursor: pointer; }
.share-marks-opt[hidden], .cs-marks[hidden] { display: none; }
.share-marks-opt input, .cs-marks input { width: auto; margin: 0; }
.cs-marks { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 2px; font-size: 13px; cursor: pointer; }
.cs-marks small { opacity: .65; font-size: 11px; }

/* 곡 팝업: 레이팅대별 유저 통계 */
.us-insight { margin-top: 8px; font-size: .78rem; font-weight: 700; color: #ffeb3b; line-height: 1.45; }
.us-chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.us-chip { width: auto; flex: 0 0 auto; display: inline-block; margin: 0; min-width: 0; box-sizing: border-box; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: rgba(255,255,255,.8); border-radius: 999px; padding: 3px 10px; font-size: .72rem; font-weight: 800; cursor: pointer; font-family: inherit; }
.us-chip.on { background: #9d63f0; border-color: #b98cf2; color: #fff; }
.us-chart { margin-top: 6px; }
.us-svg { width: 100%; height: auto; display: block; overflow: visible; }
.us-grid { stroke: rgba(255,255,255,.12); stroke-width: 1; stroke-dasharray: 2 3; }
.us-ax { font-size: 8.5px; fill: rgba(255,255,255,.5); font-weight: 700; }
.us-ax.on { fill: #fff; }
.us-bar { cursor: pointer; }
.us-fill { fill: rgba(255,255,255,.38); transition: fill .15s; }
.us-bar.me .us-fill { fill: #9d63f0; }
.us-bar.sel .us-fill { fill: #d9c2ff; }
.us-bar.me.sel .us-fill { fill: #b98cf2; stroke: #fff; stroke-width: 1.2; }
.us-val { font-size: 8.5px; fill: #fff; font-weight: 800; }
.us-avgline { fill: none; stroke: #ffeb3b; stroke-width: 1.3; stroke-dasharray: 3 3; opacity: .8; }
.us-avgdot { fill: #ffeb3b; stroke: #1b1630; stroke-width: 1; }
.us-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .64rem; color: rgba(255,255,255,.6); font-weight: 700; margin-top: 2px; }
.us-legend i { display: inline-block; vertical-align: middle; margin-right: 4px; }
.us-legend .lg-bar { width: 10px; height: 8px; border-radius: 2px; background: rgba(255,255,255,.38); }
.us-legend .lg-me { width: 10px; height: 8px; border-radius: 2px; background: #9d63f0; }
.us-legend .lg-avg { width: 8px; height: 8px; border-radius: 50%; background: #ffeb3b; }
.us-chartwrap { position: relative; }
.us-tip { position: absolute; top: 4px; right: 2%; width: 158px; z-index: 5; padding: 7px 9px; border-radius: 10px; background: rgba(20,16,38,.96); border: 1px solid rgba(185,140,242,.6); box-shadow: 0 6px 18px rgba(0,0,0,.45); pointer-events: none; font-size: .72rem; color: #fff; }
.us-tip.left { right: auto; left: 34px; }
.us-tip[hidden] { display: none; }
.us-tip-h { margin-bottom: 4px; line-height: 1.3; }
.us-tip-h small { font-size: .62rem; color: rgba(255,255,255,.55); font-weight: 600; }
.us-tip-b { display: grid; gap: 2px; }
.us-tip-r { display: grid; grid-template-columns: 38px 1fr auto; gap: 6px; align-items: baseline; color: rgba(255,255,255,.72); font-variant-numeric: tabular-nums; }
.us-tip-r b { color: #fff; font-weight: 800; text-align: right; }
.us-tip-r.on { color: #ffeb3b; }
.us-tip-r.on b { color: #ffeb3b; }
.us-tip-f { margin-top: 4px; font-size: .58rem; color: rgba(255,255,255,.45); line-height: 1.3; }
.us-read .us-tip-b { grid-template-columns: 1fr 1fr; gap: 2px 16px; margin-top: 2px; }
.us-bar:hover .us-fill { fill: rgba(255,255,255,.6); }
.us-bar.me:hover .us-fill { fill: #b98cf2; }
.us-read { margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.06); font-size: .78rem; color: #fff; line-height: 1.5; font-variant-numeric: tabular-nums; }
.us-read small { font-size: .66rem; color: rgba(255,255,255,.55); font-weight: 600; }
.us-d { font-style: normal; font-size: .68rem; font-weight: 800; color: rgba(255,255,255,.5); }
.us-d.up { color: #6fe3a0; }
.us-d.dn { color: #ff9b8c; }
.us-note { margin-top: 6px; font-size: .66rem; color: rgba(255,255,255,.5); line-height: 1.45; }

/* 책갈피 테두리는 NEW 글자와 상수(레벨) 알약 뒤로 */
.record-art .hb-const, .record-art .new-label, .hb-art .hb-const, .hb-art .new-label { z-index: 4; }

/* 목표 세트 카드: 공유·수정·책갈피·삭제 4개를 같은 크기(32px) 네모 2×2 로 (공개/비공개 알약은 옆에 그대로) */
.set-btn-grid { display: grid; grid-template-columns: repeat(2, 32px); gap: 6px; flex: 0 0 auto; align-self: flex-start; }
.set-btn-grid > button { width: 32px !important; height: 32px; padding: 0 !important; margin: 0; display: inline-flex !important; align-items: center; justify-content: center; border-radius: 9px; }
.admin-set-card > .admin-set-header > .admin-set-header-btns:has(> .set-btn-grid) { align-items: flex-start; }

/* 상수표 이미지 세부 설정 */

/* 기록 탭 요약 도넛 */
.record-summary { background: #fff; border-radius: 14px; box-shadow: 0 1px 6px rgba(26,26,46,.08); padding: 14px 14px 12px; margin-bottom: 12px; }
.rs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.rs-h1 { font-size: 14px; font-weight: 800; color: #3b2a6b; }
.rs-h2 { font-size: 12px; color: #889; }
.rs-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .rs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; } }
.rs-item { min-width: 0; display: flex; flex-direction: column; align-items: center; }
.rs-title { font-size: 12px; font-weight: 800; color: #7b3fe4; margin-bottom: 4px; }
.rs-ring { position: relative; width: 96px; height: 96px; }
.rs-ring svg { width: 100%; height: 100%; display: block; }
.rs-ring circle { transition: stroke-dasharray .25s; }
.rs-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; line-height: 1.15; }
.rs-mid b { font-size: 17px; font-weight: 800; color: #1a1a2e; }
.rs-mid span { font-size: 10px; color: #889; margin-top: 1px; }
.rs-legend { list-style: none; margin: 8px 0 0; padding: 0; width: 100%; max-width: 150px; display: flex; flex-direction: column; gap: 2px; }
.rs-legend li { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #556; }
.rs-legend i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.rs-legend .rs-l { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-legend b { font-weight: 800; color: #1a1a2e; font-variant-numeric: tabular-nums; }

/* 달성 요약: 대상/ALL 스위치, 선택 기준 표시, 검정 말풍선 */
.rs-hl { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.rs-seg-sw { display: inline-flex; flex: 0 0 auto; border: 1px solid #d9c6ff; border-radius: 999px; overflow: hidden; background: #f6f0ff; }
.rs-sc { appearance: none; border: 0; margin: 0; padding: 4px 12px; font-size: 12px; font-weight: 800; color: #7b3fe4; background: transparent; cursor: pointer; }
.rs-sc.on { background: linear-gradient(135deg, #ff77b2, #9d63f0); color: #fff; }
.rs-ring .rs-seg { cursor: default; }
.rs-ring .rs-seg:hover { stroke-width: 16; }
.rs-legend li.pk { cursor: pointer; border-radius: 6px; padding: 1px 3px; margin: 0 -3px; }
.rs-legend li.pk:hover { background: rgba(123,63,228,.14); }
.rs-legend li.in { background: rgba(123,63,228,.07); }
.rs-legend li.sel { background: rgba(123,63,228,.18); }
.rs-legend li.sel .rs-l { font-weight: 800; color: #3b2a6b; }
.rs-tip { position: fixed; z-index: 100000; pointer-events: none; background: rgba(0,0,0,.9); color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 12px; line-height: 1.35; box-shadow: 0 2px 10px rgba(0,0,0,.35); white-space: nowrap; }
.rs-tip b { display: block; font-size: 13px; font-weight: 800; }
.rs-tip span { display: block; }
.rs-tip em { display: block; font-style: normal; color: #bbb; font-size: 11px; }

/* 이미지별 라이트/다크 선택 */
.share-theme { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; flex-wrap: wrap; }
.share-theme-lab { font-size: 13px; font-weight: 800; color: #7a7f98; }
.share-theme-seg { display: inline-flex; border: 1px solid #d5d8e0; border-radius: 999px; overflow: hidden; background: #fff; }
.share-theme-seg button { appearance: none; border: 0; margin: 0; padding: 6px 16px; width: auto; font-size: 13px; font-weight: 700; color: #5a6076; background: transparent; cursor: pointer; font-family: inherit; border-radius: 0; }
.share-theme-seg button.on { background: linear-gradient(135deg, #ff77b2, #9d63f0); color: #fff; font-weight: 900; }

/* ── 라이벌 ── */
.rival-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; font-size: 12px; color: #666; }
.rival-head b { font-size: 13px; color: #d9480f; }
.friend-item .rival-btn { background: #fff4e6; color: #d9480f; border: 1px solid #ffc078; }
.friend-item .rival-btn.on { background: #f76707; color: #fff; border-color: #f76707; }
.friend-item .rival-btn:disabled { opacity: .6; cursor: default; }
.friend-item .rival-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #f76707; color: #fff; font-size: 10px; font-weight: 800; vertical-align: middle; }
.note-summary.vs-on .ns-main, .note-summary.vs-on .ns-dx, .note-summary.vs-on .ns-empty { display: none; }
.note-summary.vs-on { padding-bottom: 0; border-bottom: 0; }
.note-vs { padding: 4px 12px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.vs-grid { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 6px; align-items: stretch; }
.vs-card { position: relative; min-width: 0; padding: 8px 10px 10px; border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
.vs-me { background: linear-gradient(160deg, rgba(47,125,246,0.20), rgba(255,255,255,0.04)); border-color: rgba(47,125,246,0.45); }
.vs-rv { background: linear-gradient(200deg, rgba(247,103,7,0.22), rgba(255,255,255,0.04)); border-color: rgba(247,103,7,0.5); }
.vs-card.vs-win { box-shadow: 0 0 0 2px #ffd43b, 0 0 14px rgba(255,212,59,0.45); }
.vs-who { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; min-width: 0; color: #fff; font-weight: 800; font-size: 0.82rem; }
.vs-who i { font-style: normal; flex: 0 0 auto; font-size: 0.62rem; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,0.18); }
.vs-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-sel { min-width: 0; max-width: 100%; flex: 1 1 auto; padding: 2px 4px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.3); background: rgba(0,0,0,0.35); color: #fff; font-size: 0.8rem; font-weight: 800; }
.vs-card .ns-main { gap: 6px; }
.vs-card .ns-score { font-size: 1.35rem; }
.vs-card .ns-score small { font-size: 0.85rem; }
.vs-card .ns-grade { min-width: 0; padding: 2px 10px; font-size: 0.8rem; }
.vs-card .ns-chip { font-size: 0.68rem; padding: 2px 7px; }
.vs-card .ns-dx { flex-wrap: wrap; gap: 4px 6px; margin: 6px 0 0; font-size: 0.78rem; }
.vs-card .ns-dxpct { font-size: 0.7rem; }
.vs-none { color: rgba(255,255,255,0.5); font-size: 0.82rem; padding: 14px 0; text-align: center; }
.vs-upd { margin-top: 6px; color: rgba(255,255,255,0.45); font-size: 0.68rem; }
.vs-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0 2px; }
.vs-vs { font-weight: 900; font-size: 1.15rem; font-style: italic; letter-spacing: 1px; color: #ffd43b; text-shadow: 0 0 8px rgba(255,212,59,0.55), 1px 1px 0 #c92a2a; }
.vs-diff { font-size: 0.68rem; font-weight: 800; padding: 2px 6px; border-radius: 999px; white-space: nowrap; }
.vs-diff.win { background: #2f9e44; color: #fff; }
.vs-diff.lose { background: #e03131; color: #fff; }
.vs-diff.tie { background: rgba(255,255,255,0.2); color: #fff; }
@media (max-width: 480px) {
  .vs-grid { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 4px; }
  .vs-card { padding: 6px 7px 8px; }
  .vs-card .ns-score { font-size: 1.05rem; }
  .vs-card .ns-score small { font-size: 0.7rem; }
  .vs-vs { font-size: 0.95rem; }
}
@media (max-width: 480px) { .vs-rv .vs-who i { display: none; } .vs-who { font-size: 0.78rem; } }
.friend-item .friend-info strong.friend-name-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-item .rival-tag { align-self: flex-start; margin-left: 0; }
@media (max-width: 480px) { .friend-item { gap: 6px; } .friend-item .rival-btn { padding: 6px 8px; font-size: 11px; } }
/* VS 카드: 알약 자리 고정 (없으면 회색 점선 빈칸) */
.vs-main { min-height: 28px; }
.vs-slots { display: flex; gap: 5px; margin-top: 6px; }
.vs-slot { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; flex: 1 1 0; min-width: 0; height: 24px; border-radius: 999px; }
.vs-slot.empty { border: 1.5px dashed rgba(255,255,255,0.28); }
.vs-slot.g { flex: 0 0 64px; height: 26px; }
.vs-slot .ns-chip, .vs-slot .ns-star { width: 100%; box-sizing: border-box; text-align: center; white-space: nowrap; padding-left: 4px; padding-right: 4px; font-size: 0.7rem; line-height: 18px; }
.vs-nomsg { color: rgba(255,255,255,0.5); font-size: 0.8rem; }
.vs-main .ns-grade { flex: 0 0 64px; box-sizing: border-box; padding-left: 4px; padding-right: 4px; white-space: nowrap; }
.vs-card .ns-dx { min-height: 20px; }
@media (max-width: 480px) { .vs-slots { gap: 3px; } .vs-slot { height: 22px; } .vs-slot.g, .vs-main .ns-grade { flex-basis: 54px; } .vs-slot .ns-chip, .vs-slot .ns-star { font-size: 0.62rem; line-height: 16px; padding-left: 2px; padding-right: 2px; } }
.vs-main .ns-grade, .vs-slot.g { height: 24px; line-height: 24px; padding-top: 0; padding-bottom: 0; }
.vs-main .ns-grade { display: inline-block; }
@media (max-width: 480px) { .vs-main .ns-grade, .vs-slot.g { height: 22px; line-height: 22px; } }
/* ── 라이벌: 난이도표·서열표 승패 표시 ── */
.achv-tile .t-rv { position: absolute; right: 0; top: 11px; z-index: 4; width: 12px; height: 12px; line-height: 12px; text-align: center; font-size: 8px; font-weight: 900; color: #fff; border-radius: 3px 0 0 3px; text-shadow: none; }
.achv-tile .t-rv.win { background: #2f9e44; }
.achv-tile .t-rv.lose { background: #e03131; }
.achv-tile .t-rv.tie { background: #868e96; }
.achv-tile .t-score.t-rvd { font-size: 9px; font-weight: 800; letter-spacing: -.3px; }
.achv-tile .t-score.t-rvd.win { color: #8ce99a; }
.achv-tile .t-score.t-rvd.lose { color: #ff8787; }
.achv-tile .t-score.t-rvd.tie { color: #dee2e6; }
@media (max-width: 720px) { .achv-tile .t-rv { width: 10px; height: 10px; line-height: 10px; font-size: 7px; top: 9px; } .achv-tile .t-score.t-rvd { font-size: 8px; } }
#achvChartModeSwitch { flex-wrap: wrap; }
@media (max-width: 480px) { #achvChartModeSwitch button { padding: 7px 9px; font-size: 12px; } }
.achv-rv-opt { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.achv-rv-opt select { padding: 4px 6px; border-radius: 8px; border: 1px solid #d5d8e0; background: #fff; color: #334; font-size: 12px; font-weight: 700; max-width: 140px; }
.achv-rv-msg { color: #e03131; font-size: 11px; font-weight: 700; }

/* ── 라이벌 소식 (벨 · 목록 · 로그인 요약 팝업) ── */
.toggle-container .rv-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 36px; margin: 0; padding: 0; color: #fff; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; cursor: pointer; box-shadow: none; }
.toggle-container .rv-bell:hover { background: rgba(255,255,255,.2); }
.toggle-container .rv-bell .ic { width: 18px; height: 18px; }
.rv-bell-n { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: #e03131; color: #fff; font-size: 10px; font-weight: 800; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px #1a1a2e; }
.rv-ov { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(0,0,0,.6); }
.rv-box { width: 100%; max-width: 520px; max-height: 84vh; display: flex; flex-direction: column; border-radius: 14px; background: #1a1a2e; color: #eee; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 12px 40px rgba(0,0,0,.5); overflow: hidden; }
.rv-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
.rv-head strong { font-size: 1rem; }
.rv-head-r { flex: 1; text-align: right; }
.rv-allread { padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #ddd; font-size: 12px; font-weight: 700; cursor: pointer; width: auto; margin: 0; }
.rv-x { flex: 0 0 auto; width: 30px; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.rv-body { overflow-y: auto; padding: 8px 10px 12px; -webkit-overflow-scrolling: touch; }
.rv-empty { margin: 24px 8px; text-align: center; color: rgba(255,255,255,.55); font-size: 13px; line-height: 1.5; }
.rv-grp { margin: 6px 0; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.rv-grp.unread { border-color: rgba(247,103,7,.6); background: linear-gradient(160deg, rgba(247,103,7,.14), rgba(255,255,255,.04)); }
.rv-grp-h { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 9px 10px; cursor: pointer; }
.rv-av { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,.15); }
.rv-sent { flex: 1 1 140px; min-width: 0; font-size: 13px; font-weight: 700; line-height: 1.3; word-break: break-all; }
.rv-grp.unread .rv-sent::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #f76707; vertical-align: 1px; }
.rv-chip { font-style: normal; padding: 1px 7px; border-radius: 999px; background: rgba(47,158,68,.3); color: #8ce99a; font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.rv-day { color: rgba(255,255,255,.45); font-size: 11px; }
.rv-grp-b { padding: 0 8px 8px; }
.rv-song { display: flex; align-items: center; gap: 8px; padding: 5px 2px; border-top: 1px solid rgba(255,255,255,.06); }
.rv-sj { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 5px; overflow: hidden; background: #2a2a40; }
.rv-sj img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-sn { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.rv-sn b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-sn small { color: rgba(255,255,255,.5); font-size: 10.5px; }
.rv-ss { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; line-height: 1.25; }
.rv-ss b { font-size: 12.5px; }
.rv-ss small { color: rgba(255,255,255,.5); font-size: 10px; }
.rv-ss em { font-style: normal; color: #8ce99a; font-size: 10.5px; font-weight: 800; }
.rv-new { font-style: normal; padding: 0 5px; border-radius: 4px; background: #f76707; color: #fff; font-size: 9.5px; font-weight: 900; }
.rv-more { text-align: center; color: rgba(255,255,255,.5); font-size: 12px; padding: 4px 0; }
.rv-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 12px 12px; }
.rv-foot:empty { display: none; }
.rv-btn { width: auto; margin: 0; padding: 8px 18px; border-radius: 10px; border: 0; background: linear-gradient(135deg, #ff77b2, #9d63f0); color: #fff; font-size: 13px; font-weight: 800; cursor: pointer; }
.rv-btn.ghost { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); }
@media (max-width: 480px) { .rv-ov { padding: 8px; align-items: flex-end; } .rv-box { max-height: 88vh; } .rv-ss b { font-size: 12px; } }

/* ── VS 비교 페이지 (친구창 [VS]) ── */
html.vp-lock { overflow: hidden; }
.friend-item .rival-btn.rv-vs-btn { background: #fff; color: #7048e8; border: 1px solid #b197fc; font-weight: 900; letter-spacing: .5px; }
.vp { position: fixed; inset: 0; z-index: 10040; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #14141f; color: #eee; padding: 0 0 40px; }
.vp-top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: rgba(20,20,31,.96); border-bottom: 1px solid rgba(255,255,255,.1); }
.vp-share { margin: 0 0 0 auto; width: 34px; height: 34px; padding: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); color: #eee; flex: none; }
.vp-share .ic { width: 17px; height: 17px; }
.vp-share:hover { color: #ffd43b; border-color: #ffd43b; }
.cs-ov.vs-ov { z-index: 10100; }
.vp-top strong { font-size: 1.05rem; color: #ffd43b; font-style: italic; letter-spacing: 1px; }
.vp-back { width: auto; margin: 0; padding: 7px 14px; border-radius: 9px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.vp-load { margin: 40px 16px; text-align: center; color: rgba(255,255,255,.6); }
.vp > *:not(.vp-top):not(.vp-load) { max-width: 980px; margin-left: auto; margin-right: auto; }
.vp-head { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 8px; padding: 14px 12px 6px; }
.vp-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vp-who:last-child { flex-direction: row-reverse; text-align: right; }
.vp-who img, .vp-av { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,.15); }
.vp-who b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.vp-who small { color: rgba(255,255,255,.55); font-size: .72rem; }
.vp-vs { font-weight: 900; font-size: 1.3rem; font-style: italic; color: #ffd43b; text-shadow: 0 0 8px rgba(255,212,59,.5), 1px 1px 0 #c92a2a; }
.vp-sum { padding: 8px 12px 4px; }
.vp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vp-chip { width: auto; margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.2); background: rgba(255,255,255,.05); color: #ddd; font-size: 13px; font-weight: 700; cursor: pointer; }
.vp-chip b { font-size: 14px; }
.vp-chip.win b { color: #8ce99a; } .vp-chip.lose b { color: #ff8787; } .vp-chip.mine b { color: #74c0fc; } .vp-chip.theirs b { color: #ffc078; }
.vp-chip.on { background: #fff; color: #14141f; border-color: #fff; }
.vp-chip.on b { color: inherit; }
.vp-bar2 { display: flex; height: 8px; margin-top: 8px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); }
.vp-bar2 i { display: block; min-width: 0; }
.vp-bar2 .win { background: #2f9e44; } .vp-bar2 .tie { background: #868e96; } .vp-bar2 .lose { background: #e03131; }
.vp-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; }
.vp-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.08); }
.vp-seg button { width: auto; margin: 0; padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; color: #bbb; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.vp-seg button.on { background: #fff; color: #14141f; }
.vp select, .vp input[type=number], .vp input[type=search] { box-sizing: border-box; padding: 6px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.35); color: #fff; font-size: 13px; width: auto; margin: 0; }
.vp-ftoggle, .vp-reset { width: auto; margin: 0; padding: 6px 14px; border-radius: 9px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #ddd; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.vp-ftoggle.on { background: rgba(255,255,255,.18); }
.vp-filters { display: none; margin: 0 12px 8px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.vp-filters.open { display: block; }
.vp-frow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 6px 0; }
.vp-fl { flex: 0 0 56px; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.6); }
.vp-fc { width: auto; margin: 0 4px 0 0; padding: 4px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #ccc; font-size: 12px; font-weight: 700; cursor: pointer; }
.vp-fc.on { background: #9d63f0; border-color: #9d63f0; color: #fff; }
.vp-cin input { width: 76px; }
.vp-q { flex: 1 1 160px; min-width: 0; }
.vp-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.vp-fs { min-width: 0; margin: 0; padding: 6px 10px 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,.15); }
.vp-fs:first-child { border-color: rgba(47,125,246,.55); } .vp-fs:last-child { border-color: rgba(247,103,7,.6); }
.vp-fs legend { padding: 0 6px; font-size: 12.5px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-fs label { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 4px 0; font-size: 12px; color: rgba(255,255,255,.7); }
.vp-fs select { max-width: 62%; min-width: 0; font-size: 12px; padding: 4px 4px; }
.vp-body { padding: 0 8px; }
.vp-empty { margin: 30px 8px; text-align: center; color: rgba(255,255,255,.55); }
.vp-row { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr) 58px minmax(0,1fr); align-items: center; gap: 8px; padding: 7px 8px; margin: 4px 0; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.vp-row.r-win { border-left: 3px solid #2f9e44; } .vp-row.r-lose { border-left: 3px solid #e03131; } .vp-row.r-tie { border-left: 3px solid #868e96; }
.vp-row.r-mine { border-left: 3px solid #1c7ed6; } .vp-row.r-theirs { border-left: 3px solid #f08c00; }
.vp-song { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vp-song img { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: #2a2a40; }
.vp-song div { min-width: 0; display: flex; flex-direction: column; }
.vp-song b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-song small { color: rgba(255,255,255,.5); font-size: 10.5px; }
.vp-side { min-width: 0; }
.vp-score { display: flex; align-items: center; gap: 6px; min-height: 22px; }
.vp-score b { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vp-none { color: rgba(255,255,255,.4); }
.vp-side .ns-grade { min-width: 0; padding: 1px 7px; font-size: .72rem; white-space: nowrap; }
.vp-side .vs-slots { margin-top: 3px; gap: 3px; }
.vp-side .vs-slot { height: 18px; }
.vp-side .vs-slot.g { flex: 0 0 38px; height: 20px; }
.vp-side .vs-slot .ns-chip, .vp-side .vs-slot .ns-star { font-size: .6rem; line-height: 14px; padding: 0 3px; width: 100%; box-sizing: border-box; text-align: center; white-space: nowrap; }
.vp-mid { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.vp-badge { font-style: normal; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 900; color: #fff; background: #555; }
.vp-badge.win { background: #2f9e44; } .vp-badge.lose { background: #e03131; } .vp-badge.tie { background: #868e96; } .vp-badge.mine { background: #1c7ed6; } .vp-badge.theirs { background: #f08c00; }
.vp-d { font-size: 10.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.vp-d.win { color: #8ce99a; } .vp-d.lose { color: #ff8787; } .vp-d.tie { color: #ccc; }
.vp-more { display: block; width: 100%; margin: 8px 0; padding: 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #ddd; font-weight: 700; cursor: pointer; }
.vp-tiles .achv-ct-block { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); color: #eee; }
.vp-tiles .achv-ct-const, .vp-tiles .achv-ct-count { color: #eee; }
@media (max-width: 640px) {
  .vp-row { grid-template-columns: minmax(0,1fr) minmax(52px,auto) minmax(0,1fr); grid-template-areas: "song song song" "me mid rv"; row-gap: 6px; column-gap: 6px; }
  .vp-song { grid-area: song; } .vp-me { grid-area: me; } .vp-mid { grid-area: mid; } .vp-rv { grid-area: rv; }
  .vp-sides { grid-template-columns: 1fr; }
  .vp-who img, .vp-av { width: 32px; height: 32px; }
  .vp-fl { flex-basis: 48px; }
  .vp-score b { font-size: 12px; }
}
.vp > .vp-filters { width: calc(100% - 24px); box-sizing: border-box; margin: 0 auto 8px; }

/* VS 페이지 2차 다듬기: 승/패가 한눈에, 알약 가로 고정, PC에서 폭 줄이기 */
.vp > *:not(.vp-top):not(.vp-load) { max-width: 880px; }
.vp-row { position: relative; overflow: hidden; border-left-width: 4px; padding: 9px 10px; }
.vp-row.w-me.r-win   { background: linear-gradient(90deg,  rgba(47,158,68,.26), rgba(255,255,255,.04) 58%); }
.vp-row.w-rv.r-lose  { background: linear-gradient(270deg, rgba(224,49,49,.26), rgba(255,255,255,.04) 58%); }
.vp-row.r-tie        { background: linear-gradient(90deg, rgba(134,142,150,.20), rgba(255,255,255,.04) 30%, rgba(255,255,255,.04) 70%, rgba(134,142,150,.20)); }
.vp-row.w-me.r-mine  { background: linear-gradient(90deg,  rgba(28,126,214,.24), rgba(255,255,255,.04) 58%); }
.vp-row.w-rv.r-theirs{ background: linear-gradient(270deg, rgba(240,140,0,.24), rgba(255,255,255,.04) 58%); }
.vp-row.r-lose { border-left-color: #e03131; border-right: 4px solid #e03131; }
.vp-row.r-theirs { border-right: 4px solid #f08c00; }
.vp-row.r-win .vp-me .vp-score b, .vp-row.r-mine .vp-me .vp-score b { color: #8ce99a; text-shadow: 0 0 8px rgba(81,207,102,.55); }
.vp-row.r-mine .vp-me .vp-score b { color: #74c0fc; text-shadow: 0 0 8px rgba(77,171,247,.5); }
.vp-row.r-lose .vp-rv .vp-score b { color: #ff8787; text-shadow: 0 0 8px rgba(255,107,107,.5); }
.vp-row.r-theirs .vp-rv .vp-score b { color: #ffc078; text-shadow: 0 0 8px rgba(255,169,77,.5); }
.vp-row.w-me .vp-rv, .vp-row.w-rv .vp-me { opacity: .72; }
.vp-badge { padding: 3px 13px; font-size: 15px; letter-spacing: .5px; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.vp-d { font-size: 14px; font-weight: 900; }
.vp-d2 { font-size: 10.5px; font-weight: 800; opacity: .85; font-variant-numeric: tabular-nums; }
.vp-d2.win { color: #8ce99a; } .vp-d2.lose { color: #ff8787; } .vp-d2.tie { color: #ccc; }
.vp-pts { color: rgba(255,255,255,.6); font-size: 10.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vp-score { flex-wrap: wrap; row-gap: 1px; }
.achv-tile.rs-win { box-shadow: 0 0 0 2px #2f9e44; } .achv-tile.rs-lose { box-shadow: 0 0 0 2px #e03131; } .achv-tile.rs-tie { box-shadow: 0 0 0 2px #868e96; }
.achv-tile.rs-mine { box-shadow: 0 0 0 2px #1c7ed6; } .achv-tile.rs-theirs { box-shadow: 0 0 0 2px #f08c00; }
.vp-tiles .achv-tile .t-rv { width: 15px; height: 15px; line-height: 15px; font-size: 10px; top: 11px; }
.vp-tiles .achv-tile .t-score.t-rvd { font-size: 10px; }
@media (min-width: 641px) {
  .vp-row { grid-template-columns: minmax(0,1fr) 226px 96px 226px; gap: 10px; }
  .vp-side .vs-slots { justify-content: flex-start; gap: 4px; }
  .vp-side .vs-slot.c, .vp-side .vs-slot.s { flex: 0 0 64px; }
  .vp-side .vs-slot.x { flex: 0 0 54px; }
  .vp-side .vs-slot { height: 20px; }
  .vp-side .vs-slot .ns-chip, .vp-side .vs-slot .ns-star { font-size: .66rem; line-height: 16px; }
  .vp-side .vs-slot.g { flex: 0 0 44px; height: 22px; }
  .vp-score b { font-size: 14px; }
}
@media (max-width: 640px) { .vp-row.r-lose, .vp-row.r-theirs { border-right-width: 3px; } .vp-badge { font-size: 13px; padding: 2px 10px; } .vp-d { font-size: 12.5px; } }

/* ── 라이벌 (츄니즘·사볼) 곡 팝업 VS / VS 페이지 카드 ── */
.cs-vc { min-height: 44px; display: flex; flex-direction: column; gap: 4px; }
.cs-vc-s { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.cs-vc-s b { font-size: 1.12rem; font-variant-numeric: tabular-nums; color: #fff; white-space: nowrap; }
.cs-vc-s .chuni-rank { font-size: .85rem; font-weight: 900; }
.cs-vc-c { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 3px; min-height: 18px; }
.cs-vc-none, .cs-vc.empty { color: rgba(255,255,255,.5); font-size: .82rem; }
.cs-vc.empty { align-items: center; justify-content: center; }
.cs-vs { margin-top: 8px; }
.vp-row .cs-vc-c { margin-top: 2px; }
@media (max-width: 480px) { .cs-vc-s b { font-size: .98rem; } }
.vp-badge { white-space: nowrap; }

/* 라이벌 소식 설정 (rival-notif-prefs.js) */
.rv-gear { padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #ddd; font-size: 12px; font-weight: 700; cursor: pointer; width: auto; margin: 0 6px 0 0; display: inline-flex; align-items: center; gap: 4px; }
.rv-gear .ic { width: 14px; height: 14px; }
.rvp-note { margin: 4px 4px 10px; font-size: 12px; color: rgba(255,255,255,.6); line-height: 1.5; }
.rvp-card { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.rvp-card.off .rvp-name b { opacity: .55; }
.rvp-top { display: flex; align-items: center; gap: 10px; }
.rvp-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rvp-name b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rvp-sum { font-size: 11px; color: rgba(255,255,255,.55); }
.rvp-sw { position: relative; flex: none; width: 42px; height: 24px; margin: 0; cursor: pointer; }
.rvp-sw input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.rvp-sw i { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.2); transition: background .15s; pointer-events: none; }
.rvp-sw i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.rvp-sw input:checked + i { background: linear-gradient(135deg, #ff77b2, #9d63f0); }
.rvp-sw input:checked + i::after { transform: translateX(18px); }
.rvp-opts { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(255,255,255,.12); }
.rvp-f { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; color: rgba(255,255,255,.75); }
.rvp-f input { width: 104px; padding: 5px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.25); color: #fff; font-size: 13px; margin: 0; }
.rvp-chk { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; color: rgba(255,255,255,.75); cursor: pointer; }
.rvp-chk input { width: auto; margin: 0; }
.rvp-opts[hidden] { display: none; }
.rvp-f select { padding: 5px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.25); color: #fff; font-size: 13px; margin: 0; width: auto; max-width: 100%; }
.rvp-f.rvp-wide { flex-basis: 100%; }
.rvp-rule { border-top: 1px dashed rgba(255,255,255,.14); margin-top: 10px; padding-top: 8px; }
.rvp-rule:first-child { border-top: 0; margin-top: 8px; padding-top: 0; }
.rvp-rule-h { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,.7); }
.rvp-rule-h b { font-weight: 800; }
.rvp-rdel { width: 24px; height: 24px; padding: 0; margin: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: transparent; color: #ddd; font-size: 16px; line-height: 1; cursor: pointer; }
.rvp-rule .rvp-opts { margin-top: 8px; padding-top: 0; border-top: 0; }
.rvp-tl { font-style: normal; color: rgba(255,255,255,.6); }
.rvp-add { width: 100%; margin: 10px 0 0; padding: 8px; border-radius: 10px; border: 1px dashed rgba(255,255,255,.3); background: rgba(255,255,255,.04); color: #ddd; font-size: 13px; font-weight: 700; cursor: pointer; }
.rvp-rules[hidden] { display: none; }
.rv-hls { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.rv-hl { font-style: normal; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 900; line-height: 1.5; color: #fff; background: linear-gradient(135deg, #ff77b2, #9d63f0); white-space: nowrap; }
.rv-hl-dx { background: linear-gradient(135deg, #36c5f0, #3b82f6); }
.rv-hl-mark { background: linear-gradient(135deg, #ffb347, #f76707); }
.rvp-sec { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.rvp-sec-h { display: flex; align-items: center; gap: 8px; }
.rvp-sec-h b { font-size: 12.5px; font-weight: 800; }
.rvp-sec-h small { flex: 1 1 auto; min-width: 0; font-size: 10.5px; color: rgba(255,255,255,.5); }
.rvp-sec .rvp-opts { margin-top: 8px; padding-top: 8px; }
.rv-vs { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; margin-right: 6px; padding-right: 8px; border-right: 1px solid rgba(255,255,255,.1); font-variant-numeric: tabular-nums; line-height: 1.25; text-align: right; }
.rv-vs small { color: rgba(255,255,255,.45); font-size: 9.5px; }
.rv-vs b { font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.rv-vs.up b { color: #ff8fb3; }
.rv-vs.dn b { color: #74c0fc; }
.rv-vs.eq b, .rv-vs.none b { color: rgba(255,255,255,.6); font-weight: 600; }
.rv-hl-dxup { background: rgba(59,130,246,.25); color: #9ccbff; border: 1px solid rgba(59,130,246,.5); }
