/* 1:1 영작 교정실 전용 스타일 */
:root {
  --primary: #FF6B00;
  --primary-hover: #E55C00;
  --primary-light: #FFF4EB;
  --navy-dark: #0F172A;
  --navy-card: #1E293B;
  --slate-50: #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-400: #94A3B8;
  --slate-600: #475569;
  --slate-700: #334155;
  --white: #FFFFFF;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-subtle: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  --shadow-hover: 0 16px 36px -6px rgba(15, 23, 42, 0.12);
}

.page-wrapper {
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
  flex-grow: 1;
}

.breadcrumb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--slate-400);
  margin-bottom: 1.2rem;
  font-weight: 600;
  flex-wrap: wrap;
}
.breadcrumb-row a { color: var(--slate-600); text-decoration: none; }
.breadcrumb-row a:hover { color: var(--primary); }

.page-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  border-radius: var(--radius-lg);
  padding: 2.8rem 2.5rem;
  color: var(--white);
  margin-bottom: 2.2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.18);
}
.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(147, 51, 234, 0.2);
  border: 1px solid rgba(147, 51, 234, 0.4);
  color: #C084FC;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}
.page-hero h1 {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.8px;
  line-height: 1.25;
  margin-bottom: 0.6rem;
}
.page-hero p {
  font-size: 1.02rem;
  color: var(--slate-400);
  max-width: 720px;
  line-height: 1.5;
}

.writing-guide-banner {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 1.6rem 2rem;
  margin-bottom: 2.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  box-shadow: var(--shadow-subtle);
  background-image: radial-gradient(#FAF5FF 1px, transparent 1px);
  background-size: 16px 16px;
}
.guide-banner-text {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.guide-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #FAF5FF;
  color: #9333EA;
  border: 1.5px solid rgba(147, 51, 234, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.guide-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 0.2rem;
}
.guide-sub {
  font-size: 0.86rem;
  color: var(--slate-600);
}
.btn-goto-mypage-submit {
  background: linear-gradient(135deg, #9333EA 0%, #7E22CE 100%);
  color: #FFFFFF;
  padding: 0.75rem 1.4rem;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.25);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-goto-mypage-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(147, 51, 234, 0.35);
  color: #FFFFFF;
}

.archive-section {
  margin-top: 1rem;
  position: relative;
}
.archive-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.content-grid-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy-dark);
  margin-bottom: 0;
}
.archive-count-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: #9333EA;
  background: #FAF5FF;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(147, 51, 234, 0.25);
}
.archive-search-box {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: 30px;
  padding: 0.35rem 0.45rem 0.35rem 1rem;
  width: 350px;
  max-width: 100%;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: all 0.25s ease;
}
.archive-search-box:focus-within {
  border-color: #9333EA;
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.15);
}
.archive-search-box input {
  border: none;
  outline: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-dark);
  width: 100%;
  margin-left: 8px;
  background: transparent;
}
.clear-search-btn {
  background: none;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.clear-search-btn:hover { color: #9333EA; }
.search-submit-btn {
  background: #9333EA;
  color: #FFFFFF;
  border: none;
  border-radius: 20px;
  padding: 0.42rem 0.95rem;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(147, 51, 234, 0.25);
  margin-left: 6px;
  flex-shrink: 0;
}
.search-submit-btn:hover {
  background: #7E22CE;
  transform: translateY(-1px);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.writing-card {
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--navy-dark);
  position: relative;
}
.writing-card:hover {
  border-color: #9333EA;
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.writing-card.is-locked {
  cursor: default;
}
.writing-card.is-locked:hover {
  border-color: var(--slate-200);
  transform: none;
  box-shadow: none;
}
.card-top-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  gap: 8px;
}
.card-visibility-badge,
.card-status-badge {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card-visibility-badge.is-public {
  background: #FAF5FF;
  color: #9333EA;
  border: 1px solid rgba(147, 51, 234, 0.25);
}
.card-visibility-badge.is-private {
  background: #F8FAFC;
  color: #64748B;
  border: 1px solid #E2E8F0;
}
.card-status-badge.is-done {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}
.card-status-badge.is-ing {
  background: #FFF7ED;
  color: #EA580C;
  border: 1px solid #FED7AA;
}
.card-date { font-size: 0.78rem; color: var(--slate-400); font-weight: 600; white-space: nowrap; }
.card-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.82rem;
  color: var(--slate-600);
  gap: 8px;
}
.card-author-name {
  font-weight: 700;
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.card-tutor-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: #EFF6FF;
  color: #2563EB;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.card-writing-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-dark);
  line-height: 1.35;
  margin-bottom: 0.8rem;
}
.card-preview-box {
  background: #FAFBFD;
  border: 1px solid #F1F5F9;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.84rem;
  line-height: 1.45;
  flex-grow: 1;
}
.preview-before {
  color: #EF4444;
  font-size: 0.8rem;
}
.preview-after {
  color: #059669;
  font-weight: 700;
}
.card-lock-box {
  background: #F8FAFC;
  border: 1px dashed #E2E8F0;
  border-radius: 10px;
  padding: 1.1rem 0.9rem;
  color: var(--slate-400);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.45;
}

.no-results-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4.5rem 2rem;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--slate-200);
}
.no-results-box i {
  font-size: 2.8rem;
  color: var(--slate-300);
  margin-bottom: 1rem;
}
.no-results-box h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 0.4rem;
}
.no-results-box p {
  font-size: 0.9rem;
  color: var(--slate-400);
  margin-bottom: 1.4rem;
}
.btn-reset-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 1.4rem;
  border-radius: 20px;
  background: #9333EA;
  color: var(--white);
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-reset-search:hover {
  background: #7E22CE;
  color: var(--white);
  transform: translateY(-2px);
}

