/* EASYONMAIL Letter Studio — isolated prototype, no global site styles */
:root {
  --studio-blue: #1161eb;
  --studio-navy: #163361;
  --studio-border: #dbe3ef;
  --studio-bg: #f5f7fb;
  --studio-paper-width: 580px;
  --studio-paper-height: 836.06px;
  --studio-line-step: 36.08px;
  --studio-font-size: 19px;
  --studio-first-line-top: 123.6px;
  --studio-text-left: 59.6px;
  --studio-text-width: 461px;
  --studio-font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --studio-text-align: left;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body.eom-studio-page {
  margin: 0;
  background: var(--studio-bg);
  color: #263955;
  font-family:
    "Pretendard",
    -apple-system,
    BlinkMacSystemFont,
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    sans-serif;
  word-break: keep-all;
}
button,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
.eom-studio-header {
  height: 66px;
  background: #fff;
  border-bottom: 1px solid var(--studio-border);
}
.eom-studio-header__inner {
  max-width: 1240px;
  height: 100%;
  padding: 0 25px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.eom-studio-back {
  text-decoration: none;
  color: #52637f;
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 115px;
}
.eom-studio-back span {
  font-size: 13px;
  font-weight: 700;
}
.eom-studio-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}
.eom-studio-brand strong {
  color: #1152ac;
  font-size: 19px;
  letter-spacing: -0.055em;
  font-weight: 900;
}
.eom-studio-brand span {
  font-size: 9px;
  letter-spacing: 0.15em;
  color: #8a9cb2;
  font-weight: 850;
}
.eom-studio-prototype {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #96a3b8;
  border: 1px solid #e2e8f1;
  border-radius: 30px;
  padding: 6px 9px;
  font-weight: 800;
}
.eom-studio-layout {
  max-width: 1220px;
  margin: 0 auto;
  padding: 36px 24px 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 256px;
  gap: 28px;
  align-items: start;
}
.eom-studio-main {
  min-width: 0;
}
.eom-studio-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.eom-studio-heading h1 {
  margin: 0;
  color: var(--studio-navy);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -0.05em;
}
.eom-studio-heading p {
  margin: 6px 0 0;
  color: #7d8da5;
  font-size: 13px;
}
.eom-studio-save {
  font-size: 12px;
  color: #47765f;
  margin-top: 7px;
  white-space: nowrap;
}
.eom-studio-save.is-error {
  color: #bb4b38;
}

/* 정상 저장 상태는 숨기고 오류 발생 시에만 표시 */
.eom-studio-save:not(.is-error) {
    display: none;
}

.eom-studio-toolbar {
  position: sticky;
  z-index: 20;
  top: 10px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--studio-border);
  border-radius: 13px;
  box-shadow: 0 6px 23px rgba(34, 55, 87, 0.055);
  padding: 13px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
}
.eom-studio-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #657890;
  font-weight: 700;
}
.eom-studio-toolbar select {
  height: 36px;
  min-width: 122px;
  border: 1px solid #d7dfea;
  border-radius: 7px;
  background: #fff;
  padding: 0 8px;
  color: #2a4164;
  font-size: 12px;
}
.eom-studio-tool-group {
  display: inline-flex;
  gap: 0;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d7dfea;
  border-radius: 7px;
}
.eom-studio-tool-group button {
  border: 0;
  border-right: 1px solid #d7dfea;
  background: #fff;
  min-height: 36px;
  padding: 0 11px;
  color: #456080;
  font-weight: 700;
  font-size: 12px;
}
.eom-studio-tool-group button:last-child {
  border-right: 0;
}
.eom-studio-tool-group button.is-active {
  color: #fff;
  background: #35bfb2;
}
.eom-studio-tool-group button:hover:not(.is-active) {
  background: #f0f6ff;
}
.eom-studio-hint {
  font-size: 12px;
  color: #76879d;
  margin: 14px 0 18px;
  line-height: 1.7;
}
.eom-studio-hint kbd {
  font: inherit;
  font-weight: 800;
}
.eom-studio-editor {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  outline: 0;
  caret-color: #1251ab;
}
.eom-studio-sheet {
  isolation: isolate;
  position: relative;
  flex: 0 0 auto;
  width: var(--studio-paper-width);
  height: var(--studio-paper-height);
  max-width: 100%;
  box-shadow: 0 8px 24px rgba(36, 45, 57, 0.13);
  color: #222;
  cursor: text;
}
.eom-studio-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--studio-paper-image, url("../../images/mail/studio-paper.jpg"));
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
}
.eom-studio-sheet::after {
  content: attr(data-page-label);
  position: absolute;
  z-index: 3;
  top: 12px;
  left: -27px;
  pointer-events: none;
  font-size: 12px;
  line-height: 1;
  padding: 9px 10px;
  border-radius: 7px;
  background: #60718faa;
  color: #fff;
  font-weight: 750;
}
.eom-studio-sheet.is-over-limit::before {
  filter: grayscale(1);
  opacity: 0.4;
}
.eom-studio-sheet.is-over-limit {
  background-color: #e4e7eb;
}
.eom-studio-sheet.is-over-limit .eom-studio-lines {
  color: #313e4c;
}
.eom-studio-sheet.is-over-limit .eom-studio-over-label {
  display: block;
}
.eom-studio-over-label {
  display: none;
  position: absolute;
  top: 9px;
  right: 10px;
  z-index: 4;
  border-radius: 6px;
  background: #b95a44;
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 7px 10px;
  pointer-events: none;
}
.eom-studio-lines {
  position: absolute;
  left: var(--studio-text-left);
  top: var(--studio-first-line-top);
  width: var(--studio-text-width);
  color: var(--studio-text-color, #000000);
  font-family: var(--studio-font-family);
  font-size: var(--studio-font-size);
  line-height: var(--studio-line-step);
  letter-spacing: 0;
  text-align: var(--studio-text-align);
  font-weight: 400;
}

/* .eom-studio-line {display:block;width:100%;height:var(--studio-line-step); line-height:var(--studio-line-step);white-space:pre;word-break:normal;overflow:hidden; outline:none; margin:0;padding:0; border:0;} */
.eom-studio-line {
  display: block;
  width: 100%;

  height: auto;
  min-height: var(--studio-line-step);
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;

  line-height: var(--studio-line-step);
  overflow: hidden;
  outline: none;
  margin: 0;
  padding: 0;
  border: 0;
}

.eom-studio-line::selection {
  background: #7cb3f0b0;
}
.eom-studio-footnote {
  max-width: 580px;
  margin: 20px auto 0;
  color: #8b98a8;
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}
.eom-studio-panel {
  position: sticky;
  top: 20px;
  padding: 23px 20px;
  background: #fff;
  border: 1px solid #e2e8f1;
  box-shadow: 0 8px 28px rgba(45, 71, 100, 0.04);
  border-radius: 14px;
}
.eom-studio-panel h2 {
  font-size: 16px;
  color: #153565;
  margin: 0 0 14px;
}
.eom-studio-count {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.eom-studio-count strong {
  font-size: 38px;
  font-weight: 900;
  color: var(--studio-blue);
  font-variant-numeric: tabular-nums;
}
.eom-studio-count span {
  font-size: 13px;
  color: #65748d;
}
.eom-studio-limit-msg {
  font-size: 12px;
  line-height: 1.6;
  min-height: 20px;
  color: #62816f;
  margin: 3px 0 22px;
}
.eom-studio-limit-msg.is-over {
  color: #bb5943;
  font-weight: 750;
}
.eom-studio-panel-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #485d79;
  margin-bottom: 8px;
}
.eom-studio-panel select {
  width: 100%;
  height: 39px;
  border: 1px solid #d6e0ed;
  border-radius: 7px;
  background: #fff;
  padding: 0 10px;
  color: #365274;
  font-size: 13px;
}
.eom-studio-panel-actions {
  display: grid;
  gap: 9px;
  margin: 20px 0;
}
.eom-studio-panel-actions button {
  padding: 11px 9px;
  border: 1px solid #dce5f1;
  border-radius: 8px;
  background: #f8faff;
  color: #315786;
  font-size: 12px;
  font-weight: 750;
}
.eom-studio-panel-actions button:last-child {
  background: #fff;
  color: #9a5b54;
  border-color: #ead5d2;
}
.eom-studio-panel-note {
  font-size: 11px;
  line-height: 1.75;
  color: #8290a4;
  margin: 0;
}
@media (max-width: 950px) {
  .eom-studio-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .eom-studio-panel {
    position: static;
    max-width: 580px;
    width: 100%;
    justify-self: center;
  }
  .eom-studio-editor {
    gap: 20px;
  }
}
@media (max-width: 650px) {
  .eom-studio-header {
    height: 58px;
  }
  .eom-studio-header__inner {
    padding: 0 14px;
  }
  .eom-studio-back {
    min-width: 60px;
  }
  .eom-studio-back span {
    display: none;
  }
  .eom-studio-prototype {
    font-size: 9px;
  }
  .eom-studio-layout {
    padding: 25px 8px 48px;
  }
  .eom-studio-heading {
    padding: 0 8px;
  }
  .eom-studio-heading h1 {
    font-size: 22px;
  }
  .eom-studio-heading p {
    font-size: 12px;
  }
  .eom-studio-toolbar {
    top: 0;
    padding: 9px;
    gap: 7px;
    border-radius: 9px;
  }
  .eom-studio-tool-group button {
    padding: 0 9px;
  }
  .eom-studio-hint {
    padding: 0 8px;
  }
  .eom-studio-sheet::after {
    left: 5px;
    top: 5px;
    font-size: 10px;
    padding: 6px 8px;
  }
  .eom-studio-editor {
    gap: 14px;
  }
  .eom-studio-footnote {
    padding: 0 10px;
  }
}

/* 글자 색상 선택 */
.eom-studio-color {
  position: relative;
}

.eom-studio-color__trigger {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  background: #fff;
  border: 1px solid #d7dfea;
  border-radius: 7px;
  color: #456080;
  font-size: 12px;
}

.eom-studio-color__swatch {
  width: 19px;
  height: 19px;
  background: #000;
  border: 1px solid #d5d5d5;
  border-radius: 4px;
}

.eom-studio-color__palette {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 12px auto 0;
  padding: 14px;
  background: #fff;
  border: 1px solid #d7dfea;
  border-radius: 10px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.07);
}

