/* MyPage UI refinement - 2026-05-31
   Scope: mypage.html only. Keeps existing IDs/data attributes and JS behavior intact. */

body.study-tools-body:has(.mypage-page){
  background:#f5f7fb!important;
}

.mypage-page{
  max-width:1500px;
  gap:22px;
}

.mypage-page .portal-kicker,
.mypage-page .portal-label{
  color:#4f46e5;
  letter-spacing:.1em;
}

.mypage-page .my-clean-header{
  position:relative;
  overflow:hidden;
  align-items:center;
  border:1px solid #e5eaf3;
  border-radius:28px;
  background:
    radial-gradient(circle at 92% 10%,rgba(99,102,241,.14),transparent 30%),
    linear-gradient(135deg,#ffffff 0%,#f8faff 100%);
  padding:28px 30px;
  box-shadow:0 18px 48px rgba(15,23,42,.065);
}

.mypage-page .my-clean-header::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:7px;
  height:100%;
  background:linear-gradient(180deg,#4f46e5,#22c55e);
}

.mypage-page .my-clean-header > div:first-child{
  position:relative;
  z-index:1;
}

.mypage-page .my-clean-header h1{
  color:#0f172a;
  font-size:clamp(28px,3.1vw,44px);
  letter-spacing:-.055em;
}

.mypage-page .my-clean-header p:not(.portal-kicker){
  max-width:760px;
  color:#64748b;
  font-size:0.9375rem;
}

.mypage-page .portal-topbar-actions{
  position:relative;
  z-index:1;
  padding:6px;
  border:1px solid #e8edf5;
  border-radius:20px;
  background:rgba(255,255,255,.78);
  box-shadow:0 10px 24px rgba(15,23,42,.045);
}

.mypage-page .portal-btn{
  min-height:44px;
  border-radius:14px;
}

.mypage-page .portal-btn.primary{
  background:#111827;
  box-shadow:0 12px 24px rgba(17,24,39,.18);
}

.mypage-shell{
  grid-template-columns:310px minmax(0,1fr);
  gap:22px;
}

.mypage-sidebar-panel{
  top:18px;
  border:0;
  border-radius:0;
  background:transparent;
  color:#0f172a;
  padding:0;
  box-shadow:none;
  max-height:calc(100vh - 54px);
}

.my-profile-block{
  margin:0 0 14px;
  padding:18px;
  border:1px solid #e5eaf3;
  border-radius:26px;
  background:#fff;
  color:#0f172a;
  box-shadow:0 14px 34px rgba(15,23,42,.055);
}

.my-profile-block .portal-avatar-lg{
  width:58px;
  height:58px;
  border-radius:20px;
  background:linear-gradient(135deg,#4f46e5,#7c3aed);
  box-shadow:0 12px 22px rgba(79,70,229,.24);
}

.my-profile-block b{
  color:#0f172a;
  font-size:1.1875rem;
}

.my-profile-block span{
  color:#64748b;
  font-size:0.75rem;
}

.mypage-nav{
  gap:10px;
  margin:0 0 14px;
}

.mypage-nav button{
  position:relative;
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  grid-template-areas:"icon title" "icon desc";
  column-gap:12px;
  align-items:center;
  border:1px solid #e5eaf3;
  border-radius:20px;
  background:#fff;
  color:#334155;
  padding:15px 16px;
  box-shadow:0 10px 26px rgba(15,23,42,.035);
}

.mypage-nav button::before{
  grid-area:icon;
  width:42px;
  height:42px;
  border-radius:15px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f1f5f9;
  color:#111827;
  font-size:1.25rem;
  transition:.18s ease;
}

.mypage-nav button[data-my-tab="summary"]::before{content:"📌";}
.mypage-nav button[data-my-tab="records"]::before{content:"📈";}
.mypage-nav button[data-my-tab="feedback"]::before{content:"💬";}
.mypage-nav button[data-my-tab="wrongnote"]::before{content:"🧾";}
.mypage-nav button[data-my-tab="plan"]::before{content:"⚙️";}

.mypage-nav button:hover{
  transform:translateY(-1px);
  border-color:#c7d2fe;
  background:#fff;
  color:#111827;
  box-shadow:0 16px 34px rgba(15,23,42,.07);
}

.mypage-nav button.active{
  border-color:#c7d2fe;
  background:linear-gradient(135deg,#eef2ff,#ffffff);
  color:#111827;
  box-shadow:0 18px 38px rgba(79,70,229,.11);
}

.mypage-nav button.active::after{
  content:"";
  position:absolute;
  right:14px;
  top:50%;
  width:8px;
  height:8px;
  border-radius:999px;
  background:#4f46e5;
  transform:translateY(-50%);
}

.mypage-nav button.active::before{
  background:#111827;
  color:#fff;
}

.mypage-nav b{
  grid-area:title;
  color:inherit;
  font-size:0.9375rem;
  letter-spacing:-.02em;
}

.mypage-nav span{
  grid-area:desc;
  margin-top:3px;
  color:#64748b;
  opacity:1;
}

.my-profile-list{
  gap:9px;
  margin-top:0;
  padding:14px;
  border:1px solid #e5eaf3;
  border-radius:24px;
  background:#fff;
  box-shadow:0 14px 34px rgba(15,23,42,.045);
}

.my-profile-list div{
  border-radius:14px;
  background:#f8fafc;
  color:#334155;
  padding:11px 12px;
}

.my-profile-list span{
  color:#64748b;
}

.my-profile-list b{
  color:#111827;
}

.mypage-workspace{
  gap:20px;
}

.mypage-workspace .my-tab-panel.active{
  gap:20px;
}

.my-summary-grid{
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  gap:20px;
}

.mypage-page .portal-card{
  border:1px solid #e5eaf3;
  border-radius:28px;
  background:#fff;
  box-shadow:0 16px 42px rgba(15,23,42,.055);
}

.my-diagnosis-card{
  background:
    radial-gradient(circle at 100% 0%,rgba(34,197,94,.12),transparent 30%),
    linear-gradient(135deg,#ffffff,#fbfdff)!important;
}

.my-recent-card{
  background:
    radial-gradient(circle at 100% 0%,rgba(79,70,229,.11),transparent 28%),
    #fff!important;
}

.mypage-page .portal-card-head{
  align-items:center;
  padding-bottom:14px;
  margin-bottom:16px;
  border-bottom:1px solid #edf1f7;
}

.mypage-page .portal-card-head h2{
  font-size:1.25rem;
  letter-spacing:-.035em;
}

.mypage-page .portal-card-head a,
.mypage-page .portal-card-head button{
  border:1px solid #e2e8f0;
  background:#fff;
  color:#334155;
  border-radius:999px;
  padding:9px 13px;
}

.mypage-page .portal-metric-grid{
  gap:14px;
}

.mypage-page .portal-metric{
  position:relative;
  overflow:hidden;
  border-color:#e5eaf3;
  border-radius:24px;
  background:#fff;
  padding:20px;
  box-shadow:0 14px 34px rgba(15,23,42,.045);
}

.mypage-page .portal-metric::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:4px;
  background:linear-gradient(90deg,#4f46e5,#22c55e);
}

.mypage-page .portal-metric b{
  color:#0f172a;
  font-size:2rem;
}

.mypage-page .portal-feedback-card,
.mypage-page .wrong-card{
  border:1px solid #e8edf5;
  border-radius:22px;
  background:#fff;
  box-shadow:none;
}

.mypage-page .portal-feedback-card{
  padding:17px;
}

.mypage-page .portal-feedback-card .status{
  align-items:flex-start;
}

.mypage-page .portal-feedback-card h3{
  color:#111827;
  font-size:1rem;
}

.mypage-page .portal-feedback-card p{
  color:#475569;
}

.mypage-page .portal-empty{
  border-color:#d6deeb;
  border-radius:22px;
  background:linear-gradient(135deg,#f8fafc,#ffffff);
}

.mypage-page .portal-badge,
.mypage-page .portal-chip{
  border-radius:999px;
  padding:7px 10px;
  font-weight:950;
}

.portal-filter-pills{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.portal-filter-pills button{
  border:1px solid #e2e8f0;
  border-radius:999px;
  background:#fff;
  color:#64748b;
  padding:8px 12px;
  font-size:0.75rem;
  font-weight:950;
  cursor:pointer;
}

.portal-filter-pills button.active{
  border-color:#111827;
  background:#111827;
  color:#fff;
}

.mypage-page .portal-table-wrap{
  overflow:auto;
  border:1px solid #e5eaf3;
  border-radius:22px;
  background:#fff;
}

.mypage-page .portal-table th{
  position:sticky;
  top:0;
  z-index:1;
  background:#f8fafc;
  color:#64748b;
}

.mypage-page .portal-table td{
  color:#334155;
}

.mypage-page .portal-table tbody tr:hover td{
  background:#f8fbff;
}

.record-feedback-actions{
  display:flex;
  gap:7px;
  flex-wrap:nowrap;
}

.record-feedback-actions .portal-btn{
  min-height:34px;
  padding:8px 11px;
  font-size:0.75rem;
}

.feedback-board,
.wrongnote-board{
  gap:14px;
}

.wrong-card{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  padding:17px;
}

.wrong-card b{
  display:block;
  color:#111827;
  font-size:0.9375rem;
  font-weight:950;
}

.wrong-card span{
  display:block;
  margin-top:5px;
  color:#64748b;
  font-size:0.8125rem;
}

.my-account-grid{
  grid-template-columns:minmax(0,.9fr) minmax(360px,.7fr);
  gap:20px;
}

.mypage-page .portal-profile-list div{
  border:1px solid #edf1f7;
  background:#f8fafc;
  border-radius:15px;
}

@media (max-width:1280px){
  .mypage-shell{
    grid-template-columns:1fr;
  }
  .mypage-sidebar-panel{
    position:relative;
    top:auto;
    max-height:none;
  }
  .mypage-nav{
    grid-template-columns:repeat(5,minmax(190px,1fr));
    overflow-x:auto;
    padding-bottom:4px;
  }
  .my-profile-list{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media (max-width:900px){
  .mypage-page .my-clean-header{
    align-items:flex-start;
    flex-direction:column;
    padding:24px;
  }
  .mypage-page .portal-topbar-actions{
    width:100%;
    justify-content:flex-start;
  }
  .my-summary-grid,
  .my-account-grid{
    grid-template-columns:1fr;
  }
  .feedback-board,
  .wrongnote-board{
    grid-template-columns:1fr;
  }
}

@media (max-width:680px){
  .mypage-page{
    gap:16px;
  }
  .mypage-page .my-clean-header,
  .mypage-page .portal-card,
  .my-profile-block,
  .my-profile-list{
    border-radius:22px;
  }
  .mypage-nav{
    grid-template-columns:1fr;
  }
  .mypage-nav button{
    grid-template-columns:38px minmax(0,1fr);
    padding:13px;
  }
  .mypage-nav button::before{
    width:38px;
    height:38px;
    border-radius:14px;
  }
  .my-profile-list{
    grid-template-columns:1fr;
  }
  .record-feedback-actions{
    flex-direction:column;
  }
}

/* MyPage summary + records overflow fix - 2026-05-31 */
.mypage-page,
.mypage-shell,
.mypage-workspace,
.mypage-workspace .my-tab-panel,
.mypage-page .portal-card,
.full-panel-card{
  min-width:0;
}

.mypage-workspace{
  width:100%;
  overflow:hidden;
}

.mypage-workspace .my-tab-panel.active{
  width:100%;
}

.full-panel-card{
  overflow:hidden;
}

.mypage-page .portal-table-wrap{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
}

.mypage-page .portal-table{
  width:100%;
  min-width:980px;
  border-collapse:separate;
  border-spacing:0;
}

.mypage-page .portal-table th,
.mypage-page .portal-table td{
  white-space:nowrap;
  vertical-align:middle;
}

.mypage-page .portal-table .title-cell{
  max-width:360px;
  overflow:hidden;
  text-overflow:ellipsis;
}

.mypage-page .portal-table th:last-child,
.mypage-page .portal-table td:last-child{
  min-width:170px;
}

.my-summary-hero-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(360px,.8fr);
  align-items:center;
  gap:22px;
  background:
    radial-gradient(circle at 100% 0%,rgba(79,70,229,.12),transparent 32%),
    linear-gradient(135deg,#ffffff,#f8fbff)!important;
}

.my-summary-hero-main h2{
  margin:6px 0 8px;
  color:#0f172a;
  font-size:clamp(24px,2.4vw,34px);
  line-height:1.16;
  letter-spacing:-.05em;
}

.my-summary-hero-main p:not(.portal-label){
  color:#64748b;
  font-size:0.875rem;
  line-height:1.65;
}

.my-summary-hero-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.my-summary-hero-stat{
  border:1px solid #e5eaf3;
  border-radius:20px;
  background:rgba(255,255,255,.86);
  padding:15px;
  box-shadow:0 10px 24px rgba(15,23,42,.045);
}

.my-summary-hero-stat span,
.my-summary-mini span,
.my-progress-line span{
  display:block;
  color:#64748b;
  font-size:0.75rem;
  font-weight:850;
}

.my-summary-hero-stat b{
  display:block;
  margin-top:5px;
  color:#111827;
  font-size:1.5rem;
  letter-spacing:-.035em;
}

.my-summary-board{
  display:grid;
  grid-template-columns:1.05fr .95fr .95fr;
  gap:20px;
  align-items:stretch;
}

.my-summary-board .portal-card{
  height:100%;
}

.my-summary-mini-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.my-summary-mini{
  border:1px solid #edf1f7;
  border-radius:18px;
  background:#f8fafc;
  padding:13px;
}

.my-summary-mini b{
  display:block;
  margin-top:4px;
  color:#111827;
  font-size:1.25rem;
  letter-spacing:-.035em;
}

.my-summary-callout{
  border:1px solid #dbeafe;
  border-radius:20px;
  background:#eff6ff;
  padding:15px;
}

.my-summary-callout.good{
  border-color:#bbf7d0;
  background:#f0fdf4;
}

.my-summary-callout.warn{
  border-color:#fde68a;
  background:#fffbeb;
}

.my-summary-callout.bad{
  border-color:#fecaca;
  background:#fef2f2;
}

.my-summary-callout b{
  display:block;
  color:#111827;
  font-size:0.9375rem;
}

.my-summary-callout p{
  margin:6px 0 0;
  color:#475569;
  font-size:0.8125rem;
  line-height:1.55;
}

.my-error-bars{
  display:grid;
  gap:10px;
}

.my-error-bar-row{
  display:grid;
  grid-template-columns:52px minmax(0,1fr) 44px;
  align-items:center;
  gap:10px;
  color:#334155;
  font-size:0.8125rem;
  font-weight:850;
}

.my-error-bar-track{
  height:9px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden;
}

.my-error-bar-fill{
  height:100%;
  border-radius:inherit;
  background:#111827;
}

.my-progress-line{
  display:grid;
  gap:8px;
}

.my-progress-line strong{
  color:#111827;
  font-size:0.9375rem;
}

.my-progress-track{
  height:10px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden;
}

.my-progress-fill{
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#4f46e5,#22c55e);
}

.minimal-records .portal-record-item{
  align-items:flex-start;
}

@media (max-width:1280px){
  .my-summary-hero-card,
  .my-summary-board{
    grid-template-columns:1fr;
  }
  .my-summary-hero-stats{
    grid-template-columns:repeat(4,minmax(130px,1fr));
    overflow-x:auto;
    padding-bottom:2px;
  }
}

@media (max-width:900px){
  .my-summary-hero-stats,
  .my-summary-mini-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .mypage-page .portal-table{
    min-width:860px;
  }
}

@media (max-width:680px){
  .my-summary-hero-card{
    gap:16px;
  }
  .my-summary-hero-stats,
  .my-summary-mini-grid{
    grid-template-columns:1fr;
  }
  .mypage-page .portal-table{
    min-width:800px;
  }
}

/* MyPage summary action plan - 2026-05-31 */
.my-action-card{
  background:
    radial-gradient(circle at 100% 0%,rgba(14,165,233,.12),transparent 30%),
    linear-gradient(135deg,#ffffff,#f8fbff)!important;
}

.my-action-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.my-action-item{
  display:grid;
  grid-template-columns:44px minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  border:1px solid #e5eaf3;
  border-radius:22px;
  background:#fff;
  padding:15px;
  box-shadow:0 10px 24px rgba(15,23,42,.035);
}

.my-action-item.priority{
  border-color:#c7d2fe;
  background:linear-gradient(135deg,#eef2ff,#ffffff);
}

.my-action-item.warn{
  border-color:#fde68a;
  background:linear-gradient(135deg,#fffbeb,#ffffff);
}

.my-action-item.good{
  border-color:#bbf7d0;
  background:linear-gradient(135deg,#f0fdf4,#ffffff);
}

.my-action-no{
  width:44px;
  height:44px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#111827;
  color:#fff;
  font-weight:950;
}

.my-action-item.good .my-action-no{
  background:#16a34a;
}

.my-action-item.warn .my-action-no{
  background:#d97706;
}

.my-action-copy strong{
  display:block;
  color:#111827;
  font-size:0.9375rem;
  letter-spacing:-.025em;
}

.my-action-copy p{
  margin:5px 0 0;
  color:#64748b;
  font-size:0.8125rem;
  line-height:1.55;
}

.my-action-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  border:1px solid #e2e8f0;
  border-radius:999px;
  background:#fff;
  color:#111827;
  padding:8px 12px;
  font-size:0.75rem;
  font-weight:950;
  white-space:nowrap;
  text-decoration:none;
}

.my-action-link:hover{
  border-color:#111827;
  background:#111827;
  color:#fff;
}

.portal-chip.good{
  border-color:#bbf7d0!important;
  background:#f0fdf4!important;
  color:#15803d!important;
}

.portal-chip.warn{
  border-color:#fde68a!important;
  background:#fffbeb!important;
  color:#92400e!important;
}

@media (max-width:980px){
  .my-action-list{
    grid-template-columns:1fr;
  }
}

@media (max-width:560px){
  .my-action-item{
    grid-template-columns:38px minmax(0,1fr);
  }
  .my-action-no{
    width:38px;
    height:38px;
    border-radius:14px;
  }
  .my-action-link{
    grid-column:1 / -1;
    width:100%;
  }
}

/* AI 선생님 유료 분석 카드 */
.my-ai-premium-card{margin-top:18px;border:1px solid rgba(37,99,235,.14);background:linear-gradient(135deg,#ffffff 0%,#f8fbff 100%)}
.my-ai-premium-desc{margin:0 0 16px;color:#4b5563;line-height:1.6;font-size:0.875rem}
.my-ai-premium-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.my-ai-premium-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.my-ai-premium-grid>div{border:1px solid #e5e7eb;background:#fff;border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:6px;min-width:0}
.my-ai-premium-grid b{font-size:0.875rem;color:#111827}
.my-ai-premium-grid span{font-size:0.7812rem;line-height:1.45;color:#6b7280}
.ai-feedback-kind-chip{display:inline-flex;align-items:center;gap:4px;margin-left:6px;padding:3px 8px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:0.6875rem;font-weight:800;vertical-align:middle}
.ai-feedback-card .status h3{line-height:1.35}
@media(max-width:1100px){.my-ai-premium-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.my-ai-premium-grid{grid-template-columns:1fr}.my-ai-premium-actions .portal-btn{width:100%;justify-content:center}}


/* MyPage motion polish - 2026-05-31
   피드백방과 동일한 결의 구분형 인터랙션. 기능/ID/JS 동작 변경 없음. */
:root{
  --my-motion-ease:cubic-bezier(.2,1.25,.28,1);
  --my-motion-fast:.22s;
  --my-focus-ring:rgba(79,70,229,.34);
  --my-focus-dim-opacity:.46;
}

.mypage-page{
  perspective:1200px;
}

.mypage-page .my-clean-header,
.mypage-page .my-profile-block,
.mypage-page .my-profile-list,
.mypage-page .mypage-nav button,
.mypage-page .portal-card,
.mypage-page .portal-metric,
.mypage-page .portal-feedback-card,
.mypage-page .wrong-card,
.mypage-page .my-summary-hero-stat,
.mypage-page .my-summary-mini,
.mypage-page .my-summary-callout,
.mypage-page .my-action-item,
.mypage-page .my-ai-premium-grid>div{
  transform-origin:center top;
  transition:
    transform .34s var(--my-motion-ease),
    box-shadow .34s ease,
    border-color .34s ease,
    background .34s ease,
    opacity .24s ease,
    filter .24s ease;
}

.mypage-page .my-clean-header,
.mypage-page .mypage-sidebar-panel,
.mypage-page .mypage-workspace .my-tab-panel.active{
  animation:myRiseIn .48s var(--my-motion-ease) both;
}
.mypage-page .mypage-sidebar-panel{animation-delay:.04s;}
.mypage-page .mypage-workspace .my-tab-panel.active{animation-delay:.08s;}

.mypage-page .portal-metric,
.mypage-page .my-summary-hero-stat,
.mypage-page .my-action-item,
.mypage-page .my-summary-board .portal-card{
  animation:myMiniPop .38s var(--my-motion-ease) both;
}
.mypage-page .portal-metric:nth-child(2),
.mypage-page .my-summary-hero-stat:nth-child(2),
.mypage-page .my-action-item:nth-child(2),
.mypage-page .my-summary-board .portal-card:nth-child(2){animation-delay:.04s;}
.mypage-page .portal-metric:nth-child(3),
.mypage-page .my-summary-hero-stat:nth-child(3),
.mypage-page .my-action-item:nth-child(3),
.mypage-page .my-summary-board .portal-card:nth-child(3){animation-delay:.08s;}
.mypage-page .portal-metric:nth-child(4),
.mypage-page .my-summary-hero-stat:nth-child(4),
.mypage-page .my-action-item:nth-child(4){animation-delay:.12s;}

.mypage-page .my-clean-header::after,
.mypage-page .portal-card::after,
.mypage-page .portal-metric::after,
.mypage-page .my-action-item::after,
.mypage-page .portal-feedback-card::after,
.mypage-page .wrong-card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(110deg,transparent 0%,rgba(255,255,255,.72) 45%,transparent 72%);
  opacity:0;
  transform:translateX(-120%);
}

.mypage-page .portal-card,
.mypage-page .portal-metric,
.mypage-page .my-action-item,
.mypage-page .portal-feedback-card,
.mypage-page .wrong-card{
  position:relative;
  overflow:hidden;
}

.mypage-page .mypage-nav button:hover::before,
.mypage-page .portal-btn:hover,
.mypage-page .my-action-link:hover,
.mypage-page .portal-card-head a:hover,
.mypage-page .portal-card-head button:hover,
.mypage-page .portal-filter-pills button:hover{
  animation:mySoftBounce .42s var(--my-motion-ease);
}

.mypage-page .my-progress-fill,
.mypage-page .my-error-bar-fill{
  transform-origin:left center;
  transition:transform .28s ease, filter .28s ease;
}

@media (hover:hover){
  .mypage-page .my-clean-header:hover,
  .mypage-page .my-profile-block:hover,
  .mypage-page .my-profile-list:hover{
    transform:translateY(-6px) scale(1.006);
    border-color:#c7d2fe!important;
    box-shadow:
      0 24px 58px rgba(79,70,229,.13),
      0 8px 22px rgba(15,23,42,.075)!important;
  }

  .mypage-page .my-clean-header:hover::after,
  .mypage-page .portal-card:hover::after,
  .mypage-page .portal-metric:hover::after,
  .mypage-page .my-action-item:hover::after,
  .mypage-page .portal-feedback-card:hover::after,
  .mypage-page .wrong-card:hover::after{
    animation:myCardShine .72s ease both;
  }

  .mypage-nav:has(button:hover) button:not(:hover){
    opacity:.48;
    filter:saturate(.72);
    transform:scale(.982);
  }
  .mypage-nav button:hover{
    opacity:1;
    filter:saturate(1.06);
    transform:translateY(-6px) scale(1.018);
    z-index:8;
    border-color:#b7abff!important;
    box-shadow:
      0 18px 42px rgba(79,70,229,.15),
      0 0 0 4px rgba(79,70,229,.06)!important;
  }
  .mypage-nav button:hover b{color:#3730a3;}
  .mypage-nav button:hover span{color:#475569;}

  .mypage-workspace .my-tab-panel.active:has(.portal-card:hover) > .portal-card:not(:hover),
  .mypage-workspace .my-tab-panel.active:has(.my-summary-board .portal-card:hover) .my-summary-board > .portal-card:not(:hover){
    opacity:var(--my-focus-dim-opacity);
    filter:saturate(.72) contrast(.96);
    transform:scale(.988);
  }

  .mypage-workspace .my-tab-panel.active > .portal-card:hover,
  .mypage-workspace .my-tab-panel.active .my-summary-board > .portal-card:hover,
  .mypage-workspace .my-tab-panel.active .full-panel-card:hover{
    opacity:1;
    filter:saturate(1.06) contrast(1.01);
    transform:translateY(-8px) scale(1.008);
    z-index:14;
    border-color:#beb3ff!important;
    box-shadow:
      0 24px 60px rgba(79,70,229,.14),
      0 8px 22px rgba(15,23,42,.08),
      0 0 0 5px rgba(79,70,229,.065)!important;
  }

  .my-summary-hero-stats:has(.my-summary-hero-stat:hover) .my-summary-hero-stat:not(:hover),
  .portal-metric-grid:has(.portal-metric:hover) .portal-metric:not(:hover),
  .my-summary-mini-grid:has(.my-summary-mini:hover) .my-summary-mini:not(:hover),
  .my-action-list:has(.my-action-item:hover) .my-action-item:not(:hover),
  .feedback-board:has(.portal-feedback-card:hover) .portal-feedback-card:not(:hover),
  .wrongnote-board:has(.wrong-card:hover) .wrong-card:not(:hover),
  .my-ai-premium-grid:has(> div:hover)>div:not(:hover){
    opacity:.42;
    filter:saturate(.70);
    transform:scale(.976);
  }

  .my-summary-hero-stat:hover,
  .mypage-page .portal-metric:hover,
  .my-summary-mini:hover,
  .my-summary-callout:hover,
  .my-action-item:hover,
  .portal-feedback-card:hover,
  .wrong-card:hover,
  .my-ai-premium-grid>div:hover{
    opacity:1;
    filter:saturate(1.08);
    transform:translateY(-7px) scale(1.025);
    z-index:12;
    border-color:#b7abff!important;
    box-shadow:
      0 18px 40px rgba(79,70,229,.14),
      0 0 0 4px rgba(79,70,229,.055)!important;
  }

  .mypage-page .portal-metric:hover b,
  .my-summary-hero-stat:hover b,
  .my-action-item:hover strong,
  .portal-feedback-card:hover h3,
  .wrong-card:hover b,
  .my-summary-board .portal-card:hover h2,
  .my-action-card:hover h2,
  .full-panel-card:hover h2{
    color:#3730a3!important;
  }

  .mypage-page .portal-metric:hover::before{
    height:6px;
    filter:saturate(1.25);
  }

  .my-progress-line:hover .my-progress-fill,
  .my-error-bar-row:hover .my-error-bar-fill,
  .my-summary-board .portal-card:hover .my-progress-fill,
  .my-summary-board .portal-card:hover .my-error-bar-fill{
    transform:scaleX(1.015);
    filter:saturate(1.25);
  }

  .mypage-page .portal-table tbody tr{
    transition:background .2s ease, transform .2s ease, box-shadow .2s ease;
  }
  .mypage-page .portal-table tbody tr:hover{
    transform:translateX(4px);
    box-shadow:inset 4px 0 0 #4f46e5;
  }

  .portal-filter-pills:has(button:hover) button:not(:hover){
    opacity:.5;
    transform:scale(.96);
  }
  .portal-filter-pills button:hover{
    border-color:#4f46e5;
    color:#3730a3;
    transform:translateY(-3px) scale(1.04);
  }
}

@keyframes myRiseIn{
  from{opacity:0;transform:translateY(12px) scale(.992);}
  to{opacity:1;transform:translateY(0) scale(1);}
}
@keyframes myMiniPop{
  from{opacity:0;transform:translateY(8px) scale(.96);}
  to{opacity:1;transform:translateY(0) scale(1);}
}
@keyframes mySoftBounce{
  0%{transform:translateY(0) scale(1);}
  38%{transform:translateY(-4px) scale(1.06);}
  70%{transform:translateY(1px) scale(.985);}
  100%{transform:translateY(0) scale(1);}
}
@keyframes myCardShine{
  0%{transform:translateX(-120%);opacity:0;}
  30%{opacity:.72;}
  100%{transform:translateX(120%);opacity:0;}
}

@media (hover:none){
  .mypage-page :where(
    .my-clean-header,
    .my-profile-block,
    .my-profile-list,
    .mypage-nav button,
    .portal-card,
    .portal-metric,
    .portal-feedback-card,
    .wrong-card,
    .my-summary-hero-stat,
    .my-summary-mini,
    .my-summary-callout,
    .my-action-item,
    .my-ai-premium-grid>div
  ):active{
    transform:scale(.995);
  }
}

@media (prefers-reduced-motion: reduce){
  .mypage-page *,
  .mypage-page *::before,
  .mypage-page *::after{
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important;
  }
  .mypage-workspace .my-tab-panel.active:has(.portal-card:hover) > .portal-card:not(:hover),
  .mypage-workspace .my-tab-panel.active:has(.my-summary-board .portal-card:hover) .my-summary-board > .portal-card:not(:hover){
    opacity:1!important;
    filter:none!important;
    transform:none!important;
  }
}


/* 20260601 마이페이지 오답관리 개편 */
.wrong-management-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid #dbeafe;
  background: linear-gradient(135deg, #f8fbff, #eff6ff);
}
.wrong-management-summary div {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 12px 14px;
}
.wrong-management-summary span { display:block; color:#64748b; font-size:.8rem; font-weight:900; }
.wrong-management-summary b { display:block; color:#111827; font-size:1.25rem; margin-top:4px; }
.wrong-management-summary p { grid-column: 1 / -1; margin: 0; color:#2563eb; font-weight:800; line-height:1.55; }
.wrong-card.managed {
  display: block;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15,23,42,.06);
  margin-bottom: 14px;
}
.wrong-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
.wrong-card-head b { display:block; color:#111827; font-size:1rem; margin-bottom:4px; }
.wrong-card-head span { color:#64748b; font-size:.84rem; font-weight:700; }
.wrong-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.wrong-detail-chip {
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  padding: 12px;
}
.wrong-detail-chip span { display:block; font-size:.78rem; font-weight:950; color:#64748b; margin-bottom:6px; }
.wrong-detail-chip strong { display:block; color:#111827; line-height:1.55; word-break:keep-all; }
.wrong-detail-chip small { display:block; color:#64748b; font-weight:700; margin-top:6px; }
.wrong-detail-chip.wrong { border-color:#fecdd3; background:#fff1f2; }
.wrong-detail-chip.missing { border-color:#bfdbfe; background:#eff6ff; }
.wrong-detail-chip.added { border-color:#fed7aa; background:#fff7ed; }
.wrong-card-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
@media (max-width: 760px) {
  .wrong-management-summary { grid-template-columns: 1fr; }
  .wrong-card-head { flex-direction: column; }
}

/* 20260601 follow-up-2: 100% 배율 학습기록 잘림 방지 */
.mypage-redesign,
.mypage-page {
  max-width: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.mypage-shell,
.mypage-workspace,
.full-panel-card,
.mypage-page .portal-card-head,
.mypage-page .portal-table-wrap {
  min-width: 0 !important;
  max-width: 100% !important;
}
.mypage-page .portal-card-head {
  flex-wrap: wrap !important;
}
.mypage-page .portal-filter-pills {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  max-width: 100% !important;
}
.mypage-page .portal-table-wrap {
  overflow-x: auto !important;
  overflow-y: visible !important;
}
.mypage-page .portal-table {
  min-width: 760px !important;
}
.mypage-page .portal-table th,
.mypage-page .portal-table td {
  padding: 10px 11px !important;
  font-size: 0.8125rem !important;
}
.mypage-page .portal-table .title-cell {
  max-width: 260px !important;
}
.record-feedback-actions .portal-btn {
  padding: 7px 9px !important;
}
@media (max-width: 1500px) {
  .mypage-shell {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) !important;
    gap: 16px !important;
  }
  .mypage-sidebar-panel {
    padding: 0 !important;
  }
  .mypage-nav button {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    column-gap: 9px !important;
    padding: 11px 12px !important;
    border-radius: 16px !important;
  }
  .mypage-nav button::before {
    width: 34px !important;
    height: 34px !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
  }
  .mypage-nav b { font-size: 0.875rem !important; }
  .mypage-nav span { font-size: 0.6875rem !important; }
}
@media (max-width: 1280px) {
  .mypage-shell {
    grid-template-columns: 1fr !important;
  }
  .mypage-sidebar-panel {
    position: relative !important;
    max-height: none !important;
  }
}
