
/* ページ全体 */
body {
  margin: 0;
  font-family: sans-serif;
  background-color: #F5F3EF;
  color: #333333;
}

/* ヘッダー */
.header {
  background-color: #FFFFFF;
  padding: 25px 40px;
  border-bottom: 1px solid #E8E2DC;
}

.header h1 {
  margin: 0;
  color: #B99A82;
  font-size: 30px;
}

.header p {
  margin-bottom: 0;
  color: #777777;
}

/* メインコンテンツ */
.container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

/* ウェルカムエリア */
.welcome {
  margin-bottom: 30px;
}

.welcome h2 {
  font-size: 24px;
  letter-spacing: 2px;
}

/* 集計カード */
.summary {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}

.card {
  background-color: #FFFFFF;
  padding: 25px;
  border-radius: 15px;
  flex: 1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.card p {
  color: #777777;
  margin-top: 0;
}

.card h3 {
  font-size: 28px;
  margin-bottom: 0;
  color: #B99A82;
}

/* メニュー */
.actions {
  margin-bottom: 40px;
}

button {
  background-color: #B99A82;
  color: #FFFFFF;
  border: none;
  padding: 14px 22px;
  margin-right: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
}

button:hover {
  background-color: #A5866E;
}

/* 最近登録したグッズ */
.recent {
  background-color: #FFFFFF;
  padding: 25px;
  border-radius: 15px;
}

footer {
  text-align: center;
  padding: 20px;
  color: #999999;
}

/* スマートフォン対応 */
@media (max-width: 600px) {
  .summary {
    flex-direction: column;
  }

  .header {
    padding: 20px;
  }
}


/* グッズ登録フォーム */
.register {
  background-color: #FFFFFF;
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 40px;
}

.register form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.register input,
.register select,
.register textarea {
  padding: 12px;
  border: 1px solid #E8E2DC;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
}

.register textarea {
  min-height: 80px;
  resize: vertical;
}

.register label {
  font-size: 14px;
  font-weight: bold;
}


/* グッズカード */
.item-card {
  background-color: #F5F3EF;
  padding: 18px;
  border-radius: 10px;
  margin-top: 15px;
}

.item-card h3 {
  margin-top: 0;
  color: #B99A82;
}

.item-card p {
  font-size: 14px;
  color: #555555;
}

/* グッズ画像 */
.item-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
    display: none;
}


/* ===================================
   推し勝 デザイン改善
=================================== */

/* ページ全体 */
body {
    background-color: #F5F3EF;
    color: #333333;
    font-family: "Noto Sans JP", sans-serif;
    margin: 0;
    padding: 0 20px;
}

/* ヘッダー */
.header {
    text-align: center;
    padding: 35px 20px;
}

.header h1 {
    color: #8F715C;
    font-size: 32px;
    letter-spacing: 3px;
}

.header p {
    color: #888888;
}

/* 各セクション */
.register,
.recent,
#edit-section {
    background-color: #FFFFFF;
    max-width: 850px;
    margin: 25px auto;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

h2 {
    color: #8F715C;
    margin-bottom: 25px;
}

/* 入力欄 */
input,
select,
textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    margin-bottom: 18px;
    border: 1px solid #E5DED7;
    border-radius: 9px;
    background-color: #FAF9F7;
    font-size: 14px;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

/* ボタン */
button {
    background-color: #B99A82;
    color: white;
    border: none;
    border-radius: 9px;
    padding: 11px 20px;
    cursor: pointer;
    font-size: 14px;
    margin: 5px;
    transition: 0.2s;
}

button:hover {
    background-color: #96765E;
}

/* グッズ一覧 */
#item-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* グッズカード */
.item-card {
    background-color: #FFFFFF;
    border: 1px solid #EEE8E2;
    border-radius: 14px;
    padding: 15px;
    overflow: hidden;
    transition: 0.2s;
}

.item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
}

.item-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.item-card h3 {
    color: #725A49;
    font-size: 17px;
}

.item-card p {
    color: #777777;
    font-size: 13px;
}

/* スマートフォン対応 */
@media (max-width: 600px) {
    body {
        padding: 0 10px;
    }

    .register,
    .recent,
    #edit-section {
        padding: 20px;
    }

    #item-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .item-image {
        height: 140px;
    }
}


/* ===================================
   コンパクト表示に調整
=================================== */

/* 全体の余白 */
body {
    padding: 0 12px;
}

/* ヘッダー */
.header {
    padding: 20px 10px;
}

.header h1 {
    font-size: 27px;
    margin: 5px;
}

/* 各セクション */
.register,
.recent,
#edit-section {
    max-width: 900px;
    padding: 20px;
    margin: 15px auto;
    border-radius: 13px;
}

/* 見出し */
h2 {
    font-size: 19px;
    margin-bottom: 15px;
}

/* 入力欄 */
input,
select,
textarea {
    padding: 9px;
    margin-top: 5px;
    margin-bottom: 12px;
    font-size: 13px;
}

/* グッズ一覧 */
#item-list {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

/* グッズカード */
.item-card {
    padding: 11px;
    border-radius: 11px;
}

.item-card h3 {
    font-size: 15px;
    margin: 6px 0;
}

.item-card p {
    font-size: 12px;
    margin: 5px 0;
}

/* グッズ画像 */
.item-image {
    height: 145px;
    margin-bottom: 5px;
}

/* ボタン */
button {
    padding: 8px 13px;
    font-size: 12px;
    margin: 3px;
}

/* スマホ */
@media (max-width: 600px) {
    #item-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .item-image {
        height: 120px;
    }
}

/* 登録フォームは最初は非表示 */
.register {
    display: none;
}

/* ===================================
   登録フォームの閉じるボタン
=================================== */

#close-register-button {
    display: block;
    margin: 0 0 15px auto;
    padding: 7px 16px;
    background-color: #EDE8E3;
    color: #806B5B;
    border: 1px solid #E2D9D1;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
}

#close-register-button:hover {
    background-color: #DED3C9;
}


/* ===================================
   ホーム画面の最近登録したグッズ
=================================== */

.dashboard-recent {
    max-width: 900px;
    margin: 15px auto;
    padding: 20px;
    background-color: #FFFFFF;
    border-radius: 13px;
}

.dashboard-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-title h2 {
    margin: 5px 0 15px;
}

#more-items-button {
    background-color: transparent;
    color: #96765E;
    padding: 6px;
}

#dashboard-item-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-item-card {
    padding: 10px;
    border: 1px solid #EEE8E2;
    border-radius: 10px;
    min-width: 0;
}

.dashboard-item-image {
    display: none;
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.dashboard-item-card h3 {
    font-size: 14px;
    color: #725A49;
    overflow-wrap: anywhere;
}

.dashboard-item-card p {
    font-size: 12px;
    color: #888888;
}

#dashboard-empty-message {
    color: #999999;
    font-size: 13px;
}

@media (max-width: 600px) {
    #dashboard-item-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 月ごとの予算 */
.budget-card label {
    display: block;
    margin-top: 14px;
    color: #777777;
    font-size: 13px;
}

/* ヘッダー内のメニュー */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    text-align: left;
}

.header-brand {
    flex: 0 0 auto;
}

.header-brand-title {
    display: flex;
    align-items: center;
    gap: 9px;
}

.header-brand-title h1 {
    margin: 0;
}

.header-brand-mark {
    display: grid;
    flex: 0 0 35px;
    width: 35px;
    height: 35px;
    place-items: center;
    border-radius: 12px 12px 12px 4px;
    background: linear-gradient(145deg, #dd91aa, #b66c9a);
    color: #fff;
    font-size: 20px;
    font-weight: 850;
}

.header-brand p {
    margin: 4px 0 0;
}

.header-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
}