.eom-studio-color__palette[hidden] {
  display: none;
}

.eom-studio-color__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  color: #263955;
}

#studioColorClose {
  border: 0;
  background: transparent;
  color: #718098;
  font-size: 24px;
  line-height: 1;
  padding: 0 4px;
}

.eom-studio-color__options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.eom-studio-color-option {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 8px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.eom-studio-color-option:hover {
  background: #f4f7fb;
}

.eom-studio-color-option.is-selected {
  border-color: #bcd6f5;
  background: #eef6ff;
}

.eom-studio-color-option__swatch {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.eom-studio-color-option__preview {
  min-width: 0;
  font-size: 17px;
  white-space: nowrap;
}

@media (max-width: 650px) {
  .eom-studio-color__options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .eom-studio-color-option {
    gap: 4px;
    padding: 8px 4px;
  }

  .eom-studio-color-option__preview {
    font-size: 14px;
  }
}

/* 스튜디오 글꼴 선택 버튼 */
.eom-studio-font-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eom-studio-font-label {
  font-size: 12px;
  font-weight: 700;
  color: #657890;
}

.eom-studio-font-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 160px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid #d7dfea;
  border-radius: 7px;
  background: #fff;
  color: #2a4164;
  font-size: 12px;
}

/* 전체 화면 글꼴 선택 레이어 */
.eom-studio-font-modal[hidden] {
  display: none;
}

.eom-studio-font-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
}

.eom-studio-font-modal__shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.eom-studio-font-modal__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 772px;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  background: #f3f8ff;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.18);
}

/* 상단 제목 */
.eom-studio-font-modal__header {
  flex: none;
  background: #f3f8ff;
}

.eom-studio-font-modal__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 15px;
  color: #102b68;
}

#studioFontClose {
  border: 0;
  background: transparent;
  color: #526581;
  font-size: 26px;
  line-height: 1;
}

/* 가나다 분류 */
.eom-studio-font-tabs,
.eom-studio-font-themes {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 2px;
  padding: 8px;
}

.eom-studio-font-tabs {
  background: #1161eb;
}

.eom-studio-font-tabs button {
  border: 0;
  border-radius: 5px;
  padding: 7px 10px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.eom-studio-font-tabs button.is-active {
  background: #fff;
  color: #1161eb;
}

/* 테마별 분류 */
.eom-studio-font-themes button {
  border: 0;
  border-radius: 5px;
  padding: 6px 7px;
  background: transparent;
  color: #163361;
  font-size: 12px;
  font-weight: 700;
}

.eom-studio-font-themes button.is-active {
  background: #fff;
  color: #1161eb;
}

/* 검색 */
.eom-studio-font-search {
  display: flex;
  gap: 7px;
  padding: 8px 12px 12px;
}

.eom-studio-font-search input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #cbd6e8;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
}