.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.5rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--slate-200);
  background: var(--white);
  color: var(--slate-700);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 0 0.75rem;
}
.page-btn:hover {
  border-color: #9333EA;
  color: #9333EA;
  transform: translateY(-2px);
}
.page-btn.active {
  background: #9333EA;
  border-color: #9333EA;
  color: var(--white);
}
.page-btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.page-nav-btn { gap: 4px; font-size: 0.86rem; }

.writing-detail-view {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--slate-200);
  padding: 2.8rem 3rem;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.08);
  margin-bottom: 3.5rem;
}
.detail-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--slate-100);
  flex-wrap: wrap;
  gap: 1rem;
}
.btn-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--slate-600);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.5rem 1.1rem;
  border-radius: 10px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  transition: all 0.2s ease;
}
.btn-back-link:hover {
  background: var(--slate-200);
  color: var(--navy-dark);
}
.detail-action-buttons {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.btn-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  color: var(--slate-600);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-action-pill:hover {
  border-color: #9333EA;
  color: #9333EA;
}
.detail-header-block {
  margin-bottom: 2.2rem;
  border-bottom: 1.5px solid var(--slate-100);
  padding-bottom: 1.8rem;
}
.detail-meta-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}
.detail-proof-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--navy-dark);
  letter-spacing: -0.6px;
  line-height: 1.25;
  margin-bottom: 0.6rem;
}
.detail-author-bar {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.9rem;
  color: var(--slate-600);
  flex-wrap: wrap;
}
.detail-author-bar strong { color: var(--navy-dark); }
.detail-section-card { margin-bottom: 2.4rem; }
.detail-section-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.1rem;
  letter-spacing: -0.3px;
}
.comparison-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}
.comp-card {
  border-radius: var(--radius-md);
  padding: 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-width: 0;
}
.comp-card.before {
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
}
.comp-card.after {
  background: #F0FDF4;
  border: 1.5px solid #BBF7D0;
}
.comp-card.after.is-waiting {
  background: #F8FAFC;
  border: 1.5px dashed #CBD5E1;
}
.comp-card-tag {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.comp-card.before .comp-card-tag { color: #DC2626; }
.comp-card.after .comp-card-tag { color: #16A34A; }
.comp-card.after.is-waiting .comp-card-tag { color: #64748B; }
.comp-text-body {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.7;
  word-break: break-word;
}
.comp-card.before .comp-text-body {
  color: #991B1B;
  white-space: pre-wrap;
}
.comp-card.after .comp-text-body { color: #14532D; }
.comp-card.after.is-waiting .comp-text-body { color: #64748B; }
.comp-reply-html p { margin: 0 0 0.6rem; }
.comp-reply-html img,
.writing-attach-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}
.writing-attach-box {
  background: #FFFFFF;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}
.writing-audio {
  width: 100%;
}
.detail-bottom-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--slate-200);
  flex-wrap: wrap;
  gap: 1rem;
}
.btn-nav-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.4rem;
  border-radius: 12px;
  border: 1.5px solid var(--slate-200);
  background: var(--white);
  color: var(--navy-dark);
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-nav-step:hover {
  border-color: #9333EA;
  color: #9333EA;
}
.btn-nav-step.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.btn-nav-list-main {
  background: var(--navy-dark);
  color: var(--white);
  border-color: var(--navy-dark);
  padding: 0.75rem 1.8rem;
}
.btn-nav-list-main:hover {
  background: #1E293B;
  color: var(--white);
  border-color: #1E293B;
}

.copy-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--navy-dark);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.copy-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 992px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .comparison-cards-grid { grid-template-columns: 1fr; }
  .writing-detail-view { padding: 2rem 1.5rem; }
  .detail-proof-title { font-size: 1.8rem; }
}
@media (max-width: 600px) {
  .cards-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 2rem 1.4rem; }
  .page-hero h1 { font-size: 1.65rem; }
  .archive-search-box { width: 100%; }
  .archive-header-row { flex-direction: column; align-items: stretch; }
  .writing-guide-banner { flex-direction: column; align-items: flex-start; }
  .btn-goto-mypage-submit { width: 100%; justify-content: center; }
  .writing-detail-view { padding: 1.5rem 1.1rem; }
  .detail-proof-title { font-size: 1.5rem; }
  .detail-bottom-nav { flex-direction: column; align-items: stretch; }
  .btn-nav-step { justify-content: center; width: 100%; }
}
