.arcana-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.arcana-title-wrap h1 {
  margin: 0;
  font-size: 17px;
  line-height: 1.1;
  white-space: nowrap;
}

.arcana-version {
  color: rgba(108, 117, 130, 0.58);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.arcana-topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.arcana-icon-btn:disabled {
  color: var(--arcana-muted);
  cursor: not-allowed;
  opacity: 0.55;
}

.arcana-class-card-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  max-height: 168px;
  overflow: auto;
}

.arcana-class-card {
  min-height: 28px;
  border: 1px solid var(--arcana-line);
  border-radius: var(--arcana-radius);
  background: #fff;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.arcana-class-card:hover,
.arcana-class-card.is-selected {
  transform: translateY(-1px);
  border-color: var(--arcana-primary);
  color: var(--arcana-primary);
  background: var(--arcana-primary-soft);
}

.arcana-class-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 8px;
}

@keyframes arcana-class-drop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.arcana-refresh-notice {
  margin: 6px 0 7px;
  padding: 5px 8px;
  border: 1px solid var(--arcana-line-soft);
  border-radius: var(--arcana-radius);
  background: #fff;
  color: var(--arcana-muted);
  font-size: 11px;
}

.arcana-layout {
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity 0.16s ease, filter 0.16s ease;
}

.arcana-layout.is-class-locked {
  opacity: 0.42;
  filter: grayscale(0.25);
  pointer-events: none;
  user-select: none;
}

.arcana-panel {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--arcana-line);
  border-radius: var(--arcana-radius);
  box-shadow: var(--arcana-shadow);
  padding: 0;
}

.arcana-panel > :not(.arcana-panel-title):not(.arcana-loading-overlay) {
  margin-left: 8px;
  margin-right: 8px;
}

.arcana-panel > :last-child:not(.arcana-loading-overlay) {
  margin-bottom: 8px;
}

.arcana-panel.is-saving,
.arcana-panel.is-saved {
  cursor: not-allowed;
}

.arcana-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 29px;
  margin: 0 0 7px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--arcana-line-soft);
  background: #fff;
}

.arcana-panel-title-inner {
  min-height: 28px;
  margin-bottom: 6px;
  padding: 6px 8px;
}

.arcana-panel-title h2,
.arcana-panel-title h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
}

.arcana-panel-title h3 {
  font-size: 13px;
}

.arcana-panel-title span {
  color: var(--arcana-muted);
  font-size: 11px;
  white-space: nowrap;
}

.arcana-panel-title span.is-limit {
  color: var(--arcana-danger);
  font-weight: 800;
  animation: arcana-limit-pulse 0.28s ease-out;
}

@keyframes arcana-limit-pulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.05); }
  100% { transform: scale(1); }
}





@keyframes arcana-message-drop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .arcana-page {
    padding-left: 6px;
    padding-right: 6px;
  }

    .arcana-title-wrap,
  .arcana-topbar-actions {
    justify-content: space-between;
  }
}

/* ARC-0.1.00 수정사항_3: 키노조형 상단 버튼과 내용 기준 폭 */
/* Legacy page width authority moved to arcana-layout-manager.css. */


.arcana-refresh-notice,
.arcana-panel-title {
  align-items: flex-start;
}

.arcana-panel-title span {
  min-height: 14px;
  line-height: 1.25;
  text-align: right;
}

/* ARC-0.2.01: 항목 카드 크기 고정, 제목/본문 구분, 탑바 압축 */
.arcana-title-wrap h1 {
  font-size: 16px;
}

.arcana-version {
  font-size: 8px;
  opacity: 0.55;
}

.arcana-refresh-notice {
  width: 100%;
  margin: 5px 0 6px;
  padding: 5px 7px;
}

/* Legacy layout width authority moved to arcana-layout-manager.css. */
.arcana-layout {
  gap: 7px;
}

.arcana-panel {
  border-radius: var(--arcana-radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
}

.arcana-panel > :not(.arcana-panel-title):not(.arcana-loading-overlay) {
  margin-left: 7px;
  margin-right: 7px;
}

.arcana-panel > :last-child:not(.arcana-loading-overlay) {
  margin-bottom: 7px;
}

.arcana-panel-title {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 40px;
  margin: 0 0 6px;
  padding: 5px 7px;
  border-bottom: 1px solid var(--arcana-line-soft);
  background: #fff;
}

.arcana-title-stack {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 28px;
}

.arcana-panel-title h2,
.arcana-panel-title h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.1;
}

.arcana-panel-title h3 {
  font-size: 12px;
}

.arcana-panel-title span {
  display: block;
  min-height: 14px;
  line-height: 1.2;
  color: var(--arcana-muted);
  font-size: 10px;
  text-align: left;
  white-space: nowrap;
}

.arcana-panel-title span.is-limit {
  color: var(--arcana-danger);
  font-weight: 800;
}



@media (max-width: 720px) {
  .arcana-page {
    width: 100%;
    max-width: 100%;
  }
}

.arcana-future-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 210px;
  padding: 12px;
  border: 1px dashed var(--arcana-line);
  border-radius: var(--arcana-radius);
  color: var(--arcana-muted);
  text-align: center;
  font-size: 11px;
  line-height: 1.45;
}

.arcana-class-arrow {
  color: var(--arcana-muted);
  font-size: 12px;
}

.arcana-class-card-list {
  gap: 7px;
  max-height: 230px;
}

.arcana-class-card {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding: 0 9px;
  font-weight: 700;
}

.arcana-layout.is-class-locked .arcana-panel {
  background: #fff;
}

.arcana-layout.is-class-locked .arcana-panel-title span {
  white-space: normal;
}

.arcana-class-card-list {
  grid-template-columns: repeat(2, max-content);
  justify-content: center;
  gap: 6px;
  max-height: none;
  overflow: visible;
}

.arcana-class-card {
  width: 118px;
  min-height: 36px;
  justify-content: flex-start;
  padding: 0 8px;
  gap: 6px;
  font-size: 12px;
}

.arcana-class-actions {
  justify-content: center;
  gap: 6px;
  margin-top: 9px;
}

.arcana-class-actions .arcana-btn {
  width: 118px;
  height: 32px;
  font-weight: 700;
}


@keyframes arcana-class-rise-compact {
  from { opacity: 0; transform: translateX(50%) translateY(10px); }
  to { opacity: 1; transform: translateX(50%) translateY(0); }
}

@media (max-width: 720px) {

  @keyframes arcana-class-rise-compact {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}


/* 26062008 KINOJO Shell 통합: 기존 arcana-topbar는 공통 탑바로 이관하고, 이 영역은 클래스 선택 전용 액션바로 축소합니다. */
.arcana-actionbar {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 4px 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(143, 164, 204, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 30px rgba(32, 48, 91, 0.08);
  backdrop-filter: blur(10px);
}
.arcana-actionbar .arcana-title-wrap {
  min-width: 0;
}
.arcana-actionbar .arcana-title-wrap h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}
.arcana-actionbar .arcana-version {
  display: block;
  margin-top: 3px;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}
@media (max-width: 720px) {
  .arcana-actionbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .arcana-actionbar .arcana-topbar-actions {
    justify-content: stretch;
  }
  .arcana-actionbar .arcana-class-picker-button {
    width: 100%;
  }
}
