.ymmc-card {
  box-sizing: border-box;
  max-width: 640px;
  margin: 1.5rem auto;
  padding: 24px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #333;
}

body.ymmc-mypage-page .l-content,
body.ymmc-mypage-page #content {
  display: block !important;
}

body.ymmc-mypage-page .l-mainContent,
body.ymmc-mypage-page #main_content {
  width: 100% !important;
  max-width: none !important;
}

body.ymmc-mypage-page .l-sidebar,
body.ymmc-mypage-page #sidebar {
  display: none !important;
}

body.ymmc-mypage-page .c-pageTitle {
  margin-bottom: 0 !important;
}

body.ymmc-mypage-page .post_content {
  margin-top: 24px !important;
}

.ymmc-mypage {
  width: 100%;
  max-width: 1120px;
}

.ymmc-card.ymmc-mypage {
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ymmc-lead {
  margin: 0 0 18px;
  font-size: 1rem;
  line-height: 1.7;
}

.ymmc-google {
  margin: 0 0 14px;
}

.ymmc-login {
  width: 100%;
  max-width: none;
  padding: 36px 32px;
  text-align: center;
}

.ymmc-login-eyebrow {
  margin: 0 0 14px;
  color: #777;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.ymmc-login-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #f34300;
  box-shadow: 0 0 0 3px rgba(243, 67, 0, 0.12);
  vertical-align: 1px;
}

.ymmc-login-description {
  margin: 0 0 24px;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.7;
}

.ymmc-login .ymmc-google {
  width: 100%;
  max-width: 360px;
  margin: 0 auto 14px;
}

.ymmc-login .ymmc-google .nsl-container,
.ymmc-login .ymmc-google .nsl-container-buttons,
.ymmc-login .ymmc-google a {
  width: 100% !important;
  max-width: none !important;
}

.ymmc-login .ymmc-google .nsl-button {
  box-sizing: border-box;
  min-height: 44px;
}

.ymmc-login-note {
  margin: 0;
  text-align: center;
}

.ymmc-note,
.ymmc-status {
  color: #666;
  font-size: 0.82rem;
  line-height: 1.6;
}

.ymmc-status {
  display: flex;
  min-height: 28px;
  align-items: center;
  margin: 0;
}

.ymmc-status::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #f34300;
  box-shadow: 0 0 0 3px rgba(243, 67, 0, 0.12);
  content: "";
  vertical-align: 1px;
}

.ymmc-heading {
  margin: 0;
  font-size: 1.2rem;
}

.ymmc-mypage .ymmc-heading {
  padding: 0;
  border: 0;
  background: transparent;
  color: #333;
  box-shadow: none;
}

.ymmc-account-row,
.ymmc-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ymmc-account-row {
  margin-bottom: 24px;
}

.ymmc-heading-row {
  align-items: baseline;
  margin-bottom: 5px;
}

.ymmc-heading-note {
  margin: 0 0 16px;
  color: #777;
  font-size: 0.85rem;
  line-height: 1.6;
}

.ymmc-heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.ymmc-saved-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 28px;
  padding: 4px 0;
  border-radius: 0;
  background: transparent;
  color: #666;
  font-size: 0.78rem;
  line-height: 1;
}

.ymmc-refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 28px;
  padding: 4px 9px;
  border: 0;
  border-radius: 999px;
  background: #555;
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1;
  cursor: pointer;
}

.ymmc-refresh-button:hover,
.ymmc-refresh-button:focus-visible {
  background: #444;
}

.ymmc-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 20px;
  padding: 0 0 10px;
  border-bottom: 0;
}

.ymmc-tab {
  min-width: 82px;
  padding: 8px 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #777;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ymmc-tab.is-active {
  border-bottom-color: #f34300;
  color: #333;
}

.ymmc-tab:focus-visible {
  outline: 2px solid #f34300;
  outline-offset: 2px;
}

.ymmc-empty {
  padding: 18px;
  border: 1px dashed #ccc;
  color: #666;
  text-align: center;
}

.ymmc-favorite-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ymmc-card.ymmc-mypage .ymmc-favorite-list {
  margin-right: 0;
  margin-left: 0;
  padding-right: 0;
  padding-left: 0;
}

.ymmc-favorite-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ymmc-favorite-item[hidden] {
  display: none !important;
}

.ymmc-favorite-cover {
  display: block;
  width: 96px;
  height: 136px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f5f5f5;
  object-fit: contain;
  object-position: center;
}

.ymmc-favorite-info {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  flex-direction: column;
  gap: 5px;
}

.ymmc-favorite-title {
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ymmc-favorite-meta {
  color: #666;
  font-size: 0.82rem;
  line-height: 1.5;
}

.ymmc-favorite-title a {
  color: inherit;
  text-decoration: none;
}

.ymmc-favorite-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-sizing: border-box;
  width: 100%;
  min-height: 39px;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #555;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ymmc-favorite-button.is-saved {
  border-color: #f34300;
  background: #f34300;
  color: #fff;
}