.eom-studio-font-search button {
  min-width: 70px;
  border: 0;
  border-radius: 6px;
  background: #1161eb;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

/* 글꼴 미리보기 목록 */
.eom-studio-font-results {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 16px 20px;
}

.eom-studio-font-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.eom-studio-font-option {
  position: relative;
  display: block;
  height: 100%;
  cursor: pointer;
}

.eom-studio-font-option input {
  position: absolute;
  opacity: 0;
}

.eom-studio-font-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 3px solid transparent;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 9px rgba(24, 43, 77, 0.09);
}

.eom-studio-font-option input:checked + .eom-studio-font-card {
  border-color: #1161eb;
}

/* 글꼴 카드 상단 정보 */
.eom-studio-font-card__summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 62px;
  padding: 8px 10px;
  box-sizing: border-box;
  min-width: 0;
  text-align: center;
}

/* 글꼴 이름 */
.eom-studio-font-card__name {
  display: block;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  color: #102b68;
}

/* 제작사 및 설명 */
.eom-studio-font-card__meta {
  display: block;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
  line-height: 1.4;
  color: #8292a9;
}

.eom-studio-font-card__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  background: #f6f8fb;
}

.eom-studio-font-card__thumb img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.eom-studio-font-message {
  padding: 30px;
  text-align: center;
  color: #657890;
  font-size: 13px;
}

/* 하단 고정 버튼 */
.eom-studio-font-modal__actions {
  flex: none;
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #e5eaf2;
}

.eom-studio-font-modal__actions button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

#studioFontApply {
  flex: 6;
  background: #1161eb;
}

#studioFontCancel {
  flex: 3;
  background: #8897ad;
}

/* 모바일 */
@media (max-width: 650px) {
  .eom-studio-font-trigger {
    min-width: 135px;
  }

  .eom-studio-font-tabs button,
  .eom-studio-font-themes button {
    padding: 6px 4px;
    font-size: 11px;
  }

  .eom-studio-font-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .eom-studio-font-results {
    padding: 10px;
  }
}

/* 이모지 선택 버튼 */
.eom-studio-emoji-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #d7dfea;
  border-radius: 7px;
  background: #fff;
  color: #456080;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.eom-studio-emoji-trigger span:first-child {
  font-size: 18px;
}

.eom-studio-emoji-trigger:hover,
.eom-studio-emoji-trigger[aria-expanded="true"] {
  background: #f3f8ff;
  border-color: #1161eb;
}

/* 이모지 선택창 */
.eom-studio-emoji-picker {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);

  width: 100%;
  max-width: 580px;
  margin: 0;
  padding: 14px;
  border: 1px solid #d7dfea;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.07);
}

.eom-studio-emoji-picker[hidden] {
  display: none;
}

/* 상단 제목 */
.eom-studio-emoji-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  color: #263955;
}

#studioEmojiClose {
  border: 0;
  background: transparent;
  color: #718098;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

/* 카테고리 */
.eom-studio-emoji-categories {
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.eom-studio-emoji-categories button {
  flex: 1 0 auto;
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid #e5eaf2;
  border-radius: 7px;
  background: #f8faff;
  color: #526581;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.eom-studio-emoji-categories button.is-active {
  background: #1161eb;
  border-color: #1161eb;
  color: #fff;
}

/* 이모지 목록 */
.eom-studio-emoji-options {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 5px;
  max-height: 270px;
  overflow-y: auto;
  padding: 4px;
}

.eom-studio-emoji-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.eom-studio-emoji-item:hover,
.eom-studio-emoji-item:focus-visible {
  border-color: #c7ddfa;
  background: #edf5ff;
}

/* 안내 */
.eom-studio-emoji-help {
  margin: 12px 0 0;
  font-size: 11px;
  color: #8292a9;
  text-align: center;
}

/* 모바일 */
@media (max-width: 650px) {
  .eom-studio-emoji-picker {
    padding: 12px 10px;
  }

  .eom-studio-emoji-categories button {
    padding: 0 8px;
    font-size: 11px;
  }

  .eom-studio-emoji-options {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
  }

  .eom-studio-emoji-item {
    font-size: 25px;
  }
}

/* 편지 관리 도구 - 상단 */
.eom-studio-management {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5eaf2;
}

/* 현재 편지지 */
.eom-studio-management__paper {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  height: 35px;
  padding: 0 12px;
  border: 1px solid #d7dfea;
  border-radius: 7px;
  background: #f3f8ff;
  color: #365274;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

#studioToolbarPaper {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: left;
}

/* 저장 / 불러오기 */
.eom-studio-management__actions {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
}

.eom-studio-management__actions button {
  height: 35px;
  padding: 0 13px;
  border: 1px solid #d7dfea;
  border-radius: 7px;
  background: #fff;
  color: #365274;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

/* 작성 현황 - 하단 */
.eom-studio-management__status {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding-top: 9px;
  border-top: 1px solid #e5eaf2;
  font-size: 12px;
}

#studioToolbarProgress {
  color: #102b68;
  font-weight: 800;
}

.eom-studio-management__status span {
  color: #8292a9;
}

/* 모바일 */
@media (max-width: 650px) {
  .eom-studio-management {
    gap: 6px;
    padding-bottom: 9px;
  }

  .eom-studio-management__paper {
    padding: 0 10px;
    font-size: 11px;
  }

  .eom-studio-management__actions {
    gap: 5px;
  }

  .eom-studio-management__actions button {
    padding: 0 10px;
    font-size: 11px;
  }

  .eom-studio-management__status {
    padding-top: 8px;
    font-size: 11px;
  }
}

/* 작성완료 버튼 공통 */
.eom-studio-complete {
  border: 0;
  border-radius: 8px;
  background: #1161eb;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.eom-studio-complete:hover {
  background: #0d50c9;
}

/* 상단 작성완료 */
.eom-studio-complete--top {
  flex: 0 0 auto;
  height: 35px;
  padding: 0 14px;
  font-size: 12px;
  white-space: nowrap;
}

/* 하단 작성완료 */
.eom-studio-complete--bottom {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 22px;
  font-size: 14px;
}

/* 모바일 */
@media (max-width: 650px) {
  .eom-studio-complete--top {
    height: 33px;
    padding: 0 11px;
    font-size: 12px;
  }

  .eom-studio-complete--bottom {
    height: 48px;
    font-size: 14px;
  }
}

/* ========================================
 * 우체국 접수 안내
 * ======================================== */

.eom-studio-dispatch {
  margin: 0 0 12px;
  padding: 9px 13px;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  background: #f8fafc;
}

.eom-studio-dispatch__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.eom-studio-dispatch__title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #526581;
  font-size: 12px;
}

.eom-studio-dispatch__title strong {
  font-weight: 800;
}

.eom-studio-dispatch__icon {
  flex: 0 0 auto;
  color: #8292a9;
  font-size: 17px;
  line-height: 1;
}

