/* マイページのアルバムの半券（album/paper-ticket.js）。色は評価の共有カード（functions/src/rating-card.ts）と同じ紙の色。
   画像のない作品の絵柄は album.css の .ticket-art を使うので、album.css も読み込む。 */
.pt { --paper: #fff7e8; --ink: #2c241a; --gold: #b0965f; --sub: #6f5f45; --line: #d7c7a8;
  position: relative; display: flex; color: var(--ink); text-decoration: none; border-radius: 14px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .18)); font-feature-settings: "palt"; }
a.pt { cursor: pointer; }
a.pt:hover { filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .28)); transform: translateY(-1px); }
.pt-main { flex: 1; min-width: 0; display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: var(--paper); border-radius: 14px 0 0 14px;
  -webkit-mask: radial-gradient(circle 12px at 100% 0, #0000 98%, #000) top right/100% 51% no-repeat, radial-gradient(circle 12px at 100% 100%, #0000 98%, #000) bottom right/100% 51% no-repeat; }
.pt-stub { width: clamp(200px, 30%, 280px); flex: none; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 14px; background: var(--paper); border-radius: 0 14px 14px 0; border-left: 3px dashed var(--line);
  -webkit-mask: radial-gradient(circle 12px at 0 0, #0000 98%, #000) top left/100% 51% no-repeat, radial-gradient(circle 12px at 0 100%, #0000 98%, #000) bottom left/100% 51% no-repeat; }
/* テープで留めた写真 */
.pt-photo { position: relative; flex: none; width: 128px; height: 72px; margin-top: 6px; border-radius: 4px; overflow: hidden; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transform: rotate(-2deg); background: #2a2420; }
.pt-photo::before { content: ''; position: absolute; left: 50%; top: -6px; width: 44px; height: 12px; margin-left: -22px; background: rgba(255, 255, 255, .55); transform: rotate(-4deg); z-index: 2; }
.pt-image, .pt-photo .ticket-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
/* 写真の窓いっぱいに広げ、文字は小さく。 */
.pt-photo .ticket-art { padding: 8px 9px; aspect-ratio: auto; }
.pt-photo .ticket-art-service { font-size: 10px; }
.pt-photo .ticket-art-title { font-size: 11px; -webkit-line-clamp: 2; }
.pt-image[hidden], .pt-photo .ticket-art[hidden] { display: none; }
.pt-play { position: absolute; right: 4px; bottom: 4px; z-index: 2; display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 9px; font-weight: 700; }
.pt-body { min-width: 0; flex: 1; display: grid; gap: 6px; }
.pt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pt-admit { font-weight: 800; font-size: 10px; letter-spacing: .3em; color: var(--gold); }
.pt-service { display: inline-block; padding: 2px 8px; border-radius: 4px; background: #666; color: #fff; font-size: 11px; font-weight: 800; }
.pt-service--youtube { background: #e00000; }
.pt-service--netflix { background: #e50914; }
.pt-service--amazon_prime { background: #1f9fd6; }
.pt-service--disney_plus { background: #3d6ee0; }
.pt-title { margin: 0; font-size: 1.05rem; font-weight: 800; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pt-info { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.85rem; font-weight: 700; color: var(--sub); }
.pt-info b { display: block; font-size: 9px; letter-spacing: .2em; color: var(--gold); }
/* 作品評価・一緒に見るおすすめ度の2段（docs/design/album-ticket/mypage-ticket-stub.html の B）。
   右側の幅いっぱいに、大きめの数字と星を中央にそろえる（2026-11-01。小さく左に寄っていて読みにくかったため）。 */
.pt-block { display: grid; justify-items: center; gap: 4px; text-align: center; }
.pt-block + .pt-block { padding-top: 10px; border-top: 1px solid #eadcc1; }
.pt-block-label { font-size: 12px; font-weight: 800; color: var(--sub); }
.pt-block-big { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 8px; }
.pt-block-num { font-size: 2.1rem; font-weight: 800; line-height: 1; color: var(--ink); }
.pt-block-big .pt-stars { font-size: 16px; }
.pt-block-count { font-size: 12px; color: #8a7a5a; white-space: nowrap; }
.pt-block-none { font-size: 11px; color: #8a7a5a; }
.pt-block-you { display: flex; justify-content: center; align-items: baseline; gap: 6px; font-size: 12px; color: #8a7a5a; }
.pt-block-you-num { font-size: 14px; font-weight: 800; color: var(--ink); }
.pt-block-you .pt-stars { font-size: 12px; }
.pt-stars { position: relative; display: inline-block; font-size: 12px; line-height: 1; letter-spacing: .04em; white-space: nowrap; }
.pt-stars::before { content: "★★★★★"; color: #e0d3b9; }
.pt-stars i { position: absolute; left: 0; top: 0; overflow: hidden; font-style: normal; color: #d08c07; }
.pt-stars i::before { content: "★★★★★"; }

@media (max-width: 640px) {
  .pt { flex-direction: column; }
  .pt-main { flex-direction: column; align-items: stretch; gap: 10px; padding: 0 0 12px; border-radius: 14px 14px 0 0;
    -webkit-mask: radial-gradient(circle 12px at 0 100%, #0000 98%, #000) bottom left/51% 100% no-repeat, radial-gradient(circle 12px at 100% 100%, #0000 98%, #000) bottom right/51% 100% no-repeat; }
  .pt-photo { width: auto; height: 118px; margin: 0; border-radius: 14px 14px 0 0; box-shadow: none; transform: none; }
  .pt-photo .ticket-art { padding: 14px 16px; }
  .pt-photo .ticket-art-service { font-size: 13px; }
  .pt-photo .ticket-art-title { font-size: 18px; }
  .pt-photo::before { display: none; }
  .pt-body { padding: 0 14px; }
  .pt-title { font-size: 1rem; }
  .pt-stub { width: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; border-left: 0; border-top: 3px dashed var(--line); border-radius: 0 0 14px 14px;
    -webkit-mask: radial-gradient(circle 12px at 0 0, #0000 98%, #000) top left/51% 100% no-repeat, radial-gradient(circle 12px at 100% 0, #0000 98%, #000) top right/51% 100% no-repeat; }
  .pt-block + .pt-block { padding-top: 0; border-top: 0; }
}

/* ── アルバムの1枚（album/album-ticket.js。docs/design/mypage-album-actions/ の D）──
   押すと裏返って感想（MY NOTE）。右上の「…」で動画を見る・消す。裏面は表と同じ場所・大きさに重ねる。 */
.at { position: relative; }
.at .pt { cursor: pointer; transition: transform .15s; }
.at .pt:hover { transform: translateY(-2px); filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .28)); }
.at .pt:focus-visible, .at-back:focus-visible { outline: 3px solid #3EA6FF; outline-offset: 3px; border-radius: 14px; }
.at--flipped .pt { visibility: hidden; }
/* 感想は表に載せず、印だけ（縦幅をそろえる） */
.pt-memo { display: inline-flex; align-items: center; padding: 1px 7px; border: 1px solid #d6c39b; border-radius: 999px; background: #fff; color: #8a6d2f; font-size: 10px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
.at-back { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; gap: 8px; padding: 16px 20px 12px; border-radius: 14px; background: #fff7e8;
  box-shadow: inset 0 0 0 6px #fff7e8, inset 0 0 0 7px #e2cfa6; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .18)); color: #2c241a; cursor: pointer; }
.at-back[hidden] { display: none; }
.at-back-head { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.at-back-head b { flex: none; color: #b0965f; font-size: 10px; letter-spacing: .3em; }
.at-back-title { min-width: 0; overflow: hidden; color: #8a7a5a; font-size: 0.78rem; white-space: nowrap; text-overflow: ellipsis; }
/* 罫線の紙。長い感想は裏面の中でスクロールする */
.at-back-note { flex: 1; min-height: 0; margin: 0; overflow-y: auto; color: #3d3222; font-size: 0.95rem; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere;
  background: repeating-linear-gradient(transparent 0 calc(1.75em - 1px), #ecdcb9 calc(1.75em - 1px) 1.75em); background-attachment: local; }
.at-back-empty { color: #a39373; background: none; }
.at-back-hint { align-self: flex-end; color: #b0965f; font-size: 11px; font-weight: 700; }
/* 「…」: カードの右上に白い丸（紙の色の上でも見えるように。2026-10-28） */
.at-more { position: absolute; top: 8px; right: 10px; z-index: 3; display: grid; place-items: center; width: 32px; height: 32px; padding: 0 0 6px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); color: #6f5f45; font: inherit; font-size: 1.1rem; font-weight: 700; line-height: 1; cursor: pointer; }
.at-more:hover, .at--menu .at-more, .at-more:focus-visible { box-shadow: 0 2px 8px rgba(0, 0, 0, .3); color: #2c241a; }
.at--flipped .at-more { display: none; }
/* メニューは「…」の下に開く */
.at-menu { position: absolute; top: 46px; right: 10px; z-index: 6; display: grid; min-width: 240px; padding: 6px; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.at-menu[hidden] { display: none; }
.at-menu a, .at-menu button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 8px; background: none; color: #333; font: inherit; font-size: 0.9rem; text-align: left; text-decoration: none; cursor: pointer; }
.at-menu a:hover, .at-menu button:hover, .at-menu a:focus-visible, .at-menu button:focus-visible { background: #f5f6fa; }
.at-menu .at-menu-remove { color: #c00; }
.at-menu hr { width: 100%; margin: 4px 0; border: 0; border-top: 1px solid #eee; }
.at-menu-icon { width: 18px; text-align: center; }
.at-menu-title { display: none; }
/* メニューの外を押すと閉じる（パソコンでは透明、スマホでは暗く） */
.at-shade { position: fixed; inset: 0; z-index: 5; background: transparent; }
.at-shade[hidden] { display: none; }

@media (max-width: 640px) {
  /* 「…」は写真の右上。メニューは画面の下から出る */
  .at-more { top: 8px; right: 8px; }
  .at-back { padding: 18px 18px 14px; }
  .at-menu { position: fixed; top: auto; left: 0; right: 0; bottom: 0; min-width: 0; padding: 10px 12px 22px; border-radius: 16px 16px 0 0; }
  .at-menu a, .at-menu button { padding: 14px 12px; font-size: 1rem; }
  .at-menu-title { display: block; margin: 4px 12px 6px; color: #888; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .at-shade { background: rgba(0, 0, 0, .35); }
}

/* 一緒に見た人の感想（album/album-ticket.js。docs/album-comments-plan.md 段階3）: 表の件数、裏の自分の感想の下の
   「一緒に見た人の感想を読む（N件）」、全員の分を読むダイアログ。 */
.pt-friends { display: inline-flex; align-items: center; padding: 1px 7px; border: 1px solid #b9cbe3; border-radius: 999px; background: #fff; color: #3b5f8f; font-size: 10px; font-weight: 800; white-space: nowrap; }
.at-friends { flex: none; display: grid; gap: 4px; padding-top: 6px; border-top: 1px dashed #e2d3b1; }
.at-friends-empty, .at-friends-error { margin: 0; color: #a39373; font-size: 0.78rem; line-height: 1.6; }
.at-friends-all, .at-friends-retry { justify-self: start; padding: 2px 0; border: 0; background: none; color: #3b5f8f; font: inherit; font-size: 0.78rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
.at-friends-all:focus-visible, .at-friends-retry:focus-visible { outline: 2px solid #3EA6FF; outline-offset: 2px; border-radius: 4px; }
/* 覚えていた件数で先に出したボタン（感想が届くまでは押しても開かない） */
.at-friends-all[aria-disabled="true"] { opacity: 0.55; cursor: default; }
.at-menu .at-menu-withdraw { color: #6f5f45; }
.at-friends-dialog { width: min(440px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 64px)); padding: 20px; border: 0; border-radius: 14px; background: #fff7e8; color: #3d3222; box-shadow: 0 12px 40px rgba(0, 0, 0, .3); }
.at-friends-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.at-friends-dialog-head { margin: 0; color: #3d3222; font-size: 1rem; }
.at-friends-dialog-title { margin: 4px 0 12px; color: #8a7a5a; font-size: 0.8rem; }
.at-friends-dialog-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.at-friends-dialog-item { padding: 10px 12px; border-radius: 10px; background: #fff; }
.at-friends-dialog-name { display: block; color: #8a7a5a; font-size: 0.75rem; }
.at-friends-dialog-comment { margin: 4px 0 0; color: #3b5f8f; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.at-friends-close { display: block; margin: 14px 0 0 auto; padding: 8px 18px; border: 1px solid #d6c39b; border-radius: 999px; background: #fff; color: #6f5f45; font: inherit; font-weight: 700; cursor: pointer; }
