<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://yhan228.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://yhan228.github.io/" rel="alternate" type="text/html" /><updated>2026-07-01T16:00:39+00:00</updated><id>https://yhan228.github.io/feed.xml</id><title type="html">Yichen Han</title><subtitle>Data Scientist &amp; Cultural Explorer - Statistics, Machine Learning, and Japanese Aesthetics</subtitle><author><name>Yichen Han</name><email>yichen.han@campus.lmu.de</email></author><entry><title type="html">Reconstruction, Retreat, and the Stick-and-Shout: Between Spinoza and Original Enlightenment</title><link href="https://yhan228.github.io/posts/2026/05/monism/" rel="alternate" type="text/html" title="Reconstruction, Retreat, and the Stick-and-Shout: Between Spinoza and Original Enlightenment" /><published>2026-05-30T00:00:00+00:00</published><updated>2026-05-30T00:00:00+00:00</updated><id>https://yhan228.github.io/posts/2026/05/monism-en</id><content type="html" xml:base="https://yhan228.github.io/posts/2026/05/monism/"><![CDATA[<blockquote>
  <p><strong>Translator’s note.</strong> This is an English translation of an essay originally written by the author in Chinese. The original is published here as well: <a href="/posts/2026/05/monism-zh/">中文原文 / Chinese original</a>.</p>
</blockquote>

<p>“What is God?” is a question that recurs throughout the history of philosophy. Some of its answers are not descriptions of a transcendent being but assertions of <em>identity</em> about the whole of existence — that all of existence simply <em>is</em> itself, with no higher substance looking down on it. This essay compares how two historically independent and formally almost opposite traditions handle one such assertion: Spinoza’s seventeenth-century derivation of “God, or Nature” (<em>Deus sive Natura</em>) in the <em>Ethics</em>, set out in the manner of Euclidean geometry; and the medieval Japanese doctrine of original enlightenment (本覚, <em>hongaku</em>), formed through centuries of hermeneutic accumulation, with its claim that “the ordinary person is, as such, the Buddha” (凡夫即仏). The two set out from entirely different starting points and arrive at structurally similar conclusions. But what deserves more attention, perhaps, is the <em>manner</em> in which each arrives. This essay tries to locate where this type of identity-assertion stands once it is put under strict scrutiny.</p>

<h2 id="1-god-or-nature-deus-sive-natura">1. God, or Nature (<em>Deus sive Natura</em>)</h2>

<p>The <em>Ethics</em> (<em>Ethica Ordine Geometrico Demonstrata</em>), published after Spinoza’s death in 1677, organizes its threads — definitions, axioms, corollaries — in the manner of Euclid’s <em>Elements</em>, and from this rigorous form derives a view that was strikingly heterodox in its day: that God is the sole substance; that God is identical with Nature; and that all individuals are modes of that one substance. It answered Descartes’s dualism of thought and extension, and offered seventeenth-century Europe a third path out of the dilemma of having to choose between a personal God and atheism — namely an impersonal, all-encompassing God-Nature. Setting aside the parts not directly relevant to the core, the line of argument runs roughly as follows.</p>

<p><strong>The implicit constitutive principle:</strong> the Principle of Sufficient Reason (PSR). Every distinction must have a sufficient ground; there are no unexplained “brute facts”.</p>

<p><strong>Definitions:</strong></p>

<ul>
  <li>D3 — Substance (<em>substantia</em>): that which is in itself and is conceived through itself; whose concept does not depend on the concept of any other thing.</li>
  <li>D4 — Attribute (<em>attributum</em>): that which the intellect perceives of substance as constituting its essence (<em>id quod intellectus de substantia percipit, tanquam ejusdem essentiam constituens</em>).</li>
  <li>D5 — Mode (<em>modus</em>): an affection of substance; or that which is in another and is conceived through another.</li>
  <li>D6 — God (<em>Deus</em>): an absolutely infinite being, a substance consisting of infinitely many attributes.</li>
</ul>

<p><strong>Axioms:</strong></p>

<ul>
  <li>A1: Everything that is, is either in itself or in another.</li>
  <li>A4: The cognition of an effect depends on, and involves, the cognition of its cause.</li>
</ul>

<p><strong>The core chain of propositions:</strong></p>

<ul>
  <li><strong>P5</strong>: There cannot be two substances sharing the same attribute.</li>
</ul>

<blockquote>
  <p>Proof: Suppose there are two substances A and B; there must be some ground on which to distinguish them. The ground of distinction is either a difference in attribute or a difference in mode. If it is a difference in attribute, then A and B already differ at the level of attribute — meaning they do not “share the same attribute”, and P5 holds. If it is a difference in mode — but a mode is an affection of substance (D5), determined by the substance rather than constituting its essence, and so cannot serve as a ground of distinction <em>between substances</em>. Hence the only viable distinction is by attribute, which rules out “sharing the same attribute”.</p>
</blockquote>

<ul>
  <li><strong>P14</strong>: No substance can exist other than God.</li>
</ul>

<blockquote>
  <p>By D6, God is absolutely infinite and entails all possible attributes. If there were another substance, it would have to have some attribute. But every attribute is already among God’s infinite attributes. So the other substance would have to share some attribute with God, violating P5. Hence there is no substance other than God.</p>
</blockquote>

<ul>
  <li><strong>P15</strong>: Whatever is, is in God.</li>
</ul>

<blockquote>
  <p>From P14 and A1.</p>
</blockquote>

<ul>
  <li><strong>P29, Scholium</strong>: <em>Natura naturans</em> (Nature naturing) and <em>Natura naturata</em> (Nature natured) are two aspects of one and the same substance. The former is God as active producer; the latter is God as the totality of the modes produced.</li>
</ul>

<p>Conclusion: the one substance is God; God is Nature (<em>Deus sive Natura</em>); and all individuals are modes of that substance.</p>

<p>Looking back at the definitions of this system, however, one notices something: “substance” — a word ordinarily used to refer to any of the individual things existing in reality — under Spinoza’s definition cannot refer to any concrete thing at all. Any object of ordinary human cognition, even a stone or a pool of water, requires further descriptive concepts in order to be defined. A Spinozan substance possesses <strong>self-completeness</strong>, and that property can only belong to something all-encompassing. Combined with the definition of God as an absolutely infinite being containing all attributes, the identification of God with this all-encompassing absolute substance becomes all but inevitable.</p>

<p>What this reveals is that Spinoza’s identity-conclusion is drawn out, with surprisingly little effort, by his idiosyncratic definition of substance. Completing that definition is the most important insight in his case for “God, or Nature” — and completing it is a problem that mere logical inference cannot solve; the introduction of a metaphysical commitment is unavoidable. Once that constructed set of definitions is accepted, the conclusion is formally complete.</p>

<p>What is striking is that nearly a thousand years before Spinoza, a current within Buddhism had already advanced, in China, a similar insight-based view — one that would gradually develop, in Japan, into what is called <em>hongaku</em> thought.</p>

<h2 id="2-the-ordinary-person-is-as-such-the-buddha">2. The Ordinary Person Is, As Such, the Buddha</h2>

<p><em>Hongaku</em> thought is a hermeneutic accumulation that ran for centuries and spanned two civilizations. It was transmitted mainly within the Tendai school through secret <strong>oral transmission</strong> (口伝, <em>kuden</em>) and <strong>paper slips</strong> (切紙, <em>kirikami</em>), and only gradually compiled into written texts retrospectively attributed to ancient authorities.</p>

<p>The term “<em>hongaku</em>” (original enlightenment) first appears in the <em>Awakening of Faith in the Mahāyāna</em> (大乗起信論), a sixth-century text composed in China but attributed to India. It says:</p>

<blockquote>
  <p>所言覺義者，謂心體離念。離念相者，等虛空界，無所不遍，法界一相，即是如來平等法身。依此法身，說名本覺。何以故？本覺義者，對始覺義說，以始覺者，即同本覺。</p>
</blockquote>

<p>That is: “enlightenment” is the recognition that the essence of mind is from the outset free of discursive thought; this essence is in fact omnipresent, like empty space; the entire dharma-realm reduces to a single mark, and that mark is the Tathāgata’s undifferentiated <em>dharmakāya</em>, i.e. “original enlightenment”. The “initial enlightenment” attained through practice is identical to the original enlightenment one had all along.</p>

<p>This opening insight already contains most of what <em>hongaku</em> thought would become, though it still rests on a distinction between mind-essence and discursive thought, and still presupposes practice.</p>

<p>Monk Zhiyi (538–597), in the <em>Mohe Zhiguan</em> (摩訶止観), established “the three thousand realms in a single thought-moment” (一念三千): a single moment of mind contains all three thousand worlds. From the seventh to the ninth centuries, the Tiantai and Huayan schools developed this ontological direction further, advancing “the unobstructed interpenetration of all phenomena” (事事無礙), “one is all, all is one” (一即一切、一切即一), and “even the insentient possess [Buddha-]nature” (無情有性). These form the core of <em>hongaku</em> thought; but at this stage they remain doctrine, while actual practice still proceeds gradually through precepts, meditation, and stages.</p>

<p>In China, amid the fierce competition of Confucianism, Buddhism, and Daoism, this ontological current saw little further development. Transmitted to Japan, however, it was interpreted further and pushed to its limit. In the ninth century, the early-Heian Tendai monk Annen (安然), in his <em>Shinjō sōmoku jōbutsu shiki</em> (斟定草木成仏私記), framed the signature line “grasses, trees, and the very land all attain Buddhahood” (草木国土悉皆成仏). Out of its interpretation came three important conclusions:</p>

<blockquote>
  <p><strong>Non-duality of environment and subject</strong> (依正不二): the “environment” (依) and the “subject” (正) were never two things to begin with.</p>

  <p><strong>The self-nature of the thing as such</strong> (当体の自性): a thing’s essence just <em>is</em> the way it is now manifesting, not some “true essence” hidden behind it.</p>

  <p><strong>Containing the Middle Way</strong> (中道を具す): within “the three thousand realms in a single thought-moment”, grasses too are not lacking; hence grasses also attain Buddhahood.</p>
</blockquote>

<p>In Japan’s medieval period (11th–14th centuries), facing the onset of the “Final Dharma age” (末法, <em>mappō</em>, reckoned from 1052), and coinciding with the Heian–Kamakura transition — the rise of the estate system and the warrior class, the decline of the old aristocracy and the waning of the court, compounded by natural disasters — Japan’s despair at an impending “end of days” generated a fresh demand for “salvation”. In this period, <em>hongaku</em> thought was finally consolidated into a few orally transmitted truths:</p>

<blockquote>
  <p><strong>Birth-and-death is, as such, nirvāṇa; the afflictions are, as such, awakening; the ordinary person is, as such, the Buddha; grasses and trees all attain Buddhahood.</strong> (生死即涅槃、煩悩即菩提、凡夫即仏、草木悉皆成仏)</p>
</blockquote>

<p>Note that “non-duality of environment and subject” is not “identity of environment and subject”; whereas the “即” (<em>soku</em>, “is, as such”) in formulations like “the ordinary person is, as such, the Buddha” can be read as strict identity, and it is that reading I adopt here.</p>

<p>To the Final Dharma age, <em>hongaku</em> thought’s answer is this: salvation was never elsewhere; it is in the phenomenon of this very moment, here and now. There is no far shore to be reached. Many later schools of Japanese Buddhism were deeply marked by this idea, which in turn soaked into Zen, Noh, <em>waka</em>, linked verse, <em>haikai</em>, and the way of tea.</p>

<h2 id="3-reconstructing-original-enlightenment">3. Reconstructing Original Enlightenment</h2>

<p>Note that the original <em>hongaku</em> thought was built by <strong>hermeneutic accumulation</strong>, not deductive argument. Over several centuries, many thinker-monks, named and unnamed, contributed to its eventual form, continually interpreting and debating the lines left by their predecessors, ultimately attributing the result to ancient authorities, leaving behind a scattered literature whose details are hard to pin down.</p>

<p>Borrowing Spinoza’s form, let us attempt a derivation of <em>hongaku</em>’s main propositions from definitions and axioms. At the same time, a derivation of this kind, grounded in a metaphysical commitment, is itself one expression of interpretation; from it something may emerge that diverges from the original meaning without straying too far, which is precisely what the scriptures’ ambiguity permits.</p>

<h3 id="31-axioms-and-definitions">3.1 Axioms and Definitions</h3>

<p>We begin with three statements.</p>

<ul>
  <li>A1 (Dependent origination, 緣起): the nature of any existent is wholly determined by its relations to other things; there is no non-dependently-originated existent.</li>
  <li>A2 (Emptiness of self-nature, 性空): from A1 — all things lack self-nature (<em>svabhāva</em>).</li>
  <li>A3 (Occurrent-ness): any existent is, at any moment, in some state.</li>
</ul>

<p>Of these, A1 and A2 rest on the metaphysical commitments of the Buddhist worldview. A3 looks trivial; we accept it provisionally as a premise needing no argument, and return to it later.</p>

<h3 id="32-dissolving-the-buddha">3.2 Dissolving “the Buddha”</h3>

<p>We need to rethink <strong>“the Buddha”.</strong> Intuitively, any transcendent Buddha — of the kind that the historical development of Buddhism conferred upon them — seems to contradict the core claim “the ordinary person is, as such, the Buddha”: if the Buddha has any ontological property the ordinary person lacks, then the ordinary person is, at least in that property, not the Buddha.</p>

<p>Let us try to derive this constraint from the axioms.</p>

<ul>
  <li><strong>Theorem 1 (No ontological superiority):</strong> For any dependently-originated existents X and Y, the substantive proposition “X is ontologically superior to Y” cannot be well-defined.</li>
</ul>

<blockquote>
  <p>Proof: Suppose “X is ontologically superior to Y” is a well-defined substantive proposition; then it states an ontological fact, and that fact requires some ground. By A1 + A2, X and Y lack the independent self-nature that could serve as the locus of a ground. So the ground cannot lie in X or Y themselves; it can lie only in one of three places: in the network of relations between X and Y, in some third thing common to both, or in no specific locus at all. If in the relational network, superiority degenerates into a conventional label, not an ontological fact. If in a third thing, that third thing is likewise dependently originated and, by A2, lacks self-nature, and so cannot serve as “the ontological ground”. If in no locus at all, superiority has no substantive content. The three possibilities are exhaustive, and all are ruled out. Hence the proposition cannot be well-defined.</p>
</blockquote>

<ul>
  <li><strong>Theorem 2 (The dissolved Buddha):</strong> Given A1 + A2, any definition of “the Buddha” consistent with A1 must be dissolutive — it cannot require any ontologically superior state.</li>
</ul>

<blockquote>
  <p>Proof: Suppose someone asserts a definition D*: the Buddha = a being in some ontologically superior state X. Consider the ontological status of state X:
If X is dependently originated, then by T1 the ontological-superiority relation between X and any other dependently-originated state Y cannot be well-defined; but D* requires X to be ontologically superior to at least some other states (otherwise it is not “superior”) — contradiction.
If X is not dependently originated, it violates A1.
By A1 these two cases are exhaustive and both ruled out, so D* is inconsistent.</p>
</blockquote>

<p>T2’s output is negative — it tells us what “the Buddha” cannot be, not what it is. It even permits a more radical response: <strong>having accepted T2, simply abandon the category “Buddha”, since under our worldview it has no content.</strong></p>

<p>But let us first try to keep “the Buddha” as a meaningful category. To do so we must do more work on top of T2 — give “the Buddha” a positive content compatible with A1.</p>

<p>This requires two commitments, which we treat separately.</p>

<h3 id="33-first-commitment-ontological-ranking-is-inapplicable">3.3 First Commitment: Ontological Ranking Is Inapplicable</h3>

<p>T1 has already told us that ontological-ranking comparisons cannot be well-defined. Push this conclusion onto judgments about the ordinary person’s state:</p>

<ul>
  <li><strong>L1 (Non-penetration):</strong> No existent’s present state is penetrated by the judgment that “it ought to become some ontologically superior state”.</li>
</ul>

<blockquote>
  <p>Proof: Suppose some existent X’s present state were penetrated by the judgment “it ought to become Y”. That judgment would require Y to be ontologically superior to X’s present state. But by T1, such a superiority-judgment cannot be well-defined. So the judgment has no content. Hence X’s present state is not penetrated by it.</p>
</blockquote>

<p>But on closer inspection, L1’s proof depends on T1, and T1’s proof depends on an implicit meta-level rule. Its key step is: the proposition “X is ontologically superior to Y” <em>requires some ground</em>, and every possible ground is ruled out by A1 + A2. The requirement “requires some ground” was never stated; it is an implicit meta-rule:</p>

<ul>
  <li><strong>A4:</strong> Any substantive proposition about a thing’s ontological status requires some definable ground in order to be well-defined.</li>
</ul>

<p>This is a narrowly scoped, weakened PSR, restricted to attributions of ontological status.</p>

<p>Accept A4, and L1’s proof is complete.</p>

<h3 id="34-second-commitment-the-identity-of-state-and-reality">3.4 Second Commitment: The Identity of State and Reality</h3>

<p>L1 tells us that no “ought-to-become” ontological norm penetrates the ordinary person’s present state. But it does not tell us that the ordinary person’s present state <strong>is</strong> their reality. A gap remains.</p>

<p>A thing could perfectly well satisfy L1 (no ontological-norm judgment penetrates it) and yet still have some unmanifested “true state” — its present manifestation being only part of its reality, the complete reality including unmanifested layers. This would let “the Buddha” possess unmanifested states that distinguish him from the ordinary person.</p>

<p>For <em>hongaku</em> thought to stand, we need an additional commitment:</p>

<ul>
  <li><strong>Assertion C1 (Self-nature of the thing as such):</strong> the state any existent presently manifests <em>is</em> its actual state.</li>
</ul>

<p>C1 denies the phenomenon/thing-in-itself split, denies the possibility of any “unmanifested truth”, and asserts that there is no gap between appearance and reality.</p>

<p>We try to derive C1 from the axioms.</p>

<p>Does it come from A3? A3 says “any existent is at any moment in some state”; C1 says “the presently manifested state is its actual state”. The two are not equivalent. A3 asserts only the link between existent and state; it does not tell us whether that state is its “actual” state or merely its “manifested” one.</p>

<p>Can it be derived from A1 + A2? A2 says all phenomena lack self-nature, which means there is no reality “in the thing itself” independent of relations. But strictly, A2 rules out only <em>independent</em> self-nature; it does not directly rule out a <em>relational</em>, unmanifested state. C1 is stronger than A2.</p>

<p>C1 cannot be derived from the axioms in hand. It is an independent, strong commitment.</p>

<p>If we accept C1, we obtain the commitment that the ordinary person’s present state <em>is</em> their actual state, with no hidden “true state”.</p>

<h3 id="35-synthesis-buddha-nature-and-the-buddha">3.5 Synthesis: Buddha-Nature and the Buddha</h3>

<p>We now have two commitments from independent sources. L1 gives non-penetration — the ordinary person is not penetrated by ontological-norm judgments (resting on A1 + A2 + A4). C1 gives state–reality identity — the ordinary person’s present state is their actual state (resting on an independent commitment). Together they let us define:</p>

<ul>
  <li>
    <p>D1 — Buddha-nature: <strong>suchness, being-just-as-it-is</strong> — the state a thing presently displays is its actual state (by C1), and is not penetrated by the second-order judgment “it ought to be Y” (by L1).</p>
  </li>
  <li>
    <p>D2 — Buddha: a being that fully realizes its own Buddha-nature.</p>
  </li>
</ul>

<p>From D1 + D2 + C1: the ordinary person’s present state is their Buddha-nature; the ordinary person fully realizes their Buddha-nature; the ordinary person is, as such, the Buddha.</p>

<h3 id="36-the-first-stick-and-shout">3.6 The First “Stick-and-Shout”</h3>

<p>Let us examine the meta-rule A4 more closely.</p>

<p>T1’s proof lists three possible loci for a ground — the relational network, a common third thing, no locus at all — and rules each out via A1 + A2. But in substance, these three exclusions apply equally to <strong>all</strong> substantive propositions at the ontological level, not just to “X is ontologically superior to Y”.</p>

<p>By exactly the same argument, what we have in fact proved is:</p>

<blockquote>
  <p><strong>Theorem*:</strong> Given A1, A2, and A4, <em>all</em> substantive propositions about a thing’s ontological status cannot be well-defined. This includes superiority relations, non-superiority relations, identity relations, difference relations, and any substantively meaningful ontological comparison or attribution.</p>
</blockquote>

<p>Let us turn this finding back on the “ordinary person is, as such, the Buddha” just obtained in §3.5.</p>

<p>“The ordinary person is, as such, the Buddha” is a substantive proposition about ontological status: it asserts that the ordinary person and the Buddha are ontologically identical. By Theorem*, this proposition cannot be well-defined.</p>

<p>L1 says not merely that “the ordinary person’s present state is not penetrated by ontological norms”; what it actually says is that <strong>“the present state is penetrated” and “is not penetrated”, as ontological propositions, both have no content.</strong></p>

<p>And in D2, “Buddha = a being that <em>fully realizes</em> its own Buddha-nature”, the phrase “fully realizes” is likewise an attribution of ontological sufficiency, and so, under the strict enforcement of A4, also cannot be well-defined.</p>

<blockquote>
  <p><strong>Corollary:</strong> Given A1, A2, and A4, the entire language of ontology, <em>as a tool for expressing substantive propositions</em>, is meaningless and yields no content.</p>
</blockquote>

<p>It took us six sections to confirm: under ontological formal logic, a complete reconstruction of <em>hongaku</em> thought that does not violate its own worldview is impossible.</p>

<h3 id="37-retreating-to-madhyamaka">3.7 Retreating to Madhyamaka</h3>

<p>Keeping §3.1, what remains available to us is precisely what the Madhyamaka school could do: by the tetralemma (四句, <em>catuṣkoṭi</em>) and <em>reductio</em>, lead the opponent of a given ontological proposition into the worldview of dependent-origination-and-emptiness, so that he sees, on his own, the negation of his own proposition.</p>

<p>Here, the “tetralemma” refers to:</p>

<blockquote>
  <p>Things do not arise from themselves, nor from another, nor from both, nor without a cause; thus we know there is no [inherent] arising. (諸法不自生、亦不从他生、不共不无因、是故知无生)</p>
</blockquote>

<p>This is a fourfold negation of the modes of <em>arising</em> (from self / from another / from both / without cause). In formal terms, it is isomorphic to the joint negation of the four possibilities $ X,\ \lnot X,\ X \land \lnot X,\ \lnot(X \lor \lnot X)$.</p>

<p>What matters is that Madhyamaka offers no positive conclusion on ontological-relation judgments, thereby avoiding the trap of falling into “everything is [merely] empty”.</p>

<p>On this system, we must halt at “the ordinary person and the Buddha are incomparable”, and can go no further in any sayable way.</p>

<p><em>Hongaku</em> in part incorporates this negative conclusion of Madhyamaka, and in part inherits the <em>tathāgatagarbha</em> assertion that “sentient beings inherently possess Buddha-nature”. But the simple sum of the two can still yield only the generic conclusions “incomparable” and “the ordinary person also has Buddha-nature”.</p>

<h3 id="38-the-second-stick-and-shout">3.8 The Second “Stick-and-Shout”</h3>

<p>So then — historically, by whom, and in what manner, was the core articulation of <em>hongaku</em> thought completed?</p>

<p>It came to stand by several independent routes, a convergence of the threads in §2. But whether by way of Tendai or the <em>Awakening of Faith</em>, the <em>hongaku</em> conclusion was ultimately reached by a hermeneutic technique common to medieval Japan — the invention and rearrangement of texts, wordplay, numerical correspondence, reversal — rather than by logical argument.</p>

<p>Here I display one such hermeneutic performance: Dōgen’s, in 1241. <sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup></p>

<p>Writing the “Buddha-Nature” (佛性, <em>Busshō</em>) fascicle of the <em>Shōbōgenzō</em> at Kōshō-ji in Kyoto, Dōgen faced the famous line from the <em>Mahāparinirvāṇa Sūtra</em>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; 一切        衆生                  悉             有          佛性
&gt; all  (sentient) beings   without exception   possess    Buddha-nature
</code></pre></div></div>

<p>i.e., all living beings possess Buddha-nature.</p>

<p>Relying on the ambiguity of Classical Chinese, which has no punctuation (phrasing is left to the interpreter) and lets a single character carry several grammatical roles at once, together with the elidability of the copula, he reread the line; precisely, he read “悉有” (<em>shitsuu</em>) — originally an adverb-plus-copula component — as a nominal phrase:</p>

<blockquote>
  <p>一切衆生、悉有佛性、如来常住、無有変易。<br />
悉有の言は衆生なり、群有なり。すなはち悉有は仏性なり。悉有の一悉を衆生といふ。 (“The word <em>shitsuu</em> — ‘existence in its entirety’ / ‘whole-being’ — is all beings; it is all-that-is. That is to say, existence in its entirety <em>is</em> Buddha-nature. One instantiation of whole-being is what we call all beings”.)</p>
</blockquote>

<p>The original line can then be parsed as:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; 一切        衆生                      悉有                      佛性
&gt; all  (sentient) beings —— existence in its entirety —— Buddhic being-as-such
</code></pre></div></div>

<p>i.e.: all beings, [are] existence in its entirety, [(therefore) are] Buddha-nature. (A definition and an identity-judgment. The category traditionally restricted to sentient things — living beings — is by definition expanded to all of existence, and that whole of existence just <em>is</em> Buddha-nature.)</p>

<p>The key moves here are:</p>

<ol>
  <li>Expanding the category “sentient beings” to include the insentient, raising “even the insentient possess [Buddha-]nature” from an attribution to an identity.</li>
  <li>Making “all beings” defined by and contained within “whole-being”, with “whole-being” expressing itself through all beings.</li>
  <li>Exploiting the ontological sense (<em>svabhāva</em>) that the character 性 had already taken on in the Chinese Buddhist translation tradition, to push “Buddha-nature” entirely out of the category of <em>attribute</em> and into the category of <em>mode of existence</em> (thus “Buddhic being-as-such”).</li>
  <li>Asserting that Buddha-nature just <em>is</em> the as-it-is mode of existence. Whole-being, as the totality of existence, at its mode of being, is Buddhic being-as-such; and all beings, as expressions of whole-being, likewise are Buddhic being-as-such.</li>
</ol>