.eom-studio-dispatch__countdown {
  color: #1161eb;
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.eom-studio-dispatch__countdown[hidden] {
  display: none;
}

.eom-studio-dispatch__detail {
  margin: 3px 0 0 25px;
  color: #7d8da5;
  font-size: 11px;
  line-height: 1.4;
}

/* 오늘 접수 가능 */
.eom-studio-dispatch.is-available {
  background: #f2faf5;
  border-color: #d1e8da;
}

.eom-studio-dispatch.is-available .eom-studio-dispatch__title {
  color: #176b49;
}

.eom-studio-dispatch.is-available .eom-studio-dispatch__icon {
  color: #21865b;
}

/* 마감 임박 */
.eom-studio-dispatch.is-urgent .eom-studio-dispatch__countdown {
  color: #cc2626;
}

/* 모바일 */
@media (max-width: 650px) {
  .eom-studio-dispatch {
    margin: 0 8px 11px;
    padding: 9px 11px;
  }

  .eom-studio-dispatch__title {
    gap: 6px;
    font-size: 12px;
  }

  .eom-studio-dispatch__countdown {
    font-size: 13px;
  }

  .eom-studio-dispatch__detail {
    margin-left: 24px;
    font-size: 11px;
  }
}

.eom-studio-history-icon {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eom-studio-history-icon--redo {
  transform: scaleX(-1);
}

/* 정렬 아이콘 */
.eom-studio-align-icon {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* 작성 현황 좌우 배치 */
.eom-studio-management__status {
  justify-content: space-between;
}

/* 이용안내 버튼 */
.eom-studio-help {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: #526581;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.eom-studio-help span {
  color: #1161eb;
  font-size: 16px;
  line-height: 1;
}

.eom-studio-help:focus-visible {
  outline: 2px solid #1161eb;
  outline-offset: 3px;
  border-radius: 3px;
}

/* 오른쪽 작성 현황 */
.eom-studio-management__status-count {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

#studioHistoryHelpButton {
  color: #456080;
}

#studioHistoryHelpButton:hover,
#studioHistoryHelpButton[aria-expanded="true"] {
  color: #1161eb;
}

/* 되돌리기 안내 툴팁 */
.eom-studio-history-tip {
  position: absolute;
  top: calc(100% + 8px);
  right: 10px;
  z-index: 30;
  width: min(340px, calc(100% - 20px));
  padding: 16px;
  border: 1px solid #d7dfea;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(25, 47, 81, 0.14);
  color: #526581;
  font-size: 12px;
  line-height: 1.7;
}

.eom-studio-history-tip[hidden] {
  display: none;
}

.eom-studio-history-tip__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.eom-studio-history-tip__header strong {
  color: #102b68;
  font-size: 13px;
}

#studioHistoryTipClose {
  border: 0;
  padding: 0 3px;
  background: transparent;
  color: #8292a9;
  font-size: 23px;
  line-height: 1;
}

.eom-studio-history-tip p {
  margin: 0 0 9px;
}

.eom-studio-history-tip p strong {
  color: #1161eb;
}

.eom-studio-history-tip .eom-studio-history-tip__note {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid #e5eaf2;
  color: #8292a9;
  font-size: 11px;
}

/* 안내창 내 되돌리기 / 다시실행 아이콘 */
.eom-studio-history-tip__action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #1161eb;
  vertical-align: middle;
  white-space: nowrap;
}

.eom-studio-history-tip__action .eom-studio-history-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

/* ========================================
 * 편지 작성 이용안내
 * ======================================== */

.eom-studio-guide-modal[hidden] {
  display: none;
}

.eom-studio-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.eom-studio-guide-modal__shade {
  position: absolute;
  inset: 0;
  background: rgba(16, 35, 66, 0.55);
}

.eom-studio-guide-modal__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border: 1px solid #d7dfea;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 15px 45px rgba(20, 40, 75, 0.18);
}

.eom-studio-guide-modal__header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid #e5eaf2;
}

.eom-studio-guide-modal__header strong {
  color: #102b68;
  font-size: 17px;
  font-weight: 800;
}

#studioGuideClose {
  border: 0;
  padding: 0 4px;
  background: transparent;
  color: #8292a9;
  font-size: 27px;
  line-height: 1;
}

.eom-studio-guide-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px;
}

.eom-studio-guide-steps {
  counter-reset: studio-guide;
  list-style: none;
  margin: 0;
  padding: 0;
}

.eom-studio-guide-steps li {
  position: relative;
  counter-increment: studio-guide;
  padding-left: 38px;
  margin-bottom: 22px;
}

.eom-studio-guide-steps li::before {
  content: counter(studio-guide);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #edf5ff;
  color: #1161eb;
  font-size: 12px;
  font-weight: 800;
}

.eom-studio-guide-steps li > strong {
  display: block;
  margin-bottom: 5px;
  color: #102b68;
  font-size: 14px;
}

.eom-studio-guide-steps p {
  margin: 0;
  color: #526581;
  font-size: 13px;
  line-height: 1.8;
  word-break: keep-all;
}

.eom-studio-guide-steps p b {
  color: #1161eb;
}

.eom-studio-guide-notice {
  padding: 13px 15px;
  border-radius: 8px;
  background: #f3f8ff;
}

.eom-studio-guide-notice strong {
  display: block;
  margin-bottom: 4px;
  color: #102b68;
  font-size: 12px;
}

.eom-studio-guide-notice p {
  margin: 0;
  color: #657890;
  font-size: 12px;
  line-height: 1.7;
}

.eom-studio-guide-modal__footer {
  flex: 0 0 auto;
  padding: 13px 22px;
  border-top: 1px solid #e5eaf2;
}

#studioGuideConfirm {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 7px;
  background: #1161eb;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

#studioGuideConfirm:hover {
  background: #0d50c9;
}

/* 팝업 표시 중 배경 스크롤 방지 */
body.eom-studio-guide-open {
  overflow: hidden;
}

/* 모바일 */
@media (max-width: 650px) {
  .eom-studio-guide-modal {
    padding: 12px;
  }

  .eom-studio-guide-modal__dialog {
    max-height: calc(100dvh - 24px);
    border-radius: 12px;
  }

  .eom-studio-guide-modal__header {
    padding: 16px;
  }

  .eom-studio-guide-modal__header strong {
    font-size: 16px;
  }

  .eom-studio-guide-modal__body {
    padding: 18px 16px;
  }

  .eom-studio-guide-modal__footer {
    padding: 12px 16px;
  }
}

/* 이용안내 - 버튼 예시와 설명 */
.eom-studio-guide-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
}

.eom-studio-guide-row > p {
  flex: 1 1 130px;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  color: #526581;
}

