/* 변수 정의 */
:root {
    --primary-color: #8B4513;
    --secondary-color: #6B5344;
    --accent-color: #4AC4D6;
    --bg-color: #FFF8F4;
    --panel-color: #FFFFFF;
    --tab-inactive: #C8A794;
    --tab-active: #FFFFFF;
    --input-bg: #FFF8E1;
    --input-border: #E6D2C4;
    --empty-bg: #F5F5F5;
    --hint-color: #B89483;
    --remove-btn: #FF9999;
    --remove-hover: #FF6B6B;
    --accordion-bg: #F5DEB3;
    --accordion-hover: #E6D2C4;
    --guide-bg: #FFF4E6;
    --spacing-xs: 2px;
    --spacing-sm: 5px;
    --spacing-md: 10px;
    --spacing-lg: 15px;
    --spacing-xl: 20px;
    --font-sm: 12px;
    --font-md: 14px;
    --font-lg: 16px;
    --font-xl: 20px;
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 10px;
}

/* 기본 스타일 */
body {
    font-family: 'Noto Sans KR', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: var(--bg-color);
    color: var(--secondary-color);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 15px;
    position: relative;
    min-height: 60vh;
}

/* 프린트 버튼 스타일 - 기본 위치 */
.print-button {
    position:  fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 인쇄 안내 메시지 */
.print-instructions {
    position: fixed;
    bottom: 85px;
    right: 20px;
    background-color: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 14px;
    max-width: 200px;
    z-index: 999;
    display: none;
}

/* 헤더 스타일 */
.page-header {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 28px;
    margin: 0;
}

/* 책갈피 탭 스타일 */
.tab-bookmark-container {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-bookmark {
    position: relative;
    background-color: var(--tab-inactive);
    border-radius: 8px 8px 0 0;
    padding: 8px 12px;
    color: var(--primary-color);
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    flex: 0 1 auto;
    text-align: center;
    min-width: 100px;
    transform: translateY(-5px);
}

.tab-bookmark .tab-content {
    position: relative;
    z-index: 2;
    font-size: 0.9rem;
    white-space: nowrap;
}

.tab-bookmark .section-icon {
    margin-right: 4px;
    font-size: 1rem;
}

.tab-bookmark-tail {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 8px;
    background-color: inherit;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.tab-bookmark:hover {
    background-color: var(--accordion-hover);
}

.tab-bookmark.active {
    background-color: var(--tab-active);
    color: var(--primary-color);
    z-index: 5;
    box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(0);
}

/* 탭 패널 */
.tab-panel {
    background-color: var(--panel-color);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 20px;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: -2px;
}

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

/* 가이드 박스 */
.guide-box {
    background-color: var(--guide-bg);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.guide-box p {
    margin: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* 빈 항목 힌트 스타일 */
.empty-field-hint {
    text-align: center;
    color: var(--hint-color);
    font-size: 0.85rem;
    margin-top: 10px;
    font-style: italic;
}

/* 미리보기 아코디언 */
.preview-accordion {
    margin-top: 20px;
}

/* 아코디언 스타일 */
.accordion-section {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s, transform 0.3s;
}

.accordion-section:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.accordion-input {
    display: none;
}

.accordion-label {
    display: flex;
    align-items: center;
    background-color: var(--accordion-bg);
    color: var(--primary-color);
    padding: 12px 15px;
    cursor: pointer;
    font-weight: bold;
    position: relative;
    transition: background-color 0.3s;
}

.accordion-label:hover {
    background-color: var(--accordion-hover);
}

.section-icon {
    margin-right: 8px;
    font-size: 20px;
}

.accordion-label::after {
    content: '+';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    transition: transform 0.3s;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    background-color: var(--panel-color);
    transition: max-height 0.3s ease;
}

.accordion-input:checked + .accordion-label::after {
    content: '-';
    transform: translateY(-50%) rotate(180deg);
}

.accordion-input:checked + .accordion-label {
    background-color: var(--accordion-hover);
}

.accordion-input:checked + .accordion-label + .accordion-content {
    max-height: 500px;
    padding: 15px;
    border-top: 1px dashed var(--accordion-hover);
}

/* 입력 섹션 스타일 */
.input-section {
    padding: 5px 0;
}

.ritual-inputs {
    margin-bottom: 10px;
}

.input-group {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    background-color: var(--input-bg);
    padding: 8px 10px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.input-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.input-group.empty-group {
    background-color: var(--empty-bg);
    border: 1px dashed var(--tab-inactive);
}

/* 활동 입력 필드 */
.input-field-activity {
    grid-column: 1;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    color: var(--secondary-color);
}

/* 시간 입력 필드 */
.input-field-time {
    grid-column: 2;
    width: 70px;
    padding: 8px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    color: var(--secondary-color);
    text-align: center;
}

/* "분" 텍스트 */
.input-group span {
    grid-column: 3;
    color: var(--primary-color);
    font-weight: bold;
}

/* 삭제 버튼 */
.remove-button {
    grid-column: 4;
    background-color: var(--remove-btn);
    color: white;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.empty-group .remove-button {
    visibility: hidden;
}

.remove-button:hover {
    background-color: var(--remove-hover);
}

/* 출력 탭 스타일 */
.ritual-items {
    padding: 10px 15px;
}

.ritual-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px dashed var(--input-border);
    transition: background-color 0.2s;
}

.ritual-item:last-child {
    border-bottom: none;
}

.ritual-item:hover {
    background-color: var(--input-bg);
}

.ritual-item span:first-child {
    font-weight: normal;
    color: var(--secondary-color);
}

.ritual-item span.time {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 14px;
}

.total-time {
    margin-top: 10px;
    text-align: right;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 16px;
    padding: 5px 15px;
    background-color: var(--accordion-bg);
    border-radius: 0 0 8px 8px;
}

.empty-message {
    padding: 15px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* 푸터 스타일 */
.page-footer {
    text-align: center;
    margin-top: 30px;
    color: var(--primary-color);
    font-size: 14px;
}

/* 노트북 스타일 (프린트용) */
.print-only {
    display: none;
}

.notebook-paper {
    background-color: white;
    background-image: linear-gradient(#F5F5F5 1px, transparent 1px);
    background-size: 100% 26px;
    line-height: 26px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    position: relative;
    max-width: 210mm;
    margin: 0 auto;
    padding: 10mm 10mm;
    box-sizing: border-box;
}

.notebook-paper::before {
    content: '';
    display: none;
    position: absolute;
    top: 0;
    left: 30mm;
    height: 100%;
    width: 1px;
    background-color: #FF9999;
}

.notebook-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #F0F0F0;
    padding-bottom: 15px;
}

.notebook-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0 0 10px;
    font-weight: bold;
}

.date-line {
    font-size: 1rem;
    color: #666;
    text-align: right;
    margin: 5px 0;
}

.notebook-content {
    min-height: 230mm;
}

.notebook-section {
    margin-bottom: 20px;
    page-break-inside: avoid;
}

.notebook-section h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 15px 0 5px;
    font-weight: bold;
    page-break-after: avoid;
}

.notebook-section h2 .icon {
    margin-right: 5px;
}

.notebook-items {
    padding-left: 15px;
    position: relative;
}

.notebook-item {
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.notebook-item::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.notebook-item .time {
    margin-left: 10px;
    color: #666;
}

.notebook-total {
    margin-top: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    text-align: right;
    color: var(--primary-color);
}

.notebook-empty {
    font-style: italic;
    color: #999;
    text-align: center;
    padding: 5px 0;
}

.notebook-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.8rem;
    color: #888;
    page-break-inside: avoid;
}

/* 입력 필드 스타일 */
.input-field {
    width: 100%;
    border: none;
    border-bottom: 1px solid #ccc;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    padding: 5px 0;
    margin: 0;
}

/* 테이블 셀 내부 입력 필드 스타일 */
.worksheet-table td .input-field {
    border-bottom: none;
    min-height: 20px;
    padding: 2px;
    box-sizing: border-box;
}

/* 텍스트 영역 스타일 */
.textarea-field {
    width: 100%;
    min-height: 60px;
    border: none;
    border-bottom: 1px dashed #999;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    resize: vertical;
    padding: 5px 0;
}

/* 체크박스 스타일 */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    display: inline-block;
    margin-right: 5px;
    position: relative;
    top: 3px;
    background: white;
}

.custom-checkbox:checked {
    background-color: var(--accent-color);
}

/* 영수증 스타일 */
.receipt-paper {
    background-color: white;
    max-width: 90%;
    width: 330px;
    margin: 0 auto;
    padding: 8px;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.receipt-header {
    text-align: center;
    margin-bottom: 15px;
}

.receipt-header h1 {
    font-size: 1.5rem;
    margin: 0 0 5px;
    font-weight: bold;
}

.receipt-subtitle {
    font-size: 1rem;
    margin: 0 0 5px;
}

.date-line {
    font-size: 0.9rem;
    text-align: center;
    margin: 5px 0 10px;
}

.dotted-line {
    border-bottom: 1px dashed #999;
    margin: 10px 0;
}

.receipt-section {
    margin-bottom: 15px;
}

.receipt-section h2 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 5px 0;
    font-weight: bold;
    text-align: center;
}

.receipt-items {
    padding: 0 10px;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.receipt-item .activity {
    flex: 1;
}

.receipt-item .time {
    text-align: right;
    white-space: nowrap;
    margin-left: 10px;
}

.receipt-total {
    margin-top: 5px;
    font-weight: bold;
    font-size: 0.95rem;
    text-align: right;
    border-top: 1px solid #666;
    padding-top: 5px;
}

.receipt-empty {
    font-style: italic;
    color: #999;
    text-align: center;
    padding: 5px 0;
    font-size: 0.9rem;
}

.receipt-footer {
    text-align: center;
    margin-top: 15px;
    font-size: 0.8rem;
}

.barcode {
    font-size: 1.2rem;
    margin: 10px 0;
    letter-spacing: -1px;
    text-align: center;
}

/* 홍보 섹션 스타일 */
.promotion-section {
    display: none;
    width: 330px;
    margin: 20px auto;
    font-family: 'Courier New', monospace;
    page-break-before: always;
}

.promotion-container {
    background-color: white;
    padding: 15px;
    border-top: 1px dashed #999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 190mm;
    margin: 0 auto;
    background-color: #FFFDF7;
    border-radius: 5px;
}

.promotion-title {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
    padding-bottom: 5px;
    border-bottom: 1px dashed #999;
}

.promotion-card {
    margin-bottom: 15px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
}

.promotion-card-header {
    background-color: #B05B2E;
    color: white;
    padding: 10px 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.promotion-card-header h4 {
    margin: 0;
    font-size: 16px;
}

.promotion-badge {
    background-color: var(--accent-color);
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: bold;
}

.promotion-card-body {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 10px 10px;
}

.promotion-card-body p {
    position: relative;
    padding-left: 5px;
    margin: 6px 0;
    font-size: 13px;
}

.check-icon {
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.promotion-message {
    text-align: center;
    margin-top: 20px;
    font-weight: bold;
    font-size: 14px;
}

.contact-info {
    background-color: rgba(255, 241, 189, 0.3);
    padding: 8px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
}

.contact-info h3 {
    color: var(--primary-color);
    text-align: center;
    margin-top: 0;
    font-size: 16px;
}

.contact-info p {
    margin-bottom: 8px;
    font-size: 13px;
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
}

/* 캡처 모드 클래스 */
.capture-mode {
    background-color: #f5f5f5;
}

.capture-mode .print-only {
    display: block !important;
}

.capture-mode .container,
.capture-mode .tab-bookmark-container,
.capture-mode .tab-panel,
.capture-mode .page-header,
.capture-mode .page-footer,
.capture-mode .print-button,
.capture-mode .print-instructions {
    display: none !important;
}

/* 이미지 저장 모달 스타일 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    overflow-y: auto;
}

.image-modal-content {
    position: relative;
    margin: 20px auto;
    width: 90%;
    max-width: 500px;
    background-color: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding-top: 20px;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #333;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.image-container {
    width: 100%;
    text-align: center;
    padding: 0 10px;
    box-sizing: border-box;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
}

.save-instructions {
    background-color: #fff8e1;
    padding: 15px;
    text-align: center;
    margin-top: 15px;
    border-radius: 0 0 8px 8px;
}

.save-instructions p {
    margin: 5px 0;
    font-weight: bold;
    color: #333;
}

.ios-tip, .android-tip {
    font-size: 14px;
    color: #666;
}

/* 마리드 배너 */
.promo-banner {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 15px auto 20px;
}

.promo-card {
  background-color: white;
  border: 2px solid var(--primary-color); /* 탭 패널과 동일한 테두리 */
  border-radius: 10px; /* 탭 패널과 동일한 radius */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* 탭 패널과 동일한 그림자 */
  padding: 8px 15px;
  text-align: center;
  width: calc(100% - 40px); /* 컨테이너 패딩을 고려한 너비 */
  max-width: calc(900px - 44px); /* 컨테이너 max-width에서 패딩+테두리 빼기 */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.promo-text {
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 500;
}

.promo-button {
  background-color: var(--accent-color);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.8rem;
  margin-left: 8px;
  white-space: nowrap;
}

/* 미디어 쿼리는 그대로 유지 */

/* 미디어 쿼리 - 모바일 대응 */
@media (max-width: 480px) {
  .promo-card {
    padding: 8px 10px;
    flex-direction: column;
    gap: 5px;
  }
}

/* ========= 미디어 쿼리 섹션 ========= */
/* 이 부분부터 미디어 쿼리를 체계적으로 정리합니다 */

/* 태블릿 미디어 쿼리 (768px 이하) */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 10px;
    }
    
    .tab-bookmark-container {
        gap: 3px;
    }
    
    .tab-bookmark {
        padding: 6px 8px;
        min-width: unset;
        flex: 1 1 auto;
        font-size: 0.8rem;
    }
    
    .tab-bookmark .section-icon {
        margin-right: 3px;
    }
    
    .tab-panel {
        padding: 12px;
    }
    
    .section-header {
        padding: 8px 10px;
    }
    
    .section-title {
        font-size: 15px;
    }
    
    .input-group {
        flex-wrap: nowrap;
        gap: 5px;
        padding: 6px 8px;
    }
    
    .input-group input[type="text"] {
        flex: 1;
        font-size: 14px;
        padding: 6px;
    }
    
    .input-group input[type="number"] {
        width: 50px;
        font-size: 14px;
        padding: 6px;
    }
    
    .ritual-item {
        padding: 8px;
    }
    
    .print-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
        right: 15px;
        bottom: 15px;
    }
    
    .guide-box {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* 모바일 미디어 쿼리 (480px 이하) */
@media (max-width: 480px) {
    /* 2. 모바일 전체 컨테이너의 패딩 줄이기 */
    body {
        padding: 5px;
    }
    
    .container {
        padding: 5px;
        min-height: 60vh; /* 모바일에서는 더 작은 높이 사용 */
    }
    
    /* 1. 의식 탭의 상하 너비 줄이기 */
    .tab-bookmark {
        min-height: 28px; /* 더 작게 */
        padding: 3px 6px; /* 패딩 더 줄이기 */
        font-size: 12px; /* 폰트 더 작게 */
    }
    
    .tab-bookmark .tab-content {
        font-size: 12px; /* 폰트 더 작게 */
    }
    
    /* 5. 의식탭 상단 3개, 하단 2개 배치 */
    .tab-bookmark-container {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: auto auto;
        gap: 5px;
    }
    
    .tab-bookmark:nth-child(1) { grid-column: 1 / span 2; grid-row: 1; }
    .tab-bookmark:nth-child(2) { grid-column: 3 / span 2; grid-row: 1; }
    .tab-bookmark:nth-child(3) { grid-column: 5 / span 2; grid-row: 1; }
    .tab-bookmark:nth-child(4) { grid-column: 1 / span 3; grid-row: 2; }
    .tab-bookmark:nth-child(5) { grid-column: 4 / span 3; grid-row: 2; }
    
    /* 입력 필드 레이아웃 - 가로 배치로 변경 */
    .input-group {
        display: flex;
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        padding: 4px; /* 더 작게 줄이기 */
        gap: 3px; /* 더 작게 줄이기 */
        margin-bottom: 4px; /* 더 작게 줄이기 */
    }
    
    /* 3. 활동 입력 필드 크기와 폰트 더 작게 */
    .input-field-activity {
        flex: 1;
        min-width: 0;
        height: 26px; /* 더 작게 */
        font-size: 12px; /* 폰트 더 작게 */
        padding: 0 5px; /* 내부 패딩 줄이기 */
    }
    
    /* 4. 시간 입력 필드 너비 대폭 줄이기 */
    .input-field-time {
        width: 30px; /* 대폭 줄이기 */
        height: 26px; /* 더 작게 */
        font-size: 12px;
        flex-shrink: 0;
        padding: 0 2px; /* 내부 패딩 줄이기 */
        -webkit-appearance: none; /* iOS 기본 스타일 제거 */
        margin: 0; /* iOS 기본 마진 제거 */
    }
    
    /* 분 텍스트 */
    .input-group span {
        margin: 0 1px;
        flex-shrink: 0;
        font-size: 12px; /* 폰트 더 작게 */
    }
    
    /* 삭제 버튼 */
    .remove-button {
        width: 24px; /* 더 작게 */
        height: 24px; /* 더 작게 */
        border-radius: 4px;
        flex-shrink: 0;
        font-size: 12px; /* 폰트 더 작게 */
        padding: 0; /* 내부 패딩 제거 */
    }
    
    /* 프린트 버튼 */
    .print-button {
        width: 45px; /* 더 작게 */
        height: 45px; /* 더 작게 */
        font-size: 18px; /* 폰트 크기 줄임 */
    }
    
    /* iPhone의 특정 화면 비율에 대응 */
    @media (aspect-ratio: 9/19.5), (aspect-ratio: 9/16) {
        .print-button {
            bottom: 60px;
        }
    }
}

/* iOS 기기 전용 스타일 - 가장 높은 우선순위로 적용 */
@supports (-webkit-touch-callout: none) {
    .print-button {
        bottom: 70px;
        right: 15px;
    }
}

/* iPhone 13 이상 모델용 (더 작은 right, bottom 값 사용) */
@media screen and (min-device-width: 390px) and (-webkit-device-pixel-ratio: 3) {
    .print-button {
        bottom: 50px;
        right: 20px;
    }
}

/* 가로 모드에서의 조정 */
@media screen and (orientation: landscape) and (-webkit-touch-callout: none) {
    .print-button {
        bottom: 20px;
        right: 20px;
    }
}

/* 인쇄 스타일 */
@media print {
    .print-button, .print-instructions, .tab-bookmark {
        display: none !important;
    }
    
    input, textarea, select {
        border: none !important;
    }
    
    /* 체크박스 인쇄 스타일 */
    .custom-checkbox {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
/* 기본 버튼 위치 */
html body #printButton.print-button {
    bottom: 60px !important; 
    right: 15px !important;
    position: fixed !important;
    z-index: 9999 !important;
 }
 
 /* iPhone 13/Pro 이상 세로 모드 */
 @media screen and (min-device-width: 390px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait) {
    html body #printButton.print-button {
        bottom: 100px !important;
    }
 }
 
 /* iOS 가로 모드 전용 설정 */
 @media screen and (-webkit-touch-callout: none) and (orientation: landscape) {
    html body #printButton.print-button {
        bottom: 20px !important; /* 가로 모드에서는 화면 높이가 줄어들므로 작은 값 사용 */
        right: 20px !important;
    }
 }
 
 /* iPhone 13/Pro 이상 가로 모드 전용 */
 @media screen and (min-device-height: 390px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape) {
    html body #printButton.print-button {
        bottom: 30px !important;
        right: 30px !important;
    }
 }