.ymmc-favorite-button.is-loading {
  opacity: 0.6;
  cursor: wait;
}

.ymmc-favorite-button.is-logged-out {
  color: #555;
}

.ymmc-favorite-item .ymmc-favorite-button {
  align-self: flex-start;
  width: auto;
  margin-top: auto;
  min-height: 34px;
  padding: 5px 10px;
}

.ymmc-favorite-item-actions {
  display: flex;
  width: 100%;
  align-items: stretch;
  gap: 6px;
  margin-top: auto;
}

.ymmc-favorite-item-actions .ymmc-favorite-button {
  flex: 1 1 0;
  width: auto;
  margin-top: 0;
  white-space: nowrap;
}

.ymmc-return-icon {
  display: block;
  flex: 0 0 1em;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ymmc-favorite-item .ymmc-favorite-button.is-saved {
  border-color: #ccc;
  background: #fff;
  color: #555;
}

.ymmc-actions {
  margin: 0;
  text-align: right;
}

.ymmc-account-row .ymmc-actions,
.ymmc-account-row .ymmc-link {
  font-size: 0.82rem;
  line-height: 1.6;
}

.ymmc-account-row .ymmc-actions {
  display: flex;
  min-height: 28px;
  align-items: center;
}

.ymmc-button {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #555;
  border-radius: 6px;
  color: #333;
  text-decoration: none;
}

.ymmc-link {
  color: #555;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ymmc-notice {
  padding: 12px 16px;
  border-left: 4px solid #f34300;
  background: #fff7f3;
}

.ymmc-notice-success {
  max-width: 640px;
  margin: 1.5rem auto;
  border-left-color: #4d8b62;
  background: #f3faf5;
}

.ymmc-delete-error {
  margin: 0 0 20px;
}

.ymmc-account-management {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e5e5e5;
}

.ymmc-delete-details {
  color: #666;
  font-size: 0.82rem;
}

.ymmc-delete-details > summary {
  display: inline-block;
  color: #666;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.ymmc-delete-details > summary::marker,
.ymmc-delete-details > summary::-webkit-details-marker {
  display: none;
}

.ymmc-delete-panel {
  max-width: 560px;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #e1e1e1;
  border-radius: 6px;
  background: #fafafa;
}

.ymmc-delete-panel p {
  margin: 0 0 10px;
  line-height: 1.7;
}

.ymmc-delete-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.ymmc-delete-form label {
  color: #555;
  font-weight: 600;
}

.ymmc-delete-form input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 39px;
  padding: 7px 10px;
  border: 1px solid #bbb;
  border-radius: 5px;
  background: #fff;
  color: #333;
  font: inherit;
}

.ymmc-delete-form input[type="text"]:focus {
  border-color: #b3261e;
  outline: 2px solid rgba(179, 38, 30, 0.16);
  outline-offset: 1px;
}

.ymmc-delete-button {
  justify-self: start;
  min-height: 39px;
  padding: 7px 14px;
  border: 1px solid #b3261e;
  border-radius: 5px;
  background: #fff;
  color: #b3261e;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ymmc-delete-button:hover,
.ymmc-delete-button:focus-visible {
  background: #b3261e;
  color: #fff;
}

@media (min-width: 601px) and (max-width: 760px) {
  .ymmc-favorite-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body.ymmc-mypage-page .post_content {
    margin-top: 32px !important;
  }

  .ymmc-card {
    margin: 1rem 0;
    padding: 18px;
  }

  .ymmc-login {
    width: 100%;
    margin: 1rem auto;
    padding: 28px 18px;
  }

  .ymmc-login-description {
    margin-bottom: 20px;
  }

  .ymmc-card.ymmc-mypage {
    width: 100vw;
    max-width: none;
    margin-top: 0;
    margin-right: 0;
    margin-left: calc(50% - 50vw);
    padding-top: 0;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: 18px;
    padding-left: max(12px, env(safe-area-inset-left));
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .ymmc-account-row {
    align-items: center;
  }

  .ymmc-heading-row {
    align-items: baseline;
  }

  .ymmc-account-row {
    margin-bottom: 24px;
  }

  .ymmc-heading-row {
    margin-bottom: 5px;
  }

  .ymmc-heading-note {
    margin-bottom: 12px;
  }

  .ymmc-tabs {
    margin-bottom: 14px;
  }

  .ymmc-favorite-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ymmc-card.ymmc-mypage .ymmc-favorite-list {
    width: 100%;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  .ymmc-account-management {
    margin-top: 30px;
  }

  .ymmc-delete-panel {
    padding: 14px;
  }

  .ymmc-delete-button {
    width: 100%;
  }

  .ymmc-favorite-item {
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 7px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
  }

  .ymmc-favorite-cover {
    width: 82px;
    height: 116px;
  }
}