/* 일반 툴바 버튼 모양 */
.eom-studio-guide-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #d7dfea;
  border-radius: 7px;
  background: #fff;
  color: #456080;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.eom-studio-guide-btn--paper {
  justify-content: space-between;
  min-width: 130px;
  background: #f3f8ff;
}

.eom-studio-guide-swatch {
  display: inline-block;
  width: 17px;
  height: 17px;
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  background: #237a3c;
}

/* 글자 크기 및 정렬 버튼 그룹 */
.eom-studio-guide-btn-group {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d7dfea;
  border-radius: 7px;
  white-space: nowrap;
}

.eom-studio-guide-btn-group > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 9px;
  border-right: 1px solid #d7dfea;
  background: #fff;
  color: #456080;
  font-size: 12px;
  font-weight: 700;
}

.eom-studio-guide-btn-group > span:last-child {
  border-right: 0;
}

.eom-studio-guide-btn-group > span.is-active {
  background: #35bfb2;
  color: #fff;
}

/* SVG 아이콘 */
.eom-studio-guide-btn--icon {
  width: 38px;
  padding: 0;
}

.eom-studio-guide-btn--icon .eom-studio-history-icon,
.eom-studio-guide-btn-group .eom-studio-align-icon {
  width: 18px;
  height: 18px;
}

/* 작성완료 버튼 */
.eom-studio-guide-btn--complete {
  background: #1161eb;
  border-color: #1161eb;
  color: #fff;
}

/* 기능 연결 전 안내 */
.eom-studio-guide-pending {
  margin: 9px 0 0 !important;
  color: #8292a9 !important;
  font-size: 11px !important;
}

/* ========================================
 * 편지지 선택 갤러리
 * ======================================== */

.eom-studio-paper-modal[hidden] {
  display: none;
}

.eom-studio-paper-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.eom-studio-paper-modal__shade {
  position: absolute;
  inset: 0;
  background: rgba(16, 35, 66, 0.55);
}

.eom-studio-paper-modal__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 860px;
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 50px rgba(16, 35, 66, 0.2);
}

/* 헤더 */
.eom-studio-paper-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding: 19px 24px;
  border-bottom: 1px solid #e5eaf2;
}

.eom-studio-paper-modal__header strong {
  color: #102b68;
  font-size: 18px;
  font-weight: 800;
}

.eom-studio-paper-modal__header p {
  margin: 5px 0 0;
  color: #8292a9;
  font-size: 12px;
}

#studioPaperClose {
  border: 0;
  padding: 0 5px;
  background: transparent;
  color: #718098;
  font-size: 28px;
  line-height: 1;
}

/* 스크롤 영역 */
.eom-studio-paper-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 24px;
  background: #f8faff;
}

.eom-studio-paper-section + .eom-studio-paper-section {
  margin-top: 26px;
}

.eom-studio-paper-section__heading {
  margin-bottom: 13px;
}

.eom-studio-paper-section__heading h3 {
  margin: 0;
  color: #102b68;
  font-size: 15px;
}

.eom-studio-paper-section__heading em {
  margin-left: 4px;
  color: #1161eb;
  font-size: 11px;
  font-style: normal;
}

/* BEST 가로 목록 */
.eom-studio-paper-best {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 3px 2px 12px;
  scrollbar-width: thin;
}

/* 편지 / 카드 */
.eom-studio-paper-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.eom-studio-paper-types button {
  height: 39px;
  border: 1px solid #d7dfea;
  border-radius: 7px;
  background: #fff;
  color: #526581;
  font-size: 13px;
  font-weight: 700;
}

.eom-studio-paper-types button.is-active {
  border-color: #1161eb;
  background: #1161eb;
  color: #fff;
}

/* 카테고리 */
.eom-studio-paper-themes {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-bottom: 17px;
  padding-bottom: 5px;
}

.eom-studio-paper-themes button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid #dce5f1;
  border-radius: 30px;
  background: #fff;
  color: #526581;
  font-size: 12px;
  font-weight: 700;
}

.eom-studio-paper-themes button.is-active {
  border-color: #bcd6f5;
  background: #eaf2ff;
  color: #1161eb;
}

/* 전체 갤러리 */
.eom-studio-paper-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* 다음 단계에서 실제 데이터로 생성할 카드 디자인 */
.eom-studio-paper-card {
  position: relative;
  display: block;
  min-width: 0;
  width: 100%;
  padding: 8px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  color: #263955;
}

.eom-studio-paper-best .eom-studio-paper-card {
  flex: 0 0 155px;
}

.eom-studio-paper-card__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: #eef2f7;
}

.eom-studio-paper-card__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eom-studio-paper-card__name {
  display: block;
  overflow: hidden;
  margin-top: 9px;
  color: #263955;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.eom-studio-paper-card__meta {
  display: block;
  margin-top: 4px;
  color: #8292a9;
  font-size: 11px;
}

.eom-studio-paper-card__price {
  display: block;
  margin-top: 5px;
  color: #1161eb;
  font-size: 13px;
  font-weight: 800;
}

.eom-studio-paper-card.is-current {
  border-color: #b8ccef;
}

.eom-studio-paper-card.is-selected {
  border-color: #1161eb;
}

.eom-studio-paper-card.is-selected::after {
  content: "선택됨";
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #1161eb;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.eom-studio-paper-card:disabled {
  cursor: default;
  opacity: 1;
}

/* 데이터 연결 전 안내 */
.eom-studio-paper-empty {
  width: 100%;
  grid-column: 1 / -1;
  margin: 0;
  padding: 45px 15px;
  border: 1px dashed #d7dfea;
  border-radius: 9px;
  background: #fff;
  color: #8292a9;
  font-size: 12px;
  text-align: center;
}

/* 하단 고정 영역 */
.eom-studio-paper-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: none;
  padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid #e5eaf2;
  background: #fff;
}

