.account-page {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
  color: #222;
}

.account-page.hidden {
  display: none !important;
}

#address-book-page { z-index: 1100; }
#address-editor-page { z-index: 1200; }

body:has(#account-settings-page:not(.hidden)) #profile-modal {
  z-index: 1300 !important;
}

.account-page-header {
  display: grid;
  grid-template-columns: 44px 1fr 64px;
  align-items: center;
  min-height: calc(52px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 8px 0;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.account-page-header h2 {
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
}

.account-back,
.account-header-action {
  height: 40px;
  border: 0;
  background: transparent;
  color: #222;
  font-size: 20px;
  font-weight: 600;
}

.account-header-action {
  font-size: 14px;
  font-weight: 700;
}

.account-page-body {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}

.account-section-label {
  margin: 0;
  padding: 18px 16px 8px;
  color: #888;
  font-size: 12px;
  font-weight: 700;
}

.account-list {
  background: #fff;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.account-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid #eee;
  background: #fff;
  color: #222;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}

.account-list .account-row:last-child {
  border-bottom: 0;
}

.account-row-side {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: #bbb;
  font-size: 18px;
  font-weight: 400;
}

.account-row-note {
  max-width: 42vw;
  overflow: hidden;
  color: #888;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-entry {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: 0;
  border-bottom: 1px solid #eee;
  background: #fff;
  color: #222;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}

.address-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.address-item input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #111;
}

.address-item-main {
  min-width: 0;
  flex: 1;
}

.address-item-main strong {
  display: block;
  font-size: 15px;
}

.address-item-main p {
  margin: 4px 0 0;
  color: #666;
  font-size: 12px;
  line-height: 1.5;
}

.address-item-actions {
  display: flex;
  gap: 8px;
}

.address-item-actions button {
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
}

.address-item-actions button.danger {
  color: #e11d48;
}

.account-add {
  display: block;
  width: calc(100% - 32px);
  margin: 20px 16px;
  padding: 14px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: #fff;
}

.account-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #666;
  font-size: 12px;
  font-weight: 700;
}

.account-form input,
.account-form select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  color: #222;
  font-size: 16px;
}

.account-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.account-zip-row {
  display: flex;
  gap: 8px;
}

.account-zip-row button {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #f7f7f7;
  font-size: 13px;
  font-weight: 700;
}

.account-hint {
  margin: 0;
  padding: 12px 16px 0;
  color: #888;
  font-size: 12px;
  line-height: 1.5;
}

.mypage-avatar-btn {
  position: relative;
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 999px;
  line-height: 0;
}

.mypage-avatar-btn:active {
  transform: scale(0.96);
}

.mypage-avatar-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