<p>The fourth move has already abolished the Buddha’s transcendence, so that the next step — asserting “the ordinary person is, as such, the Buddha” — is a maximal-limit corollary of this reading. Dōgen himself retained the reservation of practice-versus-non-practice; other <em>hongaku</em> currents went further and abolished that distinction.</p>

<p>The power of interpretation is now set loose. So let me, in turn, put forward a new punctuation — juxtaposing the concepts in silence, set side by side, unjudged — for interpretive contemplation:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; 一切。衆生。悉有。佛性。
&gt; Everything. Every sentient being. Existence in its entirety. Buddhic being-as-such.
</code></pre></div></div>

<h2 id="4-same-within-the-difference">4. Same Within the Difference</h2>

<p>This essay has introduced two views of the question “What is God?” — historically unrelated, formally opposed.</p>

<p>Spinoza argued by formal logic that God is the whole of Nature, not some personified being. Yet the rigorous form conceals a metaphysical commitment that does much of the work: in choosing that “substance” which cannot refer to any concrete thing in reality, the argument is already half won. And that substance has a deeper, un-arguable source: PSR as the constitutive principle. Any substance dependent on another would make some fact a brute fact; hence no substance can be dependent on another, and a self-existent substance must exist.</p>

<p><em>Hongaku</em> thought, drawing on the Buddhist worldview and its scriptures, reached a similar insight through interpretive performance and assertion: the mode of being of all existence is possessed by the ordinary person, by grasses and trees, by earth and stone alike — and there is no transcendent ideal state to be reached; the ordinary person, the grasses and trees, the earth and stone, simply by existing, are already in that one true state. What our inquiry has found is that the dependence which lets this system’s surface argument stand, namely A4, is itself PSR in its ontological guise; and this constitutive principle, being itself an ontological-status proposition, likewise cannot be well-defined, and so stands in contradiction with the very worldview it serves.</p>

<p>That <em>Hongaku</em> rests on un-argued assertion and interpretation is not, on this essay’s reading, an essential defect, but a choice forced by the Buddhist worldview’s fundamental refusal of ontological propositions. Either shout the insight aloud, or else stay with negation, or else fall silent. As for Spinoza, the argument it ran through is already contained in that concept of substance, itself reached without argument.</p>

<p>Any account, then, of the ontological identity of the human, of God, of the whole of existence, must introduce one or a set of un-argued commitments (here, PSR and the core cluster of definitions it generates), without which there is nothing to be said at all.</p>

<h2 id="5-a-long-and-distant-stream">5. A Long and Distant Stream</h2>

<p>By way of conclusion, this essay ventures the following: <em>hongaku</em> thought appears to have shaped almost the whole of Japanese cultural life from the medieval period onward, and to have molded Japan’s distinctive aesthetic system — but its influence runs more at the level of meta-conceptual legitimacy, and the <em>way that aesthetic system was produced</em> is homologous with the way <em>hongaku</em> thought itself was produced.</p>

<p>From real landscape to dry landscape, from the exquisite to <em>wabi-sabi</em>, from the gilded-hall <em>tenmoku</em> bowl to the thatched-hut black <em>raku</em> bowl — many of the elements of Japanese aesthetics now famous the world over underwent, from the medieval period on, an upheaval that “turned black and white around”. On the face of it, all this can be read as “the ordinary person is, as such, the Buddha” extended onto objects. So: is <em>hongaku</em> thought the <em>positive</em> warrant for this reversal? I would argue that what it touches reaches, at most, the ontological status of the proposition: that fullness as a state is not ontologically superior to brokenness; and so too for the lush against the withered, the refined against the coarse, the Chinese import (唐物, <em>karamono</em>) against the native ware (和物, <em>wamono</em>). Each state is equally “just as it is”; no state ontologically dominates another. But “is fullness beautiful”, “where is the beauty in native ware” — these are aesthetic questions, not ontological ones. So what <em>hongaku</em> actually does is <em>remove the ontological illegitimacy</em> that had been attached to brokenness. The Chinese import was prized and gazed upon because it “by nature” belonged to a superior culture; this order bound aesthetic preference and ontological fact together, so that the preference looked as if it rested on an unquestionable hierarchy. But demolition is the work of a single sentence; construction is not. Cancelling the hierarchy only clears a patch of ground — no one can say, out of nothing, <em>why</em> brokenness is beautiful.</p>

<p>What is the common thread? Several of the major transformations across the various domains of medieval-and-later Japan walked the same road: first sever the old order in one stroke, force the gaze onto the very thing that was deemed unworthy of being looked at — the plain, the silent, the broken — and then, slowly, grow new content in the cleared space. It is like Zen’s “stick-and-shout” (棒喝): in an instant it severs the disciple’s discursive mind, forcing out the “presence” (在場) of that moment. And the new beauty grows slowly out of the attention that this “presence” permits. It comes from beholding, contemplating, gazing, interpreting — and it requires the accumulated practice of several generations.</p>

<p>This is of a piece with what Sen no Rikyū did as the practitioner of this very method in the way of tea. Before him, the tea gathering was defined by lavish abundance and ostentatious display, by which the host paraded his wealth and rank. The two generations of Murata Jukō and Takeno Jōō had already put most of the spirit of <em>wabi</em>-tea into practice, yet were still negotiating within the old frame; the decisive reversal was the one Rikyū brought down. He reversed every step of the ritual: a small, dim tea room; a bamboo flower vase; a single flower; coming, finally, to rest on a purely black tea bowl that <em>must</em> be gazed at. Every aesthetic expectation of the guest was interrupted, high-handedly and without argument. These utterly unremarkable things were, for the first time, beheld in earnest.</p>

<p>That this method was invoked again and again in medieval Japan had its circumstances. An island country struck repeatedly by disaster; a medieval era of war and upheaval; a culture long overshadowed by an overwhelmingly vast mother-culture on the continent; and, theologically, the Final Dharma age entered in 1052. Japan needed a road out of the inherited order: one that could both settle that millennia-deep sense of “impermanence” (無常, <em>mujō</em>) and clear, outside continental culture, a place of its own to stand on. Reversal offered exactly that road: it need not first prove the new order superior — it need only first declare that the old order’s hierarchy was empty all along. And, conveniently, the notions being reversed — abundance, refinement, the Chinese import — were almost all things at odds with “impermanence” and imported from the continent; so this method, distinctively, opened up the vast aesthetic space latent in the plain, the silent, the broken — a system still alive after more than five hundred years.</p>

<p>This un-arguable “stick-and-shout”, then, can be seen as a structural method of Japanese cultural transformation from the medieval period onward. It comes down again and again, only wearing a different face each time: in the garden, sand and stone in place of real water; in the tea room, a black bowl in place of a golden one; in thought, the line “the ordinary person is, as such, the Buddha” — held up not by argument but by assertion and interpretation. The method is filed under the Zen tradition, but its origins must be quite tangled. The Buddha’s “noble silence” before questions he would not answer (c. 6th century BCE), Zhuangzi’s stance of drawing out doctrine through stories beyond ordinary sense (c. 3rd century BCE), the Japanese native experience of coping with “impermanence” across its history — each contains something answering to the “stick-and-shout”.</p>

<p>The un-arguability of <em>hongaku</em> thought, which this essay has spent so many pages examining, is precisely one appearance of that method at the level of thought.</p>
<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:1" role="doc-endnote">
      <p>Though Dōgen himself held reservations about the strict <em>hongaku</em> conclusion. He continued to insist on the necessity of practice — person and Buddha are not strictly identical. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name>Yichen Han</name><email>yichen.han@campus.lmu.de</email></author><category term="Philosophy" /><category term="Spinoza" /><category term="Buddhism" /><category term="Aesthetics" /><summary type="html"><![CDATA[Translator’s note. This is an English translation of an essay originally written by the author in Chinese. The original is published here as well: 中文原文 / Chinese original.]]></summary></entry><entry><title type="html">重构、退守与棒喝：在斯宾诺莎与本觉之间</title><link href="https://yhan228.github.io/posts/2026/05/monism-zh/" rel="alternate" type="text/html" title="重构、退守与棒喝：在斯宾诺莎与本觉之间" /><published>2026-05-30T00:00:00+00:00</published><updated>2026-05-30T00:00:00+00:00</updated><id>https://yhan228.github.io/posts/2026/05/monism-zh</id><content type="html" xml:base="https://yhan228.github.io/posts/2026/05/monism-zh/"><![CDATA[<blockquote>
  <p><strong>说明：</strong> 本文为中文原文。英文翻译版见 <a href="/posts/2026/05/monism/">English translation</a>。</p>
</blockquote>

<p>“神是什么”是哲学史中反复出现的问题。它的某些回答不是对一个超越者的描述，而是对全部存在的同一性论断——全部存在就是它自身，没有更高的实体俯视它。本文比较两个历史上完全独立、形式上几乎相反的传统对这一论断的处理：17 世纪斯宾诺莎在《伦理学》中以欧几里得几何形式推出“神即自然”，和中世日本通过数百年诠释学累积形成的本觉思想“凡夫即佛”。两者从完全不同的起点出发，达到结构相似的结论。但更值得注意的，或许是两者达到这一结论的方式。本文试图定位这种类型的同一性论断在严格形式下的位置。</p>

<h2 id="1-神即自然deus-sive-natura">1. 神即自然（<em>Deus sive Natura</em>）</h2>

<p>1677年，斯宾诺莎死后出版的《伦理学》（Ethica Ordine Geometrico Demonstrata）以欧几里得《几何原本》的方法组织起定义、公理、推论等线索，以严谨的形式推断出“神是唯一实体；神即自然；一切个体都是这一实体的分殊”这一在当时标新立异的观点，应对笛卡尔提出的思维与广延的二分，给 17 世纪欧洲一种“走出人格神与无神论之间二选一”困境的第三条路，即没有人格、包含一切的自然神。我们省去对理解核心不直接相关的部分，他的论证思路大致如下：</p>

<p><strong>隐含的构成性原则：</strong> 充足理由律 (principium rationis sufficientis， PSR)。任何区分都需要有充足的根据，排除一切无理由的“裸事实”（brute fact）。</p>

<p><strong>定义：</strong></p>

<ul>
  <li>D3 实体 (substantia)：在自身中存在并通过自身被设想的东西；其概念不依赖于其他事物的概念。</li>
  <li>D4 属性 (attributum)：智性所感知的、构成实体本质的东西 (<em>id quod intellectus de substantia percipit， tanquam ejusdem essentiam constituens</em>)。</li>
  <li>D5 分殊 (modus)：实体的状态；或在他者中存在并通过他者被设想的东西。</li>
  <li>D6 神 (Deus)：绝对无限的存在，由无限多属性构成的实体。</li>
</ul>

<p><strong>公理：</strong></p>

<ul>
  <li>A1：一切存在的东西，要么在自身中，要么在他者中。</li>
  <li>A4：对结果的认识依赖于对原因的认识，并包含对原因的认识。</li>
</ul>

<p><strong>核心命题链：</strong></p>

<ul>
  <li><strong>P5</strong>：不可能有两个实体共享同一属性。</li>
</ul>

<blockquote>
  <p>证明：假设有两实体 A 与 B，两者必须有可区分的根据。区分的根据要么是属性差异，要么是分殊差异。若是属性差异，则 A 与 B 已经在属性层面相异——这意味着它们不“具有相同属性”，P5 成立。若是分殊差异——但分殊是实体的状态(D5)，由实体决定而非构成实体本质，不能作为实体之间的区分根据。所以唯一可行的区分是属性差异，这排除“共享同一属性”。</p>
</blockquote>

<ul>
  <li><strong>P14</strong>：除神外不可能有任何实体。</li>
</ul>

<blockquote>
  <p>根据D6，神是绝对无限的，蕴含所有可能属性。如果有另一实体，它必须有某些属性。但任何属性都已经在神的无限属性中。所以另一实体必须共享神的某些属性，这违反P5。所以除神外无实体。</p>
</blockquote>

<ul>
  <li><strong>P15</strong>：一切存在的东西都在神之中。</li>
</ul>

<blockquote>
  <p>基于P14和A1。</p>
</blockquote>

<ul>
  <li><strong>P29附释</strong>：能产的自然（Natura naturans）与所产的自然（Natura naturata）是同一实体的两面。前者是神作为主动产生者，后者是神作为被产生的分殊的总和。</li>
</ul>

<p>结论：唯一的实体即是神，神即是自然（<em>Deus sive Natura</em>）；一切个体都是这一实体的分殊。</p>

<p>然而，回看这套体系的定义，不难发现，作为常用来泛指所有在现实中存在的个体的“实体”在斯宾诺莎的定义下无法指代任何具体事物。任何一个人类日常认知的事物，即便是一块石头、一潭水，都依赖额外的描述性的概念才能被定义。一个斯宾诺莎的实体是具有<strong>自身完备性</strong>的，而这种性质只可能被某种包含一切的东西所拥有。再结合他理论框架下神作为一个绝对无限、包含一切属性的存在的定义，神等同于这个包含一切的绝对实体几乎是必然的结论。</p>

<p>这一发现意味着，斯宾诺莎的同一性结论其实被他特立独行的实体定义不甚费力地引出，完成这一定义是他“神即自然”论述中最重要的洞见，而这一定义的完成是仅凭逻辑推理无法解决的问题，形而上学信念的引入是必要的。而在接受了这套构成的定义后，结论在形式上是完备的。</p>

<p>有趣的是，早于斯宾诺莎近1000年，佛教流派中的一支就在中国提出了类似的、基于洞见的观点，并在随后几个世纪中逐渐在日本发展为“本觉思想”。</p>

<h2 id="2-凡夫即佛">2. 凡夫即佛</h2>

<p>本觉思想是一个长达数百年、跨越中日两个文明的诠释学累积过程，主要通过天台山门内部的<strong>口传 (口伝)</strong> 与<strong>切纸 (切紙)</strong> 秘密传承，然后逐渐被整理成托名于古代权威的书面文献。</p>

<p>公元6世纪在中国出现、托名印度的《大乗起信論》是“本觉”作为术语的肇始。其中提到：</p>

<blockquote>
  <p>所言覺義者，謂心體離念。離念相者，等虛空界，無所不遍，法界一相，即是如來平等法身。依此法身，說名本覺。何以故？本覺義者，對始覺義說，以始覺者，即同本覺。</p>
</blockquote>

<p>即：“觉义就是认识到心的本体本来脱离思虑分别。而这种心的本体实际上像虚空一样无所不在。整个法界归于一相，这一相就是如来的平等法身，即‘本觉’。修行所得的‘始觉’等同于本来就有的‘本觉’。”</p>

<p>这一初始洞见实际上已经包含本觉思想的大部分内容，但是还停留在本体与思虑的区分及修行上。</p>

<p>智顗（538–597）在《摩訶止觀》中确立“一念三千”：一念心中具足三千世界。7-9世纪，天台宗与华严宗继续发展这一本体论方向，提出“事事無礙”（万事万物虽然千差万别，但在本质上圆融无碍、互不相妨）、“一即一切，一切即一”、“無情有性”（无情物，即草木瓦石、山河大地，亦有佛性）。这些构成了本觉思想的核心观点，但是在这一阶段，它们仍只是教义，实际修行还要按戒律、止观、阶位渐进。</p>

<p>在中国，这一本体论流派在儒释道的激烈竞争中并没有太多后续发展。而传到日本后，它被进一步诠释和彻底化了。9世纪，平安时期天台宗僧人安然《斟定草木成仏私記》框定出“草木国土悉皆成佛”这一标志性语句。对它的诠释当中，产生了三个重要结论：</p>

<blockquote>
  <p><strong>依正不二</strong>：“依”（环境）与“正”（主体）本来就不是两个东西。</p>

  <p><strong>当体の自性</strong>：这个东西的本质就是它正在显现的这个样子，不是藏在它背后的“真正本质”。</p>

  <p><strong>中道を具す</strong>：在「一念三千」之中草木亦不缺，故草木亦成佛。</p>
</blockquote>

<p>日本中世（11–14世纪），面对“末法时代”的到来（始于1052年），恰逢平安-镰仓时代交替，庄园制、武士阶级兴起，旧贵族衰弱、朝廷式微，叠加自然灾害，日本对“末日来临”的绝望催生了对更新一种“救赎”的需求。本觉思想在这一时期被最终整理为几个口传真理：</p>

<blockquote>
  <p><strong>生死即涅槃，煩惱即菩提，凡夫即仏，草木悉皆成仏</strong></p>
</blockquote>

<p>值得注意的是，“依正不二”并非“依正一同”；而“凡夫即佛”等表述中的“即”可被诠释为严格的同一，我们也在此取此种解释。</p>

<p>对于末法时代，本觉思想的回答是：救赎从未在别处，就在此时此刻的现象本身；并没有一个需要到达的彼岸。后世日本佛教诸多流派都深受这一思想影响，又随之浸染禅宗、能乐、和歌、连歌、俳谐、茶道各界。</p>

<h2 id="3-重构本觉">3. 重构本觉</h2>

<p>注意到，原始本觉思想是通过<strong>诠释学累积</strong>而非演绎论证建立的。跨越几个世纪，大量知名或不知名的僧侣思想家为本觉思想最终的形成做贡献，不断对前人留下的语句进行诠释辩经，最终托名于权威，留下细节难考、分散遍布的文献。</p>

<p>沿用斯宾诺莎的形式，我们尝试对本觉思想的主要命题基于定义与公理的推演。同时，基于形而上学信念的此类推演本身也是诠释的一种表现形式，从中可能产生一些不同于原义、但也不过分偏离的东西，这也正是经文的模糊性所允许的。</p>

<h3 id="31-公理与定义">3.1 公理与定义</h3>

<p>我们从三条声明开始。</p>

<ul>
  <li>A1（緣起）：任何存在的性质完全由它与其他事物的关系决定； 不存在一种非缘起的存在。</li>
  <li>A2（性空）：由 A1 推出：一切事物缺乏自性。</li>
  <li>A3（现成性）：任何存在在任何时刻处于某个状态。</li>
</ul>

<p>这其中，A1、A2基于形而上学的佛教世界观信念。A3 看上去是平凡的，我们暂且接受它作为不需要论证的前提；后面会回到这一假设。</p>

<h3 id="32-消解佛">3.2 消解“佛”</h3>

<p>我们需要重新理解 <strong>“佛”</strong>。直观上，任何超然性的佛，正如佛教历史发展所赋予祂的那样，似乎都会与“凡夫即佛”这一核心命题相矛盾：如果佛具有任何凡夫不具有的本体属性，则凡夫至少在那一属性上不是佛。</p>

<p>我们尝试从公理出发推出这一约束。</p>

<ul>
  <li>Theorem 1(本体无优越性)：对任何缘起的存在 X 与 Y，关于“X 在本体上优越于 Y”的实质命题不能良定义。</li>
</ul>

<blockquote>
  <p>证明：假设“X 在本体上优越于 Y”是良定义的实质命题，则它陈述一个本体事实，该事实需要某个根据。由 A1+A2，X 与 Y 缺乏可作为根据所在位置的独立自性。所以根据不能在 X 或 Y 自身中，只能在三种位置之一：X 与 Y 的关系网络中、两者共有的某个第三者中、或不诉诸任何具体位置。若在关系网络中，优越性沦为约定俗成的标签，不是本体事实；若在第三者中，该第三者同样是缘起的，由 A2 缺乏自性，不能承担“作为本体根据”的功能；若不诉诸任何位置，优越性没有任何实质内容。三种可能穷尽，皆排除。所以该命题不能良定义。</p>
</blockquote>

<ul>
  <li>Theorem 2(消解的佛)：在 A1+A2 成立的前提下，任何与 A1 一致的“佛”的定义都必须是消解性的——它不能要求任何本体上优越的状态。</li>
</ul>

<blockquote>
  <p>证明：假设有人主张某定义 D*：佛 = 处于某种本体上优越的 X 状态的存在。考察 X 状态的本体地位：
若 X 是缘起的，则由 T1，X 与任何其他缘起状态 Y 之间的本体优越关系不能良定义；但 D* 要求 X 在本体上优越于至少某些其他状态(否则它不是“优越”的)，矛盾。
若 X 是非缘起的，则违反 A1。
由 A1，这两种情况穷尽所有可能，都被排除，因此 D* 不一致。</p>
</blockquote>

<p>T2 的产出是否定性的——它告诉我们“佛”不能是什么，不告诉我们“佛”是什么。它甚至允许一种更激进的回应：<strong>承认 T2 后，直接放弃“佛”这一范畴，因为它在我们的世界观下没有内容</strong>。</p>

<p>但我们先尝试让“佛”保留为一个有意义的范畴。所以我们需要在 T2 之上做更多工作——给“佛”一个肯定性的、与 A1 兼容的内容。</p>

<p>这要求两个承诺，我们把它们分开处理。</p>

<h3 id="33-第一个承诺本体优劣判断不可应用">3.3 第一个承诺：本体优劣判断不可应用</h3>

<p>T1 已经告诉我们本体优劣比较不能良定义。把这一结论推到对凡夫状态的判断：</p>

<ul>
  <li><strong>L1 (非穿过性)：任何存在的当下状态不被“它应该成为某种本体上更优的状态”的判断所穿过。</strong></li>
</ul>

<blockquote>
  <p>证明：假设存在某存在 X 的当下状态被“它应该成为 Y”的判断所穿过。该判断需要 Y 在本体上优越于 X 的当下状态。但由 T1，这种优越判断不能良定义。所以该判断无内容。所以 X 的当下状态不被它所穿过。</p>
</blockquote>

<p>但仔细看，L1 的证明依赖 T1， 而T1的证明依赖一个隐含的元层规则。它的关键步骤是：“X 在本体上优越于 Y”的命题需要某个根据，而所有可能的根据都被 A1+A2 排除。“需要某个根据”这一要求之前没有被声明，它是一条隐含的元层规则：</p>

<ul>
  <li><strong>A4：任何关于事物本体地位的实质命题需要某种可被定义的根据才能被良定义。</strong></li>
</ul>

<p>这是一条仅适用于本体地位归属的、范围狭窄的弱化的PSR。</p>

<p>接受 A4，那么L1 的证明完备。</p>

<h3 id="34-第二个承诺状态与实在的等同">3.4 第二个承诺：状态与实在的等同</h3>

<p>L1 告诉我们没有“应该成为”的本体规范穿过凡夫的当下状态。但这不告诉我们凡夫的当下状态<strong>就是</strong>它的实在。两者之间仍有一个间隙。</p>

<p>一个东西完全可以满足 L1(没有本体规范判断穿过它)但仍然有某种未被显现的“真实状态”——它的当下显现只是它的部分实在，完整实在包括了未被显现的层。这使得“佛”可能拥有未被显现的状态，使其区别于凡夫。</p>

<p>要让本觉思想成立，我们需要一个额外的承诺：</p>

<ul>
  <li><strong>论断 C1（当体自性）：任何存在当下显现的状态就是它的实际状态。</strong></li>
</ul>

<p>C1 否认现象/物自身的二分，否认任何“未被显现的真实”的可能性，断言显现与实在之间没有间隙。</p>

<p>我们试图从公理推出 C1。</p>

<p>它是从 A3 来的吗？A3 说“任何存在在任何时刻处于某个状态”，C1 说“当下显现的状态就是它的实际状态”。两个声明并不等价。A3 只断言存在与状态的关联，不告诉我们这个状态是它的“实际”状态还是仅仅“显现”状态。</p>

<p>那它能从 A1+A2 推出吗？A2 说一切现象缺乏自性，这意味着不存在“事物自身中”作为独立于关系的真实。但严格说，A2 只排除独立的自性，不直接排除关系性的、未显现的状态。C1 比 A2 强。</p>

<p>C1 不能从我们手头的公理推出。它是一个独立的强承诺。</p>

<p>如果我们接受 C1，我们获得这一承诺——凡夫的当下状态就是它的实际状态，没有隐藏的“真正状态”。</p>

<h3 id="35-合成佛性与佛">3.5 合成：佛性与佛</h3>

<p>现在我们有两个独立来源的承诺。L1 给出非穿过性——凡夫不被本体规范判断所穿过(基于 A1+A2+A4)。C1 给出状态-实在等同——凡夫的当下状态就是它的实际状态(基于独立承诺)。两者合起来，允许我们定义：</p>

<ul>
  <li>
    <p>D1 佛性：<strong>如其所是</strong>——事物当下显示的状态就是它的实际状态(由 C1)，不被“它应该是 Y”这种二阶判断所穿过(由 L1)。</p>
  </li>
  <li>
    <p>D2 佛：能完整实现自身佛性的存在。</p>
  </li>
</ul>

<p>由 D1 + D2 + C1，凡夫的当下状态就是它的佛性；凡夫完整实现它的佛性；凡夫即佛。</p>

<h3 id="36-第一次棒喝">3.6 第一次“棒喝”</h3>

<p>让我们更仔细地审视 A4 这条元规则。</p>

<p>T1 的证明列出三种可能的根据位置——关系网络、共有第三者、不诉诸位置——并通过 A1+A2 排除每一种。但实质上，这三种排除<strong>对所有本体层面的实质命题</strong>都一样有效，不只是对“X 在本体上优越于 Y”。</p>

<p>采用完全相同的论证，我们实际论证的是：</p>

<blockquote>
  <p>Theorem*：在A1、A2、A4的前提下，所有关于事物本体地位的实质命题都不能良定义，包括优越关系、不优越关系、同一关系、差异关系、任何有实质意义的本体比较或归属。</p>
</blockquote>

<p>让我们用这一发现回看 3.5 节刚刚获得的“凡夫即佛”。</p>

<p>“凡夫即佛”是一个关于事物本体地位的实质命题——它断言凡夫与佛在本体上是同一的。由 Theorem*，这一命题不能良定义。</p>

<p>L1 不只是说“凡夫的当下状态不被本体规范穿过”，它说的实际上是 <strong>“凡夫的当下状态被穿过”与“不被穿过”作为本体命题都没有内容</strong>。</p>

<p>D2 中“佛 = 能完整实现自身佛性的存在”中的“完整实现”也是一个本体充分性的归属，同样在 A4 的严格执行下不能良定义。</p>

<blockquote>
  <p>Corollary：在A1、A2、A4的前提下，本体论语言体系作为表达实质命题的工具没有意义也不产出内容。</p>
</blockquote>

<p>我们用了6个章节，最终证实：本体论形式逻辑下，完整重构出本觉思想而不违反其世界观是不可能的。</p>

<h3 id="37-退回中观">3.7 退回中观</h3>

<p>在保留§3.1的前提下，我们所能做的恰巧是中观学派（Madhyamakā）所能做的：通过四句法和归谬法，让针对某个本体命题的辩论对手进入缘起性空的世界观，自己看到自己命题的否定。</p>

