.ly-result-page,
.ly-latest-page {
  padding: 16px 0 28px;
}

.ly-result-wrap {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 12px;
}

.ly-brand {
  text-align: center;
  color: #d48f74;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.ly-result-title {
  margin: 0 0 14px;
  text-align: center;
  font-size: 34px;
  line-height: 1.15;
  color: #222;
}

.ly-radar-card,
.ly-summary-card,
.ly-empty-card,
.ly-latest-card,
.ly-result-card {
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ly-radar-card {
  padding: 16px 10px 10px;
  margin-bottom: 14px;
}

.ly-radar-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 18px;
  color: #333;
}

.ly-radar-canvas {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
}

.ly-member-la-overall {
  margin-top: 8px;
  margin-bottom: 4px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #555;
}

.ly-radar-date {
  margin-top: 8px;
  text-align: center;
  color: #666;
  font-size: 13px;
}

.ly-result-card {
  position: relative;
  border: 2px solid transparent;
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  display: inline-block;
  margin: 0 0 14px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.ly-result-card-grid {
  column-count: 2;
  column-gap: 14px;
  margin-bottom: 14px;
}

.ly-card-header {
  padding: 14px 14px 10px;
  text-align: center;
  color: #fff;
}

.ly-card-header h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
}

.ly-card-icon {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  /* Match .ly-card-header h2 line box: 34px × 1.2 ≈ 41px */
  width: 41px;
  height: 41px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #fff;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

.ly-card-icon img,
.ly-card-icon svg {
  width: 25px;
  height: 25px;
  display: block;
}

.ly-card-body {
  padding: 12px 14px 14px;
}

.ly-row-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  color: #222;
  font-size: 16px;
  line-height: 1.45;
}

.ly-risk-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.ly-risk-label,
.ly-risk-text {
  color: #666;
  font-size: 14px;
}

.ly-risk-track {
  height: 16px;
  border-radius: 999px;
  background: #e9e9e9;
  overflow: hidden;
}

.ly-risk-fill {
  height: 100%;
  border-radius: 999px;
}