.eom-studio-paper-selected {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.eom-studio-paper-selected span {
  color: #8292a9;
  font-size: 11px;
}

.eom-studio-paper-selected strong {
  overflow: hidden;
  color: #102b68;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#studioPaperApply {
  flex: 0 0 auto;
  min-width: 145px;
  height: 43px;
  border: 0;
  border-radius: 7px;
  background: #1161eb;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

#studioPaperApply:disabled {
  background: #d7dfea;
  color: #8795a8;
  cursor: default;
}

body.eom-studio-paper-open {
  overflow: hidden;
}

/* 모바일 */
@media (max-width: 650px) {
  .eom-studio-paper-modal {
    padding: 0;
  }

  .eom-studio-paper-modal__dialog {
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  .eom-studio-paper-modal__header {
    padding: 16px;
  }

  .eom-studio-paper-modal__body {
    padding: 18px 12px;
  }

  .eom-studio-paper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .eom-studio-paper-best .eom-studio-paper-card {
    flex-basis: 135px;
  }

  .eom-studio-paper-modal__footer {
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  }

  #studioPaperApply {
    min-width: 120px;
  }
}

/* 현재 사용 중인 편지지 */
.eom-studio-paper-card.is-current::after {
  content: "사용 중";
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #526581;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

/* ========================================
 * 스튜디오 공통 확인 팝업
 * ======================================== */

.eom-studio-confirm-modal[hidden] {
  display: none;
}

.eom-studio-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.eom-studio-confirm-modal__shade {
  position: absolute;
  inset: 0;
  background: rgba(16, 35, 66, 0.55);
}

.eom-studio-confirm-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 25px;
  border: 1px solid #dce5f1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 15px 45px rgba(20, 40, 75, 0.18);
}

.eom-studio-confirm-modal__heading {
  display: flex;
  align-items: center;
  gap: 11px;
}

.eom-studio-confirm-modal__icon {
  display: flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #fff3e6;
  color: #c47a2e;
}

.eom-studio-confirm-modal__heading strong {
  flex: 1;
  min-width: 0;
  color: #102b68;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}

.eom-studio-confirm-modal__close {
  align-self: flex-start;
  border: 0;
  padding: 0 3px;
  background: transparent;
  color: #8292a9;
  font-size: 24px;
  line-height: 1;
}

.eom-studio-confirm-modal__content {
  padding: 19px 0 22px;
  color: #526581;
  font-size: 13px;
  line-height: 1.8;
  word-break: keep-all;
}

.eom-studio-confirm-modal__content p {
  margin: 0;
}

#studioConfirmHighlight {
  display: block;
  margin-top: 9px;
  color: #1161eb;
  font-size: 13px;
}

#studioConfirmDetail {
  margin-top: 9px;
}

#studioConfirmHighlight:empty,
#studioConfirmDetail:empty {
  display: none;
}

.eom-studio-confirm-modal__actions {
  display: flex;
  gap: 9px;
}

.eom-studio-confirm-modal__actions button {
  flex: 1;
  min-height: 44px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
}

.eom-studio-confirm-modal__cancel {
  border: 1px solid #d7dfea;
  background: #fff;
  color: #526581;
}

.eom-studio-confirm-modal__accept {
  border: 1px solid #1161eb;
  background: #1161eb;
  color: #fff;
}

.eom-studio-confirm-modal__accept:hover {
  background: #0d50c9;
}

body.eom-studio-confirm-open {
  overflow: hidden;
}

@media (max-width: 650px) {
  .eom-studio-confirm-modal__dialog {
    padding: 20px;
    border-radius: 12px;
  }

  .eom-studio-confirm-modal__heading strong {
    font-size: 15px;
  }
}

/* 현재 선택된 편지지 표시 */
.eom-studio-management__paper {
  height: 48px;
  justify-content: flex-start;
  gap: 9px;
  padding: 5px 10px;
}

.eom-studio-management__paper-thumb {
  display: block;
  flex: 0 0 48px;
  width: 48px;
  height: 36px;
  object-fit: contain;
  border-radius: 5px;
  background: #fff;
}

.eom-studio-management__paper-thumb[hidden] {
  display: none;
}

.eom-studio-management__paper-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.eom-studio-management__paper-info small {
  color: #8292a9;
  font-size: 10px;
  font-weight: 600;
}

#studioToolbarPaper {
  flex: none;
  width: 100%;
  font-size: 12px;
  font-weight: 800;
  color: #163361;
}

.eom-studio-management__paper-arrow {
  flex: 0 0 auto;
  margin-left: auto;
  color: #526581;
}

/* 최초 편지쓰기 추천 안내 */
.eom-studio-welcome[hidden] {
    display: none;
}

.eom-studio-welcome {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1250;
    width: min(420px, calc(100vw - 28px));
    max-height: calc(100dvh - 28px);
    overflow-y: auto;
    padding: 19px;
    border: 1px solid #cdddf1;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 12px 45px rgba(23, 51, 94, .20);
    color: #263955;
    animation: eomStudioWelcomeIn 0.6s cubic-bezier(.22, 1, .36, 1) 0.5s both;
}

.eom-studio-welcome__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.eom-studio-welcome__header strong {
    font-size: 16px;
    color: #163361;
}

#studioWelcomeClose {
    border: 0;
    padding: 0 4px;
    background: transparent;
    color: #8292a9;
    font-size: 25px;
    line-height: 1;
}

.eom-studio-welcome__intro {
    margin: 7px 0 15px;
    color: #657890;
    font-size: 12px;
}

.eom-studio-welcome__preview {
    display: block;
}

/* 추천 편지지 */
.eom-studio-welcome__paper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.eom-studio-welcome__info {
    flex: 1;
    min-width: 0;
}

#studioWelcomeMeta {
    margin-top: 10px;
}

/* 추천 글꼴 - 별도 영역 */
.eom-studio-welcome__font {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e5eaf2;
}

.eom-studio-welcome__font-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.eom-studio-welcome__font-heading
.eom-studio-welcome__font-name {
    margin-top: 0;
}

/* 글꼴 미리보기 */
.eom-studio-welcome__font-sample {
    margin-top: 10px;
    padding: 13px 15px;
    background: #f5f8fc;
    border-radius: 8px;
}

#studioWelcomeFontPreview {
    margin: 6px 0 0;
    font-size: 22px;
    line-height: 1.5;
}

#studioWelcomePaperThumb {
    flex: 0 0 105px;
    width: 105px;
    height: 79px;
    object-fit: contain;
    border-radius: 7px;
    background: #f3f6fb;
}

#studioWelcomePaperThumb[hidden] {
    display: none;
}

.eom-studio-welcome__info {
    flex: 1;
    min-width: 0;
}

#studioWelcomePaperName {
    display: block;
    font-size: 13px;
    color: #163361;
}

.eom-studio-welcome__font-name {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: #8292a9;
}

#studioWelcomeFontPreview {
    margin: 6px 0;
    font-size: 22px;
    line-height: 1.4;
    color: #263955;
}

#studioWelcomeMeta {
    display: block;
    font-size: 12px;
    color: #1161eb;
    font-weight: 700;
}

.eom-studio-welcome__help {
    margin: 16px 0 12px;
    padding: 10px;
    border-radius: 7px;
    background: #f3f8ff;
    color: #526581;
    font-size: 12px;
    line-height: 1.6;
}

.eom-studio-welcome__tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 9px;
}

.eom-studio-welcome__tools button {
    min-height: 39px;
    padding: 8px 5px;
    border: 1px solid #d7dfea;
    border-radius: 7px;
    background: #fff;
    color: #365274;
    font-size: 12px;
    font-weight: 700;
}