<p>其中，“四句”指：</p>

<blockquote>
  <p>诸法不自生，亦不从他生，不共不无因，是故知无生。</p>
</blockquote>

<p>这是对缘起性空的准确化。在形式逻辑上，它与对 $X， \lnot X， X \land  \lnot X， \lnot(X \lor  \lnot X)$ 四种可能性的共同的否定同构。</p>

<p>重要的是，中观在本体关系判断上不给出肯定性的结论，从而避免也陷入一切皆空的陷阱。</p>

<p>基于这个体系，我们必须停留在“凡夫与佛不可比较”，不能再以可言说的方式前进。</p>

<p>本觉一部分结合了中观的这一否定性结论，一部分继承了如来藏对于“众生本具佛性”的陈述。但是二者的简单相加，还是只能带来“无法比较”、“凡夫也有佛性”的一般性结论。</p>

<h3 id="38-第二次棒喝">3.8 第二次“棒喝”</h3>

<p>那么，历史上，本觉思想的核心论述是由谁、以何种方式完成的？</p>

<p>它的成立有多条独立路径，是§2中多条线索的汇总。但不论是天台宗还是《大乘起信论》，本觉思想结论的得出最终都依赖一个日本中世常用的诠释技术：文本的发明与重组、文字游戏、数字对应、反转，而不是逻辑论证。</p>

<p>我们在这里展示道元禅师1241年的一场诠释学表演 <sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup>。</p>

<p>道元在京都兴圣寺写作《正法眼藏·佛性》卷时，面对《大般涅槃经》的著名一句：</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; 一切        衆生                  悉             有          佛性
&gt; all  (sentient) beings   without exception   possess    Buddha-nature
</code></pre></div></div>
<p>即：所有生灵都拥有佛性。</p>

<p>依赖古汉语既无标点（句读依赖诠释者）又允许字符同时承担多重语法角色的模糊性，以及系动词可被省略的语法特性，他对这句话进行了重新解读，准确地说是对“悉有”这一原本是副词-系动词的组分读作名词性短语：</p>

<blockquote>
  <p>一切衆生、悉有佛性、如来常住、無有変易。 <br />
悉有の言は衆生なり、群有なり。すなはち悉有は仏性なり。悉有の一悉を衆生といふ。（“悉有”这个词，就是众生，就是全部存在。也就是说，悉有就是佛性。悉有的一悉叫做众生。）</p>
</blockquote>

<p>这样的话，原句可以分解为：</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; 一切        衆生                      悉有                      佛性
&gt; all  (sentient) beings —— existence in its entirety —— Buddhic being-as-such
</code></pre></div></div>
<p>即：一切众生，（即）全部存在，（因此是/就是）佛性。（一个定义和一个同一性判断。传统的专指有情之物（即生物）的范畴被定义扩展为全部存在，而这一全部存在就是佛性。）</p>

<p>这其中的重点工作是：</p>

<ol>
  <li>
    <p>将’众生’范畴扩展到包括无情之物，把’無情有性’从属性归属提升为等同。</p>
  </li>
  <li>使得“众生”被“悉有”定义和包含，“悉有”由“众生”表现出来。</li>
  <li>利用’性’字在佛教汉译传统中已经承担的本体义(svabhāva)，把’佛性’从属性范畴完全推到存在样式范畴。</li>
  <li>论断佛性就是存在的如其所是样式。悉有作为全部存在，它的存在样式就是佛性。众生作为悉有的表现形式，它的存在样式也就是佛性。</li>
</ol>

<p>第四步已然取消了佛的超越性，因而下一步论断“凡夫即佛”是这一解读的一个极致化的推论。道元本人对此仍有修行与非修行的保留，而其他本觉流派进一步取消了这一区分。</p>

<p>诠释的权力此时被解放了。那么，笔者在此抛出一个新的句读，让概念在沉默中显现、并列、不被判断，供诠释性的深思。</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt; 一切。衆生。悉有。佛性。
&gt; Everything. Every sentient being. Existence in its entirety. Buddhic being-as-such.
</code></pre></div></div>

<h2 id="4-异中有同">4 异中有同</h2>

<p>本文介绍了对于“神是什么”这一问题两个历史发展上毫不相干、形式上相反对的观点。</p>

<p>斯宾诺莎用形式逻辑论证了神即是全部的自然，而不是什么人格化的存在。然而，严谨的形式隐藏了一个占据重要地位的形而上学信念：选定那个不能指代现实中任何具体事物的“实体”，论证已经成功了一半。这个实体有着更深的、不可论证的来源：PSR作为构成性原则。任何依存于他物的实体会让某个事实成为裸事实，故任何依存于他物的实体不能存在，自存的实体必须存在。</p>

<p>本觉思想借助佛教世界观、经书，通过诠释性表演和论断得出了类似的洞见：全部存在的存在样式，亦被凡夫、草木、土石所拥有，而不存在一个需要到达的、超越的理想状态；凡夫、草木、土石仅通过存在，就已经处在那个唯一的真实状态。我们通过探究发现，使得这一体系表面论证得以成立的依赖，即A4，也是PSR在本体论方面的表现，而这一构成性原则，本身作为一条本体地位命题，自身亦不能良定义，与基本世界观相违背。</p>

<p>后者基于不经论证的论断和诠释，从本文看，并不是一种本质的缺陷，而是佛教世界观对于本体论命题的根本拒绝下的一种选择。要么大声呼喝出那个洞见，要么只能否决，要么只能缄默。而前者经过的论证，其实已经蕴藏在那个不经论证而达到的实体的概念当中。</p>

<p>关于本体论上人、神、全部存在的同一性的论述，由此看，必要引入一个或一组不经论证的信念（在此，是PSR及由其所生的核心定义群），否则将无从谈起。</p>

<h2 id="5-源远流长">5 源远流长</h2>

<p>作为结尾，本文尝试提出：本觉思想看似影响了日本中世以降的几乎全部文化生活、塑造了日本独特的审美体系，但这种影响更多是在元概念的合法性上，而这种审美体系的产生方式和本觉思想本身的产生是同源的。</p>

<p>从真山水到枯山水、精美到侘寂、金箔殿天目碗到茅草庵黑楽碗——如今闻名于世的日式美学的许多元素都在中世以后经历了翻天覆地、“颠倒黑白”的变革。看起来，这都可以被诠释作“凡夫即佛”在器物上的延申。那么，本觉思想是这场反转的正面依据吗？笔者认为，它所触及的，至多是命题的本体地位：圆满作为一种状态不比残缺在本体上更优越，茂盛对比枯淡、精致对比粗糙、唐物对比和物亦然。每个状态都同样“如其所是”，没有哪个状态在本体上压倒另一个。而“圆满好不好看”、“和物哪里美”是审美问题，不是本体问题。所以本觉真正做的，是解除原本附着在残缺身上的本体非法性。唐物之所以被崇尚、被凝视，是因为它“本来”就属于上位文化。这套秩序把审美偏好和本体事实捆在一起，使得偏好看上去坐落在一个不容置疑的高下之上。然而，拆除是一句话的事，填充却不是。取消高下只腾出一片空地，谁也不能凭空说出残缺为何美。</p>

<p>什么是共同的？中世以降日本各领域的几次重大变革，走的是同一条路：先一刀截断旧秩序，把目光强按在那个原本不配被看的、素朴的、寂静的、残破的东西上，再在腾空处缓慢生出新内容——一如禅宗的“棒喝”，在瞬间截断学人的心识，从而逼出那一刻的“在场”。而新的美正是从这“在场”所允许的注意力里缓慢生出的。它来自端详、观照、凝视、诠释，需要数代人实践的积累。</p>

<p>这和千利休作为茶道中这一方法论实践者所做的事是一致的。在他之前的茶事被丰满奢华和珠光宝气所定义，因为它们通过展示财力炫耀主人的地位。村田珠光、武野绍鸥两代已在实践侘茶的大部分精神，但仍在旧框架里斡旋；真正那一记反转，是利休落下的：他将茶道仪式的每一步反转：狭小昏暗的茶事、竹制的花瓶、一枝花，最终在一只纯粹漆黑的、必须被凝视的茶碗上停驻。客人的每一个审美预期都被以霸道且不需论证的方式所打断。这些毫不起眼的东西第一次被客人认真端详。</p>

<p>这套方法论之所以在日本中世被反复启用，有它的处境。岛国灾害频仍，中世战乱动荡，文化上长久笼罩在过于庞大的大陆母文化之下，神学上自1052年已入末法。日本需要一条从既有秩序脱身的路：既要安顿那份千年累积的“无常”之感，也要在大陆文化之外为自己划出一块立足之地。反转恰好提供了这条路：它无须先证明新秩序更优，只须先断定旧秩序的高下本是空的。而恰好，被反转的那些观念——丰盛、精致、唐物——又几乎都是与“无常”相违、舶来自大陆的，于是这套方法独特地发掘了那些素朴的、寂静的、残破的东西所蕴含的巨大的美学空间，而这一体系绵延发展至今500余年仍有生命力。</p>

<p>这种无法被论证的“棒喝”，便可以被看作日本中世以降文化变革的一种结构性方法。它一再落下，只是每次换一副面孔：在庭园里是砂石替了真水，在茶席上是黑碗替了金盏，在思想里，就是本觉那句不由论证、只由断言与诠释撑起的“凡夫即佛”。这个方法论被归纳到禅宗的传统当中，但是其源起应当是相当复杂的。佛陀面对无法回答的问题的“高贵的沉默”、道家庄子以常理外的故事引伸理论的态度、日本本土文化历史上对“无常”长期应对的经验，“棒喝”式都能在自身中找到类似的对应物。</p>

<p>本文用大量篇幅所考察的本觉思想之不可被论证性，正是这它在思想层面的一次现身。</p>
<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:1" role="doc-endnote">
      <p>即便道元本人对于严格本觉结论的理解有保留。他仍然坚持修行的必要性，人与佛不严格同一。 <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name>Yichen Han</name><email>yichen.han@campus.lmu.de</email></author><category term="Philosophy" /><category term="Spinoza" /><category term="Buddhism" /><category term="Aesthetics" /><summary type="html"><![CDATA[说明： 本文为中文原文。英文翻译版见 English translation。]]></summary></entry><entry><title type="html">What Amphibian Data Reveal — and What Data Deficiency Conceals</title><link href="https://yhan228.github.io/posts/2026/03/amphibian-data-deficiency/" rel="alternate" type="text/html" title="What Amphibian Data Reveal — and What Data Deficiency Conceals" /><published>2026-03-09T00:00:00+00:00</published><updated>2026-03-09T00:00:00+00:00</updated><id>https://yhan228.github.io/posts/2026/03/amphibian-data-deficiency</id><content type="html" xml:base="https://yhan228.github.io/posts/2026/03/amphibian-data-deficiency/"><![CDATA[<blockquote>
  <p><em>This essay was originally published in <strong>AmphiBios</strong>: Han, Y. (2026). What amphibian data reveal — and what data deficiency conceals. <strong>AmphiBios</strong>, 1. <a href="https://amphibios.app/articles/amphibian-data-deficiency">amphibios.app/articles/amphibian-data-deficiency</a>.</em></p>
</blockquote>

<p>Amphibians are the most threatened vertebrate class on Earth. The second Global Amphibian Assessment found that 40.7% of assessed species are Critically Endangered, Endangered, or Vulnerable, a figure that has worsened since the first assessment two decades ago <em>(1)</em>. But this headline conceals a structural gap in the evidence base: 909 of 8,011 assessed species, roughly one in nine, are classified as Data Deficient (DD) by the IUCN <em>(1, 2)</em>. There is not enough information to evaluate whether they face extinction. These species are present on the Red List but excluded from the Red List Index (RLI), the primary global barometer used to track progress toward international biodiversity targets. They are, in effect, invisible to the metrics that drive policy.</p>

<p>This invisibility is not random. Howard and Bickford <em>(3)</em> noted over a decade ago that DD amphibians are disproportionately tropical and range-restricted, sharing the ecological profile of species already known to be threatened. The broader DD literature has addressed prediction and reassessment-prioritization using machine learning and trait-based approaches <em>(4, 5)</em>, but the framework applied here is different.</p>

<p>What enables a different approach is the quality of the global amphibian metadata. The GAA2 <em>(1)</em> is one of the most comprehensive species-level threat assessments conducted for any vertebrate class: 8,011 species individually evaluated, with standardized threat and habitat classifications, range polygons, and documented status changes across assessment rounds spanning four decades. GBIF <em>(6)</em>, AmphibiaWeb <em>(7)</em>, and AmphiBIO <em>(8)</em> provide complementary ecological, life-history, and taxonomic coverage at a scale few other taxa can match. Yet standard quantitative methods for handling incomplete data, including missing-data theory, propensity-score matching, and multiple imputation, while routine in biomedical research, have not been applied to this system. This analysis attempts to close that gap.</p>

<h2 id="the-species-we-know-least-are-likely-the-ones-in-most-trouble">The species we know least are likely the ones in most trouble</h2>

<p>To build an integrated picture, five global datasets were linked into a single, publicly archived species-level table (Figure 1): the GAA2 (8,011 species) as the taxonomic backbone <em>(1)</em>, 9.8 million occurrence records from GBIF <em>(6)</em>, taxonomic synonymies from AmphibiaWeb <em>(7)</em>, life-history traits from AmphiBIO <em>(8)</em>, and the European Red List (ERL) <em>(9)</em>. Cross-referencing against AmphibiaWeb identified over 1,100 additional species not yet included in the global assessment, recently described, 75% from tropical countries, and essentially absent from conservation accounting.</p>

<figure style="text-align: center;">
  <img src="/images/amphibian-data/figure1.png" alt="Dataset coverage and assessment breakdown" style="max-width: 100%; width: 700px;" />
  <figcaption><em><strong>Figure 1.</strong> Dataset coverage and assessment breakdown against the GAA2 backbone (8,011 species). Grey tiers show the backbone and its key subsets: 2,873 species (35.9%) are threatened (CR + EN + VU) and 909 (11.3%) are Data Deficient. Coloured bars show external dataset coverage: GBIF contributes occurrence records for 86.2% of species, AmphibiaWeb taxonomic cross-references for 97.9%, AmphiBIO traits for 71.2%, and the European Red List covers 93 European species.</em></figcaption>
</figure>

<p>Four predictive models trained on this integrated dataset show strong discrimination between DD and assessed species (area under the receiver operating characteristic curve, AUC = 0.86–0.89). The strongest predictors of DD status (few occurrence records, restricted geographic range, few habitat types) are the same traits that predict threatened status among assessed species (AUC = 0.89). Even when occurrence record count is removed entirely (the most potentially circular predictor), discriminative performance barely changes (AUC = 0.878).</p>

<p>This matters because it allows a principled estimate of how many DD species are likely threatened. In biostatistics, data that are systematically missing, where the probability of being unobserved depends on observable characteristics, are described as “missing at random” (MAR). DD amphibian species fit this pattern precisely: their unresolved threat status is predictable from their traits. But the data suggest something worse. Among assessed species, those with fewer than ten GBIF records are 60% threatened (n = 1,557), compared to 8% for species with over a thousand records (n = 711). Species described after 2010 are 54% threatened (n = 1,075), compared to 26% for species described before 1980 (n = 557). DD species sit at the extreme low end of both distributions. The pattern is consistent with “missing not at random” (MNAR): true threat and data deficiency reinforce each other.</p>

<p>Using two complementary approaches, propensity-score matching (comparing DD species to assessed species with statistically similar ecological profiles) and multiple imputation (generating plausible threat-status assignments that propagate uncertainty through the estimates), the analysis converges on 58–67% of DD species being likely threatened. That represents 530–610 species not reflected in current Red List summaries. Prior estimates have varied widely: Gonzalez-del-Pliego et al. <em>(10)</em> estimated 47% using spatio-phylogenetic trait imputation; Howard and Bickford <em>(3)</em> estimated approximately 63%; and Borgelt et al. <em>(11)</em> predicted 85%. What distinguishes this estimate is the methodology: missing-data theory provides a formal framework for diagnosing <em>why</em> the data are missing and choosing corrections appropriate to the diagnosis.</p>

<p>An independent check supports this range. Isa, Tapley et al. <em>(12)</em> found that ~50% of DD species reassessed in historical Red List updates were classified as threatened, but reassessment targets the most accessible species first, so the unresolved remainder is likely more threatened, consistent with the higher estimate here.</p>

<p>If 530–610 DD species are indeed threatened, the official count of globally threatened amphibians (2,873) understates the true figure by roughly 20%. It means that conservation priority-setting tools built on Red List tallies, from protected-area gap analyses to funding allocation models, may be systematically underweighting the regions and taxa where unquantified risk concentrates. The map makes this concrete.</p>

<h2 id="where-the-hot-blindspots-are">Where the hot blindspots are</h2>

<p>Figure 2 juxtaposes two views of the same planet. Panel A shows where threatened amphibian species concentrate: the tropical Andes, Atlantic Forest, Madagascar, Central Africa, and Southeast Asia. Panel B shows GBIF sampling completeness for species-rich cells (those with 25 or more expected species), the fraction of expected species actually documented by occurrence records.</p>

<figure style="text-align: center;">
  <img src="/images/amphibian-data/figure2.png" alt="The mismatch between amphibian threat and observation" style="max-width: 100%; width: 760px;" />
  <figcaption><em><strong>Figure 2.</strong> The mismatch between amphibian threat and observation. (A) Threatened amphibian species richness per one-degree grid cell. (B) GBIF sampling completeness for high-richness cells (upper quartile, 25 or more expected species), with hot blindspot cells (lower quartile of completeness, below 41%) in dark red. Tropical hotspots of threatened species border the most severe monitoring gaps, consistent with the possibility that the blindspots themselves hide additional unreported threats.</em></figcaption>
</figure>

<p>The mismatch is telling. Threatened species concentrate on the periphery of hot blindspots, bordering the Amazon basin, the Atlantic Forest, and Central Africa, while the blindspots themselves appear nearly empty of threatened species, possibly because reporting is sparse rather than because threats are absent. Mapping GBIF completeness onto one-degree grid cells (~111 km), this analysis finds that among cells with high amphibian diversity, over 50% qualify as hot blindspots: species-rich cells where monitoring coverage is too sparse to detect threats. This is consistent with realm-level patterns identified by Gonzalez-del-Pliego et al. <em>(10)</em> and Herrera-Lopera et al. <em>(13)</em>.</p>

<p>Not all hot blindspots are alike. In the Amazon basin and Central Africa, fewer than 15% of species in under-sampled cells are classified as threatened, suggesting that the true threat burden remains largely invisible. In Southeast Asia, 34% of species in under-sampled cells are already classified as threatened despite GBIF completeness of only 38%, a partially visible crisis constrained less by ignorance than by conservation capacity. Amphibians receive less than 3% of global vertebrate conservation funding <em>(14)</em>, and Southeast Asian protected areas face chronic operational underfunding even after establishment <em>(15)</em>. The Indomalayan realm also carries the highest DD proportion of any biogeographic realm (15%), suggesting that even these elevated threat figures understate the true burden. Where threats are already partially documented, funding for management may matter as much as funding for discovery.</p>

<h2 id="the-species-citizen-science-cannot-see">The species citizen science cannot see</h2>

<p>The hot blindspots are not simply places where no one has looked. They reflect a structural limitation in how biodiversity data are now collected. Among assessed species, 67% of GBIF records come from citizen-science platforms, predominantly iNaturalist. For DD species, the ratio inverts: 70% of their records come from preserved museum specimens. Nearly half of DD species with any GBIF data are documented only by specimen records. iNaturalist, contributing 2.2 million amphibian records to GBIF <em>(6)</em>, covers only 164 of 909 DD species; just 0.1% of its amphibian records pertain to DD species.</p>

<p>The geographic and temporal reach of DD records is equally thin. The median DD species has occurrence data from a single grid cell; its museum records span a median of one year. For assessed species, the typical temporal coverage spans decades.</p>

<p>The decline in specimen-based collecting compounds the problem (Figure 3A). In the GBIF data used here, amphibian museum specimens averaged over 40,000 per year in the 1960s–70s and have since halved, stabilizing at roughly 17,000 per year from the 1990s onward. Over the same period, citizen-science records exploded from fewer than 2,000 per year in the 1960s to over 500,000 per year in the 2020s. The monitoring effort that can reach DD species is shrinking while the effort that cannot is growing. For species that cannot be photographed, the window for discovery is narrowing.</p>

<figure style="text-align: center;">
  <img src="/images/amphibian-data/figure3.png" alt="Data gaps and their consequences for global amphibian conservation metrics" style="max-width: 100%; width: 760px;" />
  <figcaption><em><strong>Figure 3.</strong> Data gaps and their consequences for global amphibian conservation metrics. (A) Divergent trajectories of biodiversity monitoring methods: average annual museum specimen records peaked in the 1960s-70s and have since halved, while citizen-science records have grown over 200-fold since the 1950s. (B) Red List Index (RLI) values under different assumptions about DD species. The uncertainty range from DD assumptions (0.059) exceeds the observed 1980 to 2022 decline (0.031) by nearly two-fold, but all scenarios show deterioration over time. Grey ribbon shows 95% bootstrap confidence interval for the baseline. (C) Driver-disaggregated RLI change by period. Each bar shows the RLI decrement attributable to a threat driver, split into deterioration (red, species uplisted) and recovery (green, species downlisted). Numbers indicate species. Disease dominated 1980 to 2004; from 2004 to 2022, climate change shows zero recoveries while disease and habitat loss both show substantial recovery offsets.</em></figcaption>
</figure>

<p>Citizen science has transformed biodiversity monitoring for well-known species in well-surveyed regions. But it structurally misses the species that most need discovery. Closing this gap will require survey expeditions, not smartphone apps.</p>

<h2 id="dd-uncertainty-dwarfs-the-observed-global-decline">DD uncertainty dwarfs the observed global decline</h2>

<p>These are regional patterns. Their cumulative effect on the global conservation barometer can be quantified.</p>

<p>The Red List Index (RLI) runs from 1 (all species Least Concern) to 0 (all species Extinct); lower values mean worse conservation status <em>(16)</em>. Under the standard methodology, which excludes DD species entirely, the amphibian RLI declined from 0.765 [95% bootstrap CI: 0.758–0.771] in 1980 to 0.734 [0.727–0.742] in 2022, a drop of 0.031 units.</p>

<p>To test how sensitive this trend is to DD assumptions, the present analysis recomputed the RLI under six alternative scenarios, ranging from treating all DD species as Least Concern to treating 85% as threatened <em>(11)</em>. The resulting uncertainty spans 0.059 RLI units, nearly twice the observed decline itself (Figure 3B). The direction of decline is robust: under all six scenarios, the RLI falls over time. What is uncertain is the level: we cannot currently distinguish a moderately deteriorating situation from one that is substantially worse.</p>

<p>Model-based imputations place the 2022 RLI between 0.715 and 0.727, well below the official 0.734. If correct, Global Biodiversity Framework targets assessed against the official RLI are systematically optimistic, and the degree of optimism is unknowable without resolving the DD species.</p>

<h2 id="the-threat-landscape-is-shifting">The threat landscape is shifting</h2>

<p>Luedtke et al. <em>(1)</em> documented a qualitative shift in amphibian threat drivers over time. The present analysis quantifies this by decomposing the RLI trend by proximate driver <em>(16, 17, 18)</em> for global amphibians for the first time (Figure 3C).</p>

<p>From 1980 to 2004, disease and habitat loss jointly drove over 90% of status deteriorations <em>(1)</em>, with disease the larger contributor. From 2004 to 2022, climate change drove the single largest net RLI decline: 119 species were uplisted, zero downlisted. Habitat loss remained sustained (112 uplisted, 41 downlisted). Disease showed substantial recovery: 40 of 109 previously disease-affected species improved in status, partially offsetting deterioration. What distinguishes climate as a driver is not the severity per species, as each climate-driven or disease-driven deterioration was about equally severe, but the complete absence of recovery. The threat landscape has shifted, and management frameworks need to shift with it.</p>

<p>This finding interacts directly with the DD problem. If the majority of DD species are indeed threatened, and most are tropical species in regions experiencing accelerating habitat loss and climate change, then a driver decomposition that excludes them may systematically undercount climate- and habitat-driven declines. The species absent from the analysis are precisely those most exposed to the threats now dominating.</p>

<h2 id="a-resource-for-the-community">A resource for the community</h2>

<p>One output of this work is the integrated dataset itself. The species-level table described above contains over 100 columns per species, including IUCN status at three time points (1980, 2004, 2022), genuine status-change flags with attributed threat drivers, and synonym reconciliation across all five source databases. It is designed to be extended: adding regional Red Lists, environmental DNA detections, or acoustic monitoring data can begin with a species-name join to the existing backbone. The full dataset, code, and model specifications will be publicly archived alongside the preprint (target: mid-2026).</p>

<h2 id="what-comes-next">What comes next</h2>

<p>I welcome contact from researchers with field expertise in under-represented regions, access to regional amphibian databases not yet included, or interest in extending the analytical framework. The DD problem is a data problem at its root, and the gap between what existing amphibian data can support and what is currently extracted from it is wider than it needs to be. Bridging that gap is work worth doing together.</p>

<p>For the 909 species currently hidden behind a “Data Deficient” label, that bridge could be the one that matters.</p>

<h2 id="acknowledgments">Acknowledgments</h2>

<p>This analysis was conducted independently by the author in a personal capacity and was not supported by institutional funding. The author thanks the data providers behind the GAA2, GBIF, AmphibiaWeb, AmphiBIO, and the European Red List, whose open-data commitments made this integration possible.</p>

<h2 id="references">References</h2>

<p>1)  Luedtke, J.A. et al. Ongoing declines for the world’s amphibians in the face of emerging threats. <em>Nature</em> <strong>622</strong>, 308–314 (2023).</p>

<p>2)  IUCN. The IUCN Red List of Threatened Species. Version 2025-2. https://www.iucnredlist.org (accessed 4 March 2026).</p>

<p>3)  Howard, S.D. &amp; Bickford, D.P. Amphibians over the edge: silent extinction risk of Data Deficient species. <em>Divers. Distrib.</em> <strong>20</strong>, 837–846 (2014).</p>

<p>4)  Bland, L.M., Collen, B., Orme, C.D.L. &amp; Bielby, J. Predicting the conservation status of data-deficient species. <em>Conserv. Biol.</em> <strong>29</strong>, 250–259 (2015).</p>