.ly-risk-low { background: #67b54b; }
.ly-risk-medium { background: #e9c449; }
.ly-risk-high { background: #f08d4b; }
.ly-risk-very_high { background: #df3c3c; }

.ly-detail-toggle,
.ly-primary-btn {
  width: 100%;
  margin-top: 12px;
  border: 0;
  border-radius: 10px;
  background: #edf6ef;
  color: #247a3f;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 12px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

.ly-detail-panel {
  margin-top: 10px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.ly-detail-item {
  margin-bottom: 10px;
}

.ly-detail-item h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #333;
}

.ly-detail-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #444;
}

.ly-summary-card {
  padding: 14px;
}

.ly-summary-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ly-summary-card p {
  margin: 0;
  line-height: 1.6;
  color: #3e3e3e;
}

.ly-latest-card,
.ly-empty-card {
  padding: 16px;
}

.ly-latest-risk-list {
  list-style: none;
  margin: 12px 0 4px;
  padding: 0;
}

.ly-latest-risk-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  color: #fff;
  margin-bottom: 8px;
}

.ly-latest-risk-title {
  font-weight: 700;
}

.ly-latest-risk-badge {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 13px;
}

.ly-theme-bmi { border-color: #27C8D1; }
.ly-theme-bmi .ly-card-header,
.ly-theme-bmi.ly-latest-risk-item { background: #27C8D1; }
.ly-theme-bmi .ly-card-icon { color: #27C8D1; }

.ly-theme-exercise { border-color: #7CB342; }
.ly-theme-exercise .ly-card-header,
.ly-theme-exercise.ly-latest-risk-item { background: #7CB342; }
.ly-theme-exercise .ly-card-icon { color: #7CB342; }

.ly-theme-wellbeing { border-color: #FF6F61; }
.ly-theme-wellbeing .ly-card-header,
.ly-theme-wellbeing.ly-latest-risk-item { background: #FF6F61; }
.ly-theme-wellbeing .ly-card-icon { color: #FF6F61; }

.ly-theme-nutrition { border-color: #F3C94B; }
.ly-theme-nutrition .ly-card-header,
.ly-theme-nutrition.ly-latest-risk-item { background: #F3C94B; }
.ly-theme-nutrition .ly-card-icon { color: #F3C94B; }

.ly-theme-harmful { border-color: #A86ACD; }
.ly-theme-harmful .ly-card-header,
.ly-theme-harmful.ly-latest-risk-item { background: #A86ACD; }
.ly-theme-harmful .ly-card-icon { color: #A86ACD; }

.ly-theme-sleep { border-color: #5C6BC0; }
.ly-theme-sleep .ly-card-header,
.ly-theme-sleep.ly-latest-risk-item { background: #5C6BC0; }
.ly-theme-sleep .ly-card-icon { color: #5C6BC0; }

.ly-theme-stress { border-color: #26A69A; }
.ly-theme-stress .ly-card-header,
.ly-theme-stress.ly-latest-risk-item { background: #26A69A; }
.ly-theme-stress .ly-card-icon { color: #26A69A; }

@media (max-width: 480px) {
  .ly-result-title { font-size: 28px; }
  .ly-card-header h2 { font-size: 22px; }
  /* h2 line box 22px × 1.2 ≈ 26px */
  .ly-card-icon {
    top: 10px;
    left: 10px;
    width: 27px;
    height: 27px;
    font-size: 14px;
  }
  .ly-card-icon img,
  .ly-card-icon svg {
    width: 17px;
    height: 17px;
  }
  .ly-row-list { font-size: 15px; }
}

@media (max-width: 900px) {
  .ly-result-card-grid {
    column-count: 1;
  }

  .ly-result-card { 
    max-width: 100% !important; 
  }
}

.ly-protein-accordion-wrap {
  margin-top: 14px;
  border-top: 1px solid #ececec;
  padding-top: 10px;
}

.ly-protein-title {
  margin: 0 0 8px;
  font-size: 22px;
  color: #2f2f2f;
}

.ly-accordion-item {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 8px;
  overflow: hidden;
}

.ly-accordion-toggle {
  width: 100%;
  background: #fff;
  border: 0;
  display: grid;
  grid-template-columns: 28px 1fr 20px;
  align-items: center;
  gap: 8px;
  padding: 11px 10px;
  text-align: left;
}

.ly-accordion-index {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #5aa03c;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.ly-accordion-text {
  color: #2b2b2b;
  font-size: 16px;
  font-weight: 700;
}

.ly-accordion-arrow {
  color: #6f6f6f;
  font-size: 14px;
  transition: transform 0.2s ease;
}

.ly-accordion-toggle[aria-expanded="true"] .ly-accordion-arrow {
  transform: rotate(180deg);
}

.ly-accordion-panel {
  border-top: 1px solid #efefef;
  padding: 10px;
}

.ly-accordion-panel p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #404040;
}

.ly-accordion-rich {
  font-size: 14px;
  line-height: 1.6;
  color: #404040;
}

.ly-protein-table-wrap {
  overflow-x: auto;
  margin-bottom: 8px;
}

.ly-protein-table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  background: #fff;
}

.ly-protein-table th,
.ly-protein-table td {
  border: 1px solid #e3e3e3;
  padding: 8px 10px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.ly-protein-table thead th {
  background: #f7f7f7;
  font-weight: 700;
}

.ly-protein-table tbody th {
  background: #fafafa;
  font-weight: 700;
}

.ly-protein-table-note,
.ly-protein-table-summary {
  margin: 6px 0 0;
}

.ly-protein-guide-card {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fafafa;
}

.ly-protein-guide-card h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #2e2e2e;
}

.ly-protein-guide-card ul {
  margin: 0;
  padding-left: 18px;
}

.ly-protein-guide-card li {
  margin: 4px 0;
}

.ly-protein-food-title {
  margin: 12px 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #2d2d2d;
}

.ly-protein-food-table-wrap {
  overflow-x: auto;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
}

.ly-protein-food-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.ly-protein-food-table th,
.ly-protein-food-table td {
  border: 1px solid #e0e0e0;
  padding: 10px 12px;
  font-size: 15px;
  color: #2f2f2f;
  text-align: left;
  vertical-align: middle;
}

.ly-protein-food-table thead th {
  background: #f3f3f3;
  font-size: 17px;
  font-weight: 700;
}

.ly-meal-plan {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
  margin: 12px 0;
  overflow: hidden;
}

.ly-meal-plan-title {
  margin: 0;
  padding: 10px 12px;
  font-size: 20px;
  color: #5fa241;
  background: #f7fbf4;
  border-bottom: 1px solid #e5e5e5;
}

.ly-meal-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  border-bottom: 1px solid #ededed;
}

.ly-meal-side {
  background: #f4f4f4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px 6px;
  gap: 3px;
}

.ly-meal-protein {
  color: #5fa241;
  font-weight: 700;
}

.ly-meal-main {
  padding: 10px 12px;
}

.ly-meal-name {
  font-weight: 700;
  color: #2e2e2e;
  font-size: 14px;
}

.ly-meal-items {
  color: #2f2f2f;
}

.ly-meal-note {
  margin-top: 4px;
  font-size: 13px;
  color: #7a7a7a;
}

.ly-meal-total {
  padding: 10px 12px 4px;
  font-weight: 700;
  color: #333;
}

.ly-meal-caution {
  padding: 0 12px 12px;
  color: #666;
  font-size: 13px;
}

.ly-back-link {
  display: inline-block;
  margin: 0 0 8px;
  color: #2f7dbf;
  text-decoration: none;
  font-weight: 700;
}

.ly-records-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 14px;
}

a.ly-records-new-link.ly-primary-btn {
  width: auto;
  margin-top: 0;
  text-decoration: none;
}

a.ly-records-new-link.ly-primary-btn:hover,
a.ly-records-new-link.ly-primary-btn:focus {
  text-decoration: none;
}

.ly-record-list-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
}

.ly-record-item-btn {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8f8f8;
  text-decoration: none !important;
  color: #222;
  margin-bottom: 8px;
  border: 1px solid #ececec;
}

a.ly-record-item-btn:hover,
a.ly-record-item-btn:focus,
a.ly-record-item-btn:visited,
a.ly-record-item-btn:active {
  text-decoration: none !important;
  color: #222;
}

.ly-record-item-id {
  font-weight: 700;
  color: #555;
}

.ly-record-item-date {
  font-size: 13px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ly-record-item-risk {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  font-size: 12px;
  border-radius: 999px;
  color: #fff;
  padding: 2px 8px;
  text-transform: uppercase;
  justify-self: end;
}

.ly-pager {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.ly-pager-btn,
.ly-pager-page {
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e2e2;
  text-decoration: none;
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

.ly-pager-page.is-current {
  background: #27C8D1;
  border-color: #27C8D1;
  color: #fff;
}

body.ly-modal-open {
  overflow: hidden;
}

.ly-modal[hidden] {
  display: none;
}

.ly-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.ly-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.ly-modal-dialog {
  position: relative;
  width: min(680px, calc(100vw - 24px));
  max-height: calc(100vh - 64px);
  margin: 32px auto;
  background: #fff;
  border-radius: 14px;
  padding: 16px 14px 14px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.ly-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: #666;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ly-modal-title {
  margin: 0 24px 16px 0;
  font-size: 24px;
  color: #222;
  flex: 0 0 auto;
}

.ly-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  border-radius: 0 0 14px 14px;
}

.ly-modal-body .ly-detail-item:last-child {
  margin-bottom: 0;
}

.ly-modal-tab-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  border-bottom: 1px solid #ececec;
  padding-top: 2px;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.ly-modal-tab {
  border: 1px solid #dcdcdc;
  background: #f7f7f7;
  color: #333;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  white-space: nowrap;
}

.ly-modal-tab.is-active {
  background: #ffffff;
  border-color: #7ab446;
  color: #2d6e35;
  font-weight: 700;
}