.eom-studio-welcome__start {
    width: 100%;
    min-height: 43px;
    border: 0;
    border-radius: 7px;
    background: #1161eb;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 650px) {
    .eom-studio-welcome {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        width: calc(100vw - 24px);
        padding: 15px;

    }
}

.eom-studio-welcome__font-label {
    display: block;
    margin-top: 10px;
    color: #1161eb;
    font-size: 12px;
    font-weight: 800;
}

/* 추천 안내 - 편지지·글꼴 구분 */
.eom-studio-welcome__label {
    display: block;
    color: #1161eb;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 4px;
}

.eom-studio-welcome__label--font {
    margin-top: 13px;
}

.eom-studio-welcome__paper-comment {
    display: block;
    margin-top: 5px;
    color: #657890;
    font-size: 12px;
    line-height: 1.5;
    word-break: keep-all;
}

.eom-studio-welcome__paper-comment[hidden] {
    display: none;
}

.eom-studio-welcome__sample-label {
    display: block;
    margin-top: 8px;
    color: #8292a9;
    font-size: 11px;
}

/* 편지지 선택 목록 - 감성 문구 */
.eom-studio-paper-card__comment {
    display: -webkit-box;
    margin-top: 5px;
    min-height: 2.8em;
    overflow: hidden;
    color: #657890;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
    word-break: keep-all;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}


/* 최초 추천 안내 - 부드러운 등장 */
@keyframes eomStudioWelcomeIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 움직임 최소화 설정을 사용하는 고객 배려 */
@media (prefers-reduced-motion: reduce) {
    .eom-studio-welcome {
        animation: none;
    }
}

/* 추천 안내 카드 여백 정리 */
.eom-studio-welcome {
    padding: 16px;
}

.eom-studio-welcome__intro {
    margin: 6px 0 12px;
}

.eom-studio-welcome__font {
    margin-top: 13px;
    padding-top: 13px;
}

.eom-studio-welcome__font-sample {
    margin-top: 8px;
    padding: 9px 12px;
}

#studioWelcomeFontPreview {
    margin: 4px 0 0;
}

/* 안내 문구의 회색 박스 제거 */
.eom-studio-welcome__help {
    margin: 12px 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #657890;
    font-size: 12px;
    line-height: 1.6;
}


/* ========================================
 * 최초 추천 안내 - 모바일 높이 최적화
 * ======================================== */
@media (max-width: 650px) {

    .eom-studio-welcome {
        padding: 13px 14px;
        max-height: calc(100dvh - 24px - env(safe-area-inset-bottom));
    }

    /* 상단 설명 여백 */
    .eom-studio-welcome__intro {
        margin: 5px 0 10px;
        line-height: 1.4;
    }

    /* 편지지 이미지와 정보 */
    .eom-studio-welcome__paper {
        gap: 11px;
    }

    .eom-studio-welcome__paper-comment {
        margin-top: 3px;
        line-height: 1.4;
    }

    #studioWelcomeMeta {
        margin-top: 7px;
    }

    /* 추천 글꼴 영역 */
    .eom-studio-welcome__font {
        margin-top: 11px;
        padding-top: 11px;
    }

    .eom-studio-welcome__font-heading {
        gap: 4px 8px;
    }

    /* 글꼴 미리보기 높이 축소 */
    .eom-studio-welcome__font-sample {
        margin-top: 7px;
        padding: 8px 11px;
    }

    #studioWelcomeFontPreview {
        margin: 3px 0 0;
        font-size: 20px;
        line-height: 1.4;
    }

    /* 자유롭게 변경 가능 안내 */
    .eom-studio-welcome__help {
        margin: 10px 0;
        padding: 0;
        line-height: 1.5;
    }

    /* 하단 버튼 */
    .eom-studio-welcome__tools {
        gap: 7px;
        margin-bottom: 7px;
    }

    .eom-studio-welcome__tools button {
        min-height: 36px;
        padding: 7px 5px;
    }

    .eom-studio-welcome__start {
        min-height: 42px;
    }
}

/* 화면 높이가 특히 낮은 휴대폰 */
@media (max-width: 650px) and (max-height: 720px) {

    .eom-studio-welcome {
        padding: 11px 13px;
    }

    .eom-studio-welcome__intro {
        margin-bottom: 7px;
    }

    .eom-studio-welcome__font {
        margin-top: 8px;
        padding-top: 8px;
    }

    .eom-studio-welcome__font-sample {
        padding: 6px 10px;
    }

    .eom-studio-welcome__help {
        margin: 8px 0;
    }
}


/* 불러오기 - 저장된 편지 개수 */
.eom-studio-load-count {
    display: inline-block;
    margin-left: 3px;
    padding: 2px 6px;
    border-radius: 10px;
    background: #edf4ff;
    color: #1161eb;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 800;
}

.eom-studio-load-count[hidden] {
    display: none;
}

/* 저장 버튼 근처에 나타나는 알림 */
.eom-studio-save-toast {
    position: fixed;
    z-index: 10000;
    width: max-content;
    min-width: 170px;
    max-width: calc(100vw - 24px);
    padding: 11px 15px 11px 43px;
    border: 1px solid #c8def8;
    border-radius: 10px;
    background: #fff;
    color: #163361;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    box-shadow: 0 8px 24px rgba(22, 51, 97, 0.15);
    transform: translate(-50%, -100%);
    pointer-events: none;
}

.eom-studio-save-toast.is-below {
    transform: translateX(-50%);
}

.eom-studio-save-toast::before {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #e8f3ff;
    color: #1161eb;
    font-size: 13px;
    font-weight: 900;
}

.eom-studio-save-toast.is-error {
    border-color: #f1c4bf;
    color: #aa3830;
}

.eom-studio-save-toast.is-error::before {
    content: "!";
    background: #ffefed;
    color: #b74338;
}



/* ========================================
 * 저장 편지 목록 (PC/모바일 공통)
 * ======================================== */
