.melody-flag-event-page .melody_flag-container{display:block;width:100%;max-width:none;margin:0;padding:20px 18px 48px;box-sizing:border-box}
.melody-flag-event-back{display:block;align-self:flex-start;width:max-content;margin:10px 0 10px 15px;padding:0;color:var(--theme-text-muted);text-decoration:none;font-weight:400;font-size:13px;line-height:1}
.melody-flag-event-back:hover{color:var(--theme-primary)}
.melody-flag-event-toolbar{display:flex;gap:10px;width:100%;max-width:1240px;min-width:0;margin:0 0 10px;box-sizing:border-box}
.melody-flag-event-search-toggle{display:flex;align-items:center;justify-content:space-between;flex:1;max-width:1100px;min-width:0;min-height:46px;padding:10px 14px;border:1px solid var(--theme-border-soft);border-radius:12px;background:#fff;color:var(--theme-text);font:inherit;font-size:13px;font-weight:700;text-align:left;cursor:pointer;box-shadow:0 2px 7px rgba(0,0,0,.05)}
.event-search-arrow{color:var(--theme-text-muted);font-size:11px;transition:transform .2s}
.melody-flag-event-search-toggle[aria-expanded="true"] .event-search-arrow{transform:rotate(180deg)}
.melody-flag-event-history-link{display:inline-flex;align-items:center;justify-content:center;min-width:130px;padding:0 16px;border:1px solid var(--theme-border-soft);border-radius:12px;background:#fff;color:var(--theme-brand);font-size:13px;font-weight:700;text-decoration:none;box-shadow:0 2px 7px rgba(0,0,0,.05)}
.melody-flag-event-search-area{display:none;width:100%;max-width:1100px;margin:0 0 15px}
.melody-flag-event-search-area.is-open{display:block}
.melody-flag-event-search{display:flex;flex-direction:column;gap:10px;padding:14px;box-sizing:border-box;border-radius:14px;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.melody-flag-event-search input,.melody-flag-event-search select{width:100%;min-height:42px;padding:8px 12px;box-sizing:border-box;border:1px solid var(--theme-border-soft);border-radius:9px;background:#fff;color:var(--theme-text);font:inherit;font-size:13px}
.event-search-bottom{display:flex;gap:8px}
.event-search-bottom select{flex:1}
.event-search-bottom button,.event-search-bottom a{display:inline-flex;align-items:center;justify-content:center;flex:0 0 90px;min-height:42px;padding:0 12px;border:0;border-radius:9px;background:var(--theme-primary);color:#fff;font:inherit;font-size:13px;font-weight:700;text-decoration:none;cursor:pointer}
.event-search-bottom a{background:var(--theme-tint);color:var(--theme-text-sub)}
.melody-flag-event-list{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:14px;width:100%;min-width:0;box-sizing:border-box}
.melody-flag-event-item{display:flex;flex-direction:column;align-items:stretch;gap:14px;min-width:0;min-height:150px;padding:20px 22px;box-sizing:border-box;border:1px solid var(--theme-border-soft);border-radius:15px;background:#fff;box-shadow:0 3px 12px rgba(70,30,45,.055)}
.melody-flag-event-main{flex:1;min-width:0}
.melody-flag-event-heading{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.melody-flag-event-heading h2{min-width:0;margin:0;color:var(--theme-text);font-size:17px;line-height:1.55;overflow-wrap:anywhere}
.melody-flag-event-badge{display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;font-size:11px;font-weight:700;white-space:nowrap}
.melody-flag-event-badge.upcoming{background:var(--theme-blush);color:var(--theme-brand)}
.melody-flag-event-badge.past{background:var(--theme-tint);color:var(--theme-text-muted)}
.melody-flag-event-meta-list{display:flex;flex-wrap:wrap;gap:8px 18px;margin-top:10px;color:var(--theme-text-sub);font-size:13px}
.melody-flag-event-description{margin:10px 0 0;color:var(--theme-text-sub);font-size:13px;line-height:1.7;white-space:pre-line}
.melody-flag-event-official{display:inline-block;margin-top:10px;color:var(--theme-brand);font-size:12px;font-weight:700;text-decoration:none}
.melody-flag-event-saved-record{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:13px;padding:10px 12px;border-radius:9px;background:var(--theme-blush);color:var(--theme-text-sub);font-size:12px}
.melody-flag-event-saved-record span:first-child{color:var(--theme-brand);font-weight:700}
.melody-flag-event-saved-record p{flex-basis:100%;margin:2px 0 0;white-space:pre-line;line-height:1.6}
.melody-flag-event-actions{display:flex;flex:0 0 auto;flex-direction:row;align-items:flex-start;gap:9px;margin-top:8px}
.melody-flag-event-status-form{flex:1;min-width:0;margin:0}
.event-status-button{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;min-height:40px;box-sizing:border-box;padding:8px 12px;border:1px solid var(--theme-primary);border-radius:9px;background:#fff;color:var(--theme-brand);font:inherit;font-size:13px;font-weight:700;text-align:center;text-decoration:none;cursor:pointer}
.event-status-button.planned{background:var(--theme-blush)}
.event-status-button.attended{background:var(--theme-primary);color:#fff}
.event-status-button.cancel{border-color:var(--theme-border);background:var(--theme-tint);color:var(--theme-text-muted)}
.event-status-button:disabled{opacity:.55;cursor:wait}
.melody-flag-event-actions>.event-status-button{flex:1;min-width:0}
.event-record-save{min-height:40px;border:0;border-radius:8px;background:var(--theme-primary);color:#fff;font:inherit;font-weight:700;cursor:pointer}
.melody-flag-event-empty{grid-column:1/-1;padding:40px 18px;border-radius:14px;background:#fff;color:var(--theme-text-muted);text-align:center}
@media(min-width:601px){.melody-flag-event-page .melody_flag-container{padding:20px 30px 40px}.melody-flag-event-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.melody-flag-event-item{align-self:start;padding:18px}}
@media(min-width:1100px){.melody-flag-event-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.melody-flag-event-item{min-height:190px;padding:20px;border-radius:16px}}
@media(min-width:1500px){.melody-flag-event-list{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:700px){.melody-flag-event-page .melody_flag-container{width:calc(100vw - 24px);max-width:calc(100vw - 24px);margin:0 auto;padding:14px 12px 32px}.melody-flag-event-toolbar{flex-wrap:wrap;gap:7px}.melody-flag-event-search-toggle,.melody-flag-event-history-link{flex:1 1 100%;width:100%;min-width:0;min-height:42px;box-sizing:border-box}.melody-flag-event-history-link{padding:0 10px}.event-search-bottom button,.event-search-bottom a{flex-basis:72px;padding:0 8px}.melody-flag-event-list{grid-template-columns:minmax(0,1fr)}.melody-flag-event-item{width:100%;max-width:100%;padding:16px;gap:14px}.melody-flag-event-actions{flex:1 1 auto;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.melody-flag-event-actions>*{min-width:0}.melody-flag-event-heading h2{font-size:15px}}

/* ライブ一覧・参加履歴と同じカード密度と、狭い画面での安定した折り返し */
.melody-flag-event-item{justify-content:space-between}
.melody-flag-event-actions{margin-top:auto;padding-top:16px}
.melody-flag-event-status-form .event-status-button,
.melody-flag-event-actions>.event-status-button{height:42px;min-height:42px}
.melody-flag-record-detail-page{width:100%;max-width:1100px;align-self:flex-start;margin:0;padding:20px 30px 40px;box-sizing:border-box}
.melody-flag-record-detail-page>.melody-flag-record-card{margin-bottom:14px}
.melody-flag-record-detail-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:stretch}
.melody-flag-record-detail-grid .melody-flag-record-card{height:100%}
.event-detail-participation{margin-top:14px}
.melody-flag-record-empty{padding:10px 0;color:var(--theme-text-muted);font-size:13px}
.melody-flag-record-total{margin-top:14px;padding-top:14px;border-top:1px solid var(--theme-border-soft);color:var(--theme-text);text-align:right;font-size:15px;font-weight:700}
.melody-flag-record-detail-page>.melody-flag-record-actions{max-width:none;margin:14px 0 0}
.melody-flag-record-page:not(.melody-flag-record-detail-page){width:100%;max-width:1100px;align-self:flex-start;margin:0;padding:20px 30px 40px;box-sizing:border-box}
.melody-flag-event-list{align-items:stretch}
.melody-flag-event-item{align-self:stretch;height:100%}
.melody-flag-event-actions>.event-detail-link:only-child{grid-column:1/-1}
.melody-flag-event-expense-list{display:flex;flex-direction:column}
.melody-flag-event-expense-row{display:flex;align-items:center;gap:12px;min-width:0;padding:11px 0;border-bottom:1px solid var(--theme-border-soft);color:var(--theme-text);font-size:13px}
.melody-flag-event-expense-row:last-child{border-bottom:0}
.melody-flag-event-expense-main{display:grid;grid-template-columns:minmax(78px,1fr) auto;align-items:center;gap:3px 12px;flex:1;min-width:0}
.melody-flag-event-expense-main strong{overflow-wrap:anywhere}
.melody-flag-event-expense-main>span{white-space:nowrap;text-align:right}
.melody-flag-event-expense-main small{grid-column:1/-1;color:var(--theme-text-muted);white-space:pre-line;overflow-wrap:anywhere}
.melody-flag-event-expense-actions{display:flex;align-items:center;gap:6px;margin-left:auto}
.melody-flag-event-expense-actions a,.melody-flag-event-expense-actions button{display:flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;border:0;border-radius:50%;background:var(--theme-tint);color:inherit;text-decoration:none;cursor:pointer}
.melody-flag-event-expense-actions form{margin:0}
.melody-flag-event-add-expense{display:flex;align-items:center;justify-content:center;min-height:42px;margin-top:12px;border-radius:10px;background:var(--theme-primary);color:#fff;font-size:13px;font-weight:700;text-decoration:none}
.melody-flag-expense-form-page{max-width:1100px!important}
@media(max-width:700px){
    .melody-flag-record-detail-page{width:100%;max-width:none;padding:14px 12px 30px}
    .melody-flag-record-detail-page .melody-flag-record-card{width:100%;padding:18px}
    .melody-flag-record-detail-page h2{overflow-wrap:anywhere}
    .melody-flag-record-detail-grid{grid-template-columns:minmax(0,1fr);gap:12px}
    .melody-flag-record-detail-page>.melody-flag-record-actions{grid-template-columns:minmax(0,1fr)}
    .melody-flag-record-page:not(.melody-flag-record-detail-page){width:100%;max-width:none;padding:14px 12px 30px}
}

/* イベント参加履歴と記録画面 */
.melody-flag-event-history-summary{display:grid;gap:7px;margin-top:12px;color:var(--theme-text-sub);font-size:13px;line-height:1.6}
.melody-flag-event-history-summary .history-memo{white-space:pre-line;overflow-wrap:anywhere}
.event-status-button.event-detail-link{border-color:var(--theme-border-soft);background:var(--theme-tint);color:var(--theme-text-sub)}
.melody-flag-record-page{width:min(calc(100% - 36px),900px);min-width:0;box-sizing:border-box;margin:20px auto 48px}
.melody-flag-record-card{min-width:0;box-sizing:border-box;padding:24px;border:1px solid var(--theme-border-soft);border-radius:16px;background:#fff;box-shadow:0 3px 12px rgba(70,30,45,.055)}
.melody-flag-record-card h2{min-width:0;margin:0;color:var(--theme-text);font-size:20px;line-height:1.5;overflow-wrap:anywhere}
.melody-flag-record-section-title{margin:0 0 12px;color:var(--theme-text-sub);font-size:14px;font-weight:700}
.melody-flag-record-card .melody-flag-record-section-title:not(:first-child){margin-top:24px}
.melody-flag-record-value,.melody-flag-record-memo,.melody-flag-record-expense{margin-top:10px;padding:13px 15px;border-radius:10px;background:var(--theme-blush);color:var(--theme-text-sub);font-size:14px;line-height:1.7;white-space:pre-line;overflow-wrap:anywhere}
.melody-flag-record-expense{font-weight:700}
.melody-flag-record-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}
.melody-flag-record-edit-form{display:grid;gap:16px;margin-top:18px}
.melody-flag-record-edit-form label{display:grid;gap:7px;color:var(--theme-text-sub);font-size:13px;font-weight:700}
.melody-flag-record-edit-form input,.melody-flag-record-edit-form select,.melody-flag-record-edit-form textarea{width:100%;min-height:44px;box-sizing:border-box;padding:10px 12px;border:1px solid var(--theme-border-soft);border-radius:9px;background:#fff;color:var(--theme-text);font:inherit;font-size:14px}
.melody-flag-record-edit-form textarea{resize:vertical}
.melody-flag-record-edit-form .event-record-save{min-height:46px}
.event-record-cancel{display:flex;align-items:center;justify-content:center;min-height:42px;margin-top:10px;border:1px solid var(--theme-border-soft);border-radius:9px;color:var(--theme-text-sub);font-size:13px;font-weight:700;text-decoration:none}
@media(max-width:600px){.melody-flag-record-page{width:100%;margin-top:0}.melody-flag-record-card{padding:18px}.melody-flag-record-card h2{font-size:17px}.melody-flag-record-actions{grid-template-columns:1fr}}

/* ライブ参加履歴詳細と同じく、PCでは本文を左基準で広く配置する */
.melody-flag-event-page .melody-flag-record-detail-page{width:100%;max-width:1100px;align-self:flex-start;margin:0;padding:20px 30px 40px;box-sizing:border-box}
.melody-flag-event-page .melody-flag-record-page:not(.melody-flag-record-detail-page){width:100%;max-width:1100px;align-self:flex-start;margin:0;padding:20px 30px 40px;box-sizing:border-box}
.melody-flag-event-page .melody-flag-expense-form-page{max-width:1100px!important}
.melody-flag-event-page .melody-flag-record-detail-page>.melody-flag-record-actions{max-width:none;margin:14px 0 0}
@media(max-width:700px){
    .melody-flag-event-page .melody-flag-record-detail-page,
    .melody-flag-event-page .melody-flag-record-page:not(.melody-flag-record-detail-page){width:100%;max-width:none;padding:14px 12px 30px}
}

/* 刷新（Aデザイン統一） */
.melody-flag-event-page .melody_flag-container{max-width:1348px}
.melody-flag-event-search-toggle{border-color:var(--theme-border-soft);box-shadow:0 6px 18px rgba(61,44,46,.06)}
.melody-flag-event-history-link{border-color:var(--theme-border-soft);box-shadow:0 6px 18px rgba(61,44,46,.06)}
.melody-flag-event-search{box-shadow:0 6px 18px rgba(61,44,46,.06)}
.event-search-bottom button{background:linear-gradient(135deg,var(--theme-btn-from),var(--theme-primary))}
.melody-flag-event-item{border-color:var(--theme-border-soft);border-radius:18px;box-shadow:0 6px 18px rgba(61,44,46,.06)}
.melody-flag-event-heading h2{color:var(--theme-text)}
.melody-flag-event-badge.upcoming{background:var(--theme-blush);color:var(--theme-brand)}
.melody-flag-event-badge.past{background:var(--theme-tint);color:var(--theme-text-muted)}
.event-status-button{border-radius:999px;border-color:var(--theme-border);color:var(--theme-brand);background:#fff}
.event-status-button.planned{background:var(--theme-blush)}
.event-status-button.attended{background:linear-gradient(135deg,var(--theme-btn-from),var(--theme-primary));border-color:transparent;color:#fff}
.event-status-button.cancel{border-color:var(--theme-border-soft);background:var(--theme-tint);color:var(--theme-text-sub)}
.event-status-button.event-detail-link{border-color:var(--theme-border-soft);background:#fff;color:var(--theme-text-sub)}
.event-record-save{border-radius:999px;background:linear-gradient(135deg,var(--theme-btn-from),var(--theme-primary))}
.melody-flag-event-add-expense{border-radius:999px;background:linear-gradient(135deg,var(--theme-btn-from),var(--theme-primary))}
.melody-flag-record-card{border-color:var(--theme-border-soft);border-radius:18px;box-shadow:0 6px 18px rgba(61,44,46,.06)}
.melody-flag-record-section-title{color:var(--theme-heading);font-size:15px}
.melody-flag-record-total{border-top-color:var(--theme-border-soft)}
.melody-flag-event-expense-actions a,.melody-flag-event-expense-actions button{background:var(--theme-tint);color:var(--theme-text-sub)}
.event-record-cancel{border-color:var(--theme-border-soft);border-radius:999px;color:var(--theme-text-sub)}
.melody-flag-record-edit-form input:focus,.melody-flag-record-edit-form select:focus,.melody-flag-record-edit-form textarea:focus{border-color:var(--theme-primary);outline:none}
@media(max-width:700px){
.melody-flag-event-page .melody_flag-container{width:100%;max-width:none;margin:0;padding:14px 16px 32px}
}

/* ライブ・町民集会アーカイブ／参加履歴に合わせた作り（Issue #334 追加対応） */
.mev-container{max-width:1348px;margin:0;padding:6px 16px 40px;box-sizing:border-box}
.mev-heading{display:flex;align-items:center;gap:10px;margin:10px 0 16px;color:var(--theme-heading);font-size:19px;font-weight:bold}
.mev-heading::before{content:"";flex:0 0 auto;width:5px;height:22px;border-radius:3px;background:linear-gradient(180deg,var(--theme-btn-from),var(--theme-primary))}
.mev-year-heading{display:flex;align-items:center;gap:10px;margin:22px 0 12px;color:var(--theme-heading);font-size:17px;font-weight:bold}
.mev-year-heading::before{content:"";flex:0 0 auto;width:5px;height:20px;border-radius:3px;background:linear-gradient(180deg,var(--theme-btn-from),var(--theme-primary))}
.mev-year-count{padding:3px 10px;border-radius:999px;background:var(--theme-blush);color:var(--theme-brand);font-size:11px;font-weight:bold}
.melody-flag-event-page .search-area-wrapper{width:100%;max-width:none;margin:0 0 18px;padding:0;box-sizing:border-box}
.melody-flag-event-page .search-toggle-btn{width:100%;max-width:none;margin:0;border:1px solid var(--theme-border-soft);border-radius:14px;background:#fff;box-shadow:0 6px 18px rgba(61,44,46,.06);color:var(--theme-text)}
.melody-flag-event-page .search-area{width:100%;max-width:none;margin:10px 0 0}
.melody-flag-event-page .search-form{border:1px solid var(--theme-border-soft);border-radius:16px;background:#fff;box-shadow:0 6px 18px rgba(61,44,46,.06)}
.melody-flag-event-page .search-form input,.melody-flag-event-page .search-form select{border:1px solid var(--theme-border);border-radius:10px;color:var(--theme-text)}
.melody-flag-event-page .search-bottom button{border:0;border-radius:999px;background:linear-gradient(135deg,var(--theme-btn-from),var(--theme-primary));color:#fff}
.mev-search-clear{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 14px;border-radius:999px;background:var(--theme-tint);color:var(--theme-text-sub);font-size:13px;font-weight:bold;text-decoration:none}
.mev-list-wrap{position:relative;min-height:120px}
.mev-list-loading{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;border-radius:20px;background:rgba(255,255,255,.78);color:var(--theme-text-sub);font-size:13.5px;font-weight:bold}
.mev-list-loading p{margin:0}
.mev-list-loading[hidden]{display:none}
.mev-spinner{width:34px;height:34px;border-radius:50%;border:3px solid var(--theme-border);border-top-color:var(--theme-primary);animation:mev-spin .8s linear infinite}
@keyframes mev-spin{to{transform:rotate(360deg)}}
.mev-list{display:grid;grid-template-columns:1fr;gap:14px;width:100%}
.mev-card{display:flex;flex-direction:column;justify-content:space-between;width:100%;min-width:0;min-height:168px;padding:18px;box-sizing:border-box;border:1px solid var(--theme-border-soft);border-radius:20px;background:#fff;box-shadow:0 6px 18px rgba(61,44,46,.06)}
.mev-card-content{min-width:0}
.mev-card-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.mev-date-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 11px;border-radius:999px;background:var(--theme-tint);color:var(--theme-brand);font-size:12px;font-weight:bold}
.mev-date-chip svg{width:14px;height:14px}
.mev-state-chip{display:inline-flex;align-items:center;padding:4px 11px;border-radius:999px;background:linear-gradient(135deg,var(--theme-btn-from),var(--theme-primary));color:#fff;font-size:11px;font-weight:bold}
.mev-state-chip[hidden]{display:none}
.mev-name{margin-bottom:6px;color:var(--theme-text);font-size:17px;font-weight:bold;line-height:1.5;overflow-wrap:anywhere}
.mev-info{color:var(--theme-text-sub);font-size:13px;line-height:1.8}
.mev-venue,.mev-info-line{display:flex;align-items:center;gap:6px}
.mev-venue svg,.mev-info-line svg{flex:0 0 auto;width:14px;height:14px;color:var(--theme-primary)}
.mev-memo-line{align-items:flex-start}
.mev-memo-line svg{margin-top:4px}
.mev-memo-line span{white-space:pre-line;overflow-wrap:anywhere}
.mev-desc{margin:10px 0 0;color:var(--theme-text-sub);font-size:13px;line-height:1.7;white-space:pre-line}
.mev-official{display:inline-block;margin-top:10px;color:var(--theme-brand);font-size:12px;font-weight:700;text-decoration:none}
.mev-expense{margin-top:10px;color:var(--theme-text);font-size:13.5px;font-weight:bold}
.mev-actions{display:flex;align-items:stretch;gap:8px;margin-top:16px}
.mev-actions form{flex:1;min-width:0;margin:0}
.mev-actions button,.mev-detail-btn,.mev-record-btn{display:flex;align-items:center;justify-content:center;width:100%;height:42px;padding:0 8px;box-sizing:border-box;border-radius:999px;font-family:inherit;font-size:13px;font-weight:bold;cursor:pointer}
.mev-join-btn,.mev-attend-btn,.mev-record-btn{border:0;background:linear-gradient(135deg,var(--theme-btn-from),var(--theme-primary));color:#fff;text-decoration:none}
.mev-cancel-btn{border:1px solid var(--theme-border);background:#fff;color:var(--theme-text-sub)}
.mev-detail-btn{flex:0 0 42%;border:1px solid var(--theme-border);background:var(--theme-blush);color:var(--theme-brand);text-decoration:none}
.mev-empty{width:100%;box-sizing:border-box;margin:10px 0;padding:30px 20px;border:1px solid var(--theme-border-soft);border-radius:20px;background:#fff;color:var(--theme-text-muted);text-align:center;box-shadow:0 6px 18px rgba(61,44,46,.06)}
@media(min-width:768px){
.mev-container{padding:6px 30px 48px}
.mev-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.mev-name{font-size:18px}
}
@media(min-width:1500px){
.mev-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
}
/* ワイド画面の参加済み列（ライブアーカイブと同じ作り） */
.mev-side-info{display:none}
.mev-side-card{min-width:0;padding:16px;box-sizing:border-box;border:1px solid var(--theme-border-soft);border-radius:20px;background:#fff;box-shadow:0 10px 24px rgba(var(--theme-brand-rgb),.07)}
.mev-side-title{display:flex;align-items:center;gap:8px;margin-bottom:12px;color:var(--theme-text);font-size:16px;font-weight:bold;line-height:1.5}
.mev-side-dot{flex:0 0 auto;width:8px;height:8px;border-radius:50%;background:var(--theme-primary)}
.mev-side-list{list-style:none;margin:0;padding:0}
.mev-side-list li + li{margin-top:10px}
.mev-side-list a{display:block;color:var(--theme-text);text-decoration:none}
.mev-side-date{display:block;font-size:11px;color:var(--theme-text-muted);line-height:1.5}
.mev-side-item-title{display:block;font-size:13.5px;font-weight:bold;line-height:1.5}
.mev-side-venue{display:block;font-size:11.5px;color:var(--theme-text-muted);line-height:1.5}
.mev-side-empty{font-size:12.5px;color:var(--theme-text-muted);margin:0;line-height:1.6}
.mev-side-attended-list{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;max-height:420px}
@media(min-width:2150px){
.mev-side-info{display:flex;flex-direction:column;gap:12px;position:fixed;top:197px;left:calc(var(--pc-side-nav-width,220px) + 30px + 1348px + 24px);width:calc(100vw - var(--pc-side-nav-width,220px) - 1630px);max-width:440px;z-index:40;max-height:calc(100vh - 237px);max-height:calc(100dvh - 237px);overflow-y:auto;scrollbar-width:none;overscroll-behavior:contain}
.mev-side-info::-webkit-scrollbar{display:none}
}
/* 参加履歴詳細（ライブ参加履歴詳細と同じ作り） */
.mev-detail-wrap{width:100%;max-width:1348px;align-self:flex-start;margin:0;padding:20px 30px 40px;box-sizing:border-box}
.mev-detail-card{width:100%;margin:0 0 16px;padding:20px;box-sizing:border-box;background:#fff;border:1px solid var(--theme-border-soft);border-radius:20px;box-shadow:0 6px 18px rgba(61,44,46,.06)}
.mev-group-title{display:flex;align-items:center;gap:10px;margin-bottom:16px;color:var(--theme-heading);font-size:17px;font-weight:bold}
.mev-group-title::before{content:"";flex:0 0 auto;width:5px;height:20px;border-radius:3px;background:linear-gradient(180deg,var(--theme-btn-from),var(--theme-primary))}
.mev-live-name{margin-bottom:10px;color:var(--theme-text);font-size:20px;font-weight:bold;line-height:1.5;overflow-wrap:anywhere}
.mev-info-list{display:grid;gap:6px}
.mev-detail-card .mev-info-line{color:var(--theme-text-sub);font-size:13.5px}
.mev-record-grid{display:grid;grid-template-columns:1fr;gap:0}
@media(min-width:768px){
.mev-record-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
.mev-record-grid .mev-detail-card{height:100%}
}
.mev-record-item{display:flex;align-items:center;gap:8px;padding:10px 0;color:var(--theme-text);font-size:14.5px;font-weight:bold}
.mev-record-item svg{flex:0 0 auto;width:16px;height:16px;color:var(--theme-primary)}
.mev-memo{display:flex;align-items:flex-start;width:100%;margin-top:10px;padding:12px;box-sizing:border-box;border-radius:12px;background:var(--theme-blush)}
.mev-memo-icon{flex:0 0 auto;margin-right:8px;color:var(--theme-primary)}
.mev-memo-icon svg{width:15px;height:15px}
.mev-memo-text{color:var(--theme-text);font-size:13.5px;line-height:1.7;white-space:pre-line;overflow-wrap:anywhere}
.mev-empty-text{padding:10px 0;color:var(--theme-text-muted);font-size:13px}
.mev-expense-item{display:flex;align-items:center;padding:12px 0;border-bottom:1px solid var(--theme-border-soft)}
.mev-expense-item:last-child{border-bottom:none}
.mev-expense-name{width:80px;flex:0 0 auto;font-size:14px;font-weight:bold;color:var(--theme-text)}
.mev-expense-amount{width:90px;flex:0 0 auto;text-align:right;font-size:14px;white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--theme-text)}
.mev-expense-actions{display:flex;align-items:center;gap:5px;margin-left:auto}
.mev-expense-actions form{display:flex;margin:0}
.mev-icon-btn{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border:0;border-radius:50%;background:var(--theme-blush);color:var(--theme-brand);text-decoration:none;cursor:pointer}
.mev-icon-btn svg{width:15px;height:15px}
.mev-icon-space{width:30px;height:30px}
.mev-total-expense{margin-top:14px;padding-top:14px;border-top:1px solid var(--theme-border);color:var(--theme-brand);text-align:right;font-size:17px;font-weight:bold;font-variant-numeric:tabular-nums}
.mev-card-btn{display:flex;align-items:center;justify-content:center;width:100%;height:44px;margin-top:16px;border:0;border-radius:999px;font-size:14px;font-weight:bold;font-family:inherit;cursor:pointer}
.mev-card-btn-edit{border:1px solid var(--theme-border);background:#fff;color:var(--theme-brand)}
.mev-card-btn-expense{background:linear-gradient(135deg,var(--theme-btn-from),var(--theme-primary));color:#fff}
.mev-detail-actions{display:flex}
.mev-detail-actions-btn{flex:1;height:44px}
/* モーダル（ライブ参加履歴詳細と同じ作り） */
.mev-modal,.mev-memo-modal{position:fixed;inset:0;z-index:1000;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.4)}
.mev-modal-content{width:92%;max-width:430px;max-height:calc(100dvh - 120px);overflow-y:auto;padding:22px;box-sizing:border-box;border-radius:24px;background:#fff}
.mev-memo-modal-content{width:80%;max-width:350px;padding:22px;box-sizing:border-box;border-radius:24px;background:#fff}
.mev-modal-title{display:flex;align-items:center;gap:10px;margin-bottom:18px;color:var(--theme-heading);font-size:17px;font-weight:bold}
.mev-modal-title::before{content:"";flex:0 0 auto;width:5px;height:20px;border-radius:3px;background:linear-gradient(180deg,var(--theme-btn-from),var(--theme-primary))}
.mev-memo-content{color:var(--theme-text);font-size:14px;line-height:1.7;white-space:pre-line;overflow-wrap:anywhere}
.mev-close-btn{width:100%;height:44px;margin-top:18px;border:0;border-radius:999px;background:linear-gradient(135deg,var(--theme-btn-from),var(--theme-primary));color:#fff;font-size:14px;font-weight:bold;font-family:inherit;cursor:pointer}
.mev-form-group{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}
.mev-form-group label{color:var(--theme-text-sub);font-size:13.5px;font-weight:bold}
.mev-form-group input,.mev-form-group select{width:100%;height:46px;padding:0 12px;box-sizing:border-box;border:1px solid var(--theme-border);border-radius:12px;background:#fff;font-size:16px;font-family:inherit;color:var(--theme-text)}
.mev-form-group textarea{width:100%;padding:11px 12px;box-sizing:border-box;border:1px solid var(--theme-border);border-radius:12px;background:#fff;font-size:16px;font-family:inherit;color:var(--theme-text);resize:vertical}
.mev-form-group input:focus,.mev-form-group select:focus,.mev-form-group textarea:focus{outline:none;border-color:var(--theme-primary);box-shadow:0 0 0 3px var(--theme-blush)}
.mev-save-btn{width:100%;height:48px;border:0;border-radius:999px;background:linear-gradient(135deg,var(--theme-btn-from),var(--theme-primary));color:#fff;font-size:15px;font-weight:bold;font-family:inherit;cursor:pointer}
.mev-cancel-btn{width:100%;height:42px;margin-top:8px;border:1px solid var(--theme-border-soft);border-radius:999px;background:#fff;color:var(--theme-text-sub);font-size:13.5px;font-weight:bold;font-family:inherit;cursor:pointer}
.mev-page-loading{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;gap:10px;background:rgba(255,255,255,.75);color:var(--theme-text-sub);font-size:13.5px;font-weight:bold}
.mev-page-loading[hidden]{display:none}
.mev-page-loading .mev-spinner{width:26px;height:26px}
@media(max-width:700px){
.mev-detail-wrap{max-width:none;padding:14px 16px 30px}
}

/* 参加履歴詳細の間隔調整（8の倍数で統一） */
.mev-detail-wrap{padding:24px 30px 48px}
.mev-detail-card{padding:24px;margin-bottom:24px}
.mev-live-name{margin-bottom:12px}
.mev-info-list{gap:8px}
.mev-record-item{padding:12px 0}
.mev-memo{margin-top:12px;padding:14px}
.mev-expense-item{padding:14px 0}
.mev-expense-name{width:120px}
.mev-expense-actions{gap:8px}
.mev-total-expense{margin-top:16px;padding-top:16px}
.mev-card-btn{margin-top:20px}
.mev-detail-actions{margin-top:8px}
@media(min-width:768px){
.mev-record-grid{gap:24px}
}
@media(max-width:700px){
.mev-detail-wrap{padding:16px 16px 32px}
.mev-detail-card{padding:20px}
.mev-expense-name{width:96px}
}

/* 参加ラベルはライブ詳細の join-status と同じ仕様（状態で色分け） */
.mev-state-chip{padding:5px 12px;font-size:12.5px;background:#f1f1f1;color:#777}
.mev-state-chip.is-future{background:#e7f6ee;color:#1e7d46}
.mev-state-chip.is-past{background:#e8f1fb;color:#2b5ea7}
.mev-join-status{display:inline-flex;align-items:center;padding:5px 12px;border-radius:999px;font-size:12.5px;font-weight:bold}
.mev-join-status.future{background:#e7f6ee;color:#1e7d46}
.mev-join-status.past{background:#e8f1fb;color:#2b5ea7}
.mev-join-status.none{background:#f1f1f1;color:#777}

/* 関連リンク・関連グッズ（ライブ詳細／参加履歴詳細と同じ作り） */
.mev-link-btn{display:flex;align-items:center;gap:10px;width:100%;margin-top:10px;padding:9px 12px;box-sizing:border-box;border:1px solid var(--theme-border);border-radius:999px;background:#fff;color:var(--theme-text);text-decoration:none;font-size:14px;font-weight:bold}
.mev-link-btn:first-of-type{margin-top:0}
.mev-link-btn:active{transform:scale(.99)}
.mev-link-icon{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:30px;height:30px;border-radius:50%;background:var(--theme-blush);color:var(--theme-brand)}
.mev-link-icon svg{width:16px;height:16px}
.mev-link-label{min-width:0}
.mev-link-arrow{margin-left:auto;color:var(--theme-brand);font-size:20px;line-height:1}
.mev-linked-note{margin:0 0 6px;color:var(--theme-text-sub);font-size:12.5px;line-height:1.6}
.mev-linked-group{margin-top:12px}
.mev-linked-group strong{color:var(--theme-heading);font-size:13.5px}
.mev-linked-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--theme-border-soft);color:var(--theme-text);font-size:13.5px}
.mev-linked-item:last-child{border-bottom:0}
.mev-linked-total{margin-top:14px;padding-top:14px;border-top:1px solid var(--theme-border);color:var(--theme-brand);text-align:right;font-size:15px;font-weight:bold;font-variant-numeric:tabular-nums}
.mev-goods-group{margin:14px 0 4px;color:var(--theme-heading);font-size:13px;font-weight:bold}
.mev-goods-group:first-of-type{margin-top:2px}
.mev-goods-item{padding:10px 0;border-bottom:1px solid var(--theme-border-soft)}
.mev-goods-item:last-child{border-bottom:0;padding-bottom:2px}
.mev-goods-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.mev-goods-name{font-size:13.5px;font-weight:bold;line-height:1.5;color:var(--theme-text)}
.mev-goods-owned{flex:0 0 auto;padding:2px 8px;border-radius:999px;background:linear-gradient(135deg,var(--theme-btn-from),var(--theme-primary));color:#fff;font-size:10.5px;font-weight:bold;line-height:1.5}
.mev-goods-price{margin-top:2px;color:var(--theme-text-muted);font-size:12px}
.mev-official-image-btn{display:flex;align-items:center;justify-content:center;width:100%;min-height:32px;margin-top:8px;padding:5px 10px;box-sizing:border-box;border:1px solid var(--theme-border);border-radius:999px;background:var(--theme-blush);color:var(--theme-brand);font-size:12px;font-weight:bold;font-family:inherit;cursor:pointer}
@media(min-width:2150px){
.mev-goods-side{left:calc(var(--pc-side-nav-width,220px) + 30px + 1348px + 24px);width:calc(100vw - var(--pc-side-nav-width,220px) - 1630px)}
}
/* 公式画像モーダル */
.mev-official-image-modal{position:fixed;inset:0;z-index:1100;display:flex;align-items:center;justify-content:center}
.mev-official-image-modal[hidden]{display:none}
.mev-official-image-overlay{position:absolute;inset:0;background:rgba(0,0,0,.5)}
.mev-official-image-content{position:relative;width:92%;max-width:520px;max-height:calc(100dvh - 100px);overflow-y:auto;padding:20px;box-sizing:border-box;border-radius:20px;background:#fff}
.mev-official-image-close{position:absolute;top:10px;right:10px;width:34px;height:34px;border:0;border-radius:50%;background:var(--theme-tint);color:var(--theme-text-sub);font-size:18px;cursor:pointer}
.mev-official-image-title{margin-bottom:12px;padding-right:36px;color:var(--theme-text);font-size:15px;font-weight:bold}
.mev-official-image-wrapper img{width:100%;height:auto;border-radius:12px}
.mev-official-image-source{margin-top:10px;color:var(--theme-text-muted);font-size:11.5px;text-align:right}

/* イベント詳細：見出しとカードの間隔（ライブ詳細と同じ並び） */
.mev-detail-wrap>.mev-group-title{margin:24px 0 10px}
.mev-detail-wrap>.mev-group-title:first-child{margin-top:0}
.mev-detail-wrap>.mev-detail-card{margin-bottom:0}

.mev-day-status{padding:4px 10px;border-radius:999px;background:var(--theme-blush);color:var(--theme-brand);font-size:12px;font-weight:bold;white-space:nowrap}

.mev-info-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.mev-info-head .mev-live-name{margin-bottom:0;min-width:0}
.mev-info-head .mev-join-status{margin-top:2px}
.mev-detail-btns{display:flex;flex-direction:column;gap:10px;margin-top:16px}
.mev-action-primary,.mev-action-record{display:flex;align-items:center;justify-content:center;gap:8px;padding:13px 16px;border-radius:999px;font-size:14.5px;font-weight:bold;text-decoration:none;box-sizing:border-box}
.mev-action-primary{background:linear-gradient(135deg,var(--theme-btn-from),var(--theme-primary));color:#fff}
.mev-action-record{background:#fff;border:1px solid var(--theme-border);color:var(--theme-brand)}
.mev-action-primary svg,.mev-action-record svg{width:17px;height:17px;flex:0 0 auto}

/* 参加記録・費用カードの内部をライブ参加履歴詳細と完全一致させる */
.mev-detail-card{padding:20px}
.mev-record-grid{gap:16px}
.mev-record-item{padding:10px 0}
.mev-record-item svg{width:18px;height:18px}
.mev-memo{margin-top:10px;padding:12px}
.mev-memo-text{font-size:14px;line-height:1.6}
.mev-memo-icon{margin-right:6px}
.mev-memo-icon svg{width:16px;height:16px}
.mev-expense-item{padding:12px 0}
.mev-expense-name{width:80px}
.mev-expense-actions{gap:5px}
.mev-total-expense{margin-top:14px;padding-top:14px}
.mev-card-btn{margin-top:16px}
.mev-card-btn-edit{background:var(--theme-blush);border:0}

.mev-empty-inline{color:var(--theme-text-muted)}
.mev-expense-empty{padding:12px 0;font-size:14px;color:var(--theme-text-muted)}

/* 参加履歴詳細のカード間隔をライブ参加履歴詳細と同じ16pxに */
.mev-record-wrap>.mev-detail-card{margin-bottom:16px}
.mev-record-wrap .mev-record-grid{margin-bottom:16px}
.mev-record-wrap .mev-record-grid .mev-detail-card{margin-bottom:0}
.mev-record-wrap .mev-detail-actions{margin-top:0}