<p>5)  Cazalis, V. et al. Prioritizing the reassessment of data-deficient species on the IUCN Red List. <em>Conserv. Biol.</em> <strong>37</strong>, e14139 (2023).</p>

<p>6)  GBIF.org. GBIF Occurrence Download. https://doi.org/10.15468/dl.3xrhsz (accessed 4 March 2026).</p>

<p>7)  AmphibiaWeb. https://amphibiaweb.org (University of California, Berkeley; accessed 4 March 2026).</p>

<p>8)  Oliveira, B.F., São-Pedro, V.A., Santos-Barrera, G., Penone, C. &amp; Costa, G.C. AmphiBIO, a global database for amphibian ecological traits. <em>Sci. Data</em> <strong>4</strong>, 170123 (2017).</p>

<p>9)  Crnobrnja-Isailović, J., Schmidt, B.R., Denoël, M. et al. Measuring the Pulse of European Biodiversity. European Red List of Amphibians (European Commission, Brussels, 2025). https://doi.org/10.2779/035237.</p>

<p>10) Gonzalez-del-Pliego, P. et al. Phylogenetic and trait-based prediction of extinction risk for data-deficient amphibians. <em>Curr. Biol.</em> <strong>29</strong>, 1557–1563 (2019).</p>

<p>11) Borgelt, J. et al. More than half of data deficient species predicted to be threatened by extinction. <em>Commun. Biol.</em> <strong>5</strong>, 679 (2022).</p>

<p>12) Isa, H.R., Tapley, B. &amp; Michaels, C.J. How many Data Deficient amphibians are threatened? IUCN Red List assessments for amphibian species previously classed as Data Deficient. <em>Herpetol. Bull.</em> <strong>169</strong>, 12–17 (2024).</p>

<p>13) Herrera-Lopera, J.M., Solé, M. &amp; Cultid-Medina, C.A. Mapping the missing: assessing amphibian sampling completeness and overlap with global protected areas. <em>Ecol. Evol.</em> <strong>15</strong>, e71137 (2025).</p>

<p>14) Guénard, B. et al. Limited and biased global conservation funding means most threatened species remain unsupported. <em>Proc. Natl Acad. Sci. USA</em> <strong>122</strong>, e2412479122 (2025).</p>

<p>15) Sreekar, R. et al. Conservation opportunities through improved management of recently established protected areas in Southeast Asia. <em>Curr. Biol.</em> <strong>34</strong>, 3830–3835 (2024).</p>

<p>16) Butchart, S.H.M. et al. Measuring global trends in the status of biodiversity: Red List Indices for birds. <em>PLoS Biol.</em> <strong>2</strong>, e383 (2004).</p>

<p>17) Butchart, S.H.M. et al. Using Red List Indices to measure progress towards the 2010 target and beyond. <em>Phil. Trans. R. Soc. B</em> <strong>360</strong>, 255–268 (2005).</p>

<p>18) Sandvik, H. &amp; Pedersen, H.C. Using Red List Indices to assess threats to species: counting versus weighting approaches. <em>Conserv. Biol.</em> <strong>37</strong>, e14049 (2023).</p>]]></content><author><name>Yichen Han</name><email>yichen.han@campus.lmu.de</email></author><category term="Amphibians" /><category term="Conservation" /><category term="Data Science" /><category term="Biostatistics" /><summary type="html"><![CDATA[This essay was originally published in AmphiBios: Han, Y. (2026). What amphibian data reveal — and what data deficiency conceals. AmphiBios, 1. amphibios.app/articles/amphibian-data-deficiency.]]></summary></entry><entry><title type="html">The Shape of Wabi: Digital Morphometrics of Japanese Tea Bowls</title><link href="https://yhan228.github.io/posts/2026/01/wabimorph/" rel="alternate" type="text/html" title="The Shape of Wabi: Digital Morphometrics of Japanese Tea Bowls" /><published>2026-01-25T00:00:00+00:00</published><updated>2026-01-25T00:00:00+00:00</updated><id>https://yhan228.github.io/posts/2026/01/wabimorph</id><content type="html" xml:base="https://yhan228.github.io/posts/2026/01/wabimorph/"><![CDATA[<p><em>A Computational Study of Raku, Hagi, and Karatsu Ware</em></p>

<h2 id="1-from-photo-to-shape-extracting-geometry-from-images">1. From Photo to Shape: Extracting Geometry from Images</h2>

<p>How do we capture the “essence” of a tea bowl? A photograph is rich with information—lighting, angle, color—but to study <strong>form</strong> rigorously, we must look past these distractions.</p>

<p>Our method acts as a “digital potter’s eye,” tracing the vessel’s silhouette to isolate its fundamental geometry. By converting the bowl’s outline into a mathematical series of elliptical harmonics (Elliptic Fourier Analysis), we can quantify subtle variations in curvature, lip shape, and foot profile that might escape the naked eye.</p>

<figure style="text-align: center;">
  <img src="/images/wabimorph/image_contour_comparison.svg" alt="From Photo to Data" style="max-width: 100%; width: 600px;" />
  <figcaption><em>From Photo to Data: The contour extraction process abstracts the vessel into a pure mathematical signature, removing surface noise to focus on structural DNA.</em></figcaption>
</figure>

<p>This abstraction allows us to compare hundreds of bowls simultaneously, revealing patterns that span centuries of ceramic tradition.</p>

<p><em>Dataset note:</em> Shape analysis uses <strong>255</strong> bowls from <strong>35 institutions</strong> across three continents (including the Metropolitan Museum of Art, Cleveland Museum of Art, Smithsonian, and Japan Search); texture and shape–texture coupling use a <strong>195-image high-resolution subset</strong> (see the “Resolution Trap”; filtered to ≥100k pixels, i.e., ~0.1 MP).</p>

<blockquote>
  <p><strong>Key terms (plain-language)</strong></p>
  <ul>
    <li><strong>Typicality distance</strong>: how far a bowl is from its tradition’s “center” in shape space (a Mahalanobis distance; lower = more typical).</li>
    <li><strong>ICC (reliability)</strong>: what fraction of measured variation is real between-bowl difference vs segmentation noise (higher = more trustworthy).</li>
    <li><strong>CCA (shape–texture coupling)</strong>: finds paired patterns in shape and surface that tend to vary together.</li>
  </ul>
</blockquote>

<hr />

<h2 id="2-raku-standardized-skeleton-variable-skin">2. Raku: Standardized Skeleton, Variable Skin</h2>

<p><strong>Raku ware</strong> is often celebrated for its “handmade” character, shaped by the <em>tezukune</em> (hand-forming) technique rather than a potter’s wheel. Paradoxically, our analysis reveals it to be the most morphologically standardized of the three traditions—at least in its primary dimensions.</p>

<h3 id="the-canonical-form">The Canonical Form</h3>

<p>In the “morphospace” below, Raku bowls (blue) form a dense, tight cluster. This indicates a strict adherence to a specific height-to-width ratio and general curvature. The constraints of the Raku firing process and the tea ceremony’s codified aesthetics likely enforced this standardization.</p>

<figure style="text-align: center;">
  <img src="/images/wabimorph/pca_plot.png" alt="Morphospace of Japanese Tea Bowls" style="max-width: 100%; width: 500px;" />
  <figcaption><em>Morphospace of Japanese Tea Bowls: Raku (blue) clusters tightly, while Hagi (red) and Karatsu (green) are dispersed.</em></figcaption>
</figure>

<details>
<summary><strong>Statistical Foundation</strong> (click to expand)</summary>

<p>The morphospace above is derived from Principal Component Analysis (PCA) of shape coefficients. The first two axes capture <strong>87%</strong> of total shape variation (PC1: 72%, PC2: 15%). The scree plot and shape-variation diagrams below show what each axis represents geometrically.</p>

<figure style="text-align: center;">
  <img src="/images/wabimorph/pca_scree.png" alt="Scree Plot" style="max-width: 100%; width: 450px;" />
  <figcaption><em>Scree Plot: Variance explained by each principal component. The first two PCs dominate.</em></figcaption>
</figure>

<figure style="text-align: center;">
  <img src="/images/wabimorph/pca_shape_variation.png" alt="Shape Variation" style="max-width: 100%; width: 550px;" />
  <figcaption><em>Shape Variation: What do the principal components mean? PC1 captures height-to-width ratio; PC2 captures curvature of the walls.</em></figcaption>
</figure>

</details>

<p>This clustering has practical consequences: Raku’s tight grouping yields <strong>92%</strong> classification recall (the algorithm rarely misidentifies a Raku bowl), while Hagi (<strong>51%</strong>) and Karatsu (<strong>47%</strong>) frequently confuse with each other due to their overlapping morphospace.</p>

<figure style="text-align: center;">
  <img src="/images/wabimorph/shapes_overlaid.png" alt="Shape Overlap" style="max-width: 100%; width: 500px;" />
  <figcaption><em>Shape Overlap: All contours overlaid by tradition reveal Raku's tight conformity (blue) versus the broader diversity of Hagi (red) and Karatsu (green).</em></figcaption>
</figure>

<h3 id="the-paradox-of-variation">The Paradox of Variation</h3>

<p>However, “standardized” does not mean “identical.” While Raku bowls are uniform in their basic silhouette (low median typicality distance of <strong>1.68</strong>), they exhibit the highest variability in fine details (highest standard deviation of <strong>1.25</strong>).</p>

<ul>
  <li><strong>Interpretation:</strong> Raku bowls share a rigid “skeleton” (the canonical tea bowl shape) but possess a highly variable “skin” (surface undulations from hand-carving).</li>
  <li><strong>Contrast:</strong> Hagi and Karatsu bowls are the opposite—diverse in their basic skeletons (tall, wide, conical, cylindrical) but smoother and more consistent in their fine contours.</li>
</ul>

<figure style="text-align: center;">
  <img src="/images/wabimorph/typicality_distribution.png" alt="Typicality Distribution" style="max-width: 100%; width: 450px;" />
  <figcaption><em>Typicality Distribution: Raku has a dense "core" of typical shapes but significant outliers, reflecting individual artistic expression within a strict canon.</em></figcaption>
</figure>

<p><em>Balancing note:</em> Hagi shows the most consistent shape overall (lowest typicality spread), while Karatsu sits in-between—more variable than Hagi, less than Raku.</p>

<hr />

<h2 id="3-surface-tells-more-than-shape">3. Surface Tells More Than Shape</h2>

<p>If you encounter a bowl with an ambiguous shape—perhaps a Hagi bowl that mimics a Karatsu form—where should you look for the truth? <strong>The surface.</strong></p>

<p>Our analysis shows that while shapes overlap significantly between Hagi and Karatsu, surface cues add useful separation. By analyzing texture features like crackle (crazing), clay roughness, and pitting, we can distinguish the wares <strong>somewhat more accurately</strong> than by shape alone—<em>when high-resolution images are available</em>.</p>

<h3 id="the-hagi-karatsu-connection">The Hagi-Karatsu Connection</h3>

<p>Even with texture, Hagi and Karatsu remain frequently confused (misclassification rates of ~30% each direction). This is not a failure of our method—it reflects a genuine morphological kinship. Both traditions share wheel-thrown forms and regional Kyushu heritage, unlike Raku’s hand-formed, Kyoto-centered aesthetic. The algorithm confirms what connoisseurs have long intuited: Hagi and Karatsu are closer cousins to each other than either is to Raku.</p>

<figure style="text-align: center;">
  <img src="/images/wabimorph/texture_lda.svg" alt="Texture Separation" style="max-width: 100%; width: 500px;" />
  <figcaption><em>Texture Separation: Surface analysis separates the traditions more effectively than shape. Raku's rough, pitted surface (high contrast) is unmistakably distinct from Hagi's smooth, milky glaze.</em></figcaption>
</figure>

<ul>
  <li><strong>Raku:</strong> High contrast, rough surface (hand-molded clay, porous).</li>
  <li><strong>Hagi:</strong> Low contrast, high homogeneity (smooth, milky glaze).</li>
  <li><strong>Karatsu:</strong> Intermediate texture, often with iron-painted designs.</li>
</ul>

<figure style="text-align: center;">
  <img src="/images/wabimorph/texture_ware_profiles.svg" alt="Texture Profiles by Tradition" style="max-width: 100%; width: 550px;" />
  <figcaption><em>Texture Profiles by Tradition: Quantitative comparison of GLCM texture features shows clear separation—Raku's rough surface (high contrast, low homogeneity) vs. Hagi's smooth glaze (low contrast, high homogeneity).</em></figcaption>
</figure>

<p>Quantitatively, shape features alone achieve <strong>63%</strong> classification accuracy; texture reaches <strong>69%</strong>, and combining both yields <strong>70%</strong>—a modest but consistent improvement.</p>

<figure style="text-align: center;">
  <img src="/images/wabimorph/accuracy_comparison.svg" alt="Model comparison" style="max-width: 100%; width: 500px;" />
  <figcaption><em>Model comparison (high-resolution subset): Texture slightly outperforms shape; combining them yields only a small additional gain.</em></figcaption>
</figure>

<hr />

<h2 id="4-form-and-surface-move-together">4. Form and Surface Move Together</h2>

<p>Did potters mix and match shapes and glazes randomly? Our <strong>Sparse Canonical Correlation Analysis (CCA)</strong> suggests otherwise. We discovered a strong statistical “coupling” in the leading mode (Correlation r ≈ 0.99) between specific shapes and specific textures.</p>

<p>In plain terms, some shape tendencies co-occur with more <em>orderly/uniform</em> surface statistics, while other shape tendencies co-occur with more <em>varied</em> surfaces. The direction of the axis is arbitrary—what matters is that form and surface move together rather than independently.</p>

<figure style="text-align: center;">
  <img src="/images/wabimorph/cv_extremes.svg" alt="Style Coupling" style="max-width: 100%; width: 600px;" />
  <figcaption><em>Style Coupling: Real examples of bowls at the extremes of the Shape-Texture relationship. Form and surface are not independent; they are structural partners.</em></figcaption>
</figure>

<figure style="text-align: center;">
  <img src="/images/wabimorph/canonical_correlations.svg" alt="Canonical correlations" style="max-width: 100%; width: 500px;" />
  <figcaption><em>Canonical correlations: The strongest coupling mode is very high (CV1 r≈0.99), and multiple additional modes are statistically significant.</em></figcaption>
</figure>

<hr />

<h2 id="5-measurements-are-reliableif-resolution-is-high">5. Measurements Are Reliable—If Resolution Is High</h2>

<p>Can we trust these digital measurements? To verify our findings, we tested the “segmentation uncertainty”—the error introduced when outlining the bowls.</p>

<h3 id="high-reliability">High Reliability</h3>

<p>We found that <strong>86.5%</strong> of the variation in our data represents real differences between bowls (Signal), while only <strong>13.5%</strong> is due to measurement noise. This “Signal-to-Noise Ratio” (ICC = 0.865) confirms that the morphological patterns we detect are materially and culturally real, not artifacts of the software.</p>

<figure style="text-align: center;">
  <img src="/images/wabimorph/variance_decomposition.svg" alt="Variance Decomposition" style="max-width: 100%; width: 400px;" />
  <figcaption><em>Variance Decomposition: The biological/cultural signal overwhelmingly dominates measurement noise.</em></figcaption>
</figure>

<figure style="text-align: center;">
  <img src="/images/wabimorph/feature_icc_distribution.svg" alt="Per-feature reliability" style="max-width: 100%; width: 500px;" />
  <figcaption><em>Per-feature reliability: Most coefficients are stable, but reliability varies across Fourier components—useful context for interpreting fine-grained effects.</em></figcaption>
</figure>

<h3 id="the-resolution-cliff">The Resolution Cliff</h3>

<p>However, data quality matters. We observed a clear resolution-dependent pattern: at the low-resolution end, segmentation uncertainty becomes larger and more variable (the funnel plot shows a significant negative association between resolution and uncertainty, Spearman ρ ≈ -0.38). This is why texture and coupling results are reported on a high-resolution subset (<strong>195</strong> images).</p>

<p>One encouraging detail: <strong>Karatsu</strong> features were the most stable under segmentation perturbations (ICC ≈ <strong>0.915</strong>), followed by <strong>Raku</strong> (ICC ≈ <strong>0.884</strong>), while <strong>Hagi</strong> was more sensitive (ICC ≈ <strong>0.756</strong>).</p>

<ul>
  <li><strong>Implication:</strong> Low-resolution thumbnails from aggregators like Japan Search are often insufficient for rigorous morphometrics.</li>
  <li><strong>Recommendation:</strong> Reliable digital art history requires high-fidelity imaging. Museums must prioritize resolution to enable this kind of computational scholarship.</li>
</ul>

<figure style="text-align: center;">
  <img src="/images/wabimorph/uncertainty_funnel.svg" alt="The Funnel Plot" style="max-width: 100%; width: 450px;" />
  <figcaption><em>The Funnel Plot: Uncertainty vs. Resolution. Note the rise in error (y-axis), especially at the low-resolution end of the distribution.</em></figcaption>
</figure>

<hr />

<h2 id="6-limitations-a-call-for-better-data">6. Limitations: A Call for Better Data</h2>

<p>This study demonstrates what is possible with computational morphometrics—but it also reveals the constraints of working with limited data.</p>

<h3 id="dataset-size-and-access">Dataset Size and Access</h3>

<p>Our corpus of <strong>255 bowls</strong> (195 at high resolution) is modest by machine learning standards. Access restrictions—copyright, institutional policies, and the scarcity of digitized collections—limited what we could gather. Raku ware is overrepresented (58% of samples) simply because more Raku images were publicly available, not because Raku is more common or important.</p>

<h3 id="what-we-cannot-yet-do">What We Cannot Yet Do</h3>

<p>Modern deep learning methods (CNNs, vision transformers) typically require thousands of training examples per class. With fewer than 50 high-resolution Hagi and Karatsu images each, such methods would likely overfit. The statistical approaches used here (PCA, LDA, CCA) are more appropriate for small samples, but they make stronger assumptions and capture less complex patterns.</p>

<h3 id="findings-that-may-reflect-dataset-artifacts">Findings That May Reflect Dataset Artifacts</h3>

<p>We cannot fully rule out that some patterns arise from sampling bias rather than true ceramic properties:</p>

<ul>
  <li><strong>Raku’s tight clustering</strong> may partly reflect the fact that our Raku images come from fewer source types (mostly tea ceremony collections), while Hagi and Karatsu span more heterogeneous museum holdings.</li>
  <li><strong>The Hagi-Karatsu confusion</strong> might decrease with larger, more balanced samples—or it might persist, reflecting genuine morphological kinship.</li>
  <li><strong>Shape-texture coupling strength</strong> (r ≈ 0.99) is estimated from 195 images; larger samples might reveal weaker or more nuanced relationships.</li>
</ul>

<h3 id="a-path-forward">A Path Forward</h3>

<p>For more robust findings and to enable modern machine learning approaches, the field needs:</p>

<ul>
  <li><strong>Larger, balanced datasets</strong> with hundreds of examples per tradition</li>
  <li><strong>Standardized imaging protocols</strong> (consistent lighting, angles, resolution)</li>
  <li><strong>Open access</strong> to high-resolution museum collections</li>
</ul>

<p>Until then, results like ours should be treated as <em>hypotheses to be tested</em> rather than definitive conclusions. The patterns are real in our data—whether they generalize to the full universe of Japanese tea bowls remains an open question.</p>]]></content><author><name>Yichen Han</name><email>yichen.han@campus.lmu.de</email></author><category term="Morphometrics" /><category term="Japanese Ceramics" /><category term="Data Science" /><category term="Art History" /><summary type="html"><![CDATA[A Computational Study of Raku, Hagi, and Karatsu Ware]]></summary></entry><entry><title type="html">A guide to connecting VSCode to a remote cluster</title><link href="https://yhan228.github.io/posts/2025/05/blog-post-vsccluster/" rel="alternate" type="text/html" title="A guide to connecting VSCode to a remote cluster" /><published>2025-05-09T00:00:00+00:00</published><updated>2025-05-09T00:00:00+00:00</updated><id>https://yhan228.github.io/posts/2025/05/vsccluster</id><content type="html" xml:base="https://yhan228.github.io/posts/2025/05/blog-post-vsccluster/"><![CDATA[<p>Working on a remote cluster is a common task in many scientific fields. Here, I will show how to connect VSCode to a remote cluster. I take the <a href="https://doku.lrz.de/access-and-login-to-the-linux-cluster-10745974.html">LRZ cluster</a> as an example.</p>

<p>Suppose your LRZ-username (LRZ-Kennung) is “username”.
Our goal is to connect to LRZ without having to type our password each time.
You cannot avoid 2FA! Everytime you will have to give 2FA.</p>

<ol>
  <li>
    <p>Manually download the extension <a href="hhttps://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh">Remote-SSH</a>. It doesn’t seem to be automatically downloaded although VSCode claims so.</p>
  </li>
  <li>
    <p>Open Windows Powershell with admin rights</p>

    <div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code> ssh-keygen <span class="nt">-t</span> ed25519 <span class="nt">-C</span> <span class="s2">"username@lrz"</span>
</code></pre></div>    </div>
    <p>(press <code class="language-plaintext highlighter-rouge">&lt;Enter&gt;</code> three times for defaults)</p>

    <div class="language-powershell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="w"> </span><span class="kr">type</span><span class="w"> </span><span class="nv">$</span><span class="nn">env</span><span class="p">:</span><span class="nv">USERPROFILE</span><span class="n">\.ssh\id_ed25519.pub</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">ssh</span><span class="w"> </span><span class="nt">-Y</span><span class="w"> </span><span class="nx">username</span><span class="err">@</span><span class="nx">cool.hpc.lrz.de</span><span class="w"> </span><span class="s2">"umask 077 &amp;&amp; mkdir -p ~/.ssh &amp;&amp; cat &gt;&gt; ~/.ssh/authorized_keys"</span><span class="w">
</span></code></pre></div>    </div>
  </li>
  <li>
    <p>Create a local .ssh config file. Stored in <code class="language-plaintext highlighter-rouge">C:\Users\&lt;WindowsUser&gt;\.ssh\config</code></p>

    <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="c"># ensure the ~/.ssh directory exists</span>
 <span class="nb">mkdir</span> <span class="nt">-p</span> ~/.ssh

 <span class="c"># write the configuration</span>
 <span class="nb">cat</span> <span class="o">&gt;</span> ~/.ssh/config <span class="o">&lt;&lt;</span><span class="sh">'</span><span class="no">EOF</span><span class="sh">'
 Host lrz-hpc
     HostName cool.hpc.lrz.de
     Port 2222
     User username
     IdentityFile ~/.ssh/id_ed25519
     IdentitiesOnly yes
     ForwardX11 yes
     ServerAliveInterval 60
</span><span class="no"> EOF

</span> <span class="c"># secure the file</span>
 <span class="nb">chmod </span>600 ~/.ssh/config
</code></pre></div>    </div>
  </li>
  <li>
    <p>Enable the Windows SSH agent (optional but convenient)</p>

    <div class="language-powershell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="w"> </span><span class="n">Set-Service</span><span class="w"> </span><span class="nx">ssh-agent</span><span class="w"> </span><span class="nt">-StartupType</span><span class="w"> </span><span class="nx">Automatic</span><span class="w">
 </span><span class="n">Start-Service</span><span class="w"> </span><span class="nx">ssh-agent</span><span class="w">
 </span><span class="n">ssh-add</span><span class="w"> </span><span class="nv">$</span><span class="nn">env</span><span class="p">:</span><span class="nv">USERPROFILE</span><span class="nx">\.ssh\id_ed25519</span><span class="w">
</span></code></pre></div>    </div>
  </li>
  <li>
    <p><strong>In VSCode:</strong>
 <code class="language-plaintext highlighter-rouge">Ctrl + Shift + P</code> → <code class="language-plaintext highlighter-rouge">Remote-SSH: Add New SSH Host…</code>
 Enter: <code class="language-plaintext highlighter-rouge">ssh lrz-hpc</code>
 The first connection installs the VS Code Server in <code class="language-plaintext highlighter-rouge">$HOME/.vscode-server/</code> on the cluster and takes long.
 Enter passwords or 2FA when prompted.</p>
  </li>
  <li>
    <p><strong>Note:</strong> You get logged in to the login node, and heavy computation is prohibited there! If you hit the “Run python code” button, the code will be executed in the current terminal, i.e. login node. You need to start an interactive session each time.</p>
  </li>
  <li>Configure your <code class="language-plaintext highlighter-rouge">.vscode</code> folder so that you get an interactive session easily.
 <strong>In <code class="language-plaintext highlighter-rouge">.vscode/launch.json</code>:</strong>
    <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="w"> </span><span class="p">{</span><span class="w">
     </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0.2.0"</span><span class="p">,</span><span class="w">
     </span><span class="nl">"configurations"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
         </span><span class="p">{</span><span class="w">
             </span><span class="nl">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Python on compute node"</span><span class="p">,</span><span class="w">
             </span><span class="nl">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"python"</span><span class="p">,</span><span class="w">
             </span><span class="nl">"request"</span><span class="p">:</span><span class="w"> </span><span class="s2">"launch"</span><span class="p">,</span><span class="w">
             </span><span class="nl">"program"</span><span class="p">:</span><span class="w"> </span><span class="s2">"${file}"</span><span class="p">,</span><span class="w">
             </span><span class="nl">"console"</span><span class="p">:</span><span class="w"> </span><span class="s2">"integratedTerminal"</span><span class="p">,</span><span class="w">
             </span><span class="nl">"preLaunchTask"</span><span class="p">:</span><span class="w"> </span><span class="s2">"slurm-srun"</span><span class="w">
           </span><span class="p">}</span><span class="w">
     </span><span class="p">]</span><span class="w">
 </span><span class="p">}</span><span class="w">
</span></code></pre></div>    </div>
    <p><strong>In <code class="language-plaintext highlighter-rouge">.vscode/tasks.json</code>:</strong></p>
    <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="w"> </span><span class="p">{</span><span class="w">
     </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2.0.0"</span><span class="p">,</span><span class="w">
     </span><span class="nl">"tasks"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
       </span><span class="p">{</span><span class="w">
         </span><span class="nl">"label"</span><span class="p">:</span><span class="w"> </span><span class="s2">"slurm-srun"</span><span class="p">,</span><span class="w">
         </span><span class="nl">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"shell"</span><span class="p">,</span><span class="w">
         </span><span class="nl">"command"</span><span class="p">:</span><span class="w"> </span><span class="s2">"if [[ -z $SLURM_JOB_ID ]]; then srun -M inter -p cm4_inter -n 1 -c 4 --mem=32G -t 03:00:00 --pty bash -l; fi"</span><span class="p">,</span><span class="w">
         </span><span class="nl">"problemMatcher"</span><span class="p">:</span><span class="w"> </span><span class="p">[]</span><span class="w">
       </span><span class="p">}</span><span class="w">
     </span><span class="p">]</span><span class="w">
 </span><span class="p">}</span><span class="w">
