body { margin: 0; padding: 12px; background: #f0f8ff; color: #333; font-family: Arial, sans-serif; }
[hidden] { display: none !important; }
.container { max-width: 1000px; margin: auto; background: #fff; padding: 12px; border-radius: 8px; box-shadow: 0 0 10px rgba(0,0,0,.1); }
header { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-bottom: 12px; }
.sync { width: 12px; height: 12px; border-radius: 50%; background: #bbb; }
.sync[data-state="ok"] { background: #2e9d4f; animation: pulse 2s ease-in-out infinite; }
.sync[data-state="error"] { background: #d62828; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .sync { animation: none !important; } }
section { padding: 12px; border-radius: 8px; margin-bottom: 16px; }
.green { background: #e0f7da; }
.blue { background: #e3f2fd; }
.red { background: #ffebee; }
h2 { color: #ff6347; margin-top: 0; font-size: 1.3rem; }
select, input { padding: 6px; font-size: 16px; border: 1px solid #ddd; border-radius: 4px; }
button { background: #ff6347; color: #fff; border: 0; padding: 8px 16px; margin: 2px; font-size: 15px; border-radius: 4px; cursor: pointer; }
button:hover { background: #ff4500; }
button.two-step { min-width: 6em; transition: background-color .15s, color .15s; }
button.armed, button.armed:hover { background: #ffb300; color: #3a2a00; font-weight: bold; animation: armed 1s ease-in-out infinite; }
@keyframes armed { 50% { background: #ffd54f; } }
button:disabled { background: #ff6347; color: #ddd; opacity: .6; cursor: not-allowed; }
body.busy button { pointer-events: none; opacity: .6; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border: 1px solid #ddd; padding: 8px; text-align: center; white-space: nowrap; }
th { background: #ff6347; color: #fff; }
tbody tr:nth-child(odd) { background: #f9f9f9; }
.note { margin: 0 0 8px; font-size: 14px; }
button.copy { background: #fff; color: #333; border: 1px solid #ff6347; border-bottom-width: 3px; font-variant-numeric: tabular-nums; }
button.copy:hover { background: #fff3f0; }
button.copy:active { border-bottom-width: 1px; transform: translateY(2px); }
button.copy { position: relative; }
.copied { position: absolute; top: -9px; right: -9px; display: grid; place-items: center; width: 22px; height: 22px;
  border-radius: 50%; background: #2e9d4f; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3);
  pointer-events: none; animation: copied 1.2s ease-out forwards; }
@keyframes copied { 0% { opacity: 0; transform: scale(.6); } 15% { opacity: 1; transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; } }
.thumbs { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; background: #fff; font-size: 22px; box-shadow: 0 2px 8px rgba(0,0,0,.25);
  pointer-events: none; animation: thumbs 2.5s ease-out forwards; }
@keyframes thumbs { 0% { opacity: 0; transform: scale(.5); } 10% { opacity: 1; transform: scale(1.1); } 18% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .copied, .thumbs, button.armed { animation: none; } }
.fields { display: flex; flex-wrap: wrap; gap: 12px 16px; padding: 12px; background: #fff; border: 1px solid #cfe3f5; border-radius: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 220px; min-width: 0; }
.field > span { font-size: 13px; font-weight: bold; color: #555; }
.field input, .field select { box-sizing: border-box; width: 100%; height: 40px; padding: 6px 10px; background: #fff; }
.field input:focus, .field select:focus { outline: 2px solid #ff6347; outline-offset: -1px; border-color: transparent; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.grid .spot { position: relative; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0 0 10px; overflow: hidden;
  background: #fff; color: #333; text-align: left; border: 1px solid #d6e4f0; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: transform .12s, box-shadow .12s, border-color .12s; }
.grid .spot:hover { background: #fff; border-color: #ff6347; box-shadow: 0 6px 16px rgba(255,99,71,.25); transform: translateY(-2px); }
.grid .spot:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.grid .spot.has-open { border-color: #ffb199; }
.spot-media { position: relative; display: block; background: #f3ead6; }
.spot-media img { display: block; width: 100%; height: auto; }
.spot-no { position: absolute; right: 8px; bottom: 8px; min-width: 32px; height: 32px; padding: 0 6px; box-sizing: border-box;
  display: grid; place-items: center; border-radius: 16px; background: rgba(20,20,20,.78); color: #fff;
  font-size: 18px; font-weight: bold; line-height: 1; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.spot-stats { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px; }
.chip { padding: 2px 8px; border-radius: 999px; font-size: 12px; line-height: 1.6; background: #eef2f6; color: #667; font-variant-numeric: tabular-nums; }
.chip.open { background: #ff6347; color: #fff; font-weight: bold; }
.chip.done { background: #e6f4ea; color: #2e7d32; }
.spot-cta { margin: 0 10px; padding: 6px 0; border-radius: 6px; text-align: center; font-size: 13px; font-weight: bold; color: #ff6347; background: #fff3f0; }
.grid .spot:hover .spot-cta { background: #ff6347; color: #fff; }
#toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); background: #333; color: #fff; padding: 10px 20px; border-radius: 6px; user-select: text; }
@media (max-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); } }

/* 消化・取消：行のフェードアウト（app.js の FADE_MS と合わせる） */
tr.leaving { animation: leave .5s ease-in forwards; pointer-events: none; }
@keyframes leave { to { opacity: 0; } }

/* 消化 🍺・取消 🗑️：上へ昇りながら消える（app.js の ASCEND_MS と合わせる） */
.ascend { position: fixed; z-index: 10; font-size: 28px; line-height: 1; pointer-events: none;
  transform: translate(-50%, -50%); animation: ascend 1.4s ease-out forwards; }
@keyframes ascend {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  12%  { opacity: 1; transform: translate(-50%, -60%) scale(1.15); }
  35%  { transform: translate(-58%, -160%) scale(1.1) rotate(-8deg); }
  60%  { opacity: .9; transform: translate(-42%, -260%) scale(1.05) rotate(8deg); }
  100% { opacity: 0; transform: translate(-50%, -420%) scale(1.3) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  tr.leaving { animation-duration: .01s; }
  .ascend { animation: none; opacity: 0; }
}