.header-menu button {
    margin: 2px;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .header {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .header-menu {
        justify-content: flex-start;
    }
}

/* フォーム集の印象を抑えた、推し活ノート風の仕上げ */
.stats-intro::before, .home-recent-panel::before, .chart-panel::before,
.oshi-list-panel::before, .calendar-panel::before, .wishlist-section::before,
.collection-list-section::before, .memory-form::before { display: none; }

.stats-intro {
    border: 1px solid #e6d9f0;
    background: linear-gradient(125deg, #f0e8fb 0%, #fff7f3 58%, #fff 100%);
    box-shadow: 0 12px 28px rgba(88, 61, 115, .09);
}

.stats-intro h2 { color: #513875; }
.stats-intro h2::before { content: ""; margin-right: 0; }
.stats-intro p { color: #665a70; }

.home-welcome {
    border: 1px solid #dac9ee;
    background: linear-gradient(120deg, #684792 0%, #8a68b2 48%, #d78ca4 100%);
    color: #fff;
}
.home-welcome .eyebrow, .home-welcome h2, .home-welcome p { color: #fff !important; }
.home-welcome .eyebrow { opacity: .82; }
.home-welcome .primary-link { border: 1px solid #ffffff8c; background: #fff; color: #624387; box-shadow: 0 8px 20px #3f285344; }
.home-welcome .primary-link:hover { background: #fff8fc; color: #4a3268; }
.home-welcome::after { color: #ffffff20; }

.home-stat-card { border-radius: 20px 20px 20px 7px; }
.home-stat-card:nth-child(1) { border-bottom: 4px solid #9a79c3; }
.home-stat-card:nth-child(2) { border-bottom: 4px solid #dd8a9d; }
.home-stat-card:nth-child(3) { border-bottom: 4px solid #e9b86f; }
.budget-panel { border-radius: 22px 8px 22px 22px; background: linear-gradient(140deg, #fff, #f3ecfb 65%, #fff5f0); }

.home-shortcuts a { border-radius: 18px 18px 18px 7px; }
.home-shortcuts a::after { content: "›"; position: absolute; right: 15px; top: 50%; color: #a287c0; font-size: 24px; transform: translateY(-50%); }
.home-shortcuts a strong { padding-right: 22px; }

.oshi-form, .memory-form { background: linear-gradient(145deg, #fff, #f8f2fd); border-color: #e7dcef; }
.wishlist-section { background: linear-gradient(155deg, #fff, #fff8f7 72%, #f7f1fb); }
.collection-list-section { background: linear-gradient(155deg, #fff, #f8f4fc); }
.calendar-panel { background: linear-gradient(155deg, #fff, #f9f4ff 80%, #fff8f4); }
.chart-panel:nth-of-type(2) { background: linear-gradient(145deg, #fff, #f5effb); }
.chart-panel:nth-of-type(3) { background: linear-gradient(145deg, #fff, #fff3f3); }

.calendar-day {
    border-color: #e9e0ef;
    border-radius: 10px;
    background: rgba(255,255,255,.92);
}
.calendar-day-number { color: #49345f; font-weight: 800; }
.calendar-event-marker {
    min-height: 21px;
    padding: 3px 5px;
    border: 0;
    border-left: 5px solid var(--oshi-color, #9c8aa8);
    background: color-mix(in srgb, var(--oshi-color, #9c8aa8) 20%, white);
    color: #30263a;
    font-weight: 650;
}
.calendar-legend-entry { padding: 4px 9px 4px 5px; border: 1px solid #e9e1ef; border-radius: 999px; background: #fff; color: #45384f; }
.calendar-legend-entry i { flex: 0 0 14px; border: 2px solid #fff; box-shadow: 0 0 0 1px #b9aabe; }
.day-event-card { border: 1px solid #e9e0ef; border-left: 8px solid var(--oshi-color, #9c8aa8); border-radius: 14px; background: color-mix(in srgb, var(--oshi-color, #9c8aa8) 9%, white); }
.day-event-card h3 { color: #3c3047; }

.memory-card { border-radius: 20px 20px 20px 8px; }
.memory-thumbnail-button { border: 3px solid #fff; outline: 1px solid #eadff1; }
.memory-gallery-dialog { background: #fbf8ff; }
.memory-gallery-heading { padding: 8px 10px; margin: -2px -2px 12px; border-radius: 12px; background: linear-gradient(100deg, #eee5f8, #fff0ed); }

@media (max-width: 600px) {
    .calendar-day .calendar-event-marker {
        align-self: flex-start;
        width: 11px;
        min-width: 11px;
        height: 11px;
        min-height: 11px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: var(--oshi-color, #9c8aa8);
        box-shadow: 0 0 0 2px #fff, 0 0 0 3px color-mix(in srgb, var(--oshi-color, #9c8aa8) 50%, white);
        color: transparent;
        font-size: 0;
    }
    .calendar-day { gap: 5px; }
    .calendar-more-count { align-self: flex-start; color: #4f3d60; font-weight: 700; }
}

/* 日本語ホームと予算ゲージ */
.home-page {
    display: grid;
    gap: 18px;
}

.home-welcome,
.home-summary,
.budget-panel,
.home-recent-panel,
.home-shortcuts,
.collection-tools {
    padding: 22px;
    border-radius: 15px;
    background: #FFFFFF;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.home-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(120deg, #FFFDFC, #F3EAE1);
}

.home-welcome h2,
.budget-panel h2,
.home-section-heading h2 {
    margin: 4px 0 8px;
    color: #725A49;
}

.home-welcome p {
    margin-bottom: 0;
    color: #777777;
}

.eyebrow {
    margin: 0;
    color: #9A7B65 !important;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.04em;
}

.primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 10px;
    background: #B99A82;
    color: #FFFFFF;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
}

.home-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.home-stat-card {
    padding: 18px;
    border-radius: 13px;
    background: #FFFFFF;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.home-stat-card span {
    color: #777777;
    font-size: 13px;
}

.home-stat-card strong {
    display: block;
    margin-top: 8px;
    color: #8F715C;
    font-size: 24px;
}

.budget-panel-heading,
.home-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

#home-budget-remaining {
    color: #6F8061;
    font-size: 18px;
}

.budget-meter {
    width: 100%;
    height: 16px;
    margin: 16px 0 8px;
    overflow: hidden;
    border-radius: 99px;
    background: #EEEAE5;
}

.budget-meter-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #A9B98A, #6E8B61);
    transition: width 0.35s ease;
}

.budget-meter.over-budget .budget-meter-fill {
    background: linear-gradient(90deg, #D69A7B, #B34D4D);
}

.budget-meter-labels {
    display: flex;
    justify-content: space-between;
    color: #777777;
    font-size: 13px;
}

.budget-meter-labels b {
    color: #725A49;
}

.home-budget-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px 12px;
    max-width: 520px;
    margin-top: 16px;
}

.home-budget-form label {
    grid-column: 1 / -1;
    color: #66594F;
    font-size: 13px;
    font-weight: bold;
}

.home-budget-form input {
    margin: 0;
}

.home-budget-form button {
    margin: 0;
    min-height: 42px;
}

.home-section-heading a {
    color: #80634D;
    font-weight: bold;
    text-decoration: none;
}

.home-recent-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.home-recent-card {
    min-width: 0;
    padding: 12px;
    border: 1px solid #EEE8E2;
    border-radius: 12px;
}

.home-recent-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 9px;
}

.home-recent-card img[hidden] {
    display: none;
}

.home-recent-card h3 {
    color: #725A49;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.home-recent-card p {
    color: #777777;
    font-size: 13px;
}

.home-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.home-shortcuts a {
    display: block;
    padding: 16px;
    border-radius: 12px;
    background: #F7F4F0;
    color: #725A49;
    text-decoration: none;
}

.home-shortcuts strong,
.home-shortcuts span {
    display: block;
}

.home-shortcuts span {
    margin-top: 6px;
    color: #777777;
    font-size: 12px;
}

.collection-tools {
    margin: 15px auto;
    max-width: 900px;
}

.collection-tools h2 {
    margin-top: 0;
}

.collection-list-section {
    scroll-margin-top: 115px;
}

.collection-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.collection-list-heading h2 {
    margin: 4px 0 14px;
}

.collection-count {
    padding: 8px 13px;
    border-radius: 99px;
    background: #F5F3EF;
    color: #725A49;
    font-weight: bold;
}

.wishlist-card-image {
    display: block;
    width: 100%;
    max-height: 210px;
    margin-bottom: 12px;
    border-radius: 9px;
    object-fit: cover;
}

.wishlist-card-image[hidden] {
    display: none;
}

/* 推しの登録 */
.oshi-form,
.oshi-list-panel,
.calendar-panel,
.calendar-day-panel,
.calendar-form-panel {
    margin-bottom: 18px;
    padding: 22px;
    border-radius: 15px;
    background: #FFFFFF;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.oshi-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    max-width: 600px;
}

.oshi-form label,
.event-form > label {
    color: #66594F;
    font-size: 13px;
    font-weight: bold;
}

.oshi-form input[type="color"] {
    width: 72px;
    height: 44px;
    padding: 4px;
}

.oshi-list-panel h2,
.calendar-day-panel h2,
.calendar-form-panel h2 {
    margin-top: 0;
    color: #725A49;
}

.oshi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.oshi-card {
    position: relative;
    min-height: 100px;
    padding: 16px;
    border: 1px solid #EEE8E2;
    border-left: 7px solid var(--oshi-color, #B99A82);
    border-radius: 12px;
}

.oshi-color-chip {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--oshi-color, #B99A82);
    vertical-align: middle;
}

.oshi-card h3 {
    display: inline-block;
    margin: 0 0 0 8px;
    color: #725A49;
    overflow-wrap: anywhere;
}

.oshi-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    font-size: 13px;
}

.oshi-links a { color: #80634D; }
.oshi-links span { color: #999999; }
.oshi-delete { margin-top: 10px; background: #EDE8E3; color: #806B5B; }

/* イベントカレンダー */
.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.calendar-toolbar h2 {
    min-width: 170px;
    margin: 0;
    color: #725A49;
    text-align: center;
}

.calendar-toolbar button {
    min-width: 44px;
    min-height: 42px;
}
.calendar-toolbar .calendar-save-image { width:auto; padding-inline:14px; background:#765263; color:#fff; }

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
    margin-top: 18px;
    text-align: center;
    color: #806B5B;
    font-weight: bold;
}

.calendar-weekdays span { padding: 8px 0; }

.calendar-day {
    display: flex;
    min-width: 0;
    min-height: 94px;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    margin: 1px;
    padding: 5px;
    border: 1px solid #EEE8E2;
    border-radius: 7px;
    background: #FFFFFF;
    color: #444444;
    text-align: left;
    vertical-align: top;
}

.calendar-day:hover { background: #FAF7F3; }
.calendar-day.outside-month { opacity: 0.42; }
.calendar-day.selected-day { outline: 2px solid #96765E; outline-offset: -2px; }
.calendar-day-number { padding-left: 2px; font-size: 13px; font-weight: bold; }

.calendar-event-marker {
    display: block;
    overflow: hidden;
    padding: 2px 4px;
    border-left: 3px solid #B99A82;
    border-radius: 3px;
    background: #F7F4F0;
    color: #51463E;
    font-size: 10px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-more-count { color: #777777; font-size: 10px; }

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 16px;
    margin-top: 14px;
}

.calendar-legend-entry { display: inline-flex; align-items: center; gap: 6px; color: #666666; font-size: 12px; }
.calendar-legend-entry i { width: 12px; height: 12px; border-radius: 50%; }

.notification-status {
    margin: 8px 0;
    color: #725A49;
    font-weight: bold;
}

.notification-enable { background: #EDE8E3; color: #725A49; }

.day-event-list { display: grid; gap: 10px; }

.day-event-card {
    padding: 14px;
    border: 1px solid #EEE8E2;
    border-left: 6px solid #B99A82;
    border-radius: 10px;
}

.day-event-card h3 { margin: 0 0 6px; color: #725A49; }
.day-event-card p { margin: 5px 0 10px; color: #777777; font-size: 13px; }
.day-event-card a { color: #80634D; font-size: 13px; }
.event-delete { margin-top: 8px; background: #EDE8E3; color: #806B5B; }

.event-form { display: grid; gap: 3px; max-width: 600px; }

.event-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.event-form-row > div { min-width: 0; }

.notify-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 10px;
}

.notify-check input { width: auto; margin: 0; }

@media (max-width: 600px) {
    .calendar-panel,
    .calendar-day-panel,
    .calendar-form-panel,
    .oshi-form,
    .oshi-list-panel { padding: 14px; }

    .calendar-day { min-height: 62px; padding: 3px; }
    .calendar-event-marker { height: 6px; padding: 0; border-radius: 9px; color: transparent; }
    .calendar-more-count { font-size: 9px; }
    .event-form-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 650px) {
    .home-welcome {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-summary,
    .home-shortcuts {
        grid-template-columns: 1fr;
    }

    .home-recent-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-recent-card img {
        height: 120px;
    }

    .budget-panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ページ共通ナビ */
.header-menu a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    box-sizing: border-box;
    padding: 12px 18px;
    margin: 2px;
    border-radius: 11px;
    background: #F5F3EF;
    color: #725A49;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.header-menu a:hover,
.header-menu a[aria-current="page"] {
    background: #B99A82;
    color: #FFFFFF;
}

.page-content {
    max-width: 900px;
    margin: 25px auto;
    padding: 24px;
}

.stats-intro,
.chart-panel {
    padding: 22px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.stats-intro h2,
.chart-panel h2 {
    margin: 0 0 8px;
}

.stats-intro p,
.chart-summary {
    color: #777777;
}

.chart-summary {
    font-weight: bold;
}

.bar-chart {
    display: grid;
    gap: 8px;
}

.bar-row {
    display: grid;
    grid-template-columns: 54px minmax(40px, 1fr) 100px;
    align-items: center;
    gap: 10px;
}

.bar-label,
.bar-amount {
    color: #66594F;
    font-size: 12px;
}

.bar-amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.bar-track {
    height: 13px;
    overflow: hidden;
    border-radius: 99px;
    background: #F1EEE9;
}

.bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #B99A82, #8F715C);
}

.daily-chart {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 6px;
}

.empty-state {
    padding: 25px;
    color: #888888;
    text-align: center;
}

.login-page {
    display: grid;
    min-height: 65vh;
    place-items: center;
    padding: 25px;
}

.login-card {
    width: min(100%, 430px);
    box-sizing: border-box;
    padding: 28px;
    border-radius: 16px;
    background: #FFFFFF;
    box-shadow: 0 5px 22px rgba(0, 0, 0, 0.07);
}

.login-card h2 {
    margin-top: 0;
}

.login-card label {
    display: block;
    color: #66594F;
    font-weight: bold;
}

.login-actions {
    display: flex;
    flex-wrap: wrap;
}

.login-status {
    min-height: 24px;
    color: #725A49;
}

.login-note,
.setup-notice p {
    color: #777777;
    font-size: 13px;
    line-height: 1.6;
}

.setup-notice {
    margin: 14px 0;
    padding: 14px;
    border-radius: 10px;
    background: #F8F0E5;
    color: #725A49;
}

.app-dialog {
    width: min(440px, calc(100% - 36px));
    box-sizing: border-box;
    border: 0;
    border-radius: 16px;
    padding: 24px;
    color: #333333;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.25);
}

.app-dialog::backdrop {
    background: rgba(45, 36, 29, 0.42);
}

.app-dialog h2 {
    margin-top: 0;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 760px) {
    .header-menu a {
        flex: 0 0 auto;
        min-height: 46px;
        padding: 10px 13px;
        font-size: 14px;
    }

    .page-content {
        padding: 12px;
    }
}

.budget-card input {
    margin-bottom: 4px;
}

#budget-remaining {
    font-weight: bold;
    color: #6F8061;
}

#budget-remaining.over-budget {
    color: #B34D4D;
}

#backup-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* 欲しいものリスト */
.wishlist-section {
    max-width: 900px;
    margin: 15px auto;
    padding: 20px;
    background: #FFFFFF;
    border-radius: 13px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.wishlist-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wishlist-heading h2 {
    margin-bottom: 5px;
}

.wishlist-heading p {
    margin-top: 0;
    color: #888888;
    font-size: 13px;
}

.wishlist-total-card {
    min-width: 140px;
    padding: 12px 16px;
    border-radius: 11px;
    background: #F5F3EF;
    color: #777777;
    font-size: 12px;
}

.wishlist-total-card strong {
    display: block;
    margin-top: 4px;
    color: #8F715C;
    font-size: 20px;
}

.wishlist-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    max-width: 600px;
    margin: 18px 0 24px;
}

.wishlist-form label,
.wishlist-card label {
    color: #66594F;
    font-size: 13px;
    font-weight: bold;
}

.wishlist-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.wishlist-form-row > div {
    min-width: 0;
}
.wishlist-estimated-total { justify-self:end; margin:0; color:#4d7857; font-weight:800; }
.google-login-separator { display:flex; align-items:center; gap:12px; margin:16px 0 10px; color:#85798b; font-size:13px; }
.google-login-separator::before, .google-login-separator::after { content:""; flex:1; height:1px; background:#e8e0ed; }
.google-login-button { width:100%; margin:0; border:1px solid #d8d4de; background:#fff; color:#433b49; box-shadow:0 2px 6px #392d3b12; }
.google-login-button:hover { background:#f7f5f9; }

#wishlist-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.wishlist-card {
    min-width: 0;
    padding: 15px;
    border: 1px solid #EEE8E2;
    border-left: 5px solid var(--oshi-color, #EEE8E2);
    border-radius: 12px;
    background: #FFFEFD;
}

.oshi-image { display:block; width:100%; max-height:220px; object-fit:cover; border-radius:10px; margin-bottom:10px; }
.item-oshi-label { display:inline-block; margin:4px 0; padding:4px 8px; border-radius:999px; background:color-mix(in srgb, var(--oshi-color, #B7B1AA) 17%, white); color:#584B43; font-size:12px; }
.calendar-dialog { width:min(640px, calc(100% - 28px)); max-height:85vh; overflow:auto; border:0; border-radius:16px; padding:22px; color:#594B41; box-shadow:0 18px 60px #0003; }
.calendar-dialog::backdrop { background:#2d251f88; }
.calendar-dialog-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.calendar-dialog-heading h2 { margin:0 0 14px; }
.calendar-dialog-actions,.calendar-event-actions { display:flex; gap:8px; flex-wrap:wrap; }
.calendar-dialog .event-form { margin-top:18px; }
.memory-form { display:grid; gap:5px; max-width:620px; padding:18px; background:#fff; border:1px solid #eee8e2; border-radius:14px; }
.memory-tools { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:18px 0; }
.memory-tools label:not(:first-child), .calendar-tag-filter label { margin-left:8px; }
.calendar-tag-filter { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:10px 0 2px; }
.memory-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px; }
.memory-card { position:relative; padding:14px; border:1px solid #eee8e2; border-left:5px solid var(--oshi-color,#d6cec6); border-radius:13px; background:#fff; }
.memory-thumbnail-button { position:relative; display:block; width:100%; min-height:0; margin:0 0 10px; padding:0; overflow:hidden; border-radius:9px; background:#f2efeb; }
.memory-thumbnail-button[hidden], .memory-thumbnail[hidden] { display:none; }
.memory-thumbnail { display:block; width:100%; height:190px; object-fit:cover; }
.memory-thumbnail-count { position:absolute; right:8px; bottom:8px; padding:5px 9px; border-radius:99px; background:#302820cc; color:#fff; font-size:12px; }
.memory-gallery-dialog { width:min(900px,calc(100% - 24px)); max-height:90dvh; overflow:auto; border:0; border-radius:16px; padding:18px; box-shadow:0 18px 60px #0004; }
.memory-gallery-dialog::backdrop { background:#2d251f88; }
.memory-gallery-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; position:sticky; top:-18px; z-index:1; padding:8px 0; background:#fff; }
.memory-gallery-heading h2 { margin:0; }
.memory-gallery-content { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:10px; }
.memory-gallery-content img { display:block; width:100%; max-height:70vh; object-fit:contain; border-radius:10px; background:#f5f3ef; }
.memory-card h3 { margin:10px 0 5px; }
.memory-card p { overflow-wrap:anywhere; }
@media(max-width:600px) { .memory-tools { align-items:stretch; flex-direction:column; } .memory-grid { grid-template-columns:1fr; } }

/* スマートフォンでの共通レイアウト */
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; }

@media (max-width: 760px) {
    body { padding: 0; }
    .header {
        position: sticky;
        top: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
        padding: 8px 12px 10px;
    }
    .header-brand { text-align: left; }
    .header-brand h1 { margin: 0; font-size: 21px; line-height: 1.3; }
    .header-menu {
        display: flex;
        width: 100%;
        gap: 6px;
        padding: 2px 0 5px;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .header-menu a {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        margin: 0;
        padding: 9px 12px;
        font-size: 14px;
    }
    .page-content, .container, .wishlist-section {
        width: 100%;
        max-width: 100%;
        margin: 12px auto;
        padding: 12px;
    }
    .home-welcome, .home-summary, .budget-panel, .home-recent-panel,
    .home-shortcuts, .collection-tools, .recent, .register, #edit-section,
    .stats-intro, .chart-panel, .oshi-form, .oshi-list-panel,
    .calendar-panel, .calendar-day-panel, .memory-form {
        max-width: 100%;
        padding: 14px;
    }
    input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
    select, textarea {
        width: 100%;
        max-width: 100%;
        min-height: 44px;
        font-size: 16px;
    }
    input[type="file"] { min-height: 44px; max-width: 100%; font-size: 14px; }
    button { min-height: 44px; max-width: 100%; font-size: 14px; touch-action: manipulation; }
    .summary, .home-summary, .home-shortcuts { gap: 10px; }
    .home-summary { grid-template-columns: 1fr; }
    .home-shortcuts { grid-template-columns: 1fr; }
    #item-list, #wishlist-list, .oshi-grid, .memory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }
    .item-card, .wishlist-card, .oshi-card, .memory-card { min-width: 0; padding: 11px; }
    .item-image, .wishlist-card-image { width: 100%; height: 130px; object-fit: cover; }
    .wishlist-form-row, .event-form-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .wishlist-heading { gap: 8px; }
    .memory-tools { align-items: stretch; flex-direction: column; }
    .memory-thumbnail { height: 170px; }
    .memory-gallery-content { grid-template-columns:1fr; }
    .calendar-panel { overflow: hidden; }
    .calendar-toolbar { gap: 4px; }
    .calendar-toolbar h2 { min-width: 0; flex: 1; font-size: 16px; }
    .calendar-toolbar button { min-width: 42px; min-height: 44px; padding: 8px; }
    .calendar-weekdays span { padding: 6px 0; font-size: 12px; }
    .calendar-day { min-height: 58px; min-width: 0; padding: 3px 2px; }
    .calendar-day-number { padding-left: 1px; font-size: 12px; }
    .calendar-event-marker { height: 6px; min-height: 6px; padding: 0; color: transparent; }
    .calendar-more-count { overflow: hidden; font-size: 8px; white-space: nowrap; }
    .calendar-legend { gap: 8px 10px; }
    .calendar-legend-entry { font-size: 11px; }
    .calendar-dialog {
        width: calc(100% - 20px);
        max-width: 620px;
        max-height: 88dvh;
        margin: auto;
        padding: 16px;
    }
    .calendar-dialog-actions > button, .calendar-event-actions > button { flex: 1 1 auto; }
    .login-page { min-height: auto; padding: 16px 0; }
    .login-card { padding: 20px; }
    .bar-row { grid-template-columns: 42px minmax(30px, 1fr) 75px; gap: 6px; }
    .bar-label, .bar-amount { font-size: 11px; }
    .daily-chart { padding-right: 2px; }
}

@media (max-width: 380px) {
    #item-list, #wishlist-list, .oshi-grid, .memory-grid { grid-template-columns: 1fr; }
    .calendar-day { min-height: 48px; }
    .calendar-toolbar h2 { font-size: 14px; }
}

/* 推し活らしい、やわらかなアクセントと見出しのメリハリ */
:root {
    --ink: #352d3f;
    --muted: #746b7b;
    --plum: #7655a5;
    --plum-deep: #5e4389;
    --lilac: #eee7f8;
    --rose: #e28b9d;
    --peach: #f6c8a7;
    --paper: #fffdfd;
    --line: #e9e1ee;
    --soft-shadow: 0 10px 28px rgba(74, 48, 97, .09);
}

body {
    color: var(--ink);
    background:
        radial-gradient(ellipse at 3% 2%, rgba(218, 198, 246, .42), transparent 27rem),
        radial-gradient(ellipse at 98% 16%, rgba(255, 219, 199, .48), transparent 25rem),
        #f8f6fb;
}

.header {
    border-bottom: 1px solid rgba(118, 85, 165, .12);
    background: rgba(255, 253, 255, .96);
    box-shadow: 0 5px 22px rgba(74, 48, 97, .08);
}

.header-brand h1 {
    color: var(--plum);
    letter-spacing: .07em;
}

.header-brand h1::after {
    content: "";
    color: var(--rose);
    font-size: .65em;
    vertical-align: top;
}

.header-brand p { color: var(--muted); }

.header-menu a {
    border: 1px solid transparent;
    border-radius: 999px;
    transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.header-menu a:hover {
    transform: translateY(-1px);
    background: var(--lilac);
    color: var(--plum-deep);
}

.header-menu a[aria-current="page"] {
    background: linear-gradient(135deg, var(--plum), #9875c5);
    color: #fff;
    box-shadow: 0 4px 12px rgba(118, 85, 165, .25);
}

button, .primary-link {
    border: 0;
    background: linear-gradient(135deg, #8060ad, #a07bc8);
    color: #fff;
    box-shadow: 0 4px 12px rgba(118, 85, 165, .18);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

button:hover, .primary-link:hover {
    transform: translateY(-2px);
    filter: saturate(1.08);
    box-shadow: 0 7px 17px rgba(118, 85, 165, .24);
    background: linear-gradient(135deg, var(--plum-deep), #8967b5);
}

button:active, .primary-link:active { transform: translateY(0); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid rgba(226, 139, 157, .7);
    outline-offset: 2px;
}

input, select, textarea {
    border: 1px solid #e2d9e9;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: #a78bc9;
    box-shadow: 0 0 0 4px rgba(167, 139, 201, .16);
    outline: none;
}

.page-content { max-width: 1040px; }

.stats-intro, .chart-panel, .oshi-form, .oshi-list-panel,
.calendar-panel, .calendar-day-panel, .wishlist-section,
.home-recent-panel, .recent, .register, #edit-section,
.memory-form, .collection-tools {
    border: 1px solid rgba(118, 85, 165, .09);
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--soft-shadow);
}

.stats-intro, .home-recent-panel, .chart-panel, .oshi-list-panel,
.calendar-panel, .wishlist-section, .collection-list-section, .memory-form {
    position: relative;
    overflow: hidden;
}

.stats-intro::before, .home-recent-panel::before, .chart-panel::before,
.oshi-list-panel::before, .calendar-panel::before, .wishlist-section::before,
.collection-list-section::before, .memory-form::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--plum), #c29bdd 55%, var(--rose), var(--peach));
    content: "";
}

.stats-intro h2, .chart-panel h2, .oshi-list-panel h2,
.calendar-panel h2, .wishlist-heading h2, .collection-list-heading h2,
.memory-card h3, .home-recent-panel h2 {
    color: var(--plum-deep);
}

.stats-intro p, .wishlist-heading p { color: var(--muted); }
.eyebrow { color: var(--plum) !important; letter-spacing: .1em; text-transform: uppercase; }

.home-welcome {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(118, 85, 165, .13);
    background: linear-gradient(120deg, #fff 0%, #f1eafa 58%, #fff0eb 100%);
    box-shadow: var(--soft-shadow);
}

.home-welcome::after {
    position: absolute;
    top: -43px;
    right: 18%;
    color: rgba(118, 85, 165, .12);
    content: "";
    font-size: 170px;
    line-height: 1;
    pointer-events: none;
}

.home-welcome > * { position: relative; z-index: 1; }
.home-welcome h2 { color: var(--plum-deep); font-size: clamp(24px, 4vw, 34px); }
.primary-link { text-decoration: none; }

.home-stat-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(118, 85, 165, .09);
    box-shadow: var(--soft-shadow);
}

.home-stat-card:nth-child(1) { background: linear-gradient(145deg, #fff, #f3edfb); }
.home-stat-card:nth-child(2) { background: linear-gradient(145deg, #fff, #fff0ed); }
.home-stat-card:nth-child(3) { background: linear-gradient(145deg, #fff, #fff7e8); }
.home-stat-card span { color: var(--muted); font-weight: 600; }
.home-stat-card strong { color: var(--plum-deep); }

.budget-panel { border: 1px solid #e7deed; background: linear-gradient(145deg, #fff, #faf6ff); box-shadow: var(--soft-shadow); }
.budget-meter { height: 18px; border: 3px solid #fff; background: #e9e2ef; box-shadow: inset 0 1px 3px #46315418; }
.budget-meter-fill { background: linear-gradient(90deg, #9b80c4, #da8fa6, #f1b889); }
.budget-meter.over-budget .budget-meter-fill { background: linear-gradient(90deg, #e18b86, #bf5369); }
.budget-meter-labels { color: var(--muted); }
.budget-meter-labels b { color: var(--plum-deep); }

.home-shortcuts a {
    position: relative;
    border: 1px solid #eee6f2;
    border-radius: 15px;
    background: linear-gradient(135deg, #fff, #faf7fd);
    box-shadow: 0 5px 15px rgba(74, 48, 97, .06);
    transition: transform .18s ease, box-shadow .18s ease;
}

.home-shortcuts a:hover { transform: translateY(-3px); box-shadow: var(--soft-shadow); }
.home-shortcuts a strong { color: var(--plum-deep); }
.home-shortcuts a span { color: var(--muted); }

.item-card, .wishlist-card, .oshi-card, .memory-card {
    border-color: #ece4f0;
    border-radius: 16px;
    background: var(--paper);
    box-shadow: 0 5px 18px rgba(74, 48, 97, .07);
    transition: transform .18s ease, box-shadow .18s ease;
}

.item-card:hover, .wishlist-card:hover, .oshi-card:hover, .memory-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(74, 48, 97, .12);
}

.item-card h3, .wishlist-card h3, .oshi-card h3 { color: var(--plum-deep); }
.item-card p, .wishlist-card p, .memory-card p { color: #6f6676; line-height: 1.55; }
.oshi-card { background: linear-gradient(145deg, #fff, #fcf9ff); }
.oshi-color-chip { box-shadow: 0 0 0 4px #fff, 0 0 0 5px #e9e1ee; }
.item-oshi-label { background: color-mix(in srgb, var(--oshi-color, #a78bc9) 18%, white); color: var(--plum-deep); font-weight: 700; }
.wishlist-delete-button, .event-delete, .oshi-delete {
    border: 1px solid #f0d9df;
    background: #fff0f2;
    color: #9d5363;
    box-shadow: none;
}
.wishlist-delete-button:hover, .event-delete:hover, .oshi-delete:hover { background: #f9dfe5; color: #813e4f; box-shadow: 0 5px 12px rgba(157, 83, 99, .14); }

.calendar-day {
    border-color: #ebe4ef;
    background: #fff;
    transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.calendar-day:hover { transform: translateY(-1px); background: #faf7ff; box-shadow: 0 4px 10px rgba(74, 48, 97, .1); }
.calendar-day-number { color: var(--plum-deep); }
.calendar-day.selected-day { outline-color: var(--rose); background: #fff8fc; }
.calendar-event-marker { border-radius: 5px; background: #f4eff9; }
.calendar-legend-entry { color: var(--muted); }
.day-event-card { border-color: #eee6f2; background: linear-gradient(120deg, #fff, #fcf9ff); }

.bar-track { background: #eee8f2; }
.bar-fill { background: linear-gradient(90deg, #9876be, #d88da8, #f2b982); }
.bar-label, .bar-amount { color: var(--muted); }

.wishlist-total-card { border: 1px solid #f0dfeb; background: linear-gradient(135deg, #fff3f4, #f5effb); }
.wishlist-total-card strong { color: var(--plum-deep); }
.wishlist-countdown { box-shadow: 0 2px 7px rgba(74, 48, 97, .06); }
.memory-thumbnail-button { box-shadow: 0 5px 14px rgba(74, 48, 97, .12); }
.memory-thumbnail-button:hover .memory-thumbnail { transform: scale(1.035); }
.memory-thumbnail { transition: transform .25s ease; }
.memory-card { background: linear-gradient(155deg, #fff, #fdfaff); }
.memory-gallery-dialog, .calendar-dialog, .app-dialog { border: 1px solid #eee5f2; border-radius: 20px; }
.memory-gallery-dialog::backdrop, .calendar-dialog::backdrop { background: rgba(44, 32, 57, .62); backdrop-filter: blur(3px); }

.empty-state { border: 1px dashed #ded2e7; border-radius: 14px; background: #fcf9ff; color: var(--muted); }
footer { color: #94899b; }

@media (max-width: 760px) {
    .home-welcome::after { right: -14px; top: -16px; font-size: 110px; }
    .home-stat-card strong { font-size: 21px; }
    .stats-intro, .chart-panel { border-radius: 15px; }
}

.wishlist-card h3 {
    margin: 0 0 10px;
    color: #725A49;
    overflow-wrap: anywhere;
}

.wishlist-card p {
    margin: 6px 0;
    color: #777777;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.wishlist-card a {
    display: inline-block;
    margin: 6px 0;
    color: #80634D;
    font-size: 13px;
}

.wishlist-card label select {
    display: block;
}

.wishlist-actions {
    display: flex;
    flex-wrap: wrap;
    margin: 8px -3px -3px;
}

.wishlist-delete-button {
    background: #EDE8E3;
    color: #806B5B;
}

@media (max-width: 600px) {
    .wishlist-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .wishlist-total-card {
        width: 100%;
        box-sizing: border-box;
    }

    .wishlist-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    #wishlist-list {
        grid-template-columns: 1fr;
    }
}

/* 使いやすいヘッダーナビと発売日表示 */
.header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #FFFFFF;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
}

.header-menu button {
    min-height: 48px;
    padding: 12px 18px;
    font-size: 15px;
    border-radius: 11px;
}

#wishlist-section,
.recent,
.register {
    scroll-margin-top: 125px;
}

.wishlist-card .wishlist-countdown {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 8px;
    font-weight: bold;
}

.wishlist-card .countdown-upcoming {
    color: #705A42;
    background: #F4EBDC;
}

.wishlist-card .countdown-today {
    color: #FFFFFF;
    background: #B97952;
}

.wishlist-card .countdown-past {
    color: #777777;
    background: #F0EFED;
}

@media (max-width: 760px) {
    .header {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 10px;
    }

    .header-brand h1 {
        font-size: 22px;
        letter-spacing: 1px;
    }

    .header-brand p {
        display: none;
    }

    .header-menu {
        flex: 1;
        min-width: 0;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .header-menu button {
        flex: 0 0 auto;
        min-height: 46px;
        padding: 10px 13px;
        font-size: 14px;
    }

    #wishlist-section,
    .recent,
    .register {
        scroll-margin-top: 85px;
    }
}

/* 推し活ノート風の最終テーマ */
.stats-intro::before, .home-recent-panel::before, .chart-panel::before,
.oshi-list-panel::before, .calendar-panel::before, .wishlist-section::before,
.collection-list-section::before, .memory-form::before { display: none; }
.stats-intro { border: 1px solid #e6d9f0; background: linear-gradient(125deg,#f0e8fb,#fff7f3 60%,#fff); box-shadow: 0 12px 28px #583d7317; }
.stats-intro h2 { color: #513875; }
.stats-intro h2::before { content: ""; margin-right: 0; }
.stats-intro p { color: #665a70; }
.home-welcome { border: 1px solid #dac9ee; background: linear-gradient(120deg,#684792,#8a68b2 48%,#d78ca4); color: #fff; }
.home-welcome .eyebrow, .home-welcome h2, .home-welcome p { color: #fff !important; }
.home-welcome .primary-link { border: 1px solid #ffffff8c; background: #fff; color: #624387; box-shadow: 0 8px 20px #3f285344; }
.home-welcome::after { color: #ffffff20; }
.home-stat-card { border-radius: 20px 20px 20px 7px; }
.home-stat-card:nth-child(1) { border-bottom: 4px solid #9a79c3; }
.home-stat-card:nth-child(2) { border-bottom: 4px solid #dd8a9d; }
.home-stat-card:nth-child(3) { border-bottom: 4px solid #e9b86f; }
.budget-panel { border-radius: 22px 8px 22px 22px; background: linear-gradient(140deg,#fff,#f3ecfb 65%,#fff5f0); }
.home-shortcuts a { border-radius: 18px 18px 18px 7px; }
.home-shortcuts a::after { content: "›"; position: absolute; right: 15px; top: 50%; color: #a287c0; font-size: 24px; transform: translateY(-50%); }
.home-shortcuts a strong { padding-right: 22px; }
.oshi-form, .memory-form { background: linear-gradient(145deg,#fff,#f8f2fd); border-color: #e7dcef; }
.wishlist-section { background: linear-gradient(155deg,#fff,#fff8f7 72%,#f7f1fb); }
.collection-list-section { background: linear-gradient(155deg,#fff,#f8f4fc); }
.calendar-panel { background: linear-gradient(155deg,#fff,#f9f4ff 80%,#fff8f4); }
.chart-panel:nth-of-type(2) { background: linear-gradient(145deg,#fff,#f5effb); }
.chart-panel:nth-of-type(3) { background: linear-gradient(145deg,#fff,#fff3f3); }
.calendar-day { border-color: #e9e0ef; border-radius: 10px; background: #fff; }
.calendar-day-number { color: #49345f; font-weight: 800; }
.calendar-day .calendar-event-marker { min-height: 22px; padding: 3px 5px; border: 0; border-left: 5px solid var(--oshi-color,#9c8aa8); border-radius: 5px; background: color-mix(in srgb,var(--oshi-color,#9c8aa8) 22%,white); color: #30263a; font-weight: 650; }
.calendar-legend-entry { padding: 4px 9px 4px 5px; border: 1px solid #e9e1ef; border-radius: 999px; background: #fff; color: #45384f; }
.calendar-legend-entry i { flex: 0 0 14px; border: 2px solid #fff; box-shadow: 0 0 0 1px #b9aabe; }
.day-event-card { border: 1px solid #e9e0ef; border-left: 8px solid var(--oshi-color,#9c8aa8); border-radius: 14px; background: color-mix(in srgb,var(--oshi-color,#9c8aa8) 9%,white); }
.day-event-card h3 { color: #3c3047; }
.memory-card { border-radius: 20px 20px 20px 8px; }
.memory-thumbnail-button { border: 3px solid #fff; outline: 1px solid #eadff1; }
.memory-gallery-dialog { background: #fbf8ff; }
.memory-gallery-heading { padding: 8px 10px; border-radius: 12px; background: linear-gradient(100deg,#eee5f8,#fff0ed); }
.header-menu a[aria-current="page"] { background: linear-gradient(135deg,#7655a5,#9875c5); color: #fff; }
.wishlist-card h3 { color: #5e4389; }
.wishlist-card p { color: #6f6676; }
.wishlist-delete-button { border: 1px solid #f0d9df; background: #fff0f2; color: #9d5363; box-shadow: none; }

@media (max-width: 600px) {
    .calendar-day .calendar-event-marker { align-self: flex-start; width: 11px; min-width: 11px; height: 11px; min-height: 11px; padding: 0; border: 0; border-radius: 50%; background: var(--oshi-color,#9c8aa8); box-shadow: 0 0 0 2px #fff,0 0 0 3px color-mix(in srgb,var(--oshi-color,#9c8aa8) 50%,white); color: transparent; font-size: 0; }
    .calendar-day { gap: 5px; }
    .calendar-more-count { align-self: flex-start; color: #4f3d60; font-weight: 700; }
}

/* 追加ルールの後ろに来る既存スタイルとの最終調整 */
.header {
    background: rgba(255, 253, 255, .96);
    border-bottom-color: rgba(118, 85, 165, .12);
}
.header-menu a[aria-current="page"] { background: linear-gradient(135deg, #7655a5, #9875c5); color: #fff; }
.wishlist-card h3 { color: #5e4389; }
.wishlist-card p { color: #6f6676; }
.wishlist-delete-button { border: 1px solid #f0d9df; background: #fff0f2; color: #9d5363; box-shadow: none; }
.wishlist-delete-button:hover { background: #f9dfe5; color: #813e4f; }
#event-form[hidden] { display: none !important; }

@media (max-width: 760px) {
    .header { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 12px 10px; }
    .header-brand { text-align: left; }
    .header-brand h1 { margin: 0; color: #7655a5; font-size: 21px; letter-spacing: .07em; }
    .header-menu { width: 100%; flex: initial; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; gap: 6px; }
}

/* 仕上げ：フォーム感を抑えて、推し活ノートらしく */
.stats-intro::before, .home-recent-panel::before, .chart-panel::before, .oshi-list-panel::before,
.calendar-panel::before, .wishlist-section::before, .collection-list-section::before, .memory-form::before { display:none; }
.stats-intro { border:1px solid #e6d9f0; background:linear-gradient(125deg,#f0e8fb,#fff7f3 60%,#fff); box-shadow:0 12px 28px #583d7317; }
.stats-intro h2 { color:#513875; }
.stats-intro h2::before { content:""; margin-right:0; }
.stats-intro p { color:#665a70; }
.home-welcome { border:1px solid #dac9ee; background:linear-gradient(120deg,#684792,#8a68b2 48%,#d78ca4); color:#fff; }
.home-welcome .eyebrow, .home-welcome h2, .home-welcome p { color:#fff !important; }
.home-welcome .primary-link { border:1px solid #ffffff8c; background:#fff; color:#624387; box-shadow:0 8px 20px #3f285344; }
.home-welcome::after { color:#ffffff20; }
.home-stat-card { border-radius:20px 20px 20px 7px; }
.home-stat-card:nth-child(1) { border-bottom:4px solid #9a79c3; }
.home-stat-card:nth-child(2) { border-bottom:4px solid #dd8a9d; }
.home-stat-card:nth-child(3) { border-bottom:4px solid #e9b86f; }
.budget-panel { border-radius:22px 8px 22px 22px; background:linear-gradient(140deg,#fff,#f3ecfb 65%,#fff5f0); }
.home-shortcuts a { border-radius:18px 18px 18px 7px; }
.home-shortcuts a::after { content:"›"; position:absolute; right:15px; top:50%; color:#a287c0; font-size:24px; transform:translateY(-50%); }
.home-shortcuts a strong { padding-right:22px; }
.oshi-form, .memory-form { background:linear-gradient(145deg,#fff,#f8f2fd); border-color:#e7dcef; }
.wishlist-section { background:linear-gradient(155deg,#fff,#fff8f7 72%,#f7f1fb); }
.collection-list-section { background:linear-gradient(155deg,#fff,#f8f4fc); }
.calendar-panel { background:linear-gradient(155deg,#fff,#f9f4ff 80%,#fff8f4); }
.chart-panel:nth-of-type(2) { background:linear-gradient(145deg,#fff,#f5effb); }
.chart-panel:nth-of-type(3) { background:linear-gradient(145deg,#fff,#fff3f3); }
.calendar-day { border-color:#e9e0ef; border-radius:10px; background:#fff; }
.calendar-day-number { color:#49345f; font-weight:800; }
.calendar-day .calendar-event-marker { min-height:22px; padding:3px 5px; border:0; border-left:5px solid var(--oshi-color,#9c8aa8); border-radius:5px; background:color-mix(in srgb,var(--oshi-color,#9c8aa8) 22%,white); color:#30263a; font-weight:650; }
.calendar-legend-entry { padding:4px 9px 4px 5px; border:1px solid #e9e1ef; border-radius:999px; background:#fff; color:#45384f; }
.calendar-legend-entry i { flex:0 0 14px; border:2px solid #fff; box-shadow:0 0 0 1px #b9aabe; }
.day-event-card { border:1px solid #e9e0ef; border-left:8px solid var(--oshi-color,#9c8aa8); border-radius:14px; background:color-mix(in srgb,var(--oshi-color,#9c8aa8) 9%,white); }
.day-event-card h3 { color:#3c3047; }
.memory-card { border-radius:20px 20px 20px 8px; }
.memory-thumbnail-button { border:3px solid #fff; outline:1px solid #eadff1; }
.memory-gallery-dialog { background:#fbf8ff; }
.memory-gallery-heading { padding:8px 10px; border-radius:12px; background:linear-gradient(100deg,#eee5f8,#fff0ed); }
.header-menu a[aria-current="page"] { background:linear-gradient(135deg,#7655a5,#9875c5); color:#fff; }
.wishlist-card h3 { color:#5e4389; }
.wishlist-card p { color:#6f6676; }
.wishlist-delete-button { border:1px solid #f0d9df; background:#fff0f2; color:#9d5363; box-shadow:none; }

@media (max-width:600px) {
    .calendar-day .calendar-event-marker { align-self:flex-start; width:11px; min-width:11px; height:11px; min-height:11px; padding:0; border:0; border-radius:50%; background:var(--oshi-color,#9c8aa8); box-shadow:0 0 0 2px #fff,0 0 0 3px color-mix(in srgb,var(--oshi-color,#9c8aa8) 50%,white); color:transparent; font-size:0; }
    .calendar-day { gap:5px; }
    .calendar-more-count { align-self:flex-start; color:#4f3d60; font-weight:700; }
}

.oshi-color-input-row { display:grid; grid-template-columns:minmax(0,1fr) 58px; align-items:center; gap:10px; }
.oshi-form .oshi-color-input-row input[type="text"] { margin:0; font-family:ui-monospace,Consolas,monospace; font-weight:700; letter-spacing:.04em; }
.oshi-form .oshi-color-input-row input[type="color"] { width:58px; height:48px; margin:0; padding:4px; border:1px solid #e2d9e9; border-radius:12px; background:#fff; cursor:pointer; }
.oshi-form small { margin:-5px 0 8px; color:#746b7b; line-height:1.5; }
.oshi-link-inputs, .oshi-links-fields { display:grid; gap:8px; }
.oshi-link-input-row { display:grid; grid-template-columns:minmax(120px,.8fr) minmax(150px,1.5fr) auto; align-items:center; gap:7px; padding:9px; border:1px solid #e8dff0; border-radius:13px; background:#fff; }
.oshi-link-input-row input { min-width:0; margin:0; }
.oshi-link-remove { min-height:40px; padding:8px 11px; background:#fff0f2; color:#9d5363; box-shadow:none; }
.add-oshi-link { justify-self:start; }
.oshi-birthday { width:max-content; max-width:100%; margin:12px 0; padding:7px 11px; border:1px solid #f0d18a; border-radius:999px; background:linear-gradient(100deg,#fff2cb,#ffe9ee); color:#784f49; font-weight:750; }
.memory-oshi-tag { display:inline-flex; align-items:center; gap:7px; width:max-content; max-width:100%; margin:2px 0 8px; padding:6px 11px 6px 8px; border:1px solid color-mix(in srgb,var(--oshi-color,#9c8aa8) 48%,white); border-radius:999px; background:color-mix(in srgb,var(--oshi-color,#9c8aa8) 22%,white); color:#30263a; font-size:13px; font-weight:750; overflow-wrap:anywhere; }
.memory-oshi-tag::before { content:""; width:12px; height:12px; flex:0 0 12px; border:2px solid #fff; border-radius:50%; background:var(--oshi-color,#9c8aa8); box-shadow:0 0 0 1px color-mix(in srgb,var(--oshi-color,#9c8aa8) 70%,#30263a); }
.calendar-day .birthday-event-marker { background:linear-gradient(110deg,color-mix(in srgb,var(--oshi-color,#9c8aa8) 20%,white),#fff1c9); box-shadow:inset 0 0 0 1px #d8a94e; }
.birthday-event-card { position:relative; overflow:hidden; background:linear-gradient(110deg,color-mix(in srgb,var(--oshi-color,#9c8aa8) 13%,white),#fff3d9); border-top-color:#e6c779; border-right-color:#f0e1b8; border-bottom-color:#f0e1b8; }
.birthday-event-card::after { content:""; }
.birthday-event-card h3 { padding-right:28px; }

.login-signup-fields { margin:16px 0; padding:16px; border:1px solid #e6d9ed; border-radius:16px; background:linear-gradient(145deg,#fbf7ff,#fffaf7); }
.login-signup-fields h3 { margin:0 0 12px; color:#59446b; font-size:16px; }
.login-signup-fields input[type="file"] { padding:10px; background:#fff; }
.login-field-note { margin:6px 0 0; color:#756a7b; font-size:12px; }
.login-avatar-preview { display:block; width:76px; height:76px; margin:12px 0; border:3px solid #fff; border-radius:50%; object-fit:cover; box-shadow:0 2px 12px #48345230; }
.login-avatar-preview.is-account-avatar { display:inline-block; width:42px; height:42px; margin:0 10px 0 0; vertical-align:middle; }
.account-profile { display:flex; align-items:center; gap:16px; margin:18px 0; padding:18px; border:1px solid #e4d6ee; border-radius:18px; background:linear-gradient(135deg,#f4edfb,#fff8f5); }
.account-profile-avatar-wrap { position:relative; display:grid; width:76px; height:76px; flex:0 0 76px; place-items:center; overflow:hidden; border:3px solid #fff; border-radius:50%; background:#e7d8f0; box-shadow:0 3px 12px #48345224; }
.account-avatar-fallback, .account-profile-avatar-wrap img { width:100%; height:100%; object-fit:cover; }
.account-avatar-fallback { display:grid; place-items:center; color:#59446b; font-size:30px; font-weight:800; }
.account-profile-details { display:grid; min-width:0; gap:5px; }
.account-profile-details strong { overflow-wrap:anywhere; color:#493456; font-size:20px; }
.account-profile-details span { overflow-wrap:anywhere; color:#756a7b; font-size:14px; }
.account-profile[hidden], .account-avatar-fallback[hidden], .account-profile-avatar-wrap img[hidden] { display:none; }
.profile-edit-form { display:grid; gap:8px; margin-top:16px; padding:18px; border:1px solid #e4d6ee; border-radius:16px; background:#fcf9fe; }
.profile-edit-form h3 { margin:0 0 6px; color:#59446b; }
.profile-edit-form label { margin-top:5px; }
.profile-edit-form[hidden], #edit-profile-button[hidden] { display:none; }
.account-settings { display:grid; gap:14px; margin-top:18px; }
.account-settings[hidden] { display:none; }
.account-password-panel { padding:14px 16px; border:1px solid #f1dce3; border-radius:14px; background:#fff8fa; }
.account-password-panel summary { color:#92506a; font-weight:800; cursor:pointer; }
.password-change-form { display:grid; gap:8px; margin-top:14px; }
.account-delete-button { border:1px solid #d98a99; background:#fff0f2; color:#913e50; box-shadow:none; }
.account-delete-button:hover { background:#f9d9df; color:#722d3e; }
.account-delete-dialog { width:min(440px,calc(100% - 30px)); padding:24px; border:1px solid #f1cfd8; border-radius:20px; color:#513d46; box-shadow:0 20px 70px #3f263640; }
.account-delete-dialog::backdrop { background:#21151b99; backdrop-filter:blur(3px); }
.account-delete-dialog h3 { margin-top:0; color:#963f55; }
.account-delete-dialog p { line-height:1.7; }
.account-delete-dialog .login-actions { justify-content:flex-end; gap:8px; margin-top:16px; }
.account-delete-dialog .login-actions button { margin:0; }
.account-delete-dialog #confirm-delete-account:disabled { opacity:.45; cursor:not-allowed; }

/* やわらかなピンクを基調にした配色 */
:root {
    --ink:#493840;
    --muted:#806a73;
    --plum:#c86f8e;
    --plum-deep:#92506a;
    --lilac:#fff0f5;
    --rose:#e99caf;
    --peach:#f6c8b8;
    --paper:#fffdfd;
    --line:#f0dce2;
    --soft-shadow:0 10px 28px rgba(115,62,82,.10);
}
body {
    color:var(--ink);
    background:
        radial-gradient(ellipse at 3% 2%,rgba(248,207,220,.48),transparent 27rem),
        radial-gradient(ellipse at 98% 16%,rgba(255,225,213,.54),transparent 25rem),
        #fff8fa;
}
.header { border-bottom-color:#f0dce2; background:rgba(255,253,253,.97); }
.header-brand h1 { color:#bf6686; }
.header-menu a:hover { background:#fff0f5; color:#92506a; }
.header-menu a[aria-current="page"] { background:linear-gradient(135deg,#c86f8e,#e89caf); box-shadow:0 4px 12px #c86f8e45; }
.home-stat-card:nth-child(1) { border-bottom-color:#df8ca6; }
.home-stat-card:nth-child(2) { border-bottom-color:#e99caf; }
button { background:linear-gradient(135deg,#c86f8e,#e396aa); color:#fff; }
button:hover { background:linear-gradient(135deg,#b85f7f,#d98098); }

/* ホームの予定欄は、淡いピンクとクリーム色でやさしく表示 */
.home-welcome {
    border-color:#f2d7de;
    background:linear-gradient(120deg,#fffaf8 0%,#fff0f4 58%,#fff6ec 100%);
}
.home-welcome h2 { color:#825065; }
.home-welcome .eyebrow { color:#a75f78 !important; }
.home-today-event { border-color:#f0d3db; background:#fffafb; color:#56434a; }
.home-today-event small { color:#816d74; opacity:1; }
.home-today-empty { border-color:#e8cbd3; background:#fffafb; color:#816d74; }
.home-today-event-dot { border-color:#fff; box-shadow:0 0 0 1px #d7bac4; }

.share-page { display:grid; gap:20px; }
.share-intro, .share-panel { padding:24px; border:1px solid #f0dce2; border-radius:20px; background:#fffdfd; box-shadow:var(--soft-shadow); }
.share-intro { background:linear-gradient(125deg,#fff9f8,#fff0f4 58%,#fff6ed); }
.share-intro h2, .share-panel h2 { margin:0 0 10px; color:#92506a; }
.share-intro p:last-child { margin-bottom:0; color:#806a73; line-height:1.7; }
.share-form { display:grid; max-width:620px; gap:9px; }
.share-form fieldset { display:flex; flex-wrap:wrap; gap:10px 18px; margin:8px 0; padding:13px 15px; border:1px solid #ecd7df; border-radius:14px; }
.share-form legend { padding:0 6px; color:#875468; font-weight:750; }
.share-form fieldset label { display:flex; align-items:center; gap:8px; }
.share-form input[type="checkbox"] { width:18px; height:18px; margin:0; accent-color:#c86f8e; }
.share-status { min-height:1.5em; color:#825065; font-weight:650; }
.share-list, .received-shares { display:grid; gap:14px; }
.share-person-card { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:15px 17px; border:1px solid #f0dce2; border-radius:15px; background:#fff8fa; }
.share-person-card strong { color:#654653; overflow-wrap:anywhere; }
.share-person-card p { margin:5px 0 0; color:#806a73; }
.share-revoke-button { flex:0 0 auto; border:1px solid #e4bdc7; background:#fff0f2; color:#914c60; box-shadow:none; }
.received-share-card { padding:18px; border:1px solid #efdbe2; border-radius:17px; background:#fff9fb; }
.received-share-card > h3 { margin-top:0; color:#92506a; }
.shared-content-group + .shared-content-group { margin-top:18px; padding-top:16px; border-top:1px solid #efdbe2; }
.shared-content-group h4 { margin:0 0 12px; color:#89536a; }
.shared-content-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:12px; }
.shared-content-item { min-width:0; padding:12px; border:1px solid #f0e2e6; border-radius:14px; background:#fff; overflow-wrap:anywhere; }
.shared-content-item > strong { display:block; margin:6px 0; color:#614451; }
.shared-content-item p { margin:5px 0; color:#796972; font-size:13px; }
.shared-memory-images { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
.shared-memory-images img, .shared-collection-image { width:100%; max-height:190px; border-radius:10px; object-fit:cover; }
.shared-memory-images img:first-child:nth-last-child(1) { grid-column:1/-1; }
.shared-oshi-tag { display:inline-block; margin-top:5px; padding:4px 9px; border-radius:999px; background:color-mix(in srgb,var(--oshi-color,#d99aaf) 24%,white); color:#604552; font-size:12px; font-weight:750; }
.share-empty { color:#806a73; }
@media (max-width:600px) {
    .oshi-link-input-row { grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) 58px; gap:5px; padding:6px; }
    .oshi-link-remove { min-height:42px; padding:6px; font-size:12px; }
    .calendar-day .birthday-event-marker { width:13px; min-width:13px; height:13px; min-height:13px; border-radius:3px; transform:rotate(45deg); box-shadow:0 0 0 2px #fff,0 0 0 3px #d9ad58; }
}

.oshi-card-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.oshi-card-actions button { margin:0; }
.oshi-edit-button { background:linear-gradient(135deg,#6d82b4,#8797c3); }
.oshi-edit-dialog { width:min(620px,calc(100% - 24px)); max-height:90dvh; overflow:auto; }
.oshi-edit-form { display:grid; gap:4px; }
.oshi-edit-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.oshi-edit-heading h2 { margin:0 0 10px; color:#5e4389; }
.oshi-edit-heading button { min-width:44px; padding:7px; }
.oshi-edit-form .oshi-color-input-row input[type="text"] { margin:0; font-family:ui-monospace,Consolas,monospace; font-weight:700; }
.oshi-edit-form .oshi-color-input-row input[type="color"] { width:58px; height:48px; margin:0; padding:4px; border:1px solid #e2d9e9; border-radius:12px; }

.budget-chart-legend { display:flex; flex-wrap:wrap; gap:9px 16px; margin:12px 0 4px; }
.budget-chart-legend span { display:inline-flex; align-items:center; gap:7px; color:#51485d; font-size:13px; font-weight:650; }
.budget-chart-legend i { display:inline-block; width:14px; height:14px; border-radius:4px; }
.legend-spent { background:#5b3f95; }
.legend-remaining { background:#d8d3df; }
.legend-over { background:#e05262; }
.budget-stacked-chart { display:flex; align-items:stretch; gap:9px; overflow-x:auto; padding:12px 4px 8px; border-bottom:2px solid #dcd4e3; }
.budget-month-column { display:flex; flex:0 0 68px; flex-direction:column; align-items:center; gap:5px; }
.budget-month-bar { display:flex; width:40px; height:220px; flex-direction:column; justify-content:flex-end; overflow:hidden; border:1px solid #ded7e5; border-radius:10px 10px 5px 5px; background:repeating-linear-gradient(to top,#f1edf4 0,#f1edf4 1px,transparent 1px,transparent 25%); box-shadow:inset 0 0 0 2px #fff; }
.budget-month-segment { flex:0 0 auto; width:100%; min-height:2px; }
.budget-spent { background:#5b3f95; }
.budget-remaining { background:#d8d3df; }
.budget-over { background:#e05262; }
.budget-month-label { color:#51445f; font-size:12px; font-weight:750; white-space:nowrap; }
.budget-month-value { max-width:68px; overflow:hidden; color:#776d80; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.budget-month-budget { max-width:68px; overflow:hidden; color:#655b70; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.bar-fill { background:#29975e; }
.budget-meter { border:3px solid #fff; background:#ded8e6; box-shadow:inset 0 1px 3px #38274822; }
.budget-meter-fill { background:linear-gradient(90deg,#48b879,#21894f); }
.budget-meter.over-budget .budget-meter-fill { background:#e05262; }
#home-budget-remaining { color:#416c35; font-weight:800; }
#home-budget-remaining.over-budget { color:#c12f45; }
.legend-spent { background:#29975e; }
.legend-remaining { background:#cce6d5; }
.budget-spent { background:#29975e; }
.budget-remaining { background:#cce6d5; }

.oshi-birthday-input-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; max-width:320px; }
.wishlist-card { border-left:6px solid var(--oshi-color,#d8d1dc); }
.daily-vertical-chart { display:flex; align-items:flex-end; gap:8px; overflow-x:auto; padding:12px 4px 8px; border-bottom:2px solid #dcd4e3; }
.daily-chart-column { display:flex; flex:0 0 44px; flex-direction:column; align-items:center; gap:6px; }
.daily-column-track { display:flex; width:27px; height:170px; align-items:flex-end; overflow:hidden; border:1px solid #d5e4da; border-radius:9px 9px 4px 4px; background:repeating-linear-gradient(to top,#edf4ef 0,#edf4ef 1px,transparent 1px,transparent 25%); }
.daily-column-fill { width:100%; min-height:2px; border-radius:7px 7px 0 0; background:linear-gradient(180deg,#58bf7e,#238c52); }
.daily-column-label { color:#53685a; font-size:10px; font-weight:650; white-space:nowrap; }

@media(max-width:600px) {
    .budget-month-column { flex-basis:58px; }
    .budget-month-bar { width:34px; height:185px; }
    .budget-month-value { max-width:58px; }
    .budget-month-budget { max-width:58px; }
    .budget-chart-legend { gap:8px 11px; }
    .budget-chart-legend span { font-size:12px; }
    .oshi-edit-dialog { padding:16px; }
    .daily-vertical-chart { gap:6px; }
    .daily-chart-column { flex-basis:38px; }
    .daily-column-track { width:23px; height:150px; }
    .daily-column-label { font-size:9px; }
}

#close-register-button { min-width:86px; min-height:42px; padding:8px 16px; color:#493c51; background:#e8e0ed; border:1px solid #cfc2d8; font-size:14px; font-weight:700; }
#close-register-button:hover { color:#382845; background:#dcd0e5; }
.chart-touch-detail { min-height:22px; margin:8px 0; padding:9px 12px; border-left:4px solid #29975e; border-radius:8px; background:#eef7f0; color:#245b3b; font-weight:750; }
.budget-month-column, .daily-chart-column { cursor:pointer; border-radius:8px; outline:0; }
.budget-month-column:hover, .daily-chart-column:hover { background:#eef7f0; }
.budget-month-column:focus-visible, .daily-chart-column:focus-visible, .chart-column-selected { outline:3px solid #55ad74; outline-offset:2px; background:#eef7f0; }

.home-today-content { min-width:0; flex:1; }
.home-today-content h2 { margin-bottom:10px; }
.home-today-events { display:grid; max-height:150px; overflow-y:auto; gap:6px; }
.home-today-event { display:grid; grid-template-columns:12px minmax(0,1fr) auto; align-items:center; gap:9px; padding:8px 11px; border:1px solid #ffffff45; border-radius:12px; background:#ffffff20; }
.home-today-event-dot { width:10px; height:10px; border:2px solid #fff; border-radius:50%; box-shadow:0 0 0 1px #ffffff65; }
.home-today-event-title { overflow-wrap:anywhere; font-weight:750; }
.home-today-event small { color:#fff; opacity:.86; text-align:right; }
.home-today-empty { margin:0; padding:10px 12px; border:1px dashed #ffffff78; border-radius:12px; color:#fff; background:#ffffff12; }

@media(max-width:600px) {
    .home-today-event { grid-template-columns:12px minmax(0,1fr); }
    .home-today-event small { grid-column:2; text-align:left; }
    .home-today-events { max-height:190px; }
}




/* 今日の予定は背景と文字をはっきり分ける */
.home-welcome .home-today-event {
    border-color: #e6c3ce;
    background: #fff;
    color: #49343c;
}
.home-welcome .home-today-event-title,
.home-welcome .home-today-event small {
    color: #49343c !important;
    opacity: 1;
}
.home-welcome .home-today-empty {
    border-color: #d9b6c1;
    background: #fff;
    color: #5a414a !important;
}

/* ホーム：推しの画像とテーマカラー */
.home-welcome .home-today-content h2 { color:#593b48 !important; }
.home-welcome .home-today-content .eyebrow { color:#9a526c !important; }
.home-oshi-panel { padding:22px; border:1px solid #f0dce2; border-radius:20px; background:rgba(255,255,255,.92); box-shadow:var(--soft-shadow); }
.home-oshi-panel .home-section-heading { margin-bottom:14px; }
.home-oshi-panel h2 { margin:0; color:#654653; }
.home-oshi-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:12px; }
.home-oshi-card { display:flex; min-width:0; flex-direction:column; align-items:center; gap:9px; padding:14px 10px 12px; border:1px solid color-mix(in srgb,var(--oshi-color) 48%,#70515f); border-bottom:4px solid color-mix(in srgb,var(--oshi-color) 68%,#604452); border-radius:17px; background:color-mix(in srgb,var(--oshi-color) 19%,white); color:#46343b; text-decoration:none; box-shadow:0 5px 15px rgba(69,48,56,.14),0 2px 8px color-mix(in srgb,var(--oshi-color) 12%,transparent); transition:transform .18s ease, box-shadow .18s ease; }
.home-oshi-card:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(69,48,56,.18),0 2px 10px color-mix(in srgb,var(--oshi-color) 22%,transparent); }
.home-oshi-avatar { position:relative; display:grid; width:74px; height:74px; place-items:center; overflow:hidden; border:3px solid white; border-radius:50%; background:color-mix(in srgb,var(--oshi-color) 34%,white); box-shadow:0 0 0 2px color-mix(in srgb,var(--oshi-color) 50%,#634653),0 4px 12px rgba(69,48,56,.12); }
.home-oshi-avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.home-oshi-fallback { color:#46343b; font-size:28px; font-weight:800; }
.home-oshi-card strong { max-width:100%; overflow-wrap:anywhere; text-align:center; color:#46343b; }
.home-oshi-color { width:35px; height:5px; border-radius:999px; background:var(--oshi-color); }
.calendar-filter-button { min-height:34px; padding:5px 10px; font:inherit; cursor:pointer; }
.calendar-filter-button[aria-pressed="true"] { outline:2px solid #654653; outline-offset:2px; background:#fff5f7; color:#49343c; font-weight:800; }
.calendar-filter-help { margin:14px 0 -5px; color:#695861; font-size:13px; }
.calendar-filter-button:focus-visible, .home-oshi-card:focus-visible { outline:3px solid #694759; outline-offset:3px; }
@media(max-width:600px) {
    .home-oshi-panel { padding:16px; }
    .home-oshi-list { grid-template-columns:repeat(auto-fill,minmax(105px,1fr)); gap:9px; }
    .home-oshi-card { padding:12px 7px 10px; }
    .home-oshi-avatar { width:62px; height:62px; }
}

/* 推しごとのプロフィールページ */
.oshi-profile-page { max-width:1080px; }
.oshi-profile-back { display:inline-flex; margin:0 0 16px; color:#704c5b; font-weight:750; text-decoration:none; }
.oshi-profile-card { display:flex; align-items:center; gap:22px; margin-bottom:22px; padding:24px; border:1px solid color-mix(in srgb,var(--profile-oshi-color) 45%,#70515f); border-left:8px solid var(--profile-oshi-color); border-radius:22px; background:linear-gradient(135deg,color-mix(in srgb,var(--profile-oshi-color) 20%,white),#fff 78%); box-shadow:0 8px 22px rgba(69,48,56,.1); }
.oshi-profile-card[hidden] { display:none; }
.oshi-profile-avatar { position:relative; display:grid; width:124px; height:124px; flex:0 0 124px; place-items:center; overflow:hidden; border:4px solid white; border-radius:26px; background:color-mix(in srgb,var(--profile-oshi-color) 34%,white); box-shadow:0 0 0 2px color-mix(in srgb,var(--profile-oshi-color) 55%,#604452),0 7px 18px #49343c24; }
.oshi-profile-avatar span { color:#49343c; font-size:54px; font-weight:850; }
.oshi-profile-avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.oshi-profile-avatar img { cursor:zoom-in; }
.oshi-profile-info { min-width:0; }
.oshi-profile-info h2 { margin:0 0 8px; color:#49343c; font-size:clamp(25px,4vw,36px); overflow-wrap:anywhere; }
.oshi-profile-info p { margin:5px 0; color:#69575e; }
.oshi-profile-info .oshi-profile-group { color:#49343c; font-weight:700; }
.oshi-profile-links { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.oshi-profile-links a { padding:7px 12px; border:1px solid color-mix(in srgb,var(--profile-oshi-color) 48%,#d8c3ca); border-radius:999px; background:#fff; color:#684957; font-weight:700; text-decoration:none; }
.oshi-profile-section { margin:22px 0; padding:22px; border:1px solid #efdee5; border-radius:20px; background:#fffdfd; box-shadow:0 5px 18px #49343c0c; }
.oshi-profile-section > h2 { margin:0 0 14px; color:#614451; }
.oshi-profile-memory-grid,.oshi-profile-item-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:13px; }
.oshi-profile-memory-card,.oshi-profile-item-card { min-width:0; overflow:hidden; border:1px solid color-mix(in srgb,var(--profile-oshi-color) 30%,#eadde2); border-radius:15px; background:color-mix(in srgb,var(--profile-oshi-color) 7%,white); }
.oshi-profile-memory-card { padding:13px; }
.oshi-profile-memory-card h3,.oshi-profile-item-card h3 { margin:0 0 5px; color:#49343c; overflow-wrap:anywhere; }
.oshi-profile-memory-card time,.oshi-profile-item-card p { color:#76666d; font-size:13px; }
.oshi-profile-memory-card p { margin:8px 0 0; color:#5f5056; white-space:pre-wrap; overflow-wrap:anywhere; }
.oshi-profile-memory-images { display:flex; gap:6px; margin-top:10px; overflow-x:auto; }
.oshi-profile-memory-images img { width:92px; height:92px; flex:0 0 92px; border-radius:10px; object-fit:cover; cursor:zoom-in; }
.oshi-profile-item-card { display:grid; grid-template-columns:100px minmax(0,1fr); }
.oshi-profile-item-card img { width:100px; height:116px; object-fit:cover; background:#f7eef1; }
.oshi-profile-item-card img:not([hidden]) { cursor:zoom-in; }
.oshi-profile-item-card img[hidden] { display:none; }
.oshi-profile-item-card:has(img[hidden]) { grid-template-columns:minmax(0,1fr); }
.oshi-profile-item-card > div { padding:12px; }
.oshi-profile-item-card p { margin:5px 0; }
.oshi-profile-gallery { width:min(900px,calc(100vw - 28px)); max-height:90vh; overflow:auto; }
.oshi-profile-gallery-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.oshi-profile-gallery-heading h2 { color:#614451; }
.oshi-profile-gallery-images { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px; }
.oshi-profile-gallery-images img { width:100%; max-height:65vh; border-radius:12px; object-fit:contain; background:#f8f1f4; }
.oshi-profile-gallery-images img { cursor:zoom-in; }
.oshi-profile-image-viewer { position:fixed; inset:0; width:100vw; height:100dvh; max-width:none; max-height:none; margin:0; padding:0; overflow:hidden; border:0; background:#171316; }
.oshi-profile-image-viewer[open] { display:grid; place-items:center; }
.oshi-profile-image-viewer::backdrop { background:#171316; }
.oshi-profile-image-viewer > img { display:block; width:100%; height:100%; max-width:100vw; max-height:100dvh; object-fit:contain; }
.oshi-profile-image-viewer > button { position:absolute; z-index:1; top:max(14px,env(safe-area-inset-top)); right:max(14px,env(safe-area-inset-right)); display:grid; width:44px; height:44px; place-items:center; margin:0; padding:0; border:1px solid #ffffff88; border-radius:50%; background:#302b2dcc; color:#fff; font-size:28px; }
.oshi-profile-image-viewer button[hidden] { display:none; }
.oshi-profile-image-viewer .oshi-viewer-arrow { top:50%; right:auto; transform:translateY(-50%); width:48px; height:64px; border-radius:14px; background:#302b2dbb; font-size:42px; }
.oshi-profile-image-viewer .oshi-viewer-prev { left:max(12px,env(safe-area-inset-left)); }
.oshi-profile-image-viewer .oshi-viewer-next { right:max(12px,env(safe-area-inset-right)); }
.oshi-profile-image-viewer .oshi-viewer-count { position:absolute; right:0; bottom:max(16px,env(safe-area-inset-bottom)); left:0; color:#fff; font-size:14px; text-align:center; text-shadow:0 1px 5px #000; pointer-events:none; }
.memory-gallery-content img { cursor:zoom-in; }
@media(max-width:600px) {
    .oshi-profile-image-viewer .oshi-viewer-arrow { width:40px; height:54px; font-size:36px; }
}

/* サイト共通の画像一覧・全画面ビュー */
.site-image-gallery { width:min(980px,calc(100vw - 28px)); max-height:90vh; margin:auto; padding:20px; overflow:auto; border:1px solid #ead5de; border-radius:20px; background:#fffdfd; color:#49343c; box-shadow:0 24px 80px #34202c44; }
.site-image-gallery::backdrop { background:#34202c99; backdrop-filter:blur(3px); }
.site-image-gallery-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.site-image-gallery-heading h2 { margin:0; color:#614451; }
.site-image-gallery-heading button { width:auto; min-width:72px; margin:0; }
.site-image-gallery-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:10px; }
.site-image-gallery-grid img { width:100%; height:190px; border-radius:12px; object-fit:contain; background:#f7eef1; cursor:zoom-in; }
.site-image-viewer { position:fixed; inset:0; width:100vw; height:100dvh; max-width:none; max-height:none; margin:0; padding:0; overflow:hidden; border:0; background:#171316; touch-action:pan-y; }
.site-image-viewer[open] { display:grid; place-items:center; }
.site-image-viewer::backdrop { background:#171316; }
.site-image-viewer > img { display:block; width:100%; height:100%; max-width:100vw; max-height:100dvh; object-fit:contain; }
.site-image-viewer > button { position:absolute; z-index:1; top:max(14px,env(safe-area-inset-top)); right:max(14px,env(safe-area-inset-right)); display:grid; width:44px; height:44px; place-items:center; margin:0; padding:0; border:1px solid #ffffff88; border-radius:50%; background:#302b2dcc; color:#fff; font-size:28px; }
.site-image-viewer button[hidden] { display:none; }
.site-image-viewer .site-image-arrow { top:50%; right:auto; transform:translateY(-50%); width:48px; height:64px; border-radius:14px; background:#302b2dbb; font-size:42px; }
.site-image-viewer .site-image-prev { left:max(12px,env(safe-area-inset-left)); }
.site-image-viewer .site-image-next { right:max(12px,env(safe-area-inset-right)); }
.site-image-viewer .site-image-count { position:absolute; right:0; bottom:max(16px,env(safe-area-inset-bottom)); left:0; color:#fff; font-size:14px; text-align:center; text-shadow:0 1px 5px #000; pointer-events:none; }
@media(max-width:600px) {
    .site-image-gallery { padding:15px; }
    .site-image-gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
    .site-image-gallery-grid img { height:145px; }
    .site-image-viewer .site-image-arrow { width:40px; height:54px; font-size:36px; }
}
@media(max-width:600px) {
    .oshi-profile-card { align-items:flex-start; gap:15px; padding:16px; }
    .oshi-profile-avatar { width:88px; height:88px; flex-basis:88px; border-radius:20px; }
    .oshi-profile-avatar span { font-size:40px; }
    .oshi-profile-section { padding:15px; }
    .oshi-profile-memory-grid,.oshi-profile-item-grid { grid-template-columns:1fr; }
    .calendar-toolbar { flex-wrap:wrap; }
    .calendar-toolbar .calendar-save-image { flex:1 1 100%; }
}

/* 推し一覧：テーマカラーと、画像なしでも分かるプロフィール枠 */
.oshi-card {
    overflow:hidden;
    border:1px solid color-mix(in srgb,var(--oshi-color,#d9a8b7) 48%,#70515f) !important;
    border-left:7px solid color-mix(in srgb,var(--oshi-color,#d9a8b7) 75%,#604452) !important;
    background:linear-gradient(145deg,color-mix(in srgb,var(--oshi-color,#d9a8b7) 17%,white),#fff 88%) !important;
    box-shadow:0 7px 18px rgba(69,48,56,.12),0 2px 8px color-mix(in srgb,var(--oshi-color,#d9a8b7) 18%,transparent) !important;
}
.oshi-card h3 { color:#49343c !important; }
.oshi-card[role="link"] { cursor:pointer; }
.oshi-card[role="link"]:focus-visible { outline:3px solid #694759; outline-offset:3px; }
.oshi-card .oshi-group-name { margin:4px 0 8px; color:#67545b; font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.oshi-color-chip { width:17px; height:17px; border:2px solid white; box-shadow:0 0 0 2px color-mix(in srgb,var(--oshi-color,#d9a8b7) 48%,#70515f) !important; }
.oshi-portrait {
    position:relative;
    display:grid;
    width:min(100%,220px);
    aspect-ratio:1;
    place-items:center;
    overflow:hidden;
    margin:0 0 14px;
    border:2px solid color-mix(in srgb,var(--oshi-color,#d9a8b7) 50%,#70515f);
    border-radius:20px;
    background:color-mix(in srgb,var(--oshi-color,#d9a8b7) 22%,white);
    box-shadow:0 4px 13px rgba(69,48,56,.14);
}
.oshi-portrait .oshi-image { position:absolute; inset:0; width:100%; height:100%; max-height:none; margin:0; border-radius:0; object-fit:cover; }
.oshi-portrait .oshi-image[hidden] { display:none; }
.oshi-image-fallback { display:grid; width:100%; height:100%; place-items:center; color:#49343c; font-size:clamp(58px,12vw,92px); font-weight:850; }
.oshi-image-fallback[hidden] { display:none; }
.oshi-card .oshi-links a { color:#694655; text-decoration:underline; text-decoration-color:color-mix(in srgb,var(--oshi-color,#d9a8b7) 60%,transparent); text-underline-offset:3px; }
.oshi-onboarding-form { display:grid; gap:8px; }
.oshi-onboarding-form h2 { margin:0 0 4px; color:#654653; }
.oshi-onboarding-form p { color:#66585f; line-height:1.65; }
.oshi-onboarding-form input[type="color"] { width:68px; height:48px; padding:4px; border:1px solid #ddcbd3; border-radius:11px; }
.oshi-onboarding-form input[type="file"] { font-size:13px; }
.oshi-onboarding-status { min-height:1.3em; margin:0; color:#9d5363 !important; }
.oshi-onboarding-more { color:#805366; font-size:13px; font-weight:700; text-align:center; text-underline-offset:3px; }
/* 投稿コミュニティ */
.posts-page { display:grid; gap:18px; }
.community-feed { width:min(100%,820px); margin-inline:auto; padding:22px; border:1px solid #f0dce2; border-radius:20px; background:#fffdfd; box-shadow:var(--soft-shadow); }
.community-feed h2 { margin:0; color:#754b5d; }
.post-open-button { position:fixed; right:24px; bottom:max(24px,env(safe-area-inset-bottom)); z-index:1000; width:auto; min-height:48px; margin:0; padding:10px 19px; border-radius:999px; box-shadow:0 8px 24px #9a5a7244; white-space:nowrap; }
.post-dialog { width:min(620px,calc(100vw - 28px)); max-height:88vh; margin:auto; padding:22px; overflow:auto; border:1px solid #edcfda; border-radius:22px; background:#fffdfd; color:#493d43; box-shadow:0 24px 80px #34202c44; }
.post-dialog[open] { display:block; }
.post-detail-dialog { width:min(940px,calc(100vw - 28px)); height:min(88vh,900px); max-height:88vh; overflow:hidden; }
.post-detail-dialog[open] { display:flex; flex-direction:column; }
.post-detail-dialog .post-dialog-heading { flex:0 0 auto; }
.post-detail-content { display:flex; min-height:0; flex:1; flex-direction:column; overflow:hidden; }
.post-detail-card { min-height:0; flex:1 1 auto; overflow-y:auto; padding:18px; cursor:default; }
.post-detail-card h3 { font-size:20px; }
.post-dialog::backdrop { background:#34202c88; backdrop-filter:blur(3px); }
.post-dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:14px; }
.post-dialog-heading h2 { margin:0; color:#754b5d; }
.post-dialog-close { width:auto; min-height:36px; margin:0; padding:6px 12px; background:#f8edf1; color:#684957; box-shadow:none; }
#post-form { display:grid; gap:8px; max-width:760px; }
#post-source-fields { display:grid; gap:8px; }
#post-source-fields[hidden] { display:none; }
#post-form label { color:#654653; font-weight:750; }
#post-form select, #post-form textarea { margin:0 0 7px; }
#post-caption { min-height:100px; resize:vertical; }
.post-compose-preview { min-height:1.5em; margin:0 0 6px; color:#77616a; font-size:13px; }
.post-status, .feed-status { min-height:1.5em; margin:8px 0 0; color:#805366; font-weight:650; }
.community-feed-heading { display:flex; flex-wrap:wrap; align-items:end; gap:10px 14px; margin-bottom:14px; }
.community-feed-heading > div { margin-right:auto; }
.community-feed-heading h2 { margin:0; }
.community-feed-heading label { color:#654653; font-size:13px; font-weight:750; }
.community-feed-heading select { width:auto; min-width:150px; margin:0; }
.post-feed { display:grid; gap:16px; }
.community-post-card { width:min(100%,660px); min-width:0; margin-inline:auto; padding:12px 14px; border:1px solid color-mix(in srgb,var(--oshi-color,#e6c6d1) 36%,#e8dfe3); border-left:4px solid var(--oshi-color,#d9a8b7); border-radius:16px; background:linear-gradient(145deg,color-mix(in srgb,var(--oshi-color,#e6c6d1) 7%,white),white 60%); box-shadow:0 4px 13px rgba(68,44,54,.07); overflow-wrap:anywhere; }
.community-post-card.post-detail-card { width:100%; max-width:none; }
.community-post-clickable { cursor:pointer; transition:transform .16s ease,box-shadow .16s ease; }
.community-post-clickable:hover, .community-post-clickable:focus-visible { transform:translateY(-2px); box-shadow:0 8px 20px rgba(68,44,54,.12); outline:2px solid #d8a3b5; outline-offset:2px; }
.community-post-header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:7px; }
.community-post-author { display:flex; min-width:0; align-items:center; gap:9px; }
.community-profile-avatar-button { display:grid; width:38px; height:38px; flex:0 0 auto; place-items:center; margin:0; padding:0; overflow:hidden; border:2px solid #fff; border-radius:50%; background:#f1dce4; color:#754b5d; box-shadow:0 0 0 1px #d7c2cb; cursor:pointer; }
.community-profile-avatar-button img { width:100%; height:100%; border:0; border-radius:50%; object-fit:cover; box-shadow:none; }
.community-profile-avatar-button span { font-weight:800; }
.community-profile-avatar-button:hover { transform:scale(1.06); }
.community-post-author img { width:32px; height:32px; flex:0 0 auto; border-radius:50%; object-fit:cover; border:2px solid #fff; box-shadow:0 0 0 1px #d7c2cb; }
.community-post-author strong { color:#49343c; overflow-wrap:anywhere; }
.community-post-author time { color:#83737a; font-size:12px; }
.community-post-type { padding:5px 9px; border-radius:999px; background:#f4e9ed; color:#684957; font-size:12px; font-weight:750; white-space:nowrap; }
.community-post-card h3 { margin:4px 0 6px; color:#513844; font-size:16px; }
.community-post-meta, .community-post-memory-note { margin:5px 0; color:#786871; font-size:12px; }
.community-post-body { margin:7px 0; color:#493d43; line-height:1.6; white-space:pre-wrap; }
.community-post-preview-body { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.post-gallery-wrapper { position:relative; min-width:0; margin:9px 0; }
.community-post-collage { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:1fr; gap:6px; overflow:hidden; border-radius:14px; }
.community-post-collage.multiple { max-width:500px; }
.post-collage-tile { position:relative; min-width:0; overflow:hidden; border-radius:10px; background:#f7eef1; }
.post-collage-image { display:block; width:100%; aspect-ratio:1; object-fit:cover; }
.post-collage-tile.single { grid-column:1 / -1; }
.post-collage-tile.single .post-collage-image { max-height:420px; aspect-ratio:16 / 10; object-fit:contain; }
.post-collage-more { position:absolute; inset:0; display:grid; place-items:center; background:#24182099; color:#fff; font-size:clamp(24px,5vw,42px); font-weight:800; pointer-events:none; }
.post-detail-collage { grid-auto-rows:auto; }
.post-detail-collage-tile { min-width:0; overflow:hidden; border-radius:10px; background:#f7eef1; }
.post-detail-collage-image { display:block; width:100%; aspect-ratio:1; object-fit:contain; }
.post-detail-collage-tile:only-child { grid-column:1 / -1; }
.post-detail-collage-tile:only-child .post-detail-collage-image { max-height:440px; aspect-ratio:16 / 10; }
.post-oshi-tag { display:inline-flex; min-height:30px; align-items:center; margin:2px 0 6px; padding:4px 11px; border:1px solid color-mix(in srgb,var(--oshi-color,#d9a8b7) 55%,#6b505b); border-radius:999px; background:color-mix(in srgb,var(--oshi-color,#d9a8b7) 23%,white); color:#46343b; font:inherit; font-size:13px; font-weight:800; }
button.post-oshi-tag { cursor:pointer; }
button.post-oshi-tag:hover { filter:saturate(1.15); }
.community-post-actions { display:flex; flex-wrap:wrap; align-items:center; gap:7px; padding:7px 0 0; border-top:1px solid #f0e2e7; }
.community-post-actions button { min-height:33px; padding:5px 10px; font-size:13px; }
.post-like-button { background:#fff0f4; color:#98506b; border:1px solid #edcbd6; box-shadow:none; }
.post-like-button.liked { background:#c86686; color:#fff; }
.post-comment-count { background:#f7f1f4; color:#684957; border:1px solid #e9dce2; box-shadow:none; }
.post-delete-button { margin-left:auto; background:#f6eeee; color:#8d4c57; }
.post-comments { display:flex; min-height:130px; max-height:30vh; flex:0 0 auto; flex-direction:column; overflow:hidden; padding-top:8px; border-top:1px solid #f0e2e7; background:#fffdfd; }
.post-comments h4 { margin:0 0 10px; color:#654653; }
.post-comment-list { display:grid; min-height:0; gap:8px; overflow-y:auto; padding-right:3px; }
.post-comment { position:relative; padding:10px 12px; border-radius:12px; background:#fff8fa; }
.post-comment strong { color:#654653; font-size:13px; }
.post-comment p { margin:4px 0 0; color:#55464d; white-space:pre-wrap; overflow-wrap:anywhere; }
.post-comment-delete { position:absolute; top:7px; right:8px; padding:3px 7px; background:transparent; color:#92596c; box-shadow:none; font-size:12px; }
.post-comment-form { position:sticky; bottom:0; display:flex; flex:0 0 auto; gap:8px; margin-top:8px; padding:8px 0 2px; background:#fffdfd; }
.post-comment-form input { flex:1; min-width:0; margin:0; }
.post-comment-form button { flex:0 0 auto; margin:0; }
.community-profile-dialog { width:min(720px,calc(100vw - 28px)); }
.community-profile-summary { display:grid; grid-template-columns:72px minmax(0,1fr); gap:8px 14px; align-items:center; padding:4px 0 18px; border-bottom:1px solid #f0e2e7; }
.community-profile-avatar { display:grid; width:68px; height:68px; grid-row:span 3; place-items:center; overflow:hidden; border:3px solid #fff; border-radius:20px; background:#f1dce4; color:#754b5d; box-shadow:0 0 0 1px #e4cbd5; font-size:26px; font-weight:800; }
.community-profile-avatar img { width:100%; height:100%; object-fit:cover; }
.community-profile-bio, .community-profile-counts { margin:0; color:#5b4b52; white-space:pre-wrap; overflow-wrap:anywhere; }
.community-profile-counts { color:#856c77; font-size:13px; }
.community-profile-follow { width:auto; justify-self:start; margin:0; padding:7px 18px; }
.community-profile-section { margin-top:16px; }
.community-profile-section h3 { margin:0 0 9px; color:#754b5d; font-size:16px; }
.community-profile-oshis { display:flex; flex-wrap:wrap; gap:7px; }
.community-profile-oshi { display:inline-flex; align-items:center; padding:5px 11px; border:1px solid color-mix(in srgb,var(--oshi-color,#d9a8b7) 48%,#dfcbd3); border-radius:999px; background:color-mix(in srgb,var(--oshi-color,#d9a8b7) 20%,white); color:#493d43; font-size:13px; font-weight:750; }
.community-profile-empty { color:#806d75; font-size:13px; }
.community-profile-posts { display:grid; max-height:40vh; gap:9px; overflow-y:auto; }
.community-profile-post { padding:12px 13px; border:1px solid #efdee5; border-left:4px solid var(--oshi-color,#dfb2c2); border-radius:12px; background:#fffafa; }
.community-profile-post-heading { display:flex; justify-content:space-between; gap:10px; margin-bottom:6px; color:#856c77; font-size:12px; }
.community-profile-post strong { display:block; margin-bottom:6px; color:#513844; }
.community-profile-post p { margin:5px 0 0; color:#55464d; font-size:13px; white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:600px) {
    .community-feed { padding:16px; }
    .post-dialog { padding:17px; }
    .post-open-button { right:16px; bottom:max(16px,env(safe-area-inset-bottom)); }
    .community-feed-heading { align-items:center; }
    .community-feed-heading h2 { width:100%; }
    .community-post-card { padding:11px 12px; }
    .post-detail-card { padding:16px; }
    .community-profile-dialog { padding:17px; }
    .community-profile-summary { grid-template-columns:58px minmax(0,1fr); gap:7px 11px; }
    .community-profile-avatar { width:56px; height:56px; border-radius:16px; }
    .community-post-author { flex-wrap:wrap; }
    .community-post-header { align-items:flex-start; }
}

/* 共有ダイアログと共有ボタン */
.share-dialog { width:min(680px,calc(100vw - 28px)); max-height:88vh; margin:auto; padding:22px; overflow:auto; border:1px solid #edcfda; border-radius:22px; background:#fffdfd; color:#493d43; box-shadow:0 24px 80px #34202c44; }
.share-dialog[open] { display:block; }
.share-dialog::backdrop { background:#34202c88; backdrop-filter:blur(3px); }
.share-dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.share-dialog-heading h2 { margin:0; color:#754b5d; }
.share-close-button { width:auto; min-height:38px; margin:0; padding:6px 12px; background:#f8edf1; color:#684957; box-shadow:none; }
.share-dialog-help { margin:6px 0 12px; color:#75636b; font-size:13px; }
.share-dialog > label { display:block; margin:10px 0 6px; color:#654653; font-weight:750; }
#share-caption { width:100%; min-height:110px; margin:0; resize:vertical; }
.share-image-preview { display:flex; gap:9px; max-width:100%; padding:4px 2px 10px; overflow-x:auto; }
.share-image-preview[hidden], .share-image-links[hidden] { display:none !important; }
.share-preview-item { flex:0 0 120px; width:120px; margin:0; }
.share-preview-item img { display:block; width:120px; height:120px; border-radius:12px; object-fit:cover; background:#f7eef1; }
.share-preview-item figcaption { padding-top:4px; color:#806c75; font-size:12px; text-align:center; }
.share-image-links { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 10px; }
.share-image-download { display:inline-flex; align-items:center; min-height:36px; padding:6px 10px; border:1px solid #ead8df; border-radius:10px; background:#fff7f9; color:#805366; font-size:13px; font-weight:700; text-decoration:none; }
.share-dialog-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.share-dialog-actions button { width:auto; min-height:40px; margin:0; padding:8px 13px; }

.share-x-button { background:#302b2d; color:#fff; }
.share-copy-button { background:#f8edf1; color:#684957; box-shadow:none; }
.share-status { min-height:1.4em; margin:10px 0 0; color:#805366; font-size:13px; }
.share-icon-button { display:inline-grid; width:38px; height:38px; min-height:38px; flex:0 0 auto; place-items:center; margin:0; padding:8px; border:1px solid #e8cbd6; border-radius:12px; background:#fff8fa; color:#8c5368; box-shadow:none; vertical-align:middle; }
.share-icon-button svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.share-icon-button:hover { background:#f8e8ee; transform:translateY(-1px); }
.memory-card-actions, .collection-item-actions { display:flex; flex-wrap:wrap; align-items:center; gap:7px; margin-top:8px; }
.memory-card-actions .share-icon-button, .collection-item-actions .share-icon-button { margin-left:auto; }
.collection-item-actions button:not(.share-icon-button) { width:auto; }
@media(max-width:600px) {
    .share-dialog { padding:16px; }
    .share-dialog-actions button { flex:1 1 auto; }
    .share-preview-item { flex-basis:94px; width:94px; }
    .share-preview-item img { width:94px; height:94px; }
}

/* 登録グッズ画像枠を統一し、画像がないカードも同じ高さにする */
#item-list .item-card { display:flex; height:100%; box-sizing:border-box; flex-direction:column; }
#item-list .item-image-frame { position:relative; display:grid; width:100%; height:145px; flex:0 0 145px; place-items:center; margin-bottom:8px; overflow:hidden; border-radius:12px; background:linear-gradient(145deg,#f8eff2,#f1e8eb); }
#item-list .item-image-frame .item-image { display:block; width:100%; height:100%; margin:0; border-radius:0; object-fit:cover; }
#item-list .item-image-frame .item-image[hidden] { display:none; }
#item-list .item-image-placeholder { display:grid; position:absolute; inset:0; place-items:center; color:#9b818b; font-size:13px; font-weight:700; }
#item-list .item-image-placeholder[hidden] { display:none; }
#item-list .item-card .collection-item-actions { margin-top:auto; padding-top:8px; }
@media(max-width:600px) {
    #item-list .item-image-frame { height:126px; flex-basis:126px; }
}