</span></code></pre></div>    </div>
    <p><em>Modify the parameters in the <code class="language-plaintext highlighter-rouge">slurm-srun</code> task command as you need!</em></p>
  </li>
  <li>To use, i.e. to start an interactive session, press <code class="language-plaintext highlighter-rouge">Ctrl + F5</code></li>
</ol>]]></content><author><name>Yichen Han</name><email>yichen.han@campus.lmu.de</email></author><category term="Computing" /><category term="Cluster" /><summary type="html"><![CDATA[Working on a remote cluster is a common task in many scientific fields. Here, I will show how to connect VSCode to a remote cluster. I take the LRZ cluster as an example.]]></summary></entry><entry><title type="html">The Way of Tea: An Interactive Exploration of Chanoyu</title><link href="https://yhan228.github.io/chanoyu/" rel="alternate" type="text/html" title="The Way of Tea: An Interactive Exploration of Chanoyu" /><published>2024-01-15T00:00:00+00:00</published><updated>2024-01-15T00:00:00+00:00</updated><id>https://yhan228.github.io/chanoyu</id><content type="html" xml:base="https://yhan228.github.io/chanoyu/"><![CDATA[<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>The Way of Tea — An Interactive Exploration of Chanoyu</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Noto+Sans:wght@300;400;500;700&display=swap" rel="stylesheet">
    <style>
        :root {
            --zen-primary: #FDFBF5;
            --zen-secondary: #F0EAD6;
            --zen-accent: #6B8E23;
            --zen-highlight: #DAA520;
            --zen-text: #3a3a3a;
            --zen-text-light: #666666;
        }
        
        body {
            font-family: 'Noto Sans', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background: linear-gradient(135deg, var(--zen-primary) 0%, var(--zen-secondary) 100%);
            color: var(--zen-text);
            min-height: 100vh;
        }
        .nav-pill {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            background: white;
            border: 2px solid transparent;
        }
        .nav-pill:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(107, 142, 35, 0.15);
            border-color: var(--zen-accent);
        }
        .nav-pill.active {
            background: var(--zen-accent);
            color: white;
            border-color: var(--zen-accent);
        }
        .card {
            background: white;
            border-radius: 12px;
            padding: 1.5rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
            transition: all 0.3s ease;
            border: 1px solid rgba(107, 142, 35, 0.1);
        }
        .card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 24px rgba(107, 142, 35, 0.12);
            border-color: var(--zen-accent);
        }
        .timeline-dot {
            position: absolute;
            left: -10px;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--zen-highlight);
            border: 3px solid var(--zen-accent);
            z-index: 1;
        }
        .accordion-btn {
            width: 100%;
            text-align: left;
            padding: 0.5rem 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            color: var(--zen-text);
            font-size: 0.875rem;
            font-weight: 500;
            transition: color 0.2s;
        }
        .accordion-btn:hover {
            color: var(--zen-accent);
        }
        .accordion-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease-out;
        }
        .accordion-content.open {
            max-height: 500px;
        }
        .accordion-icon {
            transition: transform 0.3s;
        }
        .accordion-icon.rotate {
            transform: rotate(180deg);
        }
        /* Optimize accordion performance */
        .accordion-wrapper {
            will-change: height;
        }
        .search-highlight {
            background-color: #fef3c7;
            padding: 2px 4px;
            border-radius: 3px;
        }
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            inset: 0;
            background: rgba(0,0,0,0.6);
            backdrop-filter: blur(4px);
        }
        .modal.show {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .modal-content {
            background: white;
            border-radius: 16px;
            max-width: 900px;
            max-height: 90vh;
            overflow-y: auto;
            position: relative;
            animation: slideIn 0.3s ease-out;
        }
        @keyframes slideIn {
            from { transform: translateY(-30px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        .filter-badge {
            padding: 0.375rem 1rem;
            border-radius: 9999px;
            font-size: 0.875rem;
            transition: all 0.2s;
            cursor: pointer;
            background: white;
            border: 2px solid var(--zen-secondary);
            color: var(--zen-text);
        }
        .filter-badge:hover {
            transform: scale(1.05);
            border-color: var(--zen-accent);
        }
        .filter-badge.active {
            background: var(--zen-accent);
            color: white;
            border-color: var(--zen-accent);
        }
        .section-card {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            padding: 2rem;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
            margin-bottom: 2rem;
            border: 1px solid rgba(107, 142, 35, 0.15);
        }
        .icon {
            display: inline-block;
            width: 20px;
            height: 20px;
            margin-right: 8px;
        }
        .temple-card {
            cursor: pointer;
            background: white;
            border: 2px solid transparent;
            transition: all 0.3s ease;
        }
        .temple-card:hover {
            border-color: var(--zen-accent);
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(107, 142, 35, 0.15);
        }
        .golden-accent {
            color: var(--zen-highlight);
        }
        
        .zen-button {
            background: var(--zen-accent);
            color: white;
            padding: 0.5rem 1.5rem;
            border-radius: 8px;
            font-weight: 500;
            transition: all 0.3s;
            border: none;
            cursor: pointer;
        }
        .zen-button:hover {
            background: #5a7a1f;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(107, 142, 35, 0.3);
        }
        
        .translator-box {
            background: linear-gradient(135deg, white 0%, var(--zen-secondary) 100%);
            border: 2px solid var(--zen-accent);
            border-radius: 16px;
            padding: 1.5rem;
            box-shadow: 0 8px 32px rgba(107, 142, 35, 0.15);
        }
        
        .translator-input {
            width: 100%;
            padding: 0.75rem 1rem;
            border: 2px solid var(--zen-secondary);
            border-radius: 12px;
            font-size: 1rem;
            transition: all 0.3s;
            background: white;
        }
        .translator-input:focus {
            outline: none;
            border-color: var(--zen-accent);
            box-shadow: 0 0 0 3px rgba(107, 142, 35, 0.1);
        }
        
        .translator-result {
            background: white;
            border-radius: 12px;
            padding: 1rem;
            margin-top: 1rem;
            border: 1px solid var(--zen-secondary);
            min-height: 100px;
        }
        
        .tag {
            display: inline-block;
            padding: 0.25rem 0.75rem;
            background: var(--zen-secondary);
            border-radius: 9999px;
            font-size: 0.75rem;
            color: var(--zen-text);
            margin: 0.125rem;
            transition: all 0.2s;
        }
        .tag:hover {
            background: var(--zen-accent);
            color: white;
            transform: scale(1.05);
        }
        
        .highlight-box {
            background: linear-gradient(135deg, var(--zen-secondary) 0%, rgba(218, 165, 32, 0.1) 100%);
            border-left: 4px solid var(--zen-highlight);
            padding: 1rem;
            border-radius: 8px;
            margin: 1rem 0;
        }
    </style>
</head>
<body>
    <!-- Header -->
    <header class="sticky top-0 z-50 bg-white/90 backdrop-blur-md border-b-2" style="border-color: rgba(107, 142, 35, 0.2);">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex items-center justify-between py-4">
                <div class="flex items-center gap-4">
                    <a href="/" class="text-sm text-gray-600 hover:text-gray-900 flex items-center gap-1" style="text-decoration: none;">
                        <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path>
                        </svg>
                        Home
                    </a>
                    <h1 class="text-2xl font-bold" style="color: var(--zen-accent);">
                        <span class="golden-accent">茶の湯</span> The Way of Tea
                    </h1>
                </div>
                <button id="mobile-menu-btn" class="md:hidden p-2 rounded-lg hover:bg-gray-100">
                    <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
                    </svg>
                </button>
            </div>
            <!-- Navigation -->
            <nav id="nav-menu" class="hidden md:flex flex-wrap gap-2 pb-3">
                <button class="nav-pill nav-btn px-4 py-2 rounded-full text-sm font-medium" data-section="overview">
                    Overview
                </button>
                <button class="nav-pill nav-btn px-4 py-2 rounded-full text-sm font-medium" data-section="translator">
                    茶道 Translator
                </button>
                <button class="nav-pill nav-btn px-4 py-2 rounded-full text-sm font-medium" data-section="timeline">
                    Timeline
                </button>
                <button class="nav-pill nav-btn px-4 py-2 rounded-full text-sm font-medium" data-section="roles">
                    Roles
                </button>
                <button class="nav-pill nav-btn px-4 py-2 rounded-full text-sm font-medium" data-section="temples">
                    Temples
                </button>
                <button class="nav-pill nav-btn px-4 py-2 rounded-full text-sm font-medium" data-section="monks">
                    Monks & Bokuseki
                </button>
                <button class="nav-pill nav-btn px-4 py-2 rounded-full text-sm font-medium" data-section="utensils">
                    Utensils Explorer
                </button>
                <button class="nav-pill nav-btn px-4 py-2 rounded-full text-sm font-medium" data-section="provenance">
                    Provenance & Hakogaki
                </button>
                <button class="nav-pill nav-btn px-4 py-2 rounded-full text-sm font-medium" data-section="events">
                    Temple Events
                </button>
                <button class="nav-pill nav-btn px-4 py-2 rounded-full text-sm font-medium" data-section="toriawase">
                    Toriawase Lab
            </button>
        </nav>
        </div>
    </header>



    <!-- Main Content -->
    <main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
        
        <!-- Overview Section -->
        <section id="overview" class="content-section mb-12">
            <div class="section-card">
                <h2 class="text-3xl font-bold mb-4" style="color: var(--zen-accent);">Chanoyu, Temples, and the Modern Collecting Ecosystem</h2>
                <div class="prose max-w-none text-gray-700">
                    <p class="mb-4">
                        Chanoyu emerged from Zen monasteries as a practical aid to meditation and matured—through merchants, monks, and tea masters—into a codified aesthetic and social practice. This interactive guide presents an integrated, richly detailed map of that world.
                    </p>
                    <div class="grid md:grid-cols-3 gap-4 mt-6">
                        <div class="highlight-box">
                            <h3 class="font-semibold mb-2 golden-accent">Temple Centrality</h3>
                            <p class="text-sm">Daitoku-ji and peers host public <em>tsukigama</em>, memorials, and <em>kencha</em>, while abbots provide bokuseki and endorsements.</p>
                        </div>
                        <div class="highlight-box">
                            <h3 class="font-semibold mb-2 golden-accent">Wabi-cha Aesthetics</h3>
                            <p class="text-sm">From Murata Jukō to Rikyū—small huts, rustic materials, moral clarity—distinct from earlier <em>karamono</em> display culture.</p>
                        </div>
                        <div class="highlight-box">
                            <h3 class="font-semibold mb-2 golden-accent">Collector's Lens</h3>
                            <p class="text-sm">Canon, diagnostics, and <em>denrai</em> (provenance) converge in the box inscription (<em>hakogaki</em>).</p>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Quotes Section -->
        <section id="quotes" class="content-section mb-12">
            <div class="section-card">
                <div class="flex items-center justify-between mb-2">
                    <h2 class="text-2xl font-bold" style="color: var(--zen-accent);">Words of the Tea Masters</h2>
                    <div class="flex gap-2">
                        <button id="quote-prev" class="filter-badge" aria-label="Previous quote">Previous</button>
                        <button id="quote-next" class="filter-badge" aria-label="Next quote">Next</button>
                    </div>
                </div>
                <div id="quote-box" class="p-4 rounded-lg border border-gray-200 bg-white">
                    <div class="text-xl leading-relaxed mb-3" id="quote-jp" style="font-family: 'Noto Sans JP', 'Noto Sans', sans-serif;">Loading...</div>
                    <div class="text-sm text-gray-700 mb-2" id="quote-en"></div>
                    <div class="text-xs text-gray-500" id="quote-meta"></div>
                </div>
            </div>
        </section>

        <!-- Translator Section -->
        <section id="translator" class="content-section mb-12">
            <div class="section-card">
                <h2 class="text-3xl font-bold mb-6" style="color: var(--zen-accent);">茶道 Tea Ceremony Translator</h2>
                <div class="translator-box">
                    <p class="text-sm mb-4" style="color: var(--zen-text-light);">
                        Enter any Japanese term, romaji, or English word related to tea ceremony. Get instant translations, kanji, and cultural context.
                    </p>
                    <input type="text" id="translator-input" class="translator-input" 
                        placeholder="Try: 'wabi', '茶碗', 'tea bowl', 'ichigo ichie', or any tea term...">
                    <div id="translator-result" class="translator-result">
                        <p class="text-sm text-gray-500">Your translation will appear here...</p>
                    </div>
                    <div class="mt-4 flex flex-wrap gap-2">
                        <span class="text-xs text-gray-600">Popular searches:</span>
                        <button class="tag cursor-pointer" onclick="window.translateTerm('一期一会')">一期一会</button>
                        <button class="tag cursor-pointer" onclick="window.translateTerm('wabi-sabi')">wabi-sabi</button>
                        <button class="tag cursor-pointer" onclick="window.translateTerm('tea bowl')">tea bowl</button>
                        <button class="tag cursor-pointer" onclick="window.translateTerm('利休')">利休</button>
                        <button class="tag cursor-pointer" onclick="window.translateTerm('hakogaki')">hakogaki</button>
                    </div>
                </div>
            </div>
        </section>

        <!-- Timeline Section -->
        <section id="timeline" class="content-section mb-12">
            <div class="section-card">
                <h2 class="text-3xl font-bold mb-6">Timeline: From Monastic Tool to Public Heritage</h2>
                <div id="timeline-container" class="relative border-l-4 border-green-700 ml-2">
                    <!-- Timeline items will be inserted here -->
                </div>
            </div>
        </section>

        <!-- Roles Section -->
        <section id="roles" class="content-section mb-12">
            <div class="section-card">
                <h2 class="text-3xl font-bold mb-6">The Ecosystem of Roles</h2>
                <div id="roles-container" class="grid md:grid-cols-2 gap-6">
                    <!-- Role cards will be inserted here -->
                </div>
            </div>
        </section>

        <!-- Temples Section -->
        <section id="temples" class="content-section mb-12">
            <div class="section-card">
                <h2 class="text-3xl font-bold mb-6">Temples: Hubs, Counterpoints, Lineages</h2>
                <p class="text-sm text-gray-600 mb-4 italic">Click on any temple card to learn more about its history and role in tea culture.</p>
                <div class="mb-4 flex flex-wrap gap-2">
                    <span class="text-sm text-gray-600 mr-2">Filter by sect:</span>
                    <button class="filter-badge border border-gray-300 bg-white active" data-filter="All">All</button>
                    <button class="filter-badge border border-gray-300 bg-white" data-filter="Rinzai">Rinzai</button>
                    <button class="filter-badge border border-gray-300 bg-white" data-filter="Kegon">Kegon</button>
                    <button class="filter-badge border border-gray-300 bg-white" data-filter="Jōdo">Jōdo</button>
                    <button class="filter-badge border border-gray-300 bg-white" data-filter="Nichiren">Nichiren</button>
                    <button class="filter-badge border border-gray-300 bg-white" data-filter="Shingon">Shingon</button>
                    </div>
                <div id="temples-container" class="grid md:grid-cols-2 gap-4">
                    <!-- Temple cards will be inserted here -->
                </div>
            </div>
        </section>

        <!-- Monks & Bokuseki Section -->
        <section id="monks" class="content-section mb-12">
            <div class="section-card">
                <h2 class="text-3xl font-bold mb-6">Monks & Bokuseki</h2>
                <div class="grid lg:grid-cols-2 gap-6">
                    <div class="bg-white rounded-lg border border-gray-200 p-6">
                        <h3 class="text-xl font-bold mb-3">Bokuseki (墨蹟): The Alcove's Heart</h3>
                        <p class="text-gray-700 mb-4">
                            Zen calligraphy by esteemed monks is the most revered tokonoma display. The phrase (e.g., <em>日々是好日</em>, <em>一期一会</em>) sets the <em>shudai</em> and guides the ensemble. Brush energy is read as the living trace of discipline and clarity.
                        </p>
                        <div class="accordion-wrapper">
                            <button class="accordion-btn">
                                <span>How bokuseki guides selection</span>
                                <svg class="w-4 h-4 accordion-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
                                </svg>
                            </button>
                            <div class="accordion-content px-2">
                                <ul class="list-disc pl-5 text-sm text-gray-600 mt-2">
                                    <li>Theme first; utensils should echo the scroll's teaching.</li>
                                    <li>Balance: intense ink energy pairs well with quiet ceramics.</li>
                                    <li>Seasonality: choose phrases aligned to season/occasion.</li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="bg-white rounded-lg border border-gray-200 p-6">
                        <h3 class="text-xl font-bold mb-3">The Abbot as Host, Artist, and Arbiter</h3>
                        <p class="text-gray-700 mb-4">
                            High-ranking abbots (esp. at Daitoku-ji) may host tea as direct Zen instruction, brush scrolls, name/carve utensils, and write authoritative box inscriptions (<em>hakogaki</em>) that canonize objects.
                        </p>
                        <div class="accordion-wrapper">
                            <button class="accordion-btn">
                                <span>Listing phrase decoder: 前大徳 [Name] 書付</span>
                                <svg class="w-4 h-4 accordion-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
                                </svg>
                            </button>
                            <div class="accordion-content px-2">
                                <p class="text-sm text-gray-600 mt-2">
                                    <strong>前大徳</strong> denotes a former abbot of Daitoku-ji; <strong>書付</strong> indicates an inscription/attestation. Together, this signals a premium endorsement—verify hand and seal.
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Utensils Explorer Section -->
        <section id="utensils" class="content-section mb-12">
            <div class="section-card">
                <h2 class="text-3xl font-bold mb-6">Utensils Explorer</h2>
                <div class="mb-4 flex flex-wrap gap-2">
                    <span class="text-sm text-gray-600 mr-2">Filter by type:</span>
                    <button class="filter-badge border border-gray-300 bg-white active" data-utensil-filter="All">All</button>
                    <button class="filter-badge border border-gray-300 bg-white" data-utensil-filter="Chawan">Chawan (Tea Bowls)</button>
                    <button class="filter-badge border border-gray-300 bg-white" data-utensil-filter="Chaire">Tea Caddies</button>
                    <button class="filter-badge border border-gray-300 bg-white" data-utensil-filter="Other">Other Utensils</button>
                </div>
                <div id="utensils-container" class="space-y-8">
                    <!-- Utensil cards will be inserted here -->
                </div>
            </div>
        </section>

        <!-- Provenance & Hakogaki Section -->
        <section id="provenance" class="content-section mb-12">
            <div class="section-card">
                <h2 class="text-3xl font-bold mb-6">Provenance & Hakogaki: A Practical Guide</h2>
                <div class="grid lg:grid-cols-2 gap-6">
                    <div class="bg-white rounded-lg border border-gray-200 p-6">
                        <h3 class="text-xl font-bold mb-3">Reading a Box (Kiribako)</h3>
                        <ul class="list-disc pl-5 text-gray-700 space-y-2">
                            <li><strong>Front:</strong> Object type + title/mei; sometimes era/kiln.</li>
                            <li><strong>Lid underside:</strong> Signature + <em>kaō</em> (stylized seal) of authority.</li>
                            <li><strong>Sides:</strong> Old collection labels, exhibition notes.</li>
                        </ul>
                        <div class="mt-4 p-4 bg-gray-50 rounded-lg">
                            <h4 class="font-semibold mb-2">Common wordings</h4>
                            <dl class="text-sm space-y-2">
                                <dt class="font-semibold">What is hakogaki (箱書)?</dt>
                                <dd class="text-gray-600">Box inscription on kiribako: name/mei, attribution, signer's signature + kaō. Documentary spine for identity and provenance.</dd>
                                <dt class="font-semibold">Who are strong signers?</dt>
                                <dd class="text-gray-600">Senke iemoto (Omote/Ura/Mushanokōji) and senior abbots of major temples (esp. Daitoku-ji).</dd>
                            </dl>
                    </div>
                    </div>
                    <div class="bg-white rounded-lg border border-gray-200 p-6">
                        <h3 class="text-xl font-bold mb-3">Due Diligence Checklist</h3>
                        <ul class="list-disc pl-5 text-gray-700 space-y-2">
                            <li>Match handwriting + kaō to known exemplars (abbot/iemoto).</li>
                            <li>Check box carpentry + paper/fabric age vs. claimed period.</li>
                            <li>Confirm object–box fit: wear patterns, ties, internal blocks.</li>
                            <li>Triangulate with museum comparanda and published denrai.</li>
                            <li>Document every change (remounts, relacquers, repairs).</li>
                        </ul>
                        <div class="mt-4 p-4 bg-amber-50 rounded-lg">
                            <h4 class="font-semibold mb-2 text-amber-900">Economics in brief</h4>
                            <p class="text-sm text-amber-800">
                                A credible <em>hakogaki</em> often commands a premium by transforming a good object into a named, canonized piece. Conversely, mismatched or forged inscriptions can invert value. Treat the box as a document, not décor.
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Temple Events Section -->
        <section id="events" class="content-section mb-12">
            <div class="section-card">
                <h2 class="text-3xl font-bold mb-6">Temple Events & Formats</h2>
                <div id="events-container" class="grid md:grid-cols-2 gap-4">
                    <!-- Event cards will be inserted here -->
        </div>
            </div>
        </section>

        <!-- Toriawase Lab Section -->
        <section id="toriawase" class="content-section mb-12">
            <div class="section-card">
                <h2 class="text-3xl font-bold mb-4">Toriawase Lab (Ensemble Sandbox)</h2>
                <div class="mb-3 flex flex-wrap items-center gap-2">
                    <select id="preset-filter-season" class="px-3 py-2 border border-gray-300 rounded-lg text-sm">
                        <option value="All">All seasons</option>
                        <option value="Spring">Spring</option>
                        <option value="Summer">Summer</option>
                        <option value="Autumn">Autumn</option>
                        <option value="Winter">Winter</option>
                        <option value="NewYear">New Year</option>
                    </select>
                    <select id="preset-filter-occasion" class="px-3 py-2 border border-gray-300 rounded-lg text-sm">
                        <option value="All">All occasions</option>
                        <option value="Chakai">Chakai</option>
                        <option value="Chaji">Chaji</option>
                        <option value="Memorial">Memorial</option>
                        <option value="Kencha">Kencha</option>
                        <option value="MoonViewing">Moon Viewing</option>
                    </select>
                    <button id="preset-surprise" class="filter-badge">Surprise</button>
                </div>
                <div id="preset-strip" class="mb-4 overflow-x-auto whitespace-nowrap no-scrollbar">
                    <!-- Compact preset chips will be inserted here -->
                </div>

                <div id="toriawase-compose-panel" class="block">
                    <div class="grid lg:grid-cols-2 gap-6">
                        <div class="bg-white rounded-lg border border-gray-200 p-6">
                            <h3 class="text-xl font-bold mb-4">Set your theme</h3>
                            <div class="space-y-3">
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 mb-1">Theme</label>
                                    <input type="text" id="theme-input" value="Autumn moon" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-800">
                                </div>
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 mb-1">Scroll (bokuseki)</label>
                                    <input type="text" id="scroll-input" value="一期一会" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-800">
                                </div>
                                <div class="grid grid-cols-2 gap-3">
                                    <div>
                                        <label class="block text-sm font-medium text-gray-700 mb-1">Tea bowl</label>
                                        <select id="bowl-select" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-800">
                                            <option>Ido</option>
                                            <option>Raku</option>
                                            <option>Tenmoku</option>
                                            <option>Shino</option>
                                            <option>Oribe</option>
                                            <option>Hagi</option>
                                            <option>Karatsu</option>
                                        </select>
                                    </div>
                                    <div>
                                        <label class="block text-sm font-medium text-gray-700 mb-1">Tea caddy</label>
                                        <select id="caddy-select" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-800">
                                            <option>Chaire</option>
                                            <option>Natsume</option>
                                        </select>
                                    </div>
                                </div>
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 mb-1">Flower vase</label>
                                    <select id="vase-select" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-800">
                                        <option>Bamboo (node-cut)</option>
                                        <option>Ceramic (Shigaraki)</option>
                                        <option>Bronze hanging</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="bg-white rounded-lg border border-gray-200 p-6">
                            <h3 class="text-xl font-bold mb-4">Curatorial guidance</h3>
                            <p class="text-gray-700 mb-3 text-sm">General heuristics drawn from orthodox practice and connoisseurship.</p>
                            <ul class="list-disc pl-5 text-sm text-gray-700 space-y-1">
                                <li>Choose a clear shudai (theme): seasonal, literary, or memorial.</li>
                                <li>Balance decorated pieces with quiet anchors; avoid clashing patterns.</li>
                                <li>Do not over-concentrate one maker/kiln; seek textural dialogue.</li>
                                <li>Let bokuseki lead the room; utensils echo the scroll's teaching.</li>
                                <li>Document the set: shifuku, boxes, and notes to build denrai.</li>
                            </ul>
                            <div id="toriawase-notes" class="mt-4 p-4 bg-blue-50 rounded-lg">
                                <h4 class="font-semibold mb-2 text-blue-900">Contextual notes</h4>
                                <ul id="context-notes" class="list-disc pl-5 text-sm text-blue-800 space-y-1">
                                    <!-- Dynamic notes will appear here -->
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>


    </main>

    <!-- Modal -->
    <div id="modal" class="modal">
        <div class="modal-content p-8 max-w-3xl mx-4">
            <button id="modal-close" class="absolute top-4 right-4 p-2 rounded-full hover:bg-gray-100" style="z-index: 10;">
                <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
                </svg>
            </button>
            <div id="modal-body">
                <!-- Modal content will be inserted here -->
            </div>
        </div>
    </div>

    <!-- Footer -->
    <footer class="mt-16 py-8 border-t-2" style="background: var(--zen-secondary); border-color: var(--zen-accent);">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
            <p style="color: var(--zen-text);">© 2025 Chanoyu Interactive. Educational content for the study of the Way of Tea.</p>
            <p class="text-sm mt-2" style="color: var(--zen-text-light);">This site is self-contained for offline use.</p>
        </div>
    </footer>

    <script>
    // Data structures
    const TIMELINE = [
        {
            year: 1191,
            title: "Eisai returns from Song China",
            desc: "Rinzai monk Myōan Eisai brings Zen teachings and powdered tea practice to Japan. Tea aids zazen (wakefulness) and is formalized in monastic charei.",
            tags: ["Zen", "Rinzai", "Origins"]
        },
        {
            year: 1211,
            title: "Kissa Yōjōki (Drinking Tea for Health)",
            desc: "Eisai promotes tea's medicinal value; wins Kamakura patronage and diffuses Zen + tea together.",
            tags: ["Text", "Patronage"]
        },
        {
            year: 1450,
            title: "Murata Jukō & Ikkyū",
            desc: "With guidance from Daitoku-ji abbot Ikkyū, Jukō reframes taste: elevate rustic wamono, pair Zen bokuseki with utensils—seed of wabi-cha.",
            tags: ["Aesthetics", "Wabi-cha"]
        },
        {
            year: 1550,
            title: "Takeno Jōō refines wabi-cha",
            desc: "Consolidates the philosophical and aesthetic program leading toward Rikyū's synthesis.",
            tags: ["Wabi", "Aesthetics"]
        },
        {
            year: 1582,
            title: "Rikyū's synthesis",
            desc: "Small sōan huts, minimal etiquette, domestically guided wares (Raku, Shino, Oribe); tea and Zen seen as one taste (chazen ichimi).",
            tags: ["Rikyū", "Codification"]
        },
        {
            year: 1591,
            title: "Sanmon Incident",
            desc: "Conflict with Toyotomi Hideyoshi culminates in Rikyū's death; illustrates tea's political charge and Daitoku-ji's centrality.",
            tags: ["Politics", "Daitoku-ji"]
        },
        {
            year: 1880,
            title: "First modern Kencha at Kitano Tenman-gū",
            desc: "Tea offerings at shrines/temples go public; from Meiji onward kencha-shiki spread nationwide, re-linking tea and religion in civic space.",
            tags: ["Kencha", "Public Ritual"]
        },
        {
            year: 1940,
            title: "Rikyū 350th memorial at Daitoku-ji",
            desc: "Abbot officiates service; Sen iemoto offer tea; three-day tea gatherings welcome thousands—temple as national cultural stage.",
            tags: ["Memorial", "Temple Venue"]
        }
    ];

    const ROLES = [
        {
            name: "Monk (Zen clergy)",
            bullets: [
                "Spiritual anchor; frames tea as lived Zen (chazen ichimi).",
                "Host (teishu) in temple settings; gatherings as direct teaching.",
                "Artist: bokuseki for tokonoma, chashaku carving/naming (mei).",
                "Arbiter of value: hakogaki (box inscription) authenticates and elevates."
            ],
            details: "Bokuseki is the apex of scroll choices in the alcove; the monk's phrase sets the shudai (theme). A high-ranking abbot's hakogaki (signature + kaō) on a kiribako turns an anonymous utensil into a canonized piece with lineage."
        },
        {
            name: "Tea Master (iemoto / practitioner)",
            bullets: [
                "Creative director: composes toriawase ensembles under a theme.",
                "Guides artisans (e.g., Rikyū⇄Chōjirō → Raku).",
                "Transmits orthodoxy and pedagogy across schools (Senke)."
            ],
            details: "From Jukō to Jōō to Rikyū, the master defines the aesthetic economy of attention—small spaces, rough beauty, moral clarity."
        },
        {
            name: "Artisan (potters, lacquerers, metalworkers, bamboo)",
            bullets: [
                "Translate doctrine into object: Shino, Oribe, Raku, Karatsu, etc.",
                "Institutional ties: Senke Jisshoku (Ten Craftsmen); oniwa-yaki at temples/patrons.",
                "Material diagnostics (kairagi, foot rings, glaze movement) encode connoisseurship."
            ],
            details: "Temple-linked kilns (e.g., Kōdai-ji-gama) and designated families (Jisshoku) institutionalize standards."
        },
        {
            name: "Patron (warriors, merchants, modern sponsors)",
            bullets: [
                "Provide economic engine, spaces, and political cover.",
                "Medieval karamono display → wabi-cha merchant culture → modern cultural tourism."
            ],
            details: "Patronage mediates prestige: from Ashikaga to Hideyoshi to corporate and municipal sponsors."
        }
    ];

    const TEMPLES = [
        { 
            name: "Daitoku-ji", 
            kanji: "大徳寺",
            city: "Kyoto", 
            sect: "Rinzai", 
            roles: ["tea-friendly hub", "memorial venues", "abbots as calligraphers"], 
            notes: "Subtemples host tsukigama (28th); deep ties to Rikyū and later masters.",
            details: "Founded in 1315, Daitoku-ji became the spiritual center of wabi-cha. Its 22 subtemples include Kōtō-in (高桐院) where Hosokawa Tadaoki is buried, and Zuihō-in (瑞峯院) with its famous dry landscape garden. Abbots like Ikkyū and Takuan left profound marks on tea culture through their calligraphy and direct guidance to tea masters."
        },
        { 
            name: "Myōshin-ji", 
            kanji: "妙心寺",
            city: "Kyoto", 
            sect: "Rinzai", 
            roles: ["historically stricter"], 
            notes: "Periods of discouraging tea among clergy; instructive counterpoint to Daitoku-ji.",
            details: "The largest Rinzai temple complex with 46 subtemples. While historically more austere regarding tea practice among monks, it houses important tea rooms including Taizō-in's (退蔵院) yokushitsu, showing the complex relationship between Zen orthodoxy and tea culture."
        },
        { 
            name: "Kōzan-ji", 
            kanji: "高山寺",
            city: "Kyoto", 
            sect: "Kegon", 
            roles: ["tea garden heritage", "annual kencha"], 
            notes: "Myoe planted tea; yearly offering to his spirit with Uji growers.",
            details: "Home to Japan's oldest tea garden, planted by monk Myōe (明恵) in 1206 using seeds from Eisai. The temple maintains the tradition of 'honcha' (本茶) - original tea. Every May, Uji tea growers offer the first harvest in a solemn kencha ceremony."
        },
        { 
            name: "Zōjō-ji", 
            kanji: "増上寺",
            city: "Tokyo", 
            sect: "Jōdo", 
            roles: ["annual kencha"], 
            notes: "Invites iemoto; ritualized civic link.",
            details: "The Tokugawa family temple hosts major kencha ceremonies where Sen family iemoto offer tea to the Buddha. This Pure Land temple demonstrates how tea transcends sectarian boundaries, linking civic, religious, and aesthetic spheres."
        },
        { 
            name: "Ikegami Honmon-ji", 
            kanji: "池上本門寺",
            city: "Tokyo", 
            sect: "Nichiren", 
            roles: ["chasen kuyō"], 
            notes: "Ceremony retiring whisks; material piety.",
            details: "Famous for its annual chasen kuyō (茶筅供養) where used tea whisks are ritually burned in gratitude. This ceremony, held each autumn, reflects the animistic respect for tools central to tea philosophy - acknowledging the spirit within objects."
        },
        { 
            name: "Gokoku-ji", 
            kanji: "護国寺",
            city: "Tokyo", 
            sect: "Shingon", 
            roles: ["capital hub for large tea events"], 
            notes: "Nickname: a 'tea ceremony honzan'.",
            details: "This Shingon temple, founded by the fifth Tokugawa shogun's mother, hosts massive public tea gatherings. Its Geppō-den (月鳳殿) hall accommodates hundreds for simultaneous tea ceremonies, earning its reputation as Tokyo's 'tea ceremony headquarters'."
        }
    ];

    const EVENTS = [
        { kind: "Tsukigama", desc: "Monthly public tea at temple subprecincts; ticketed; practice in historic spaces.", where: ["Daitoku-ji subtemples"], season: "Monthly" },
        { kind: "Kencha / Kencha-shiki", desc: "Tea offering to deity/buddha; temple/shrine partnership; since 1880 widely public.", where: ["Kitano Tenman-gū", "Daitoku-ji", "Zōjō-ji", "Kōzan-ji"], season: "Varies" },
        { kind: "Kuchikiri no chakai", desc: "Seal-cutting of new tea jars; grinding tencha; lectures + kaiseki.", where: ["Gyokurin-in (Daitoku-ji)", "Uji lineages"], season: "November" },
        { kind: "Memorial Chakai", desc: "Annual rites at gravesites or founder halls (e.g., Enshūki at Kohō-an).", where: ["Kohō-an (Daitoku-ji)"], season: "Annual (date by master)" },
        { kind: "Zen + Tea Experiences", desc: "Curated meditation + shōjin ryōri + private tea; high-end cultural tourism.", where: ["Daiji-in (Daitoku-ji)", "Kennin-ji subtemples"], season: "Year-round" }
    ];

    const UTENSIL_TYPES = [
        {
            type: "Chawan (Tea Bowls)",
            subtypes: [
                { 
                    name: "Tenmoku (天目)", 
                    diagnostics: ["conical profile", "thick iron glaze", "oil-spot/hare's fur"], 
                    lineage: "Song Jian ware via Zen refectories; early tea prestige.", 
                    valueDrivers: ["authentic kiln/period", "fine glaze effects", "provenance, temple links"], 
                    pitfalls: ["modern reproductions", "box-object mismatches"] 
                },
                { 
                    name: "Ido (井戸)", 
                    diagnostics: ["wide lip (kōhai)", "kairagi (sharkskin) at foot", "warm feldspathic glaze"], 
                    lineage: "Korean rice bowls elevated by wabi-cha masters.", 
                    valueDrivers: ["foot and clay quality", "patina", "named provenance"], 
                    pitfalls: ["excessively neat copies", "over-polished foot"] 
                },
                { 
                    name: "Raku (楽)", 
                    diagnostics: ["hand-formed", "soft glaze", "lightweight"], 
                    lineage: "Rikyū–Chōjirō collaboration; orthodox wabi ideal.", 
                    valueDrivers: ["family generation", "iemoto ties", "hakogaki"], 
                    pitfalls: ["post-firing alterations", "spurious boxes"] 
                },
                { 
                    name: "Shino / Oribe", 
                    diagnostics: ["Shino: feldspathic pinholes; Oribe: asymmetry, green copper glaze"], 
                    lineage: "Momoyama innovation with master guidance.", 
                    valueDrivers: ["kiln site", "period", "coherent toriawase role"], 
                    pitfalls: ["attribution drift"] 
                },
                {
                    name: "Hagi (萩)",
                    diagnostics: ["soft porous body", "pinkish-white glaze", "visible crazing"],
                    lineage: "Korean potters brought to Hagi domain; prized for transformation through use.",
                    valueDrivers: ["'seven transformations' patina", "old family kilns", "tea-stained crackle"],
                    pitfalls: ["forced aging", "artificial staining"]
                },
                {
                    name: "Karatsu (唐津)",
                    diagnostics: ["sandy clay body", "simple iron decoration", "sturdy foot"],
                    lineage: "Kyushu kilns with Korean influence; 'First Ido, second Raku, third Karatsu'.",
                    valueDrivers: ["e-garatsu painted designs", "Korean potter lineages", "natural ash deposits"],
                    pitfalls: ["modern mass production", "confused attributions"]
                }
            ]
        },
        {
            type: "Chaire & Natsume (Tea Caddies)",
            subtypes: [
                { 
                    name: "Chaire (濃茶)", 
                    diagnostics: ["stoneware", "ivory lid (old)", "silk shifuku"], 
                    lineage: "karamono prestige; named meibutsu.", 
                    valueDrivers: ["named cloth lineage", "hakogaki", "old denrai"], 
                    pitfalls: ["replaced lids/cloth"] 
                },
                { 
                    name: "Natsume (薄茶)", 
                    diagnostics: ["lacquered wood", "form/finish consistency"], 
                    lineage: "Senke Jisshoku lacquer families.", 
                    valueDrivers: ["maker family", "finish quality"], 
                    pitfalls: ["later relacquering"] 
                }
            ]
        },
        {
            type: "Kama / Mizusashi / Kakejiku / Hanaire",
            subtypes: [
                { 
                    name: "Kama (釜)", 
                    diagnostics: ["iron casting seam", "shoulder inscription"], 
                    lineage: "tetsubin/kama smith lineages.", 
                    valueDrivers: ["smith school", "sound", "surface"] 
                },
                { 
                    name: "Mizusashi (水指)", 
                    diagnostics: ["proportion to chawan", "lid fit"], 
                    lineage: "ceramic or lacquer; visual anchor.", 
                    valueDrivers: ["material coherence", "theme fit"] 
                },
                { 
                    name: "Kakejiku (掛軸)", 
                    diagnostics: ["bokuseki content", "paper/mount age"], 
                    lineage: "Zen calligraphy as spiritual theme.", 
                    valueDrivers: ["monk/abbot hand", "phrase relevance"], 
                    pitfalls: ["re-mounted scrolls hiding era"] 
                },
                { 
                    name: "Hanaire (花入)", 
                    diagnostics: ["bamboo nodes", "cut marks"], 
                    lineage: "rustic naturalism; temple garden motifs.", 
                    valueDrivers: ["maker/monk carving", "surface patina"] 
                },
                {
                    name: "Chashaku (茶杓)",
                    diagnostics: ["bamboo node placement", "curve angle", "tip shape"],
                    lineage: "Tea scoop carved by masters/monks; most intimate utensil.",
                    valueDrivers: ["carver identity", "poetic name (mei)", "original筒 (tsutsu) case"],
                    pitfalls: ["posthumous naming", "mismatched cases"]
                }
            ]
        }
    ];

    // Quotes shared with history page (subset or full list)
    const QUOTES = [
    // Philosophical Teachings and Zen Insights
    { author: '栄西（明菴栄西）', source: '『喫茶養生記』', jp: '茶は養生の仙薬なり。延齢の妙術なり。', en: 'Tea is a miraculous elixir for health, a wondrous method for longevity.' },
    { author: '村田珠光', source: '『珠光心の文』', jp: '心の師とはなれ、心を師とせざれ。', en: 'Become the master of your mind; do not let your mind become your master.' },
    { author: '村田珠光', source: '—', jp: '巧者をばそねみ、初心の者をば見下す事、一段勿体無き事共也。', en: 'To envy the adept and to look down upon the beginner are exceedingly deplorable things.' },
    { author: '千利休', source: '—', jp: '頭を下げて守れるものもあれば、頭を下げる故に守れないものもある。', en: 'There are things that can be preserved by bowing one’s head, and things that, by bowing, one cannot preserve.' },
    { author: '千利休', source: '—', jp: '家は漏らぬほど、食事は飢えぬほどにて足ることなり。', en: 'A house is sufficient if it does not leak; food is enough if it keeps one from hunger.' },
    { author: '一休宗純', source: '—', jp: '大空の月、もろもろの水に宿りたまうといえども、濁れる水には宿りたまわず、澄める水のみ宿りたまうがごとし。', en: 'The full moon of the sky reflects in every pool of water; yet it will not dwell in cloudy water, only in water that is clear.' },
    { author: '一休宗純', source: '—', jp: '今日ほめて明日わるく言う人の口。泣くも笑うも嘘の世の中。', en: 'Today they praise you, tomorrow they malign you. In this world of ours, both tears and laughter are lies.' },
    { author: '一休宗純', source: '—', jp: '世の中は食うては糞して寝て起きて、さてその後は死ぬるばかりよ。', en: 'The world is nothing more than eating, shitting, sleeping, and waking — and after that, all that remains is to die.' },
    { author: '一休宗純', source: '—', jp: '死にとうない。', en: 'I don’t want to die.' },

    // Tea Practice and Etiquette Principles
    { author: '千利休', source: '—', jp: '茶の湯とはただ湯をわかし茶を点てて飲むばかりなる事と知るべし。', en: 'Tea ceremony is nothing other than boiling water, making tea, and drinking it — that is all you need to understand.' },
    { author: '千利休', source: '「七則」（伝）', jp: '茶は服のよきように、炭は湯の沸くように、夏は涼しく冬は暖かに、花は野にあるように、刻限は早めに、降らずとも雨の用意、相客に心せよ。', en: 'Serve tea to suit your guests; lay the charcoal so the water boils well; in summer provide coolness, in winter warmth; arrange flowers as though in the field; be ahead of time; prepare for rain even if it does not fall; and give every consideration to your fellow guests.' },
    { author: '千利休', source: '—', jp: '常の茶湯なりとも、路地へ入るより出づるまで、一期に一度の会のように亭主を敬ひ畏るべし。', en: 'Even if it is an ordinary tea gathering, from entering the roji until departing, honor and revere the host as if it were a once-in-a-lifetime meeting.' },
    { author: '千利休', source: '—', jp: '時ならず客の来らば、点前をば心は草に、技を慎め。', en: 'If an unexpected guest arrives, perform the procedure with a humble, grass-like heart, and take utmost care in your technique.' },
    { author: '千利休', source: '—', jp: '何にても置き付けかへる手離れは、恋しき人に別るると知れ。', en: 'Whenever you set down an utensil and withdraw your hand, do so as if parting from a beloved person.' },
    { author: '千利休', source: '—', jp: '習ひつつ見てこそ習へ、習はずによしあし言ふは愚かなりけり。', en: 'Learn by practice and observation before you speak; to judge good or bad without learning is folly.' },
    { author: '千利休', source: '—', jp: '（弟子に向かって）もしこれができたら、私はあなたの弟子になりましょう。', en: 'To a pupil: “If you can truly do that, then I shall become your disciple.”' },

    // Wabi-Sabi Aesthetics and Poetry
    { author: '村田珠光', source: '—', jp: '月も雲間のなきは嫌にて候。', en: 'I dislike a moon with no veil of clouds.' },
    { author: '村田珠光', source: '—', jp: '一年の内にも十月こそ侘びなれ。', en: 'Of all the months, the Tenth Month is the most wabi.' },
    { author: '武野紹鴎', source: '—', jp: '心敬法師連歌の語に曰く、「連歌は枯れかじけて寒かれ」…茶の湯の果ても、其ごとく成したきと紹鴎常に云う。', en: 'As the renga master Shinkei said, “Linked verse should be withered and chilled.” Jōō would often add, “I wish the ultimate state of tea to be like that as well.”' },
    { author: '千宗旦', source: '—', jp: '茶の湯とは梅寒菊に黄ばみ落ち、青竹枯木暁の霜。', en: 'Tea is [like] plum blossoms in the cold, chrysanthemums yellowing and falling, green bamboo, bare trees, and frost at dawn.' },
    { author: '千利休', source: '—', jp: '花見より帰りの人に茶の湯せば、花鳥の絵をも花も置くまじ。', en: 'If you host tea for one returning from flower-viewing, do not display flower-and-bird paintings, nor set out blossoms.' }
  ];

    // Curated Toriawase presets (gallery)
    const TORIAWASE_PRESETS = [
        { id: 'P01', title: 'Autumn Moon (Orthodox)', season: 'Autumn', occasion: 'MoonViewing', formality: 'High', theme: 'Autumn moon', scroll: '一期一会', bowl: 'Raku', caddy: 'Chaire', vase: 'Bamboo (node-cut)' },
        { id: 'P02', title: 'Harvest Moon (Formal)', season: 'Autumn', occasion: 'MoonViewing', formality: 'High', theme: 'Harvest moon', scroll: '無', bowl: 'Tenmoku', caddy: 'Chaire', vase: 'Bronze hanging' },
        { id: 'P03', title: 'Maple Quiet', season: 'Autumn', occasion: 'Chakai', formality: 'Medium', theme: 'Autumn leaves', scroll: '日々是好日', bowl: 'Ido', caddy: 'Chaire', vase: 'Ceramic (Shigaraki)' },
        { id: 'P04', title: 'Kuchikiri (Koicha)', season: 'Autumn', occasion: 'Chaji', formality: 'High', theme: 'Kuchikiri', scroll: '和敬清寂', bowl: 'Tenmoku', caddy: 'Chaire', vase: 'Bronze hanging' },
        { id: 'P05', title: 'Winter Quiet', season: 'Winter', occasion: 'Chaji', formality: 'High', theme: 'Snow silence', scroll: '無', bowl: 'Tenmoku', caddy: 'Chaire', vase: 'Bamboo (node-cut)' },
        { id: 'P06', title: 'New Year (Formal)', season: 'NewYear', occasion: 'Chaji', formality: 'High', theme: 'New Year auspice', scroll: '和敬清寂', bowl: 'Tenmoku', caddy: 'Chaire', vase: 'Bronze hanging' },
        { id: 'P07', title: 'Early Spring Plum', season: 'Spring', occasion: 'Chakai', formality: 'Medium', theme: 'First plum', scroll: '日々是好日', bowl: 'Hagi', caddy: 'Natsume', vase: 'Bamboo (node-cut)' },
        { id: 'P08', title: 'Sakura Drizzle', season: 'Spring', occasion: 'Chakai', formality: 'Medium', theme: 'Cherry rain', scroll: '雲水', bowl: 'Shino', caddy: 'Chaire', vase: 'Bamboo (node-cut)' },
        { id: 'P09', title: 'Fresh Green (Playful)', season: 'Spring', occasion: 'Chakai', formality: 'Low', theme: 'New shoots', scroll: '日々是好日', bowl: 'Oribe', caddy: 'Chaire', vase: 'Ceramic (Shigaraki)' },
        { id: 'P10', title: 'Rainy Season Cool', season: 'Summer', occasion: 'Chakai', formality: 'Low', theme: 'Cool water', scroll: '雲水', bowl: 'Karatsu', caddy: 'Natsume', vase: 'Bamboo (node-cut)' },
        { id: 'P11', title: 'High Summer Clarity', season: 'Summer', occasion: 'Chakai', formality: 'Low', theme: 'Wind bell', scroll: '日々是好日', bowl: 'Karatsu', caddy: 'Natsume', vase: 'Ceramic (Shigaraki)' },
        { id: 'P12', title: 'Memorial Dignity', season: 'Autumn', occasion: 'Memorial', formality: 'High', theme: 'Memorial service', scroll: '無', bowl: 'Tenmoku', caddy: 'Chaire', vase: 'Bronze hanging' },
        { id: 'P13', title: 'Tea and Zen One Taste', season: 'Winter', occasion: 'Chaji', formality: 'High', theme: 'Chazen ichimi', scroll: '茶禅一味', bowl: 'Raku', caddy: 'Chaire', vase: 'Bamboo (node-cut)' },
        { id: 'P14', title: 'Wabi Anchor', season: 'Autumn', occasion: 'Chakai', formality: 'Medium', theme: 'Rust and grass', scroll: '日々是好日', bowl: 'Ido', caddy: 'Chaire', vase: 'Ceramic (Shigaraki)' },
        { id: 'P15', title: 'Momoyama Play', season: 'Spring', occasion: 'Chakai', formality: 'Low', theme: 'Asymmetry', scroll: '松風', bowl: 'Oribe', caddy: 'Chaire', vase: 'Ceramic (Shigaraki)' },
        { id: 'P16', title: 'Rikyū Orthodoxy', season: 'Winter', occasion: 'Chaji', formality: 'High', theme: 'Seiza and quiet', scroll: '和敬清寂', bowl: 'Raku', caddy: 'Chaire', vase: 'Bamboo (node-cut)' },
        { id: 'P17', title: 'Everyday Good Day', season: 'Any', occasion: 'Chakai', formality: 'Medium', theme: 'Ordinary suchness', scroll: '日々是好日', bowl: 'Karatsu', caddy: 'Natsume', vase: 'Bamboo (node-cut)' },
        { id: 'P18', title: 'Hagi Seven Transformations', season: 'Autumn', occasion: 'Chakai', formality: 'Medium', theme: 'Patina', scroll: '一期一会', bowl: 'Hagi', caddy: 'Chaire', vase: 'Ceramic (Shigaraki)' },
        { id: 'P19', title: 'Shino Snowfield', season: 'Winter', occasion: 'Chakai', formality: 'Medium', theme: 'Snow garden', scroll: '和敬清寂', bowl: 'Shino', caddy: 'Chaire', vase: 'Bamboo (node-cut)' },
        { id: 'P20', title: 'Karatsu Autumn Grass', season: 'Autumn', occasion: 'Chakai', formality: 'Medium', theme: 'Autumn grass', scroll: '松風', bowl: 'Karatsu', caddy: 'Natsume', vase: 'Ceramic (Shigaraki)' },
        { id: 'P21', title: 'Ido Harvest Warmth', season: 'Autumn', occasion: 'Chakai', formality: 'Medium', theme: 'Harvest hearth', scroll: '日々是好日', bowl: 'Ido', caddy: 'Chaire', vase: 'Bamboo (node-cut)' },
        { id: 'P22', title: 'Bronze Gravitas', season: 'Winter', occasion: 'Memorial', formality: 'High', theme: 'Gratitude', scroll: '無', bowl: 'Raku', caddy: 'Chaire', vase: 'Bronze hanging' }
    ];

    // Translation dictionary for the translator
    const TRANSLATION_DICTIONARY = [
    // Core concepts
    { japanese: "茶の湯", romaji: "chanoyu", english: "Way of Tea", explanation: "The Japanese tea ceremony; aesthetic–ethical practice centered on preparing and sharing matcha." },
    { japanese: "茶道", romaji: "chadō / sadō", english: "Way of Tea", explanation: "Alternate reading; emphasizes the ‘dō’ (Way) as a lifelong discipline." },
    { japanese: "侘茶", romaji: "wabicha", english: "wabi-style tea", explanation: "Rustic, introspective tea developed by Jukō, Jōō, and perfected by Rikyū." },
    { japanese: "侘び寂び", romaji: "wabi-sabi", english: "imperfect/aged beauty", explanation: "Aesthetic of humble simplicity (wabi) and patina of time (sabi)." },
    { japanese: "茶禅一味", romaji: "chazen ichimi", english: "tea and Zen are one taste", explanation: "Tea practice and Zen insight share the same essence." },
    { japanese: "一期一会", romaji: "ichigo ichie", english: "one time, one meeting", explanation: "Each encounter is unique and unrepeatable." },
    { japanese: "四規", romaji: "shiki", english: "four principles", explanation: "Harmony (和), Respect (敬), Purity (清), Tranquility (寂) articulated by Rikyū." },
    { japanese: "和敬清寂", romaji: "wa kei sei jaku", english: "harmony, respect, purity, tranquility", explanation: "Mnemonic of the four principles guiding tea." },
    { japanese: "利休七則", romaji: "Rikyū shichisoku", english: "Rikyū’s Seven Rules", explanation: "Practical precepts on preparation, seasonality, and attentiveness." },
  
    // People (masters, monks, patrons)
    { japanese: "栄西（明菴栄西）", romaji: "Eisai (Myōan Eisai)", english: "Eisai", explanation: "Rinzai monk who reintroduced tea from Song China; author of Kissa Yōjōki (1211)." },
    { japanese: "明恵", romaji: "Myoe", english: "Myoe", explanation: "Kegon monk linked to early tea cultivation at Kōzan-ji." },
    { japanese: "一休宗純", romaji: "Ikkyū Sōjun", english: "Ikkyū Sōjun", explanation: "Iconoclastic Daitoku-ji abbot; influenced Murata Jukō." },
    { japanese: "村田珠光", romaji: "Murata Jukō", english: "Murata Jukō", explanation: "Early theorist of wabi-oriented tea aesthetics." },
    { japanese: "武野紹鴎", romaji: "Takeno Jōō", english: "Takeno Jōō", explanation: "Merchant-master who refined wabi-cha; mentor to Rikyū." },
    { japanese: "千利休", romaji: "Sen no Rikyū", english: "Sen no Rikyū", explanation: "Pivotal tea master; synthesized wabicha; executed in 1591." },
    { japanese: "古田織部", romaji: "Furuta Oribe", english: "Furuta Oribe", explanation: "Warrior–tea master; playful asymmetry; Oribe ware patron." },
    { japanese: "小堀遠州", romaji: "Kobori Enshū", english: "Kobori Enshū", explanation: "Aristocratic master; refined, elegant taste; garden and architecture patron." },
    { japanese: "千宗旦", romaji: "Sen Sōtan", english: "Sen Sōtan", explanation: "Rikyū’s grandson; crucial transmitter of Sen family lineages." },
    { japanese: "千宗室", romaji: "Sen Sōshitsu", english: "Sen Sōshitsu", explanation: "Hereditary iemoto name of Urasenke head." },
    { japanese: "山上宗二", romaji: "Yamanoue Sōji", english: "Yamanoue Sōji", explanation: "Disciple and chronicler; author of Yamanoue Sōji ki." },
    { japanese: "長次郎", romaji: "Chōjirō", english: "Chōjirō", explanation: "First Raku potter who worked under Rikyū’s guidance." },
    { japanese: "豊臣秀吉", romaji: "Toyotomi Hideyoshi", english: "Toyotomi Hideyoshi", explanation: "Warlord patron; staged the 1587 Kitano Grand Tea Gathering." },
  
    // Schools & iemoto
    { japanese: "表千家", romaji: "Omotesenke", english: "Omotesenke school", explanation: "One of the three Sen families; HQ: Konnichi-an." },
    { japanese: "裏千家", romaji: "Urasenke", english: "Urasenke school", explanation: "One of the three Sen families; HQ: Fushin-an; global outreach." },
    { japanese: "武者小路千家", romaji: "Mushanokōjisenke", english: "Mushanokōji Senke", explanation: "One of the three Sen families; HQ: Kankyū-an." },
    { japanese: "家元", romaji: "iemoto", english: "head of school", explanation: "Hereditary head who defines and transmits forms and licenses." },
    { japanese: "千家十職", romaji: "Senke Jisshoku", english: "Ten Craftsmen of the Sen houses", explanation: "Traditional artisan families supporting the Sen schools." },
  
    // Temples & shrines
    { japanese: "大徳寺", romaji: "Daitoku-ji", english: "Daitoku-ji (Kyoto)", explanation: "Rinzai temple complex central to chanoyu; numerous subtemples host tea." },
    { japanese: "妙心寺", romaji: "Myōshin-ji", english: "Myōshin-ji (Kyoto)", explanation: "Large Rinzai complex; historically stricter on clergy participation in tea." },
    { japanese: "建仁寺", romaji: "Kennin-ji", english: "Kennin-ji (Kyoto)", explanation: "Oldest Zen temple in Kyoto; associated with Eisai; hosts tea culture programs." },
    { japanese: "高山寺", romaji: "Kōzan-ji", english: "Kōzan-ji (Kyoto)", explanation: "Linked to early tea cultivation; annual kencha with Uji growers." },
    { japanese: "増上寺", romaji: "Zōjō-ji", english: "Zōjō-ji (Tokyo)", explanation: "Pure Land temple; public kencha ceremonies with iemoto participation." },
    { japanese: "池上本門寺", romaji: "Ikegami Honmon-ji", english: "Ikegami Honmon-ji (Tokyo)", explanation: "Nichiren temple; chasen kuyō (whisk memorial) rites." },
    { japanese: "護国寺", romaji: "Gokoku-ji", english: "Gokoku-ji (Tokyo)", explanation: "Shingon temple; large-scale public tea events." },
    { japanese: "北野天満宮", romaji: "Kitano Tenman-gū", english: "Kitano Tenmangū", explanation: "Shrine site of Hideyoshi’s 1587 Grand Tea Gathering; modern kencha." },
  
    // Historical texts & documents
    { japanese: "喫茶養生記", romaji: "Kissa Yōjōki", english: "Drinking Tea for Health", explanation: "Eisai’s treatise (1211) promoting tea’s medicinal value." },
    { japanese: "南方録", romaji: "Nanpōroku", english: "Nanpōroku", explanation: "Apocryphal records attributed to Rikyū; influential in later pedagogy." },
    { japanese: "山上宗二記", romaji: "Yamanoue Sōji ki", english: "Record of Yamanoue Sōji", explanation: "Early notes on tea taste, practice, and notable utensils." },
    { japanese: "君台観左右帳記", romaji: "Kundaikan Sōchōki", english: "Kundaikan Sōchōki", explanation: "Early Muromachi connoisseur text on display aesthetics and objects." },
    { japanese: "利休百首", romaji: "Rikyū Hyakushu", english: "Rikyū’s Hundred Poems", explanation: "Didactic verses on spirit and technique of tea." },
    { japanese: "珠光心の文", romaji: "Jukō kokoro no fumi", english: "Jukō’s Letter on the Heart", explanation: "Letter outlining wabi sensibility in tea." },
    { japanese: "名物記", romaji: "Meibutsuki", english: "Catalogs of celebrated objects", explanation: "Records of meibutsu utensils and their provenance." },
  
    // Events & eras
    { japanese: "北野大茶湯", romaji: "Kitano Ōchanoyu", english: "Kitano Grand Tea Gathering (1587)", explanation: "Mass tea event staged by Toyotomi Hideyoshi in Kyoto." },
    { japanese: "口切の儀", romaji: "kuchikiri no gi", english: "seal-cutting rite", explanation: "Ceremonially opening the year’s tea jar in late autumn." },
    { japanese: "月釜", romaji: "tsukigama", english: "monthly tea gathering", explanation: "Recurring public tea at temples/subtemples." },
    { japanese: "献茶", romaji: "kencha", english: "tea offering", explanation: "Ritual offering of tea at shrines/temples; widely public from Meiji." },
    { japanese: "茶礼", romaji: "charei", english: "monastic tea etiquette", explanation: "Zen monastic ritual tea; etiquette for wakefulness and harmony." },
    { japanese: "闘茶", romaji: "tōcha", english: "tea-guessing contests", explanation: "Medieval competitive tastings; prehistory of chanoyu." },
    { japanese: "利休切腹", romaji: "Rikyū seppuku", english: "Rikyū’s death (1591)", explanation: "Execution under Hideyoshi; marks tea’s political entanglement." },
  
    // Spaces & architecture
    { japanese: "茶室", romaji: "chashitsu", english: "tea room", explanation: "Purpose-built room or hut for tea; often small, rustic." },
    { japanese: "草庵", romaji: "sōan", english: "thatched hut", explanation: "Rustic tea hut form central to wabi aesthetics." },
    { japanese: "床の間", romaji: "tokonoma", english: "alcove", explanation: "Display niche for scroll and flowers; theme-setting space." },
    { japanese: "躙口", romaji: "nijiriguchi", english: "crawl-through entrance", explanation: "Small entrance symbolizing humility and equality." },
    { japanese: "露地", romaji: "roji", english: "tea garden path", explanation: "Approach garden preparing guests’ mind; ‘dewy ground’." },
    { japanese: "蹲", romaji: "tsukubai", english: "ablution basin", explanation: "Stone water basin for ritual cleansing before entry." },
    { japanese: "待合", romaji: "machiai", english: "waiting area", explanation: "Shelter where guests assemble before the call." },
    { japanese: "腰掛待合", romaji: "koshikake machiai", english: "bench waiting shelter", explanation: "Roji shelter with bench for guests." },
    { japanese: "中門", romaji: "chūmon", english: "inner gate", explanation: "Gate demarcating inner roji precinct." },
    { japanese: "水屋", romaji: "mizuya", english: "preparation area", explanation: "Back room for preparation, cleaning, and staging utensils." },
    { japanese: "炉", romaji: "ro", english: "sunken hearth", explanation: "Winter hearth cut into tatami; used in cold season." },
    { japanese: "風炉", romaji: "furo", english: "portable brazier", explanation: "Summer brazier used when the hearth is closed." },
  
    // Utensils (core)
    { japanese: "茶碗", romaji: "chawan", english: "tea bowl", explanation: "Bowl for drinking matcha; many archetypes (Ido, Raku, etc.)." },
    { japanese: "天目", romaji: "tenmoku", english: "tenmoku bowl", explanation: "Conical dark-glazed bowl from Song Jian tradition." },
    { japanese: "井戸", romaji: "ido", english: "Ido bowl", explanation: "Elevated Korean rice-bowl type; prized in wabi-cha." },
    { japanese: "楽", romaji: "raku", english: "Raku ware", explanation: "Hand-formed bowls from the Raku family lineage." },
    { japanese: "志野", romaji: "shino", english: "Shino ware", explanation: "Milky feldspathic glaze with pinholes; Momoyama aesthetic." },
    { japanese: "織部", romaji: "oribe", english: "Oribe ware", explanation: "Green copper glazes and bold, asymmetrical design." },
    { japanese: "萩", romaji: "hagi", english: "Hagi ware", explanation: "Soft-bodied ware that develops patina through use." },
    { japanese: "唐津", romaji: "karatsu", english: "Karatsu ware", explanation: "Hizen stoneware with iron brushwork and ash glazes." },
    { japanese: "備前", romaji: "bizen", english: "Bizen ware", explanation: "Unglazed stoneware with natural firing effects." },
    { japanese: "信楽", romaji: "shigaraki", english: "Shigaraki ware", explanation: "Rustic stoneware with feldspathic inclusions." },
    { japanese: "伊賀", romaji: "iga", english: "Iga ware", explanation: "Dynamic Momoyama stoneware with fire-scar effects." },
    { japanese: "瀬戸", romaji: "seto", english: "Seto ware", explanation: "Historic kiln center for glazed wares." },
  
    // Utensils (containers & implements)
    { japanese: "茶入", romaji: "chaire", english: "thick-tea caddy", explanation: "Stoneware caddy for koicha; often with named pouch (shifuku)." },
    { japanese: "棗", romaji: "natsume", english: "thin-tea caddy", explanation: "Lacquered wood container for usucha." },
    { japanese: "仕覆", romaji: "shifuku", english: "drawstring pouch", explanation: "Silk pouch for chaire; carries named textile lineage." },
    { japanese: "茶杓", romaji: "chashaku", english: "tea scoop", explanation: "Bamboo scoop; often carved/named by masters or abbots." },
    { japanese: "茶筅", romaji: "chasen", english: "tea whisk", explanation: "Bamboo whisk used to mix matcha; retired in chasen kuyō rites." },
    { japanese: "茶巾", romaji: "chakin", english: "linen cloth", explanation: "Cloth for wiping the bowl; folded and handled with precision." },
    { japanese: "帛紗", romaji: "fukusa", english: "silk purifying cloth", explanation: "Silk cloth used to ritually purify utensils and as etiquette item." },
    { japanese: "懐紙", romaji: "kaishi", english: "pocket paper", explanation: "Paper for sweets and incidental handling; carried by guests." },
    { japanese: "柄杓", romaji: "hishaku", english: "bamboo ladle", explanation: "Ladle for water; different forms for ro and furo." },
    { japanese: "蓋置", romaji: "futaoki", english: "lid rest", explanation: "Small stand for kettle lid and ladle tip." },
    { japanese: "建水", romaji: "kensui", english: "waste-water bowl", explanation: "Vessel for discarded water during temae." },
    { japanese: "風炉先屏風", romaji: "furosaki byōbu", english: "low folding screen", explanation: "Two-panel screen used near the hearth/brazier." },
    { japanese: "棚", romaji: "tana", english: "display/utensil shelf", explanation: "Varied shelf forms used in certain procedures." },
    { japanese: "長板", romaji: "naga-ita", english: "long board", explanation: "Board used in formal set-ups with furo; supports utensils." },
  
    // Utensils (kettle & water)
    { japanese: "釜", romaji: "kama", english: "iron kettle", explanation: "Cast-iron kettle; form and sound quality prized." },
    { japanese: "鐶", romaji: "kan", english: "kettle rings", explanation: "Removable iron rings for lifting the kettle." },
    { japanese: "水指", romaji: "mizusashi", english: "fresh-water jar", explanation: "Container for fresh water; ceramic or lacquer." },
  
    // Scrolls & documentation
    { japanese: "掛軸", romaji: "kakejiku", english: "hanging scroll", explanation: "Scroll in tokonoma; often Zen calligraphy (bokuseki)." },
    { japanese: "墨蹟", romaji: "bokuseki", english: "Zen calligraphy", explanation: "Brush traces of monks; sets the theme (shudai)." },
    { japanese: "箱書", romaji: "hakogaki", english: "box inscription", explanation: "Inscription on storage box by authority; key to provenance." },
    { japanese: "共箱", romaji: "tomobako", english: "original box", explanation: "Maker’s/authority’s own box accompanying the utensil." },
    { japanese: "花押", romaji: "kaō", english: "stylized signature", explanation: "Cursive seal-like signature used by masters/abbots." },
    { japanese: "銘", romaji: "mei", english: "poetic name", explanation: "Name given to an object or scoop, often seasonal or literary." },
    { japanese: "伝来", romaji: "denrai", english: "provenance", explanation: "Chain of transmission/ownership and documentation." },
    { japanese: "名物", romaji: "meibutsu", english: "celebrated object", explanation: "Famous utensil with storied provenance and high esteem." },
    { japanese: "唐物", romaji: "karamono", english: "Chinese objects", explanation: "Imported Chinese wares prized in medieval display culture." },
    { japanese: "和物", romaji: "wamono", english: "Japanese wares", explanation: "Domestic wares elevated in wabi-cha aesthetics." },
    { japanese: "前大徳", romaji: "zen-daitoku", english: "former Daitoku-ji abbot", explanation: "Honorific preceding inscription by a former abbot." },
    { japanese: "御書付", romaji: "go-shofuda / go-shotsuke", english: "honorific inscription", explanation: "High-prestige endorsement or attestation on a box." },
  
    // Procedures & roles
    { japanese: "点前", romaji: "temae", english: "tea procedure", explanation: "Codified sequence of making and serving tea." },
    { japanese: "稽古", romaji: "keiko", english: "practice", explanation: "Training sessions to internalize forms and etiquette." },
    { japanese: "亭主", romaji: "teishu", english: "host", explanation: "Host of the gathering; directs theme and utensils." },
    { japanese: "半東", romaji: "hantō", english: "assistant host", explanation: "Assistant who supports the host’s service." },
    { japanese: "客", romaji: "kyaku", english: "guest", explanation: "Participant(s) receiving tea; observe etiquette and haiken." },
    { japanese: "正客", romaji: "shōkyaku", english: "principal guest", explanation: "Lead guest who speaks for the group and interacts with host." },
    { japanese: "拝見", romaji: "haiken", english: "utensil appreciation", explanation: "Formal viewing of utensils; questions/answers on provenance." },
    { japanese: "茶事", romaji: "chaji", english: "full tea gathering", explanation: "Formal event with kaiseki meal, charcoal, koicha and usucha." },
    { japanese: "茶会", romaji: "chakai", english: "tea gathering", explanation: "Lighter event (often without full meal/charcoal sequence)." },
    { japanese: "懐石", romaji: "kaiseki", english: "tea cuisine", explanation: "Seasonal meal preceding thick tea; restrained and mindful." },
    { japanese: "主菓子", romaji: "omogashi", english: "fresh sweet", explanation: "Moist seasonal sweet served typically before koicha." },
    { japanese: "干菓子", romaji: "higashi", english: "dry sweets", explanation: "Dry confections served with usucha." },
    { japanese: "初炭", romaji: "shozumi", english: "first charcoal", explanation: "Opening charcoal procedure to prepare the kettle." },
    { japanese: "後炭", romaji: "gozumi", english: "later charcoal", explanation: "Charcoal procedure after intermission to refresh the fire." },
  
    // Tea types & production
    { japanese: "抹茶", romaji: "matcha", english: "powdered green tea", explanation: "Stone-milled green tea made from shade-grown tencha." },
    { japanese: "碾茶", romaji: "tencha", english: "leaf for matcha", explanation: "Unmilled leaf base for matcha; destemmed/deveined." },
    { japanese: "玉露", romaji: "gyokuro", english: "gyokuro", explanation: "Shade-grown leaf for steeped tea (sencha tradition), not whisked." },
    { japanese: "煎茶", romaji: "sencha", english: "steeped green tea", explanation: "Brewed tea tradition distinct from chanoyu." },
    { japanese: "茶壺", romaji: "chatsubo", english: "tea jar", explanation: "Storage jar for leaf; opened at kuchikiri in late autumn." },
    { japanese: "茶臼", romaji: "chausu", english: "stone mill", explanation: "Hand mill used to grind tencha into matcha." },
  
    // Aesthetic & phrase repertoire
    { japanese: "無", romaji: "mu", english: "nothingness", explanation: "Zen key term; frequent scroll subject encouraging emptiness of self." },
    { japanese: "空", romaji: "kū", english: "emptiness", explanation: "Mahayana concept of interdependence; also a scroll theme." },
    { japanese: "日々是好日", romaji: "hibi kore kōjitsu", english: "every day a good day", explanation: "Zen phrase on everyday suchness; common bokuseki theme." },
    { japanese: "一期", romaji: "ichigo", english: "one lifetime", explanation: "Component of ichigo ichie; emphasizes rarity of encounters." },
  
    // Connoisseurship & markets
    { japanese: "出自", romaji: "shutsuji", english: "origin", explanation: "Maker/kiln/period identity of an object." },
    { japanese: "由緒", romaji: "yui sho", english: "pedigree", explanation: "Distinguished history or association enhancing value." },
    { japanese: "極め", romaji: "kiwame", english: "attribution", explanation: "Formal judgment assigning maker/period; often by authority." },
  
    // Regions & kilns (geography)
    { japanese: "宇治", romaji: "Uji", english: "Uji (Kyoto)", explanation: "Historic center of matcha cultivation and blending." },
    { japanese: "美濃", romaji: "Mino", english: "Mino region", explanation: "Shino/Oribe kiln heartland (Gifu)." },
    { japanese: "唐津（肥前）", romaji: "Karatsu (Hizen)", english: "Karatsu (Saga)", explanation: "Kyushu kiln zone producing Karatsu ware." },
    { japanese: "萩（長州）", romaji: "Hagi (Chōshū)", english: "Hagi (Yamaguchi)", explanation: "Domain kilns fostering Hagi ware." },
    { japanese: "信楽（近江）", romaji: "Shigaraki (Ōmi)", english: "Shigaraki (Shiga)", explanation: "Ancient kiln site for rustic stoneware." },
    { japanese: "瀬戸（尾張）", romaji: "Seto (Owari)", english: "Seto (Aichi)", explanation: "Historic production center; wide glaze repertoire." },
    { japanese: "伊賀（伊賀国）", romaji: "Iga", english: "Iga (Mie)", explanation: "Momoyama stoneware with powerful firing effects." },
    { japanese: "楽家", romaji: "Raku-ke", english: "Raku family", explanation: "Potter lineage producing Raku ware for tea." },
  
    // Additional practice terms
    { japanese: "会所の茶", romaji: "kaisho no cha", english: "salon-style tea", explanation: "Pre-wabi display-oriented gatherings of medieval elites." },
    { japanese: "書院の茶", romaji: "shoin no cha", english: "shoin-style tea", explanation: "Formal architectural setting preceding wabi-cha huts." },
    { japanese: "取り合わせ", romaji: "toriawase", english: "ensemble curation", explanation: "Curating a coherent set of utensils around a theme." },
    { japanese: "主題", romaji: "shudai", english: "theme", explanation: "The guiding idea expressed by the scroll and utensils." },
    { japanese: "茶花", romaji: "chabana", english: "tea flowers", explanation: "Seasonal wildflowers arranged simply for the alcove." },
    { japanese: "花入", romaji: "hanaire", english: "flower vase", explanation: "Vase for chabana; bamboo, ceramic, or metal." },
    { japanese: "香合", romaji: "kōgō", english: "incense container", explanation: "Small container for incense used in charcoal procedures." },
    { japanese: "炭点前", romaji: "sumi-demae", english: "charcoal procedure", explanation: "Ritualized tending of the fire before/after the meal." },
  
    // Validations & boxes (market literacy)
    { japanese: "書付", romaji: "shōtsuke / shofuda", english: "inscription", explanation: "General term for written attestation or note." },
    { japanese: "桐箱", romaji: "kiribako", english: "paulownia box", explanation: "Standard storage box wood; stable for humidity control." },
    { japanese: "添状", romaji: "soejō", english: "accompanying note", explanation: "Supplemental paper documenting details/provenance." },
  
    // Guest etiquette & sequence markers
    { japanese: "初座", romaji: "shozā / shozā (shōza)", english: "first seating", explanation: "First half of chaji: kaiseki and first charcoal." },
    { japanese: "中立", romaji: "chūritsu", english: "intermission", explanation: "Break between first and second seating." },
    { japanese: "後座", romaji: "goza", english: "second seating", explanation: "Second half of chaji: koicha, usucha, later charcoal." },
  
    // Additional utensil details
    { japanese: "台子", romaji: "daisu", english: "formal stand", explanation: "Classical stand used for highly formal procedures." },
    { japanese: "火箸", romaji: "hibashi", english: "fire tongs", explanation: "Tongs used during charcoal procedures." },
    { japanese: "羽箒", romaji: "habōki", english: "feather broom", explanation: "Feather brush for gentle cleaning of ash bed." },
  
    // Distinctions in tea service
    { japanese: "濃茶", romaji: "koicha", english: "thick tea", explanation: "Shared, syrupy tea whisked with multiple scoops and less water." },
    { japanese: "薄茶", romaji: "usucha", english: "thin tea", explanation: "Individual, frothy tea whisked lighter and served to each guest." }
    ];
  



    // Initialize
    document.addEventListener('DOMContentLoaded', () => {
        try {
            renderTimeline();
        } catch(e) { console.error('Error in renderTimeline:', e); }
        
        try {
            renderRoles();
        } catch(e) { console.error('Error in renderRoles:', e); }
        
        try {
            renderTemples();
        } catch(e) { console.error('Error in renderTemples:', e); }
        
        try {
            renderUtensils();
        } catch(e) { console.error('Error in renderUtensils:', e); }
        
        try {
            renderEvents();
        } catch(e) { console.error('Error in renderEvents:', e); }
        
        try {
            setupNavigation();
        } catch(e) { console.error('Error in setupNavigation:', e); }
        
        try {
            setupFilters();
        } catch(e) { console.error('Error in setupFilters:', e); }
        
        try {
            setupAccordions();
        } catch(e) { console.error('Error in setupAccordions:', e); }
        
        try {
            setupToriawaseLab();
        } catch(e) { console.error('Error in setupToriawaseLab:', e); }
        
        try {
            setupModal();
        } catch(e) { console.error('Error in setupModal:', e); }
        
        try {
            setupTranslator();
        } catch(e) { console.error('Error in setupTranslator:', e); }
        
        try {
            setupQuotesOnMain();
        } catch(e) { console.error('Error in setupQuotesOnMain:', e); }
    });

    // Render functions
    function renderTimeline() {
        const container = document.getElementById('timeline-container');
        if (!container) {
            console.error('Timeline container not found');
            return;
        }
        // Add comprehensive history card at the top
        const intro = document.createElement('div');
        intro.className = 'relative pl-8 pb-8';
        intro.innerHTML = `
            <div class="timeline-dot"></div>
            <div class="bg-white rounded-lg p-4 shadow hover:shadow-lg transition-shadow cursor-pointer">
                <div class="flex items-baseline justify-between mb-2">
                    <h3 class="text-lg font-bold">Comprehensive History of Chanoyu</h3>
                    <a href="/chanoyu-history/" class="text-sm zen-button">Open</a>
                </div>
                <p class="text-gray-700 text-sm">A self-contained, long-form overview from monastic origins to modern practice: people, temples, utensils, spaces, and rituals.</p>
            </div>
        `;
        container.appendChild(intro);
        TIMELINE.forEach(item => {
        const div = document.createElement('div');
            div.className = 'relative pl-8 pb-8';
        div.innerHTML = `
                <div class="timeline-dot"></div>
                <div class="bg-white rounded-lg p-4 shadow hover:shadow-lg transition-shadow cursor-pointer">
                    <div class="flex items-baseline justify-between mb-2">
                        <h3 class="text-lg font-bold">${item.title}</h3>
                        <span class="text-sm text-gray-500">${item.year}</span>
                    </div>
                    <p class="text-gray-700 text-sm">${item.desc}</p>
                    <div class="flex flex-wrap gap-1 mt-2">
                        ${item.tags.map(tag => `<span class="px-2 py-1 bg-gray-100 text-xs rounded-full">${tag}</span>`).join('')}
                </div>
            </div>
        `;
            container.appendChild(div);
        });
    }

    function renderRoles() {
        const container = document.getElementById('roles-container');
        if (!container) {
            console.error('Roles container not found');
            return;
        }
        ROLES.forEach(role => {
            const div = document.createElement('div');
            div.className = 'bg-white rounded-lg border border-gray-200 p-6 hover:shadow-lg transition-shadow';
            div.innerHTML = `
                <h3 class="text-xl font-bold mb-3">${role.name}</h3>
                <ul class="list-disc pl-5 space-y-1 text-sm text-gray-700">
                    ${role.bullets.map(b => `<li>${b}</li>`).join('')}
                </ul>
                <p class="mt-4 text-sm text-gray-600 italic">${role.details}</p>
            `;
            container.appendChild(div);
        });
    }

    function renderTemples(filter = 'All') {
        const container = document.getElementById('temples-container');
        if (!container) {
            console.error('Temples container not found');
            return;
        }
        container.innerHTML = '';
        const filtered = filter === 'All' ? TEMPLES : TEMPLES.filter(t => t.sect === filter);
        
        filtered.forEach(temple => {
        const div = document.createElement('div');
            div.className = 'temple-card bg-white rounded-lg border border-gray-200 p-4';
        div.innerHTML = `
                <div class="flex items-baseline justify-between mb-2">
                    <h3 class="text-lg font-bold">${temple.name} ${temple.kanji}</h3>
                    <span class="text-sm text-gray-500">${temple.city} · ${temple.sect}</span>
            </div>
                <p class="text-sm text-gray-700 mb-3">${temple.notes}</p>
                <div class="flex flex-wrap gap-1">
                    ${temple.roles.map(r => `<span class="px-2 py-1 bg-gray-100 text-xs rounded-full">${r}</span>`).join('')}
                </div>
            `;
            div.addEventListener('click', () => {
                openModal({
                    title: `${temple.name} ${temple.kanji}`,
                    subtitle: `${temple.city} · ${temple.sect} Buddhism`,
                    content: temple.details,
                    footer: `Roles: ${temple.roles.join(', ')}`
                });
            });
            container.appendChild(div);
        });
    }

    function renderUtensils(filter = 'All') {
        const container = document.getElementById('utensils-container');
        if (!container) {
            console.error('Utensils container not found');
            return;
        }
        container.innerHTML = '';
        
        const filtered = filter === 'All' ? UTENSIL_TYPES : 
            filter === 'Chawan' ? UTENSIL_TYPES.filter(u => u.type.includes('Chawan')) :
            filter === 'Chaire' ? UTENSIL_TYPES.filter(u => u.type.includes('Chaire')) :
            UTENSIL_TYPES.filter(u => u.type.includes('Kama'));
        
        filtered.forEach(category => {
            const section = document.createElement('div');
            section.innerHTML = `
                <h3 class="text-xl font-bold mb-4">${category.type}</h3>
                <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-4">
                    ${category.subtypes.map(item => `
                        <div class="bg-white rounded-lg border border-gray-200 p-4 hover:shadow-lg transition-shadow">
                            <h4 class="font-bold mb-2">${item.name}</h4>
                            ${item.lineage ? `<p class="text-sm text-gray-600 mb-3">${item.lineage}</p>` : ''}
                            <div class="space-y-2">
                                <div class="accordion-wrapper">
                                    <button class="accordion-btn">
                                        <span>Diagnostics</span>
                                        <svg class="w-4 h-4 accordion-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
                                        </svg>
                                    </button>
                                    <div class="accordion-content">
                                        <ul class="list-disc pl-5 text-xs text-gray-600 mt-2">
                                            ${item.diagnostics ? item.diagnostics.map(d => `<li>${d}</li>`).join('') : ''}
                                        </ul>
                                    </div>
                                </div>
                                ${item.valueDrivers ? `
                                <div class="accordion-wrapper">
                                    <button class="accordion-btn">
                                        <span>Value drivers</span>
                                        <svg class="w-4 h-4 accordion-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
                                        </svg>
                                    </button>
                                    <div class="accordion-content">
                                        <ul class="list-disc pl-5 text-xs text-gray-600 mt-2">
                                            ${item.valueDrivers.map(v => `<li>${v}</li>`).join('')}
                                        </ul>
                                    </div>
                                </div>
                                ` : ''}
                                ${item.pitfalls ? `
                                <div class="accordion-wrapper">
                                    <button class="accordion-btn">
                                        <span>Common pitfalls</span>
                                        <svg class="w-4 h-4 accordion-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
                                        </svg>
                                    </button>
                                    <div class="accordion-content">
                                        <ul class="list-disc pl-5 text-xs text-gray-600 mt-2">
                                            ${item.pitfalls.map(p => `<li>${p}</li>`).join('')}
                                        </ul>
                                    </div>
                                </div>
                                ` : ''}
                            </div>
                        </div>
                    `).join('')}
                </div>
            `;
            container.appendChild(section);
        });
        setupAccordions(); // Re-setup accordions for new content
    }

    function renderEvents() {
        const container = document.getElementById('events-container');
        if (!container) {
            console.error('Events container not found');
            return;
        }
        EVENTS.forEach(event => {
            const div = document.createElement('div');
            div.className = 'bg-white rounded-lg border border-gray-200 p-4 hover:shadow-lg transition-shadow';
            div.innerHTML = `
                <div class="flex items-baseline justify-between mb-2">
                    <h3 class="text-lg font-bold">${event.kind}</h3>
                    <span class="text-sm text-gray-500">${event.season}</span>
                    </div>
                <p class="text-sm text-gray-700 mb-3">${event.desc}</p>
                <div class="flex flex-wrap gap-1">
                    ${event.where.map(w => `<span class="px-2 py-1 bg-gray-100 text-xs rounded-full">${w}</span>`).join('')}
                </div>
            `;
            container.appendChild(div);
        });
    }



    // Quotes on main page
    function setupQuotesOnMain() {
        const jpEl = document.getElementById('quote-jp');
        const enEl = document.getElementById('quote-en');
        const metaEl = document.getElementById('quote-meta');
        const prevBtn = document.getElementById('quote-prev');
        const nextBtn = document.getElementById('quote-next');
        
        if (!jpEl || !enEl || !metaEl) {
            console.error('Quote elements not found');
            return;
        }
        
        let currentIndex = Math.floor(Math.random() * QUOTES.length);
        
        function renderQuote() {
            const quote = QUOTES[currentIndex];
            jpEl.textContent = quote.jp;
            enEl.textContent = quote.en;
            metaEl.textContent = quote.source ? `${quote.author}／${quote.source}` : quote.author;
        }
        
        // Initial render
        renderQuote();
        
        // Setup button handlers
        if (prevBtn) {
            prevBtn.onclick = function() {
                currentIndex = (currentIndex - 1 + QUOTES.length) % QUOTES.length;
                renderQuote();
            };
        }
        
        if (nextBtn) {
            nextBtn.onclick = function() {
                currentIndex = (currentIndex + 1) % QUOTES.length;
                renderQuote();
            };
        }
    }

    // Setup functions
    function setupNavigation() {
        const navButtons = document.querySelectorAll('.nav-btn');
        const sections = document.querySelectorAll('.content-section');
        const mobileMenuBtn = document.getElementById('mobile-menu-btn');
        const navMenu = document.getElementById('nav-menu');
        
        if (!navButtons.length || !sections.length) {
            console.warn('Navigation elements not found');
            return;
        }

        navButtons.forEach(btn => {
        btn.addEventListener('click', () => {
                const targetSection = btn.dataset.section;
                
                // Update active button
                navButtons.forEach(b => {
                    b.classList.remove('bg-gray-900', 'text-white');
                    b.classList.add('bg-white', 'border-gray-300');
                });
                btn.classList.remove('bg-white', 'border-gray-300');
                btn.classList.add('bg-gray-900', 'text-white');
                
                // Scroll to section
                document.getElementById(targetSection).scrollIntoView({ behavior: 'smooth', block: 'start' });
                
                // Close mobile menu if open
                if (navMenu.classList.contains('flex') && window.innerWidth < 768) {
                    navMenu.classList.add('hidden');
                    navMenu.classList.remove('flex');
                }
            });
        });

        // Mobile menu toggle
        mobileMenuBtn.addEventListener('click', () => {
            navMenu.classList.toggle('hidden');
            navMenu.classList.toggle('flex');
        });
    }



    function setupFilters() {
        // Temple filters
        document.querySelectorAll('[data-filter]').forEach(btn => {
            btn.addEventListener('click', () => {
                document.querySelectorAll('[data-filter]').forEach(b => {
                    b.classList.remove('active');
                });
                btn.classList.add('active');
                renderTemples(btn.dataset.filter);
            });
        });
        
        // Utensil filters
        document.querySelectorAll('[data-utensil-filter]').forEach(btn => {
            btn.addEventListener('click', () => {
                document.querySelectorAll('[data-utensil-filter]').forEach(b => {
                    b.classList.remove('active');
                });
                btn.classList.add('active');
                renderUtensils(btn.dataset.utensilFilter);
            });
        });
    }

    // Optimized accordion setup - use event delegation
    let accordionInitialized = false;
    
    function setupAccordions() {
        if (accordionInitialized) return; // Prevent multiple event listeners
        accordionInitialized = true;
        
        // Use event delegation on document body for better performance
        document.body.addEventListener('click', (e) => {
            const button = e.target.closest('.accordion-btn');
            if (!button) return;
            
            const content = button.nextElementSibling;
            const icon = button.querySelector('.accordion-icon');
            
            if (content && content.classList.contains('accordion-content')) {
                content.classList.toggle('open');
                if (icon) icon.classList.toggle('rotate');
            }
        });
    }

    function setupToriawaseLab() {
        // Compact presets strip
        const composePanel = document.getElementById('toriawase-compose-panel');
        const filterSeason = document.getElementById('preset-filter-season');
        const filterOccasion = document.getElementById('preset-filter-occasion');
        const surpriseBtn = document.getElementById('preset-surprise');
        
        if (!composePanel) {
            console.warn('Toriawase compose panel not found');
            return;
        }
        const presetStrip = document.getElementById('preset-strip');

        const applyPresetToForm = (p) => {
            const themeEl = document.getElementById('theme-input');
            const scrollEl = document.getElementById('scroll-input');
            const bowlEl = document.getElementById('bowl-select');
            const caddyEl = document.getElementById('caddy-select');
            const vaseEl = document.getElementById('vase-select');
            if (themeEl) themeEl.value = p.theme;
            if (scrollEl) scrollEl.value = p.scroll;
            if (bowlEl) bowlEl.value = p.bowl;
            if (caddyEl) caddyEl.value = p.caddy;
            if (vaseEl) vaseEl.value = p.vase;
        };

        const renderToriawasePresets = () => {
            if (!presetStrip) return;
            presetStrip.innerHTML = '';
            const season = filterSeason?.value || 'All';
            const occasion = filterOccasion?.value || 'All';

            const filtered = TORIAWASE_PRESETS.filter(p =>
                (season === 'All' || p.season === season || (season === 'Any' && p.season === 'Any')) &&
                (occasion === 'All' || p.occasion === occasion)
            );

            filtered.forEach(p => {
                const chip = document.createElement('button');
                chip.className = 'filter-badge text-sm mr-2 mb-2';
                chip.textContent = `${p.title} · ${p.season}`;
                chip.setAttribute('title', `Theme: ${p.theme}\nScroll: ${p.scroll}\nBowl: ${p.bowl}\nCaddy: ${p.caddy}\nVase: ${p.vase}`);
                chip.addEventListener('click', () => { applyPresetToForm(p); analyzeEnsemble(); });
                presetStrip.appendChild(chip);
            });
        };

        filterSeason?.addEventListener('change', renderToriawasePresets);
        filterOccasion?.addEventListener('change', renderToriawasePresets);
        surpriseBtn?.addEventListener('click', () => {
            const season = filterSeason?.value || 'All';
            const occasion = filterOccasion?.value || 'All';
            const pool = TORIAWASE_PRESETS.filter(p =>
                (season === 'All' || p.season === season || (season === 'Any' && p.season === 'Any')) &&
                (occasion === 'All' || p.occasion === occasion)
            );
            const pick = pool[Math.floor(Math.random() * pool.length)] || TORIAWASE_PRESETS[0];
            applyPresetToForm(pick);
            analyzeEnsemble();
        });

        // Render presets at start
        renderToriawasePresets();

        // Sophisticated analysis engine for toriawase
        const analyzeEnsemble = () => {
            const theme = document.getElementById('theme-input').value.toLowerCase();
            const scroll = document.getElementById('scroll-input').value;
            const bowl = document.getElementById('bowl-select').value;
            const caddy = document.getElementById('caddy-select').value;
            const vase = document.getElementById('vase-select').value;
            
            const notes = [];
            
            // Theme-based analysis
            if (theme.includes('autumn') || theme.includes('fall') || theme.includes('秋')) {
                notes.push("Autumn theme calls for warm earth tones. Consider maple leaf motifs on shifuku or russet-glazed pieces.");
                if (bowl === 'Ido') notes.push("The golden undertones of Ido complement autumn perfectly—its kairagi evokes dried grasses.");
                if (vase === 'Bronze hanging') notes.push("Bronze hanaire with pampas grass (susuki) captures autumn's metallic light.");
            }
            if (theme.includes('moon') || theme.includes('月')) {
                notes.push("Moon viewing demands restraint—let negative space echo lunar quietude.");
                if (bowl === 'Raku') notes.push("Black Raku (kuro-raku) creates a void-like depth, perfect for moon contemplation.");
            }
            if (theme.includes('spring') || theme.includes('春')) {
                notes.push("Spring welcomes color—consider e-Shino with plum blossom underglaze or fresh green Oribe.");
                if (vase === 'Bamboo (node-cut)') notes.push("Fresh-cut bamboo with early wildflowers (violets, yamabuki) embodies spring's emergence.");
            }
            if (theme.includes('memorial') || theme.includes('追善')) {
                notes.push("Memorial gatherings require solemn dignity. Avoid playful or asymmetric pieces.");
                if (bowl === 'Tenmoku') notes.push("Tenmoku's formality and Buddhist origins make it ideal for memorial services.");
            }
            
            // Scroll-based guidance
            const scrollAnalysis = {
                '一期一会': "This scroll demands ultimate sincerity. Every choice should emphasize the unrepeatable nature of this moment. Avoid anything that feels contrived or decorative.",
                '日々是好日': "'Every day is a good day' invites appreciation of the ordinary. Choose humble, well-used pieces that show the beauty of daily practice.",
                '和敬清寂': "The four principles of tea require perfect balance. Each utensil should embody one aspect: harmony (soft glazes), respect (proper proportions), purity (clean lines), tranquility (subdued colors).",
                '松風': "'Pine wind' evokes nature's voice. Emphasize natural materials—unglazed stoneware, bamboo, rough silk.",
                '雲水': "'Clouds and water' suggests flow and impermanence. Pieces with movement in their glazes or organic forms resonate.",
                '無': "The character for 'nothingness' requires maximum restraint. Strip the ensemble to essentials—perhaps only black and earth tones."
            };
            
            // Check for exact scroll matches first
            for (const [key, value] of Object.entries(scrollAnalysis)) {
                if (scroll.includes(key)) {
                    notes.push(value);
                    break;
                }
            }
            
            // If no exact match, analyze scroll content
            if (!notes.some(n => n.includes('scroll'))) {
                if (scroll.includes('心') || scroll.includes('kokoro')) {
                    notes.push("References to 'heart/mind' call for pieces that reveal inner character—visible clay body, natural ash deposits, honest construction.");
                } else if (scroll.includes('水') || scroll.includes('mizu')) {
                    notes.push("Water imagery pairs with pieces showing fluidity—Chosen Karatsu with its running glazes or Hagi with its milky pooling.");
                } else if (scroll.includes('mountain') || scroll.includes('山')) {
                    notes.push("Mountain themes suggest stability and weathering. Bizen or Shigaraki with their crusty, geological surfaces fit perfectly.");
                } else if (scroll.length > 0) {
                    notes.push("Consider how the scroll's brushwork energy relates to your utensils—bold calligraphy can handle decorated pieces, while delicate writing needs quiet companions.");
                }
            }
            
            // Bowl-specific insights
            const bowlInsights = {
                'Ido': {
                    'Chaire': "Ido with chaire creates a Korean-Chinese dialogue—ensure the shifuku bridges these aesthetics with subdued geometry.",
                    'Natsume': "Ido's rusticity can overwhelm delicate natsume. Choose a robust shape with confident lacquer.",
                    'season': "Ido works year-round but excels in autumn when its warm tones match the season."
                },
                'Raku': {
                    'Chaire': "Raku and chaire represent the ultimate wabi pairing—both shaped by Rikyū's vision. Let nothing distract from this historical resonance.",
                    'Natsume': "Raku with natsume risks being too 'Sen school orthodox'—add an unexpected element elsewhere.",
                    'season': "Black Raku deepens winter gatherings; red Raku warms spring dawn ceremonies."
                },
                'Tenmoku': {
                    'Chaire': "Both being karamono, ensure variety—if using yuteki tenmoku, choose a quieter chaire shape.",
                    'Natsume': "Tenmoku's formality clashes with casual natsume unless the theme specifically calls for such contrast.",
                    'season': "Tenmoku's depth suits winter's introspection and formal New Year gatherings."
                },
                'Shino': {
                    'Chaire': "Shino's softness complements chaire's strength—the feldspathic white creates breathing room around the dark stoneware.",
                    'Natsume': "Both being 'soft' aesthetics, add structure elsewhere—perhaps a bold kakejiku or geometric shifuku.",
                    'season': "Shino evokes snow and suits winter, but e-Shino with underglaze painting can celebrate any season."
                },
                'Oribe': {
                    'Chaire': "Oribe's dynamism can fight with elaborate chaire. Choose simple katatsuki form to ground Oribe's energy.",
                    'Natsume': "Oribe and decorated natsume together risk visual chaos—one should be plain.",
                    'season': "Green Oribe resonates with fresh growth—ideal for late spring into summer."
                },
                'Hagi': {
                    'Chaire': "Hagi's transformation through use pairs beautifully with well-traveled chaire showing genuine patina.",
                    'Natsume': "Both invite gentle handling—this combination suits intimate gatherings among close friends.",
                    'season': "Hagi's warmth suits autumn; its 'seven transformations' philosophy fits New Year reflection."
                },
                'Karatsu': {
                    'Chaire': "Korean-influenced Karatsu with Chinese-style chaire creates pan-Asian dialogue—very sophisticated when done right.",
                    'Natsume': "Robust Karatsu can anchor refined natsume—good contrast of folk and urban aesthetics.",
                    'season': "E-garatsu's iron brushwork suits autumn; plain Karatsu works year-round."
                }
            };
            
            if (bowlInsights[bowl]) {
                if (bowlInsights[bowl][caddy]) {
                    notes.push(bowlInsights[bowl][caddy]);
                }
            }
            
            // Vase harmony
            const vaseNotes = {
                'Bamboo (node-cut)': {
                    formal: "Single-node bamboo hanaire maintains tea room's rustic vocabulary while adding organic verticality.",
                    flowers: "Seasonal wildflowers or single camellia branch—never compete with the scroll's message."
                },
                'Ceramic (Shigaraki)': {
                    formal: "Shigaraki's crusty surface and natural ash deposits echo the randomness of nature within controlled space.",
                    flowers: "Can handle bolder arrangements—autumn grasses or spring branches with movement."
                },
                'Bronze hanging': {
                    formal: "Bronze usubata adds temple gravitas—perfect for memorial or highly formal gatherings.",
                    flowers: "Demands elegant restraint—single peony, lotus pod, or pine branch."
                }
            };
            
            if (vaseNotes[vase]) {
                notes.push(vaseNotes[vase].formal);
            }
            
            // Cross-reference checks
            if (bowl === 'Oribe' && vase === 'Bronze hanging') {
                notes.push("⚠️ Oribe's playfulness conflicts with bronze formality—reconsider unless intentionally juxtaposing.");
            }
            if (bowl === 'Tenmoku' && vase === 'Bamboo (node-cut)') {
                notes.push("Tenmoku's Chinese elegance with rustic bamboo creates interesting tension—ensure scroll unifies them.");
            }
            if (caddy === 'Natsume' && theme.includes('memorial')) {
                notes.push("⚠️ Natsume (usucha) may be too casual for memorial—consider switching to chaire for koicha service.");
            }
            
            // General principles
            if (notes.length < 3) {
                notes.push("Remember: one focal point per gathering. If the scroll is powerful, subdue utensils. If featuring a special bowl, choose a quiet scroll.");
            }
            
            // Seasonal awareness
            const month = new Date().getMonth();
            const seasonalHint = [
                "January calls for auspicious motifs—pine, bamboo, plum (shō-chiku-bai).",
                "February's plum blossoms inspire hope before spring—consider red accents.",
                "March celebrates Girls' Day—shell-shaped pieces or soft colors appropriate.",
                "April's cherry blossoms demand restraint—let one sakura reference suffice.",
                "May's fresh tea (shincha) deserves celebration—consider pieces with tea plant motifs.",
                "June's rain (tsuyu) invites water themes—rain dragon patterns or 'wet' glazes.",
                "July's heat calls for visual coolness—glass or pale ceramics, water-themed scrolls.",
                "August's Obon remembrance suits subdued palettes and memorial themes.",
                "September's moon viewing is paramount—ensure nothing competes with lunar contemplation.",
                "October's colored leaves inspire warm palettes—rust, gold, and crimson welcomed.",
                "November's tea year begins with kuchikiri—use your finest, most treasured pieces.",
                "December's winter solstice calls for depth—dark glazes and candlelit intimacy."
            ];
            notes.push(seasonalHint[month]);
            
            const notesContainer = document.getElementById('context-notes');
            notesContainer.innerHTML = notes.map(n => `<li>${n}</li>`).join('');
        };
        
        // Add event listeners
        document.getElementById('theme-input').addEventListener('input', analyzeEnsemble);
        document.getElementById('scroll-input').addEventListener('input', analyzeEnsemble);
        document.getElementById('bowl-select').addEventListener('change', analyzeEnsemble);
        document.getElementById('caddy-select').addEventListener('change', analyzeEnsemble);
        document.getElementById('vase-select').addEventListener('change', analyzeEnsemble);
        
        analyzeEnsemble(); // Initial analysis (compose panel)
        // Default view: presets tab active
        if (tabPresets) {
            applyActiveTabStyles(tabPresets);
            showPresets();
        }
    }

    function setupModal() {
        const modal = document.getElementById('modal');
        const modalClose = document.getElementById('modal-close');
        const modalBody = document.getElementById('modal-body');
        
        if (!modal) {
            console.error('Modal element not found');
            return;
        }
        
        if (modalClose) {
            modalClose.addEventListener('click', () => {
                modal.classList.remove('show');
            });
        } else {
            console.error('Modal close button not found');
        }
        
        modal.addEventListener('click', (e) => {
            if (e.target === modal) {
                modal.classList.remove('show');
            }
        });
    }
    
    function openModal(data) {
        const modal = document.getElementById('modal');
        const modalBody = document.getElementById('modal-body');
        
        modalBody.innerHTML = `
            <h3 class="text-2xl font-bold mb-2">${data.title}</h3>
            ${data.subtitle ? `<p class="text-gray-600 mb-4">${data.subtitle}</p>` : ''}
            <div class="prose max-w-none">
                <p>${data.content}</p>
            </div>
            ${data.footer ? `<div class="mt-6 pt-4 border-t border-gray-200 text-sm text-gray-600">${data.footer}</div>` : ''}
        `;
        
        modal.classList.add('show');
    }
    
    // Translator function - make it global so buttons can access it
    window.translateTerm = function(input) {
        const normalize = (s) => (s || '')
            .toString()
            .toLowerCase()
            .normalize('NFD')
            .replace(/[\u0300-\u036f]/g, '') // strip combining marks
            .replace(/[ōŌ]/g, 'o')
            .replace(/[ūŪ]/g, 'u')
            .replace(/[āĀ]/g, 'a')
            .replace(/[īĪ]/g, 'i')
            .replace(/[ēĒ]/g, 'e')
            .replace(/[\s\-]/g, '');

        const searchTermRaw = (input || '').trim();
        const searchTerm = normalize(searchTermRaw);
        const resultDiv = document.getElementById('translator-result');
        
        // Update input field if called from button
        const inputField = document.getElementById('translator-input');
        if (inputField && inputField.value !== input) {
            inputField.value = input;
        }
        
        // Search through comprehensive dictionary
        const results = TRANSLATION_DICTIONARY.filter(entry => {
            const jp = (entry.japanese || '').toString();
            const ro = normalize(entry.romaji || '');
            const en = normalize(entry.english || '');
            const exp = normalize(entry.explanation || '');
            // For Japanese search, use raw (don't normalize away kanji)
            return jp.includes(searchTermRaw) || 
                   ro.includes(searchTerm) || 
                   en.includes(searchTerm) ||
                   exp.includes(searchTerm);
        });
        
        if (results.length > 0) {
            let html = '<div class="space-y-3">';
            results.forEach(result => {
                html += `
                    <div class="border-l-4 pl-3" style="border-color: var(--zen-accent);">
                        <div class="flex flex-wrap items-baseline gap-2 mb-1">
                            <span class="text-xl font-bold">${result.japanese}</span>
                            <span class="text-sm" style="color: var(--zen-text-light);">${result.romaji}</span>
                            <span class="text-sm font-medium">${result.english}</span>
                        </div>
                        <p class="text-sm" style="color: var(--zen-text);">${result.explanation}</p>
                    </div>
                `;
            });
            html += '</div>';
            resultDiv.innerHTML = html;
        } else {
            resultDiv.innerHTML = `
                <p class="text-sm text-gray-500">No results for "${searchTermRaw}".</p>
                <p class="text-xs text-gray-400 mt-2">Try Japanese (茶碗), romaji (chawan/chadō), or English (tea bowl). Macrons aren’t required.</p>
            `;
        }
    }

    // Setup translator
    function setupTranslator() {
        const input = document.getElementById('translator-input');
        if (!input) {
            console.error('Translator input not found');
            return;
        }
        
        let debounceTimer;
        
        // Handle input events
        input.addEventListener('input', function(e) {
            clearTimeout(debounceTimer);
            const value = e.target.value.trim();
            
            debounceTimer = setTimeout(function() {
                if (value) {
                    window.translateTerm(value);
                } else {
                    const resultDiv = document.getElementById('translator-result');
                    if (resultDiv) {
                        resultDiv.innerHTML = '<p class="text-sm text-gray-500">Your translation will appear here...</p>';
                    }
                }
            }, 300);
        });
        
        // Also handle Enter key for immediate search
        input.addEventListener('keypress', function(e) {
            if (e.key === 'Enter') {
                clearTimeout(debounceTimer);
                const value = e.target.value.trim();
                if (value) {
                    window.translateTerm(value);
                }
            }
        });
    }
</script>
</body>
</html>]]></content><author><name>Yichen Han</name><email>yichen.han@campus.lmu.de</email></author><category term="culture" /><category term="japanese-aesthetics" /><category term="tea-ceremony" /><summary type="html"><![CDATA[An interactive exploration of the profound bond between Japanese Zen temples and Chanoyu—the Way of Tea.]]></summary></entry></feed>