.eom-studio-draft-modal[hidden], #studioDraftMore[hidden], .eom-studio-draft-modal__footer[hidden] { display: none !important; }
.eom-studio-draft-modal {
  position: fixed; inset: 0; z-index: 1400;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.eom-studio-draft-modal__shade {
  position: absolute; inset: 0; background: rgba(16, 35, 66, .55);
}
.eom-studio-draft-modal__dialog {
  position: relative; display: flex; flex-direction: column;
  width: 100%; max-width: 760px; max-height: calc(100dvh - 32px);
  overflow: hidden; border-radius: 14px; background: #fff;
  box-shadow: 0 16px 50px rgba(16, 35, 66, .2);
}
.eom-studio-draft-modal__header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  flex: 0 0 auto; padding: 20px 24px 18px; border-bottom: 1px solid #e5eaf2;
}
.eom-studio-draft-modal__header h2 { margin: 0; color: #102b68; font-size: 18px; font-weight: 800; }
.eom-studio-draft-modal__header p { margin: 7px 0 0; color: #71839c; font-size: 12px; }
#studioDraftModalCount { color: #1161eb; }
.eom-studio-draft-modal__close {
  border: 0; padding: 0 5px; background: transparent; color: #718098;
  font-size: 28px; line-height: 1;
}
.eom-studio-draft-modal__body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 24px 22px; background: #f8faff;
}
.eom-studio-draft-list { display: grid; gap: 12px; }
.eom-studio-draft-empty {
  margin: 0; padding: 36px 12px; background: #fff; border-radius: 10px;
  color: #657890; text-align: center; font-size: 13px;
}
.eom-studio-draft-item {
  min-width: 0; padding: 16px; background: #fff;
  border: 1px solid #e0e8f2; border-radius: 11px;
}
.eom-studio-draft-item__top { display: flex; align-items: flex-start; gap: 16px; }
.eom-studio-draft-item__thumb {
  display: flex; flex: 0 0 82px; align-items: flex-start; justify-content: center;
  width: 82px; min-height: 108px; overflow: hidden;
  border: 1px solid #e2e8f1; border-radius: 6px; background: #f8faff;
}
.eom-studio-draft-item__thumb img { display: block; width: 100%; height: auto; object-fit: contain; }
.eom-studio-draft-item__thumb-empty { margin: auto; font-size: 11px; color: #93a0b2; }
.eom-studio-draft-item__summary { flex: 1; min-width: 0; }
.eom-studio-draft-item__summary h3 {
  margin: 0 0 8px; color: #18365a; font-size: 15px; font-weight: 800; line-height: 1.5;
}
.eom-studio-draft-item__meta { margin: 0 0 6px; font-size: 12px; color: #5d7089; line-height: 1.6; }
.eom-studio-draft-item__date { margin: 0; color: #94a2b5; font-size: 11px; line-height: 1.55; }
.eom-studio-draft-item__font {
  margin: 12px 0 0; padding-top: 11px; border-top: 1px solid #edf1f6;
  color: #5d7089; font-size: 12px; font-weight: 700;
}
.eom-studio-draft-item__preview {
  margin: 10px 0 12px; padding: 11px 12px 9px; background: #f4f7fb;
  border-radius: 7px;
}
.eom-studio-draft-item__excerpt {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden; margin: 0; color: #394c66; font-size: 15px;
  line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere;
}
.eom-studio-draft-item__excerpt.is-expanded {
  display: block; -webkit-line-clamp: unset;
  max-height: var(--draft-preview-height, 29.7em); overflow-y: auto;
}
.eom-studio-draft-item__more {
  display: block; margin: 7px 0 0 auto; padding: 3px 0;
  border: 0; background: transparent; color: #1161eb;
  font-size: 12px; font-weight: 700;
}
.eom-studio-draft-item__actions { display: flex; justify-content: flex-end; gap: 8px; }
.eom-studio-draft-item__actions button {
  min-width: 78px; min-height: 35px; padding: 0 12px;
  border-radius: 7px; font-size: 12px; font-weight: 800;
}
.eom-studio-draft-item__actions button:disabled { opacity: .55; cursor: default; }
.eom-studio-draft-item__delete { border: 1px solid #dbe3ee; background: #fff; color: #7a8799; }
.eom-studio-draft-item__load { border: 1px solid #1161eb; background: #1161eb; color: #fff; }
.eom-studio-draft-modal__footer {
  flex: 0 0 auto; display: flex; justify-content: center;
  padding: 13px 24px calc(13px + env(safe-area-inset-bottom));
  border-top: 1px solid #e5eaf2; background: #fff;
}
.eom-studio-draft-modal__footer button {
  min-width: 96px; height: 36px; border: 1px solid #d7dfea;
  border-radius: 7px; background: #f6f8fc; color: #456080;
  font-size: 12px; font-weight: 700;
}
.eom-studio-draft-modal__footer button:disabled { opacity: .65; cursor: default; }
body.eom-studio-draft-open { overflow: hidden; }
@media (max-width: 650px) {
  .eom-studio-draft-modal { padding: 0; }
  .eom-studio-draft-modal__dialog { width: 100%; height: 100dvh; max-height: none; border-radius: 0; }
  .eom-studio-draft-modal__header { padding: 18px 16px 14px; }
  .eom-studio-draft-modal__header h2 { font-size: 17px; }
  .eom-studio-draft-modal__body { padding: 14px 12px 20px; }
  .eom-studio-draft-item { padding: 12px; }
  .eom-studio-draft-item__top { gap: 12px; }
  .eom-studio-draft-item__thumb { flex-basis: 72px; width: 72px; min-height: 96px; }
  .eom-studio-draft-item__summary h3 { font-size: 14px; }
  .eom-studio-draft-item__excerpt { font-size: 14px; }
  .eom-studio-draft-item__actions button { min-width: 68px; }
  .eom-studio-draft-modal__footer { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
}

/* 편집권한 이전 후 사용자가 현재 내용을 보기로 한 화면 */
.is-studio-reading .eom-studio-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: auto;
}
.is-studio-reading .eom-studio-header__inner { height: 66px; }
.is-studio-reading .eom-studio-back span { display: inline; }
.is-studio-reading .eom-studio-complete--top { visibility: hidden; }

.eom-studio-readonly-notice {
  padding: 12px 24px;
  background: #eef4fd;
  border-top: 1px solid #dae5f4;
  outline: none;
}
.eom-studio-readonly-notice > div {
  max-width: 1172px;
  margin: 0 auto;
  padding-left: 12px;
  border-left: 3px solid #37649b;
}
.eom-studio-readonly-notice strong {
  color: var(--studio-navy);
  font-size: 16px;
}
.eom-studio-readonly-notice p {
  margin: 3px 0 0;
  color: #364e6c;
  font-size: 14px;
  line-height: 1.5;
}
.is-studio-reading .eom-studio-layout {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1fr);
}
.is-studio-reading .eom-studio-layout::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 25;
  background: rgba(0, 0, 0, 0.12);
  pointer-events: none;
}
.is-studio-reading .eom-studio-toolbar,
.is-studio-reading .eom-studio-heading,
.is-studio-reading .eom-studio-dispatch,
.is-studio-reading .eom-studio-hint,
.is-studio-reading .eom-studio-panel { display: none; }
.is-studio-reading .eom-studio-sheet { cursor: default; }

@media (max-width: 650px) {
  .is-studio-reading .eom-studio-header__inner { height: 50px; }
  .eom-studio-readonly-notice { padding: 10px 14px; }
}
